Documentation ¶
Index ¶
- Constants
- Variables
- func WaitForDroplet(droplet *Droplet) error
- type Account
- func (account *Account) CachedImages() (hash map[int]string, e error)
- func (account *Account) CachedRegions() (hash map[int]string, e error)
- func (account *Account) CachedSizes() (hash map[int]string, e error)
- func (account *Account) CreateDroplet(droplet *Droplet) (out *Droplet, e error)
- func (account *Account) DefaultDroplet() (droplet *Droplet)
- func (account *Account) DestroyDroplet(id int) (*EventResponse, error)
- func (self *Account) Droplets() (droplets []*Droplet, e error)
- func (a *Account) GetDroplet(id int) (*Droplet, error)
- func (self *Account) GetImage(id int) (image *Image, e error)
- func (account *Account) ImageName(i int) string
- func (self *Account) Images() (images []*Image, e error)
- func (a *Account) RebuildDroplet(id int, imageId int) (*EventResponse, error)
- func (account *Account) RegionName(i int) string
- func (self *Account) Regions() (regions []*Region, e error)
- func (a *Account) RenameDroplet(id int, name string) (*EventResponse, error)
- func (account *Account) SizeName(i int) string
- func (account *Account) Sizes() (sizes []*Size, e error)
- func (account *Account) SshKeys() (keys []*SshKey, e error)
- type Config
- type Droplet
- type DropletResponse
- type DropletsResponse
- type ErrorResponse
- type EventResponse
- type GenericResponse
- type Image
- type ImageResponse
- type ImagesReponse
- type Region
- type RegionResponse
- type Size
- type SizeResponse
- type SshKey
- type SshKeysResponse
Constants ¶
View Source
const ( VERSION = "0.1.3" IMAGE_UBUNTU_13_04_64BIT = 350076 REGION_SF1 = 3 SIZE_512M = 66 )
View Source
const API_ROOT = "https://api.digitalocean.com"
Variables ¶
View Source
var (
GITCOMMIT string
)
View Source
var Plans = []*gocloud.Plan{ {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 0.7}, MemoryInMB: 512, Cores: 1, DiskInGB: 20, TrafficInTB: 1}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 1.5}, MemoryInMB: 1 * megaToGiga, Cores: 1, DiskInGB: 30, TrafficInTB: 2}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 3}, MemoryInMB: 2 * megaToGiga, Cores: 2, DiskInGB: 40, TrafficInTB: 3}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 6}, MemoryInMB: 4 * megaToGiga, Cores: 2, DiskInGB: 60, TrafficInTB: 4}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 11.9}, MemoryInMB: 8 * megaToGiga, Cores: 4, DiskInGB: 80, TrafficInTB: 5}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 23.8}, MemoryInMB: 16 * megaToGiga, Cores: 8, DiskInGB: 160, TrafficInTB: 6}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 47.6}, MemoryInMB: 32 * megaToGiga, Cores: 12, DiskInGB: 320, TrafficInTB: 7}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 70.5}, MemoryInMB: 48 * megaToGiga, Cores: 16, DiskInGB: 480, TrafficInTB: 8}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 94.1}, MemoryInMB: 64 * megaToGiga, Cores: 20, DiskInGB: 640, TrafficInTB: 9}, {Price: &gocloud.Price{PerHour: true, Currency: gocloud.USD, Amount: 141.1}, MemoryInMB: 96 * megaToGiga, Cores: 24, DiskInGB: 960, TrafficInTB: 10}, }
Functions ¶
func WaitForDroplet ¶
Types ¶
type Account ¶
type Account struct { Name string ApiKey string SshKey int ClientId string RegionId int SizeId int ImageId int // contains filtered or unexported fields }
func LoadAccount ¶
func NewAccount ¶
func (*Account) CachedImages ¶
func (*Account) CachedRegions ¶
func (*Account) CreateDroplet ¶
func (*Account) DefaultDroplet ¶
func (*Account) DestroyDroplet ¶
func (account *Account) DestroyDroplet(id int) (*EventResponse, error)
func (*Account) RebuildDroplet ¶
func (a *Account) RebuildDroplet(id int, imageId int) (*EventResponse, error)
func (*Account) RegionName ¶
func (*Account) RenameDroplet ¶
func (a *Account) RenameDroplet(id int, name string) (*EventResponse, error)
type Droplet ¶
type Droplet struct { Id int `json:"id"` ImageId int `json:"image_id"` SizeId int `json:"size_id"` RegionId int `json:"region_id"` Name string `json:"name"` IpAddress string `json:"ip_address"` Locked bool `json:"locked"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` SshKey int *Account }
func (*Droplet) PowerOnDroplet ¶
func (droplet *Droplet) PowerOnDroplet() (out *EventResponse, e error)
func (*Droplet) ShutdownDroplet ¶
func (droplet *Droplet) ShutdownDroplet() (out *EventResponse, e error)
type DropletResponse ¶
type DropletsResponse ¶
type ErrorResponse ¶
type EventResponse ¶
type GenericResponse ¶
type ImageResponse ¶
type ImagesReponse ¶
type RegionResponse ¶
type SizeResponse ¶
type SshKeysResponse ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.