Documentation ¶
Index ¶
- type API
- func (a *API) AddKey(ctx context.Context, name, key string) (int, error)
- func (a *API) CreateDroplet(ctx context.Context, name string, sshKeyID int, userdata string) (*godo.Droplet, error)
- func (a *API) CreateImage(ctx context.Context, name, url string) (*godo.Image, 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) CreateDroplet ¶
func (*API) CreateImage ¶ added in v0.20.0
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 }
Click to show internal directories.
Click to hide internal directories.