Documentation ¶
Overview ¶
Package linode provides complete bindings to the Linode API.
Index ¶
- Constants
- func Bool(b bool) *bool
- func Int(i int) *int
- func String(s string) *string
- type AccInfo
- type Client
- func (c *Client) AccountEstimateInvoice(mode string, term *int, planID *int, linodeID *int) (EstimatedInvoice, error)
- func (c *Client) AccountInfo() (AccInfo, error)
- func (c *Client) AvailDatacenters() ([]Datacenter, error)
- func (c *Client) AvailDistributions(distributionID *int) ([]Distribution, error)
- func (c *Client) AvailKernels(kernelID *int, isXen *bool) ([]Kernel, error)
- func (c *Client) AvailLinodePlans(planID *int) ([]LinodePlan, error)
- func (c *Client) AvailStackScripts(distID *int, distVendor *string, keywords *string) ([]StackScript, error)
- func (c *Client) DomainCreate(domain string, Type string, conf DomainCreateOpts) (domainID int, err error)
- func (c *Client) DomainDelete(domainID int) error
- func (c *Client) DomainList(domainID *int) ([]Domain, error)
- func (c *Client) DomainResourceCreate(domainID int, rType string, conf DomainResourceCreateOpts) (resourceID int, err error)
- func (c *Client) DomainResourceDelete(domainID int, resourceID int) error
- func (c *Client) DomainResourceList(domainID int, resourceID *int) ([]DomainResource, error)
- func (c *Client) DomainResourceUpdate(resourceID int, conf DomainResourceUpdateOpts) error
- func (c *Client) DomainUpdate(domainID int, conf DomainUpdateOpts) error
- func (c *Client) ImageDelete(imgID int) error
- func (c *Client) ImageList(imgID *int, pendingOnly *bool) ([]Image, error)
- func (c *Client) ImageUpdate(imgID int, label *string, description *string) error
- func (c *Client) LinodeBoot(linodeID int, configID *int) (jobID int, err error)
- func (c *Client) LinodeClone(linodeID int, datacenterID int, planID int, term *int, hypervisor *string) (cloneLinodeID int, err error)
- func (c *Client) LinodeConfigCreate(linodeID int, kernelID int, label string, diskList string, ...) (configID int, err error)
- func (c *Client) LinodeConfigDelete(linodeID int, configID int) error
- func (c *Client) LinodeConfigList(linodeID int, configID *int) ([]LinodeConfig, error)
- func (c *Client) LinodeConfigUpdate(configID int, conf LinodeConfigUpdateOpts) error
- func (c *Client) LinodeCreate(datacenterID int, planID int, term *int) (linodeID int, err error)
- func (c *Client) LinodeDelete(linodeID int, skipChecks *bool) error
- func (c *Client) LinodeDiskCreate(linodeID int, label string, dType string, size int) (jobID int, diskID int, err error)
- func (c *Client) LinodeDiskCreateFromDistribution(linodeID int, distID int, label string, size int, rootPass string, ...) (jobID int, diskID int, err error)
- func (c *Client) LinodeDiskCreateFromImage(imageID int, linodeID int, label string, size *int, rootPass *string, ...) (jobID int, diskID int, err error)
- func (c *Client) LinodeDiskCreateFromStackScript(linodeID int, ssID int, ssUDFResp string, distID int, label string, size int, ...) (jobID int, diskID int, err error)
- func (c *Client) LinodeDiskDelete(linodeID int, diskID int) (jobID int, err error)
- func (c *Client) LinodeDiskDuplicate(linodeID int, diskID int) (jobID int, nDiskID int, err error)
- func (c *Client) LinodeDiskImagize(linodeID int, diskID int, description *string, label *string) (jobID int, imageID int, err error)
- func (c *Client) LinodeDiskList(linodeID int, diskID *int) ([]LinodeDisk, error)
- func (c *Client) LinodeDiskResize(linodeID int, diskID int, size int) (jobID int, err error)
- func (c *Client) LinodeDiskUpdate(linodeID int, diskID int, label *string, readOnly *bool) error
- func (c *Client) LinodeIPAddPrivate(linodeID int) (ipID int, ipAddr string, err error)
- func (c *Client) LinodeIPList(linodeID *int, ipID *int) ([]LinodeIP, error)
- func (c *Client) LinodeIPSwap(ipID int, withIPID *int, toLinodeID *int) error
- func (c *Client) LinodeJobList(linodeID int, jobID *int, pendingOnly *bool) ([]LinodeJob, error)
- func (c *Client) LinodeList(linodeID *int) ([]Linode, error)
- func (c *Client) LinodeReboot(linodeID int, configID *int) (jobID int, err error)
- func (c *Client) LinodeResize(linodeID int, planID int) error
- func (c *Client) LinodeShutdown(linodeID int) (jobID int, err error)
- func (c *Client) LinodeUpdate(linodeID int, conf LinodeOpts) error
- func (c *Client) NodeBalancerConfigCreate(nbID int, conf NodeBalancerConfigCreateOpts) (confID int, err error)
- func (c *Client) NodeBalancerConfigDelete(nbID int, confID int) error
- func (c *Client) NodeBalancerConfigList(nbID int, confID *int) ([]NodeBalancerConfig, error)
- func (c *Client) NodeBalancerConfigUpdate(confID int, conf NodeBalancerConfigUpdateOpts) error
- func (c *Client) NodeBalancerCreate(datacenterID int, label *string, throttle *int) (nbID int, err error)
- func (c *Client) NodeBalancerDelete(nbID int) error
- func (c *Client) NodeBalancerList(nbID *int) ([]NodeBalancer, error)
- func (c *Client) NodeBalancerNodeCreate(confID int, label string, address string, weight *int, mode *string) (nodeID int, err error)
- func (c *Client) NodeBalancerNodeDelete(nodeID int) error
- func (c *Client) NodeBalancerNodeList(confID int, nodeID *int) ([]NodeBalancerNode, error)
- func (c *Client) NodeBalancerNodeUpdate(nodeID int, label *string, address *string, weight *int, mode *string) error
- func (c *Client) NodeBalancerUpdate(nbID int, label *string, throttle *int) error
- func (c *Client) StackScriptCreate(label string, distIDList string, script string, description *string, ...) (ssID int, err error)
- func (c *Client) StackScriptDelete(ssID int) error
- func (c *Client) StackScriptList(ssID *int) ([]StackScript, error)
- func (c *Client) StackScriptUpdate(ssID int, label *string, description *string, distIDList *string, ...) error
- func (c *Client) TestEcho() error
- func (c *Client) UserGetAPIKey(username string, password string, token *string, expires *int, label *string) (apiKey string, err error)
- func (c *Client) WaitForAllJobs(linodeID int, checkInterval time.Duration, timeout time.Duration) error
- func (c *Client) WaitForJob(linodeID int, jobID int, checkInterval time.Duration, timeout time.Duration) (ok bool, err error)
- type Datacenter
- type Distribution
- type Domain
- type DomainCreateOpts
- type DomainResource
- type DomainResourceCreateOpts
- type DomainResourceUpdateOpts
- type DomainUpdateOpts
- type EstimatedInvoice
- type Image
- type Kernel
- type Linode
- type LinodeConfig
- type LinodeConfigCreateOpts
- type LinodeConfigUpdateOpts
- type LinodeDisk
- type LinodeIP
- type LinodeJob
- type LinodeOpts
- type LinodePlan
- type NodeBalancer
- type NodeBalancerConfig
- type NodeBalancerConfigCreateOpts
- type NodeBalancerConfigUpdateOpts
- type NodeBalancerNode
- type StackScript
Constants ¶
const (
// Linode API URL.
BaseURL = "https://api.linode.com/"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccInfo ¶
type AccInfo struct { ActiveSince string `json:"ACTIVE_SINCE"` TransferPool int `json:"TRANSFER_POOL"` TransferUsed int `json:"TRANSFER_USED"` TransferBillable int `json:"TRANSFER_BILLABLE"` Managed bool `json:"MANAGED"` Balance float64 `json:"BALANCE"` BillingMethod string `json:"BILLING_METHOD"` }
AccInfo is the API response to the 'account.info' call.
type Client ¶
type Client struct { URL string // contains filtered or unexported fields }
Client is the API client. It should be created by a call to NewClient().
func (*Client) AccountEstimateInvoice ¶
func (c *Client) AccountEstimateInvoice(mode string, term *int, planID *int, linodeID *int) (EstimatedInvoice, error)
AccountEstimateInvoice maps to the 'account.estimateinvoice' call.
func (*Client) AccountInfo ¶
AccountInfo maps to the 'account.info' call.
func (*Client) AvailDatacenters ¶
func (c *Client) AvailDatacenters() ([]Datacenter, error)
AvailDatacenters maps to the 'avail.datacenters' call.
func (*Client) AvailDistributions ¶
func (c *Client) AvailDistributions(distributionID *int) ([]Distribution, error)
AvailDistributions maps to the 'avail.distributions' call.
func (*Client) AvailKernels ¶
AvailKernels maps to the 'avail.kernels' call.
func (*Client) AvailLinodePlans ¶
func (c *Client) AvailLinodePlans(planID *int) ([]LinodePlan, error)
AvailLinodePlans maps to the 'avail.linodeplans' call.
func (*Client) AvailStackScripts ¶
func (c *Client) AvailStackScripts(distID *int, distVendor *string, keywords *string) ([]StackScript, error)
AvailStackScripts maps to the 'avail.stackscripts' call.
func (*Client) DomainCreate ¶
func (c *Client) DomainCreate(domain string, Type string, conf DomainCreateOpts) (domainID int, err error)
DomainCreate maps to the 'domain.create' call.
func (*Client) DomainDelete ¶
DomainDelete maps to the 'domain.delete' call.
func (*Client) DomainList ¶
DomainList maps to the 'domain.list' call.
func (*Client) DomainResourceCreate ¶
func (c *Client) DomainResourceCreate(domainID int, rType string, conf DomainResourceCreateOpts) (resourceID int, err error)
DomainResourceCreate maps to the 'domain.resource.create' call.
NOTE: The TTL passed is not respected by the API. It must be set to one of: 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, or 2419200.
func (*Client) DomainResourceDelete ¶
DomainResourceDelete maps to the "domain.resource.delete" call.
func (*Client) DomainResourceList ¶
func (c *Client) DomainResourceList(domainID int, resourceID *int) ([]DomainResource, error)
DomainResourceList maps to the 'domain.resource.list' call.
func (*Client) DomainResourceUpdate ¶
func (c *Client) DomainResourceUpdate(resourceID int, conf DomainResourceUpdateOpts) error
DomainResourceUpdate maps to the 'domain.resource.update' call.
func (*Client) DomainUpdate ¶
func (c *Client) DomainUpdate(domainID int, conf DomainUpdateOpts) error
DomainUpdate maps to the 'domain.update' call.
func (*Client) ImageDelete ¶
ImageDelete maps to the 'image.delete' call.
func (*Client) ImageUpdate ¶
ImageUpdate maps to the 'image.update' call.
func (*Client) LinodeBoot ¶
LinodeBoot maps to the 'linode.boot' call.
func (*Client) LinodeClone ¶
func (c *Client) LinodeClone(linodeID int, datacenterID int, planID int, term *int, hypervisor *string) (cloneLinodeID int, err error)
LinodeClone maps to the 'linode.clone' call.
func (*Client) LinodeConfigCreate ¶
func (c *Client) LinodeConfigCreate(linodeID int, kernelID int, label string, diskList string, conf LinodeConfigCreateOpts) (configID int, err error)
LinodeConfigCreate maps to the 'linode.config.create' call.
func (*Client) LinodeConfigDelete ¶
LinodeConfigDelete maps to the 'linode.config.delete' call.
func (*Client) LinodeConfigList ¶
func (c *Client) LinodeConfigList(linodeID int, configID *int) ([]LinodeConfig, error)
LinodeConfigList maps to the 'linode.config.list' call.
func (*Client) LinodeConfigUpdate ¶
func (c *Client) LinodeConfigUpdate(configID int, conf LinodeConfigUpdateOpts) error
LinodeConfigUpdate maps to the 'linode.config.update' call.
func (*Client) LinodeCreate ¶
LinodeCreate maps to the 'linode.create' call.
func (*Client) LinodeDelete ¶
LinodeDelete maps to the 'linode.delete' call.
func (*Client) LinodeDiskCreate ¶
func (c *Client) LinodeDiskCreate(linodeID int, label string, dType string, size int) (jobID int, diskID int, err error)
LinodeDiskCreate maps to the 'linode.disk.create' call.
func (*Client) LinodeDiskCreateFromDistribution ¶
func (c *Client) LinodeDiskCreateFromDistribution(linodeID int, distID int, label string, size int, rootPass string, rootSSHKey *string) (jobID int, diskID int, err error)
LinodeDiskCreateFromDistribution maps to the 'linode.disk.createfromdistribution' call.
https://www.linode.com/api/linode/linode.disk.createfromdistribution
func (*Client) LinodeDiskCreateFromImage ¶
func (c *Client) LinodeDiskCreateFromImage(imageID int, linodeID int, label string, size *int, rootPass *string, rootSSHKey *string) (jobID int, diskID int, err error)
LinodeDiskCreateFromImage maps to the 'linode.disk.createfromimage' call.
https://www.linode.com/api/linode/linode.disk.createfromimage
func (*Client) LinodeDiskCreateFromStackScript ¶
func (c *Client) LinodeDiskCreateFromStackScript(linodeID int, ssID int, ssUDFResp string, distID int, label string, size int, rootPass string, rootSSHKey *string) (jobID int, diskID int, err error)
LinodeDiskCreateFromStackScript maps to the 'linode.disk.createfromstackscript' call.
https://www.linode.com/api/linode/linode.disk.createfromstackscript
func (*Client) LinodeDiskDelete ¶
LinodeDiskDelete maps to the 'linode.disk.delete' call.
func (*Client) LinodeDiskDuplicate ¶
LinodeDiskDuplicate maps to the 'linode.disk.duplicate' call.
func (*Client) LinodeDiskImagize ¶
func (c *Client) LinodeDiskImagize(linodeID int, diskID int, description *string, label *string) (jobID int, imageID int, err error)
LinodeDiskImagize maps to the 'linode.disk.imagize' call.
func (*Client) LinodeDiskList ¶
func (c *Client) LinodeDiskList(linodeID int, diskID *int) ([]LinodeDisk, error)
LinodeDiskList maps to the 'linode.disk.list' call.
func (*Client) LinodeDiskResize ¶
LinodeDiskResize maps to the 'linode.disk.resize' call.
func (*Client) LinodeDiskUpdate ¶
LinodeDiskUpdate maps to the 'linode.disk.update' call.
func (*Client) LinodeIPAddPrivate ¶
LinodeIPAddPrivate maps to the 'linode.ip.addprivate' call.
func (*Client) LinodeIPList ¶
LinodeIPList maps to the 'linode.ip.list' call.
func (*Client) LinodeIPSwap ¶
LinodeIPSwap maps to the 'linode.ip.swap' call.
func (*Client) LinodeJobList ¶
LinodeJobList maps to the 'linode.job.list' call.
func (*Client) LinodeList ¶
LinodeList maps to the 'linode.list' call.
func (*Client) LinodeReboot ¶
LinodeReboot maps to the 'linode.reboot' call.
func (*Client) LinodeResize ¶
LinodeResize maps to the 'linode.resize' call.
func (*Client) LinodeShutdown ¶
LinodeShutdown maps to the 'linode.shutdown' call.
func (*Client) LinodeUpdate ¶
func (c *Client) LinodeUpdate(linodeID int, conf LinodeOpts) error
LinodeUpdate maps to the 'linode.update' call.
func (*Client) NodeBalancerConfigCreate ¶
func (c *Client) NodeBalancerConfigCreate(nbID int, conf NodeBalancerConfigCreateOpts) (confID int, err error)
NodeBalancerConfigCreate maps to the 'nodebalancer.config.create' call.
https://www.linode.com/api/nodebalancer/nodebalancer.config.create
func (*Client) NodeBalancerConfigDelete ¶
NodeBalancerConfigDelete maps to the 'nodebalancer.config.delete' call.
https://www.linode.com/api/nodebalancer/nodebalancer.config.delete
func (*Client) NodeBalancerConfigList ¶
func (c *Client) NodeBalancerConfigList(nbID int, confID *int) ([]NodeBalancerConfig, error)
NodeBalancerConfigList maps to the 'nodebalancer.config.list' call.
https://www.linode.com/api/nodebalancer/nodebalancer.config.list
func (*Client) NodeBalancerConfigUpdate ¶
func (c *Client) NodeBalancerConfigUpdate(confID int, conf NodeBalancerConfigUpdateOpts) error
NodeBalancerConfigUpdate maps to the 'nodebalancer.config.update' call.
https://www.linode.com/api/nodebalancer/nodebalancer.config.update
func (*Client) NodeBalancerCreate ¶
func (c *Client) NodeBalancerCreate(datacenterID int, label *string, throttle *int) (nbID int, err error)
NodeBalancerCreate maps to the 'nodebalancer.create' call.
func (*Client) NodeBalancerDelete ¶
NodeBalancerDelete maps to the 'nodebalancer.delete' call.
func (*Client) NodeBalancerList ¶
func (c *Client) NodeBalancerList(nbID *int) ([]NodeBalancer, error)
NodeBalancerList maps to the 'nodebalancer.list' call.
func (*Client) NodeBalancerNodeCreate ¶
func (c *Client) NodeBalancerNodeCreate(confID int, label string, address string, weight *int, mode *string) (nodeID int, err error)
NodeBalancerNodeCreate maps to the 'nodebalancer.node.create' call.
https://www.linode.com/api/nodebalancer/nodebalancer.node.create
func (*Client) NodeBalancerNodeDelete ¶
NodeBalancerNodeDelete maps to the 'nodebalancer.node.delete' call.
https://www.linode.com/api/nodebalancer/nodebalancer.node.delete
func (*Client) NodeBalancerNodeList ¶
func (c *Client) NodeBalancerNodeList(confID int, nodeID *int) ([]NodeBalancerNode, error)
NodeBalancerNodeList maps to the 'nodebalancer.node.list' call.
https://www.linode.com/api/nodebalancer/nodebalancer.node.list
func (*Client) NodeBalancerNodeUpdate ¶
func (c *Client) NodeBalancerNodeUpdate(nodeID int, label *string, address *string, weight *int, mode *string) error
NodeBalancerNodeUpdate maps to the 'nodebalancer.node.update' call.
https://www.linode.com/api/nodebalancer/nodebalancer.node.update
func (*Client) NodeBalancerUpdate ¶
NodeBalancerUpdate maps to the 'nodebalancer.update' call.
func (*Client) StackScriptCreate ¶
func (c *Client) StackScriptCreate(label string, distIDList string, script string, description *string, isPublic *bool, revNote *string) (ssID int, err error)
StackScriptCreate maps to the 'stackscript.create' call.
func (*Client) StackScriptDelete ¶
StackScriptDelete maps to the 'stackscript.delete' call.
func (*Client) StackScriptList ¶
func (c *Client) StackScriptList(ssID *int) ([]StackScript, error)
StackScriptList maps to the 'stackscript.list' call.
func (*Client) StackScriptUpdate ¶
func (c *Client) StackScriptUpdate(ssID int, label *string, description *string, distIDList *string, isPublic *bool, revNote *string, script *string) error
StackScriptUpdate maps to the 'stackscript.update' call.
func (*Client) TestEcho ¶
TestEcho maps to the 'test.echo' call. It has hardcoded arguments (foo:bar). It can be used to test your API key.
func (*Client) UserGetAPIKey ¶
func (c *Client) UserGetAPIKey(username string, password string, token *string, expires *int, label *string) (apiKey string, err error)
UserGetAPIKey maps to the 'user.getapikey' call. It is used to generate an API key from your Linode Manager credentials.
Token is required if you have enabled 2-factor auth.
Expires is the number of hours an API key will be valid for, from 0-8760 hours. The default (if you pass in nil) is 168 hours. If you pass 0, the key will never expire.
func (*Client) WaitForAllJobs ¶
func (c *Client) WaitForAllJobs(linodeID int, checkInterval time.Duration, timeout time.Duration) error
WaitForAllJobs waits for all jobs on the passed Linode to be completed.
Error will be non-nil if there is an API error, or the timeout is reached.
func (*Client) WaitForJob ¶
func (c *Client) WaitForJob(linodeID int, jobID int, checkInterval time.Duration, timeout time.Duration) (ok bool, err error)
WaitForJob will wait for the specified jobID to complete, checking every checkInterval up to the timeout.
Ok indicates whether the job was successful or not.
Error will only be non-nil if the timeout is reached, there is an API error, or the passed job doesn't exist.
type Datacenter ¶
type Datacenter struct { ID int `json:"DATACENTERID"` Location string `json:"LOCATION"` Abbr string `json:"ABBR"` }
Datacenter is the API response to the 'avail.datacenters' call.
type Distribution ¶
type Distribution struct { Is64Bit bool `mapstructure:"IS64BIT"` Label string `mapstructure:"LABEL"` MinImageSize int `mapstructure:"MINIMAGESIZE"` ID int `mapstructure:"DISTRIBUTIONID"` CreateDT string `mapstructure:"CREATE_DT"` RequiresPVOps bool `mapstructure:"REQUIRESPVOPSKERNEL"` }
Distribution is the API repsonse to the 'avail.distributions' call.
type Domain ¶
type Domain struct { ID int `mapstructure:"DOMAINID"` Description string `mapstructure:"DESCRIPTION"` Type string `mapstructure:"TYPE"` Status int `mapstructure:"STATUS"` SOAEmail string `mapstructure:"SOA_EMAIL"` Domain string `mapstructure:"DOMAIN"` RetrySec int `mapstructure:"RETRY_SEC"` MasterIPs string `mapstructure:"MASTER_IPS"` AXFRIPs string `mapstructure:"AXFR_IPS"` ExpireSec int `mapstructure:"EXPIRE_SEC"` RefreshSec int `mapstructure:"REFRESH_SEC"` TTLSec int `mapstructure:"TTL_SEC"` DisplayGroup string `mapstructure:"LPM_DISPLAYGROUP"` }
Domain is the API response to the 'domain.list' call.
type DomainCreateOpts ¶
type DomainCreateOpts struct { Description *string `args:"Description"` SOAEmail *string `args:"SOA_Email"` RefreshSec *int `args:"Refresh_sec"` RetrySec *int `args:"Retry_sec"` ExpireSec *int `args:"Expire_sec"` TTLSec *int `args:"TTL_sec"` DisplayGroup *string `args:"lpm_displayGroup"` Status *int `args:"status"` MasterIPs *string `args:"master_ips"` AXFRIPs *string `args:"axfr_ips"` }
DomainCreateOpts contains the optional arguments to DomainCreate().
type DomainResource ¶
type DomainResource struct { Protocol string `mapstructure:"PROTOCOL"` TTLSec int `mapstructure:"TTL_SEC"` Priority int `mapstructure:"PRIORITY"` Type string `mapstructure:"TYPE"` Target string `mapstructure:"TARGET"` Weight int `mapstructure:"WEIGHT"` ID int `mapstructure:"RESOURCEID"` Port int `mapstructure:"PORT"` DomainID int `mapstructure:"DOMAINID"` Name string `mapstructure:"NAME"` }
DomainResource is the API response to the 'domain.resource.list' call.
type DomainResourceCreateOpts ¶
type DomainResourceCreateOpts struct { Name *string `args:"Name"` Target *string `args:"Target"` Priority *int `args:"Priority"` Weight *int `args:"Weight"` Protocol *string `args:"Protocol"` TTLSec *int `args:"TTL_sec"` Port *int `args:"Port"` }
DomainResourceCreateOpts contains the optional arguments to DomainResourceCreate().
type DomainResourceUpdateOpts ¶
type DomainResourceUpdateOpts struct { DomainID *int `args:"DomainID"` Name *string `args:"Name"` Target *string `args:"Target"` Priority *int `args:"Priority"` Weight *int `args:"Weight"` Port *int `args:"Port"` Protocol *string `args:"Protocol"` TTLSec *int `args:"TTL_sec"` }
DomainResourceUpdateOpts contains the optional arguments to DomainResourceUpdate().
type DomainUpdateOpts ¶
type DomainUpdateOpts struct { Domain *string `args:"Domain"` Type *string `args:"Type"` SOAEmail *string `args:"SOA_Email"` RefreshSec *int `args:"Refresh_sec"` RetrySec *int `args:"Retry_sec"` ExpireSec *int `args:"Expire_sec"` TTLSec *int `args:"TTL_sec"` DisplayGroup *string `args:"lpm_displayGroup"` Status *int `args:"status"` MasterIPs *string `args:"master_ips"` AXFRIPs *string `args:"axfr_ips"` }
DomainUpdateOpts contains the optional arguments to DomainUpdate().
type EstimatedInvoice ¶
EstimatedInvoice is the API response to the 'account.estimateinvoice' call.
type Image ¶
type Image struct { CreateDT string `mapstructure:"CREATE_DT"` Creator string `mapstructure:"CREATOR"` Description string `mapstructure:"DESCRIPTION"` FSType string `mapstructure:"FS_TYPE"` ID int `mapstructure:"IMAGEID"` IsPublic bool `mapstructure:"ISPUBLIC"` Label string `mapstructure:"LABEL"` LastUsedDT string `mapstructure:"LAST_USED_DT"` MinSize int `mapstructure:"MINSIZE"` Status string `mapstructure:"STATUS"` Type string `mapstructure:"TYPE"` }
Image is the API response to the 'image.list' call.
type Kernel ¶
type Kernel struct { Label string `mapstructure:"LABEL"` IsXen bool `mapstructure:"ISXEN"` IsPVOps bool `mapstructure:"ISPVOPS"` ID int `mapstructure:"KERNELID"` }
Kernel is the API response to the 'avail.kernels' call.
type Linode ¶
type Linode struct { TotalXfer int `mapstructure:"TOTALXFER"` BackupsEnabled bool `mapstructure:"BACKUPSENABLED"` Watchdog bool `mapstructure:"WATCHDOG"` DisplayGroup string `mapstructure:"LPM_DISPLAYGROUP"` Status int `mapstructure:"STATUS"` TotalRAM int `mapstructure:"TOTALRAM"` BackupWindow int `mapstructure:"BACKUPWINDOW"` Label string `mapstructure:"LABEL"` BackupWeeklyDay int `mapstructure:"BACKUPWEEKLYDAY"` DatacenterID int `mapstructure:"DATACENTERID"` TotalHD int `mapstructure:"TOTALHD"` ID int `mapstructure:"LINODEID"` CreateDT string `mapstructure:"CREATE_DT"` PlanID int `mapstructure:"PLANID"` DistVendor string `mapstructure:"DISTRIBUTIONVENDOR"` AlertBWQuotaEnabled bool `mapstructure:"ALERT_BWQUOTA_ENABLED"` AlertBWQuotaThreshold int `mapstructure:"ALERT_BWQUOTA_THRESHOLD"` AlertDiskIOEnabled bool `mapstructure:"ALERT_DISKIO_ENABLED"` AlertDiskIOThreshold int `mapstructure:"ALERT_DISKIO_THRESHOLD"` AlertCPUEnabled bool `mapstructure:"ALERT_CPU_ENABLED"` AlertCPUThreshold int `mapstructure:"ALERT_CPU_THRESHOLD"` AlertBWInEnabled bool `mapstructure:"ALERT_BWIN_ENABLED"` AlertBWInThreshold int `mapstructure:"ALERT_BWIN_THRESHOLD"` AlertBWOutEnabled bool `mapstructure:"ALERT_BWOUT_ENABLED"` AlertBWOutThreshold int `mapstructure:"ALERT_BWOUT_THRESHOLD"` }
Linode is the API response to the 'linode.list' call.
type LinodeConfig ¶
type LinodeConfig struct { RootDeviceCustom string `mapstructure:"RootDeviceCustom"` Comments string `mapstructure:"Comments"` IsRescue bool `mapstructure:"isRescue"` DevTmpFSAutomount bool `mapstructure:"devtmpfs_automount"` HelperDistro bool `mapstructure:"helper_distro"` HelperDisableUpdateDB bool `mapstructure:"helper_disableUpdateDB"` Label string `mapstructure:"label"` HelperNetwork bool `mapstructure:"helper_network"` ID int `mapstructure:"ConfigID"` DiskList string `mapstructure:"DiskList"` RootDeviceRO bool `mapstructure:"RootDeviceRO"` RunLevel string `mapstructure:"RunLevel"` RootDeviceNum int `mapstructure:"RootDeviceNum"` HelperXen bool `mapstructure:"helper_xen"` RAMLimit int `mapstructure:"RAMLimit"` VirtMode string `mapstructure:"virt_mode"` LinodeID int `mapstructure:"LinodeID"` HelperDepmod bool `mapstructure:"helper_depmod"` KernelID int `mapstructure:"KernelID"` }
LinodeConfig is the API response to the 'linode.config.list' call.
type LinodeConfigCreateOpts ¶
type LinodeConfigCreateOpts struct { Comments *string `args:"Comments"` RAMLimit *int `args:"RAMLimit"` VirtMode *string `args:"virt_mode"` RunLevel *string `args:"RunLevel"` RootDeviceNum *int `args:"RootDeviceNum"` RootDeviceCustom *string `args:"RootDeviceCustom"` RootDeviceRO *bool `args:"RootDeviceRO"` HelperDisableUpdateDB *bool `args:"helper_disableUpdateDB"` HelperDistro *bool `args:"helper_distro"` HelperXen *bool `args:"helper_xen"` HelperDepmod *bool `args:"helper_depmod"` HelperNetwork *bool `args:"helper_network"` DevTmpFSAutomount *bool `args:"devtmpfs_automount"` }
LinodeConfigCreateOpts contains the optional arguments to LinodeConfigCreate().
type LinodeConfigUpdateOpts ¶
type LinodeConfigUpdateOpts struct { LinodeID *int `args:"LinodeID"` KernelID *int `args:"KernelID"` Comments *string `args:"Comments"` RAMLimit *int `args:"RAMLimit"` VirtMode *string `args:"virt_mode"` RunLevel *string `args:"RunLevel"` RootDeviceNum *int `args:"RootDeviceNum"` RootDeviceCustom *string `args:"RootDeviceCustom"` RootDeviceRO *bool `args:"RootDeviceRO"` HelperDisableUpdateDB *bool `args:"helper_disableUpdateDB"` HelperDistro *bool `args:"helper_distro"` HelperXen *bool `args:"helper_xen"` HelperDepmod *bool `args:"helper_depmod"` HelperNetwork *bool `args:"helper_network"` DevTmpFSAutomount *bool `args:"devtmpfs_automount"` }
LinodeConfigUpdateOpts contains the optional arguments to LinodeConfigUpdate().
type LinodeDisk ¶
type LinodeDisk struct { UpdateDT string `mapstructure:"UPDATE_DT"` ID int `mapstructure:"DISKID"` Label string `mapstructure:"LABEL"` Type string `mapstructure:"TYPE"` LinodeID int `mapstructure:"LINODEID"` IsReadOnly bool `mapstructure:"ISREADONLY"` Status int `mapstructure:"STATUS"` CreateDT string `mapstructure:"CREATE_DT"` Size int `mapstructure:"SIZE"` }
LinodeDisk is the API response to the 'linode.disk.list' call.
type LinodeIP ¶
type LinodeIP struct { LinodeID int `mapstructure:"LINODEID"` IsPublic bool `mapstructure:"ISPUBLIC"` Address string `mapstructure:"IPADDRESS"` RDNSName string `mapstructure:"RDNS_NAME"` ID int `mapstructure:"IPADDRESSID"` }
LinodeIP is the API response to the 'linode.ip.list' call.
type LinodeJob ¶
type LinodeJob struct { EnteredDT string `mapstructure:"ENTERED_DT"` Action string `mapstructure:"ACTION"` Label string `mapstructure:"LABEL"` HostStartDT string `mapstructure:"HOST_START_DT"` LinodeID int `mapstructure:"LINODEID"` HostFinishDT string `mapstructure:"HOST_FINISH_DT"` Duration int `mapstructure:"DURATION"` HostMessage string `mapstructure:"HOST_MESSAGE"` ID int `mapstructure:"JOBID"` HostSuccess bool `mapstructure:"HOST_SUCCESS"` }
LinodeJob is the API response to the 'linode.job.list' call.
type LinodeOpts ¶
type LinodeOpts struct { Label *string `args:"label"` DisplayGroup *string `args:"lpm_displayGroup"` AlertCPUEnabled *bool `args:"Alert_cpu_enabled"` AlertCPUThreshold *int `args:"Alert_cpu_threshold"` AlertDiskIOEnabled *bool `args:"Alert_diskio_enabled"` AlertDiskIOThreshold *int `args:"Alert_diskio_threshold"` AlertBWInEnabled *bool `args:"Alert_bwin_enabled"` AlertBWInThreshold *int `args:"Alert_bwin_threshold"` AlertBWOutEnabled *bool `args:"Alert_bwout_enabled"` AlertBWOutThreshold *int `args:"Alert_bwout_threshold"` AlertBWQuotaEnabled *bool `args:"Alert_bwquota_enabled"` AlertBWQuotaThreshold *int `args:"Alert_bwquota_threshold"` BackupWindow *int `args:"backupWindow"` BackupWeeklyDay *int `args:"backupWeeklyDay"` Watchdog *bool `args:"watchdog"` }
LinodeOpts contains the optional arguments to LinodeUpdate().
type LinodePlan ¶
type LinodePlan struct { Cores int `json:"CORES"` Price float64 `json:"PRICE"` RAM int `json:"RAM"` Xfer int `json:"XFER"` ID int `json:"PLANID"` Label string `json:"LABEL"` Disk int `json:"DISK"` Hourly float64 `json:"HOURLY"` }
LinodePlan is the API response to the 'avail.linodeplans' call.
type NodeBalancer ¶
type NodeBalancer struct { ID int `json:"NODEBALANCERID"` Label string `json:"LABEL"` DatacenterID int `json:"DATACENTERID"` Hostname string `json:"HOSTNAME"` IPv4Addr string `json:"ADDRESS4"` IPv6Addr string `json:"ADDRESS6"` Throttle int `json:"CLIENTCONNTHROTTLE"` }
NodeBalancer is the API response to the 'nodebalancer.list' call.
type NodeBalancerConfig ¶
type NodeBalancerConfig struct { Stickiness string `mapstructure:"STICKINESS"` CheckPath string `mapstructure:"CHECK_PATH"` Port int `mapstructure:"PORT"` CheckBody string `mapstructure:"CHECK_BODY"` Check string `mapstructure:"CHECK"` CheckInterval int `mapstructure:"CHECK_INTERVAL"` Protocol string `mapstructure:"PROTOCOL"` ID int `mapstructure:"CONFIGID"` Algorithm string `mapstructure:"ALGORITHM"` CheckTimeout int `mapstructure:"CHECK_TIMEOUT"` NodeBalancerID int `mapstructure:"NODEBALANCERID"` CheckAttempts int `mapstructure:"CHECK_ATTEMPTS"` CheckPassive bool `mapstructure:"CHECK_PASSIVE"` SSLFingerprint string `mapstructure:"SSL_FINGERPRINT"` SSLCommonName string `mapstructure:"SSL_COMMONNAME"` }
NodeBalancerConfig is the API response to the 'nodebalancer.config.list' call.
type NodeBalancerConfigCreateOpts ¶
type NodeBalancerConfigCreateOpts struct { Port *int `args:"Port"` Protocol *string `args:"Protocol"` Algorithm *string `args:"Algorithm"` Stickiness *string `args:"Stickiness"` Check *string `args:"check"` CheckInterval *int `args:"check_interval"` CheckTimeout *int `args:"check_timeout"` CheckAttempts *int `args:"check_attempts"` CheckPath *string `args:"check_path"` CheckBody *string `args:"check_body"` CheckPassive *bool `args:"check_passive,int"` SSLCert *string `args:"ssl_cert"` SSLKey *string `args:"ssl_key"` }
NodeBalancerConfigCreateOpts contains the optional arguments to NodeBalancerConfigCreate().
type NodeBalancerConfigUpdateOpts ¶
type NodeBalancerConfigUpdateOpts struct { Port *int `args:"Port"` Protocol *string `args:"Protocol"` Algorithm *string `args:"Algorithm"` Stickiness *string `args:"Stickiness"` Check *string `args:"check"` CheckInterval *int `args:"check_interval"` CheckTimeout *int `args:"check_timeout"` CheckAttempts *int `args:"check_attempts"` CheckPath *string `args:"check_path"` CheckBody *string `args:"check_body"` CheckPassive *bool `args:"check_passive,int"` SSLCert *string `args:"ssl_cert"` SSLKey *string `args:"ssl_key"` }
NodeBalancerConfigUpdateOpts contains the optional arguments to NodeBalancerConfigUpdate().
type NodeBalancerNode ¶
type NodeBalancerNode struct { Weight int `mapstructure:"WEIGHT"` Address string `mapstructure:"ADDRESS"` Label string `mapstructure:"LABEL"` ID int `mapstructure:"NODEID"` Mode string `mapstructure:"MODE"` Status string `mapstructure:"STATUS"` NodeBalancerID int `mapstructure:"NODEBALANCERID"` ConfigID int `mapstructure:"CONFIGID"` }
NodeBalancerNode is the API response to the 'nodebalancer.node.list' call.
type StackScript ¶
type StackScript struct { Script string `mapstructure:"SCRIPT"` Description string `mapstructure:"DESCRIPTION"` DistIDList string `mapstructure:"DISTRIBUTIONIDLIST"` Label string `mapstructure:"LABEL"` TotalDeploys int `mapstructure:"DEPLOYMENTSTOTAL"` LatestRev int `mapstructure:"LATESTREV"` CreateDT string `mapstructure:"CREATE_DT"` ActiveDeploys int `mapstructure:"DEPLOYMENTSACTIVE"` ID int `mapstructure:"STACKSCRIPTID"` RevNote string `mapstructure:"REV_NOTE"` RevDT string `mapstructure:"REV_DT"` IsPublic bool `mapstructure:"ISPUBLIC"` UserID int `mapstructure:"USERID"` }
StackScript is the API response to the 'stackscript.list' and 'avail.stackscripts' calls.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
_third_party
|
|
mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
|
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure. |
testify
Package testify is a set of packages that provide many tools for testifying that your code will behave as you intend.
|
Package testify is a set of packages that provide many tools for testifying that your code will behave as you intend. |
testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
|
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. |
testify/http
A set of tools to make testing http activity using the Go testing system easier.
|
A set of tools to make testing http activity using the Go testing system easier. |
testify/mock
Provides a system by which it is possible to mock your objects and verify calls are happening as expected.
|
Provides a system by which it is possible to mock your objects and verify calls are happening as expected. |
testify/require
Alternative testing tools which stop test execution if test failed.
|
Alternative testing tools which stop test execution if test failed. |
testify/suite
The suite package contains logic for creating testing suite structs and running the methods on those structs as tests.
|
The suite package contains logic for creating testing suite structs and running the methods on those structs as tests. |