Documentation
¶
Index ¶
Constants ¶
View Source
const TokenHeader = "token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DOToken ¶
type DOToken struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` RefreshToken string `json:"refresh_token"` Scope string `json:"scope"` Info Info `json:"info"` }
DOToken is the response of the OAUTH for Digital Ocean
type Droplet ¶
type Droplet struct { ID int `json:"id"` Name string `json:"name"` Region string `json:"region"` InstanceName string `json:"instance_name"` OperatingSystem string `json:"operating_system"` IPV6 bool `json:"ipv6,omitempty"` PrivateNetworking bool `json:"private_networking"` Networks Networks `json:"networks"` SSHKeys []Key `json:"ssh_keys"` }
Droplet represents a droplet inside Digital Ocean
type DropletRequest ¶
type DropletRequest struct { Name string `json:"name"` Region string `json:"region"` Size string `json:"size"` Image string `json:"image"` Backups bool `json:"backups"` IPv6 bool `json:"ipv6"` PrivateNetworking bool `json:"private_networking"` UserData string `json:"user_data,omitempty"` SSHKeys []Key `json:"ssh_keys"` }
DropletRequest is the request used to create a droplet in Digital Ocean
type Info ¶
type Info struct { Name string `json:"name"` Email string `json:"email"` UUID string `json:"uuid"` }
Info is the user information in a OAUTH requests from Digital Ocean
type Key ¶
type Key struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` PublicKey string `json:"public_key,omitempty"` }
Key represents an SSH key
type NetworkV4 ¶
type NetworkV4 struct { IPAddress string `json:"ip_address,omitempty"` Netmask string `json:"netmask,omitempty"` Gateway string `json:"gateway,omitempty"` Type string `json:"type,omitempty"` }
NetworkV4 represents a V4 network
type NetworkV6 ¶
type NetworkV6 struct { IPAddress string `json:"ip_address,omitempty"` Netmask int `json:"netmask,omitempty"` Gateway string `json:"gateway,omitempty"` Type string `json:"type,omitempty"` }
NetworkV6 The representation of a V6 network
Click to show internal directories.
Click to hide internal directories.