Documentation ¶
Index ¶
- func GenerateFakeKey() (string, error)
- 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) 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) 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 ¶
func GenerateFakeKey ¶
GenerateFakeKey generates a SSH key pair, returns the public key, and discards the private key. This is useful for droplets that don't need a public key, since DO insists on requiring one.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
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 }
Click to show internal directories.
Click to hide internal directories.