Documentation ¶
Index ¶
- type Client
- func (client *Client) Domains() (*DomainsResponse, error)
- func (client *Client) Droplet(idOrSlug string) (*DropletResponse, error)
- func (client *Client) DropletDelete(idOrSlug string) error
- func (client *Client) Droplets() (*DropletsResponse, error)
- func (client *Client) Image(idOrSlug string) (*ImageResponse, error)
- func (client *Client) Images(page int) (*ImagesResponse, error)
- func (client *Client) Keys() (*KeysResponse, error)
- func (c *Client) RebootDroplet(id string) error
- func (client *Client) Regions() (*RegionsResponse, error)
- type CreateDroplet
- type Domain
- type DomainsResponse
- type Droplet
- type DropletResponse
- type DropletsList
- type DropletsResponse
- type Image
- type ImageResponse
- type ImagesResponse
- type Kernel
- type KeysResponse
- type Meta
- type Network
- type Networks
- type Region
- type RegionsResponse
- type Size
- type SizesResponse
- type SshKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewFromEnv ¶
func (*Client) Domains ¶
func (client *Client) Domains() (*DomainsResponse, error)
func (*Client) DropletDelete ¶
func (*Client) Droplets ¶
func (client *Client) Droplets() (*DropletsResponse, error)
func (*Client) Keys ¶
func (client *Client) Keys() (*KeysResponse, error)
func (*Client) RebootDroplet ¶
func (*Client) Regions ¶
func (client *Client) Regions() (*RegionsResponse, error)
type CreateDroplet ¶
type CreateDroplet struct { Name string `json:"name,omitempty"` // required Region string `json:"region,omitempty"` // required Size string `json:"size,omitempty"` // required Image string `json:"image,omitempty"` // required SshKeys []string `json:"ssh_keys,omitempty"` Backups bool `json:"backups,omitempty"` IPv6 bool `json:"ipv6,omitempty"` PrivateNetworking bool `json:"private_networking,omitempty"` UserData string `json:"user_data,omitempty"` }
func (*CreateDroplet) Execute ¶
func (c *CreateDroplet) Execute(client *Client) (*DropletResponse, error)
type DomainsResponse ¶
type Droplet ¶
type Droplet struct { Id int `json:"id,omitempty"` Name string `json:"name,omitempty"` Region *Region `json:"region,omitempty"` Image *Image `json:"image,omitempty"` Size *Size `json:"size,omitempty"` SizeSlug string `json:"size_slug,omitempty"` Locked bool `json:"locked,omitempty"` Status string `json:"status,omitempty"` Networks *Networks `json:"networks,omitempty"` Kernel *Kernel `json:"kernel,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` BackupIds []int64 `json:"backup_ids,omitempty"` SnapshotIds []int64 `json:"snapshot_ids,omitempty"` ActionIds []int64 `json:"action_ids,omitempty"` }
type DropletResponse ¶
type DropletResponse struct {
Droplet *Droplet `json:"droplet,omitempty"`
}
type DropletsList ¶
type DropletsList struct { }
type DropletsResponse ¶
type Image ¶
type Image struct { Id int `json:"id,omitempty"` Name string `json:"name,omitempty"` Distribution string `json:"distribution,omitempty"` Slug string `json:"slug,omitempty"` Public bool `json:"public,omitempty"` Regions []string `json:"regions,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` }
type ImageResponse ¶
type ImageResponse struct {
Image *Image `json:"image,omitempty"`
}
type ImagesResponse ¶
type KeysResponse ¶
type KeysResponse struct {
SshKeys []*SshKey `json:"ssh_keys"`
}
type RegionsResponse ¶
type RegionsResponse struct {
Regions []*Region `json:"regions,omitempty"`
}
type Size ¶
type Size struct { Slug string `json:"slug,omitempty"` Memory int `json:"memory,omitempty"` VCpus int `json:"v_cpus,omitempty"` Disk int `json:"disk,omitempty"` Transfer interface{} `json:"transfer,omitempty"` PriceMonthley float64 `json:"price_monthley,omitempty"` PriceHourly float64 `json:"price_hourly,omitempty"` Regions []string `json:"regions,omitempty"` }
type SizesResponse ¶
type SizesResponse struct {
Sizes []*Size `json:"sizes,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.