digitalocean

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DO

type DO struct {
	Config *config.Config
}

func (DO) CreateVM

func (d DO) CreateVM(name, os, size, region, sshkey string) (string, error)

func (DO) DestroyVM

func (d DO) DestroyVM(id string) error

func (DO) GetAllVMs

func (d DO) GetAllVMs() (data []provider.VM, err error)

func (DO) GetConfig

func (d DO) GetConfig() *config.Config

func (DO) GetInstalledSshKeys

func (d DO) GetInstalledSshKeys() (data []provider.SshKey, err error)

func (DO) GetProviderName

func (d DO) GetProviderName() string

func (DO) InstallNewSshKey

func (d DO) InstallNewSshKey(name, key string) (string, error)

func (DO) Sleep

func (d DO) Sleep()

func (DO) StartVM

func (d DO) StartVM(id string) error

func (DO) UpdateSshKey

func (d DO) UpdateSshKey(id, name, key string) (string, error)

type Droplet

type Droplet struct {
	Id     int      `json:"id"`
	Name   string   `json:"name"`
	Status string   `json:"status"`
	Region Region   `json:"region"`
	OS     Image    `json:"image"`
	IP     Networks `json:"networks"`
}

type Droplets

type Droplets struct {
	Droplets []Droplet `json:"droplets"`
}

type Image

type Image struct {
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Distro string `json:"distribution"`
	Slug   string `json:"slug"`
}

type NetworkV4

type NetworkV4 struct {
	IP   string `json:"ip_address"`
	Type string `json:"type"`
}

type Networks

type Networks struct {
	V4 []NetworkV4 `json:"v4"`
}

type Region

type Region struct {
	Slug string `json:"slug"`
	Name string `json:"name"`
}

type SshKey

type SshKey struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Key         string `json:"public_key"`
	Fingerprint string `json:"fingerprint"`
}

type SshKeys

type SshKeys struct {
	Keys []SshKey `json:"ssh_keys"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL