Documentation
¶
Index ¶
- type API
- func (a *API) AddKey(ctx context.Context, name, key string) (int, error)
- func (a *API) CreateCustomImage(ctx context.Context, name string, url string) (*godo.Image, error)
- func (a *API) CreateDroplet(ctx context.Context, name string, sshKeyID int, userdata string) (*godo.Droplet, error)
- func (a *API) DeleteDroplet(ctx context.Context, dropletID int) error
- func (a *API) DeleteImage(ctx context.Context, imageID int) error
- func (a *API) DeleteKey(ctx context.Context, keyID int) error
- func (a *API) GC(ctx context.Context, gracePeriod time.Duration) error
- func (a *API) GetDroplet(ctx context.Context, dropletID int) (*godo.Droplet, error)
- func (a *API) GetUserImage(ctx context.Context, imageName string, inRegion bool) (*godo.Image, error)
- func (a *API) ListKeys(ctx context.Context) ([]godo.Key, error)
- func (a *API) PreflightCheck(ctx context.Context) error
- func (a *API) SnapshotDroplet(ctx context.Context, dropletID int, name string) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CreateCustomImage ¶
func (*API) CreateDroplet ¶
func (*API) GetDroplet ¶
func (*API) GetUserImage ¶
type Options ¶
type Options struct {
*platform.Options
// Config file. Defaults to $HOME/.config/digitalocean.json.
ConfigPath string
// Profile name
Profile string
// Personal access token (overrides config profile)
AccessToken string
// Region slug (e.g. "sfo2")
Region string
// Droplet size slug (e.g. "512mb")
Size string
// Numeric image ID, {alpha, beta, stable}, or user image name
Image string
// Whether to allocate an IPv6 address to the droplet.
DisableIPv6 bool
}
Click to show internal directories.
Click to hide internal directories.