Documentation ¶
Index ¶
- func AttachVolume(ctx context.Context, client *godo.Client, volID string, dropletID int) error
- func CreateDroplet(ctx context.Context, client *godo.Client, ...) error
- func CreateVolume(ctx context.Context, client *godo.Client, ...) error
- func DeleteDroplet(ctx context.Context, client *godo.Client, id int) error
- func DeleteVolume(ctx context.Context, client *godo.Client, id string) error
- func DetachVolume(ctx context.Context, client *godo.Client, volID string, dropletID int) error
- func ListDroplets(ctx context.Context, client *godo.Client) ([]godo.Droplet, error)
- func ListVolumes(ctx context.Context, client *godo.Client) ([]godo.Volume, error)
- func ResizeVolume(ctx context.Context, client *godo.Client, volID, region string, ...) error
- func UpdateDroplet(ctx context.Context, client *godo.Client, id int, action, value string) error
- type Droplet
- type GitDrops
- type Privileges
- type UserData
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachVolume ¶
AttachVolume attempts to attach a volume to a droplet
func CreateDroplet ¶
func CreateDroplet(ctx context.Context, client *godo.Client, dropletCreateRequest *godo.DropletCreateRequest) error
DeleteDroplet attempts to create droplet on DO by dropletCreateRequest
func CreateVolume ¶
func CreateVolume(ctx context.Context, client *godo.Client, volumeCreateRequest *godo.VolumeCreateRequest) error
CreateVolume attempts to create droplet on DO by dropletCreateRequest
func DeleteDroplet ¶
DeleteDroplet attempts to delete droplet from DO by ID
func DeleteVolume ¶
DeleteVolume attempts to delete volume from DO by ID
func DetachVolume ¶
AttachVolume attempts to attach a volume to a droplet
func ListDroplets ¶
ListDroplets lists all active droplets on DO account
func ListVolumes ¶
ListVolumes lists all active volumes on DO account
Types ¶
type Droplet ¶
type Droplet struct { Name string `yaml:"name"` Region string `yaml:"region"` Size string `yaml:"size"` // Image represents the image name for the droplet. It is the equivalient of // godo.DropletCreateRequest.Image.Slug Image string `yaml:"image"` // SSHKeyFingerprint represents the SSH key fingerprints for the droplet. // It is the equivalient of godo.DropletCreateRequest.[]SSHKeys.FingerPrint SSHKeyFingerprints []string `yaml:"sshKeyFingerprints"` Backups bool `yaml:"backups"` IPv6 bool `yaml:"ipv6"` Monitoring bool `yaml:"monitoring"` // See type UserData UserData UserData `yaml:"userData,omitempty"` // Volumes is a []string of the volume names to be attached to the droplet. Volumes []string `yaml:"volumes,omitempty"` Tags []string `yaml:"tags"` VPCUUID string `yaml:"vpcuuid,omitempty"` }
Droplet is a simplified gitdrops representation of godo.DropletCreateRequest
type GitDrops ¶
type GitDrops struct { Privileges Privileges `yaml:"privileges"` Droplets []Droplet `yaml:"droplets"` Volumes []Volume `yaml:"volumes"` }
func ReadGitDrops ¶
ReadGitDrops reads and unmarshals from gitdrops.yaml
type Privileges ¶
type UserData ¶
UserData stores the Path of a userdata file and/or the Data itself. In the event that path is defined, Data is populated with contents of the file at Path. Thus Path takes precedence over Data.
type Volume ¶
type Volume struct { Name string `yaml:"name"` Region string `yaml:"region"` SizeGigaBytes int64 `yaml:"sizeGigaBytes"` SnapshotID string `yaml:"snapShotID"` FilesystemType string `yaml:"filesystemType"` FilesystemLabel string `yaml:"filesystemLabel"` Tags []string `yaml:"tags"` }
Volume is a simplified gitdrops representation of godo.VolumeCreateRequest