Documentation ¶
Index ¶
- Variables
- func FormatJSON(unformattedJSON string) (string, error)
- func InitCreateWindow() *windowCreate
- type ArgsDo
- type DigitalOcean
- func (d *DigitalOcean) Create(name string, region string, size string, image string)
- func (d *DigitalOcean) Hide()
- func (d *DigitalOcean) ListDroplets() bool
- func (d *DigitalOcean) ListSSHKeyID() error
- func (d *DigitalOcean) NewDroplet(dd *godo.Droplet) *Droplet
- func (d *DigitalOcean) PowerOff(dropletID int) error
- func (d *DigitalOcean) PowerOn(dropletID int) error
- func (d *DigitalOcean) Ready() bool
- func (d *DigitalOcean) Show()
- func (d *DigitalOcean) Toggle()
- func (d *DigitalOcean) Update() bool
- type Droplet
- func (d *Droplet) Active() bool
- func (d *Droplet) Connect()
- func (d *Droplet) Destroy()
- func (d *Droplet) Exists() bool
- func (d *Droplet) GetDisk() string
- func (d *Droplet) GetIPv4() string
- func (d *Droplet) GetIPv6() string
- func (d *Droplet) GetImage() string
- func (d *Droplet) GetMemory() string
- func (d *Droplet) GetName() string
- func (d *Droplet) GetSize() string
- func (d *Droplet) GetStatus() string
- func (d *Droplet) HasIPv4() bool
- func (d *Droplet) HasIPv6() bool
- func (d *Droplet) Hide()
- func (d *Droplet) On() bool
- func (d *Droplet) PowerOff()
- func (d *Droplet) PowerOn()
- func (d *Droplet) Ready() bool
- func (d *Droplet) Show()
- func (d *Droplet) Update(dpoll *godo.Droplet)
Constants ¶
This section is empty.
Variables ¶
View Source
var INFO *log.LogFlag
View Source
var NOW *log.LogFlag
View Source
var POLL *log.LogFlag
Functions ¶
func FormatJSON ¶
formatJSON takes an unformatted JSON string and returns a formatted version.
func InitCreateWindow ¶
func InitCreateWindow() *windowCreate
This is initializes the main DO object You can only have one of these
Types ¶
type ArgsDo ¶
type ArgsDo struct {
DigitalOceanTimer int `arg:"--digitalocean-poll-interval" help:"how often to poll droplet status (default 60 seconds)"`
}
This struct can be used with the go-arg package
type DigitalOcean ¶
type DigitalOcean struct {
// contains filtered or unexported fields
}
func New ¶
func New(p *gui.Node) *DigitalOcean
This is initializes the main DO object You can only have one of these
func (*DigitalOcean) Create ¶
func (d *DigitalOcean) Create(name string, region string, size string, image string)
func (*DigitalOcean) Hide ¶
func (d *DigitalOcean) Hide()
func (*DigitalOcean) ListDroplets ¶
func (d *DigitalOcean) ListDroplets() bool
ListDroplets fetches and prints out the droplets along with their IPv4 and IPv6 addresses.
func (*DigitalOcean) ListSSHKeyID ¶
func (d *DigitalOcean) ListSSHKeyID() error
func (d *DigitalOcean) ListDroplets() bool {
func (*DigitalOcean) NewDroplet ¶
func (d *DigitalOcean) NewDroplet(dd *godo.Droplet) *Droplet
func (*DigitalOcean) PowerOff ¶
func (d *DigitalOcean) PowerOff(dropletID int) error
func (*DigitalOcean) PowerOn ¶
func (d *DigitalOcean) PowerOn(dropletID int) error
func (*DigitalOcean) Ready ¶
func (d *DigitalOcean) Ready() bool
Returns true if the status is valid
func (*DigitalOcean) Show ¶
func (d *DigitalOcean) Show()
func (*DigitalOcean) Toggle ¶ added in v0.20.2
func (d *DigitalOcean) Toggle()
func (*DigitalOcean) Update ¶
func (d *DigitalOcean) Update() bool
type Droplet ¶
type Droplet struct { ID int // contains filtered or unexported fields }
func (*Droplet) Show ¶
func (d *Droplet) Show()
type Droplet struct { ID int `json:"id,float64,omitempty"` Name string `json:"name,omitempty"` Memory int `json:"memory,omitempty"` Vcpus int `json:"vcpus,omitempty"` Disk int `json:"disk,omitempty"` Region *Region `json:"region,omitempty"` Image *Image `json:"image,omitempty"` Size *Size `json:"size,omitempty"` SizeSlug string `json:"size_slug,omitempty"` BackupIDs []int `json:"backup_ids,omitempty"` NextBackupWindow *BackupWindow `json:"next_backup_window,omitempty"` SnapshotIDs []int `json:"snapshot_ids,omitempty"` Features []string `json:"features,omitempty"` Locked bool `json:"locked,bool,omitempty"` Status string `json:"status,omitempty"` Networks *Networks `json:"networks,omitempty"` Created string `json:"created_at,omitempty"` Kernel *Kernel `json:"kernel,omitempty"` Tags []string `json:"tags,omitempty"` VolumeIDs []string `json:"volume_ids"` VPCUUID string `json:"vpc_uuid,omitempty"` }
Click to show internal directories.
Click to hide internal directories.