Documentation
¶
Index ¶
- Constants
- Variables
- func WaitForPendingJobs(client *Client, linodeid int)
- type AccountInfo
- type AccountInfoResponse
- type AccountInterface
- type AccountService
- type ApiInterface
- type ApiResponse
- type ApiService
- type AvailDataCentersResponse
- type AvailDistributionsResponse
- type AvailInterface
- type AvailService
- func (t *AvailService) DataCenters() (*AvailDataCentersResponse, error)
- func (t *AvailService) Distributions() (*AvailDistributionsResponse, error)
- func (t *AvailService) FilterKernels(isxen int, iskvm int) (*KernelsResponse, error)
- func (t *AvailService) Kernels(args map[string]string) (*KernelsResponse, error)
- func (t *AvailService) LinodePlans() (*LinodePlansResponse, error)
- func (t *AvailService) NodeBalancers() (*NodeBalancersResponse, error)
- func (t *AvailService) StackScripts() (*StackScriptsResponse, error)
- type Client
- type CustomBool
- type CustomBoolImpl
- type CustomShortTime
- type CustomString
- type CustomStringImpl
- type CustomTime
- type DataCenter
- type Disk
- type DiskJob
- type Distribution
- type Error
- type EstimateInvoice
- type EstimateInvoiceResponse
- type FullIPAddress
- type IPAddress
- type Image
- type ImageInterface
- type ImageResponse
- type ImageService
- type ImagesListResponse
- type Job
- type JobId
- type JobResponse
- type Kernel
- type KernelsResponse
- type Linode
- type LinodeConfig
- type LinodeConfigId
- type LinodeConfigInterface
- type LinodeConfigListResponse
- type LinodeConfigResponse
- type LinodeConfigService
- func (t *LinodeConfigService) Create(linodeId int, kernelId int, label string, args map[string]string) (*LinodeConfigResponse, error)
- func (t *LinodeConfigService) Delete(linodeId int, configId int) (*LinodeConfigResponse, error)
- func (t *LinodeConfigService) List(linodeId int, configId int) (*LinodeConfigListResponse, error)
- func (t *LinodeConfigService) Update(configId int, linodeId int, kernelId int, args map[string]string) (*LinodeConfigResponse, error)
- type LinodeDiskInterface
- type LinodeDiskJobResponse
- type LinodeDiskListResponse
- type LinodeDiskService
- func (t *LinodeDiskService) Create(linodeId int, diskType string, label string, size int, args map[string]string) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) CreateFromDistribution(distributionId int, linodeId int, label string, size int, ...) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) CreateFromImage(imageId int, linodeId int, label string, size int, args map[string]string) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) CreateFromStackscript(stackScriptId int, linodeId int, label string, stackScriptUDFResponses string, ...) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) Delete(linodeId int, diskId int) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) Duplicate(linodeId int, diskId int) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) Imagize(linodeId int, diskId int, description string, label string) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) List(linodeId int, diskId int) (*LinodeDiskListResponse, error)
- func (t *LinodeDiskService) Resize(linodeId int, diskId int, size int) (*LinodeDiskJobResponse, error)
- func (t *LinodeDiskService) Update(linodeId int, diskId int, label string, isReadOnly bool) (*LinodeDiskJobResponse, error)
- type LinodeIPAddress
- type LinodeIPAddressResponse
- type LinodeIPInterface
- type LinodeIPListResponse
- type LinodeIPService
- func (t *LinodeIPService) AddPrivate(linodeId int) (*LinodeIPAddressResponse, error)
- func (t *LinodeIPService) AddPublic(linodeId int) (*LinodeIPAddressResponse, error)
- func (t *LinodeIPService) List(linodeId int, ipAddressId int) (*LinodeIPListResponse, error)
- func (t *LinodeIPService) SetRDNS(ipAddressId int, hostname string) (*LinodeRDNSIPAddressResponse, error)
- func (t *LinodeIPService) Swap(ipAddressId int, withIPAddressId int, toLinodeId int) (*LinodeLinodeIPAddressResponse, error)
- type LinodeId
- type LinodeInterface
- type LinodeJobInterface
- type LinodeJobService
- type LinodeLinodeIPAddressResponse
- type LinodeNodeBalancer
- type LinodeNodeBalancerId
- type LinodePlan
- type LinodePlansResponse
- type LinodeRDNSIPAddressResponse
- type LinodeResponse
- type LinodeService
- func (t *LinodeService) Boot(linodeId int, configId int) (*JobResponse, error)
- func (t *LinodeService) Clone(linodeId int, dataCenterId int, planId int, paymentTerm int) (*LinodeResponse, error)
- func (t *LinodeService) Create(dataCenterId int, planId int, paymentTerm int) (*LinodeResponse, error)
- func (t *LinodeService) Delete(linodeId int, skipChecks bool) (*LinodeResponse, error)
- func (t *LinodeService) List(linodeId int) (*LinodesListResponse, error)
- func (t *LinodeService) Reboot(linodeId int, configId int) (*JobResponse, error)
- func (t *LinodeService) Resize(linodeId int, planId int) (*LinodeResponse, error)
- func (t *LinodeService) Shutdown(linodeId int) (*JobResponse, error)
- func (t *LinodeService) Update(linodeId int, args map[string]interface{}) (*LinodeResponse, error)
- type LinodeVolumeInterface
- type LinodeVolumeListResponse
- type LinodeVolumeResponse
- type LinodeVolumeService
- func (t *LinodeVolumeService) Clone(cloneFromId int, label string) (*LinodeVolumeResponse, error)
- func (t *LinodeVolumeService) Create(size int, label string, args map[string]string) (*LinodeVolumeResponse, error)
- func (t *LinodeVolumeService) Delete(volumeId int) (*LinodeVolumeResponse, error)
- func (t *LinodeVolumeService) List(volumeId int) (*LinodeVolumeListResponse, error)
- func (t *LinodeVolumeService) Update(volumeId int, args map[string]string) (*LinodeVolumeResponse, error)
- type LinodesJobListResponse
- type LinodesListResponse
- type NodeBalancer
- type NodeBalancerConfig
- type NodeBalancerConfigId
- type NodeBalancerConfigInterface
- type NodeBalancerConfigListResponse
- type NodeBalancerConfigResponse
- type NodeBalancerConfigService
- func (t *NodeBalancerConfigService) Create(nodeBalancerId int, args map[string]string) (*NodeBalancerConfigResponse, error)
- func (t *NodeBalancerConfigService) Delete(nodeBalancerId int, configId int) (*NodeBalancerConfigResponse, error)
- func (t *NodeBalancerConfigService) List(nodeBalancerId int, configId int) (*NodeBalancerConfigListResponse, error)
- func (t *NodeBalancerConfigService) Update(configId int, args map[string]string) (*NodeBalancerConfigResponse, error)
- type NodeBalancerInterface
- type NodeBalancerListResponse
- type NodeBalancerNode
- type NodeBalancerNodeId
- type NodeBalancerNodeInterface
- type NodeBalancerNodeListResponse
- type NodeBalancerNodeResponse
- type NodeBalancerNodeService
- func (t *NodeBalancerNodeService) Create(configId int, label string, address string, args map[string]string) (*NodeBalancerNodeResponse, error)
- func (t *NodeBalancerNodeService) Delete(nodeId int) (*NodeBalancerNodeResponse, error)
- func (t *NodeBalancerNodeService) List(configId int, nodeId int) (*NodeBalancerNodeListResponse, error)
- func (t *NodeBalancerNodeService) Update(NodeId int, args map[string]string) (*NodeBalancerNodeResponse, error)
- type NodeBalancerResponse
- type NodeBalancerService
- func (t *NodeBalancerService) Create(datacenterId int, label string, args map[string]string) (*NodeBalancerResponse, error)
- func (t *NodeBalancerService) Delete(nodeBalancerId int) (*NodeBalancerResponse, error)
- func (t *NodeBalancerService) List(nodeBalancerId int) (*NodeBalancerListResponse, error)
- func (t *NodeBalancerService) Update(nodeBalancerId int, args map[string]string) (*NodeBalancerResponse, error)
- type NodeBalancersResponse
- type RDNSIPAddress
- type Response
- type StackScript
- type StackScriptId
- type StackScriptInterface
- type StackScriptListResponse
- type StackScriptResponse
- type StackScriptService
- func (t *StackScriptService) Create(label, distributionIDList, script string, args map[string]string) (*StackScriptResponse, error)
- func (t *StackScriptService) Delete(scriptId int) (*StackScriptResponse, error)
- func (t *StackScriptService) List(scriptId int) (*StackScriptListResponse, error)
- func (t *StackScriptService) Update(scriptId int, args map[string]string) (*StackScriptResponse, error)
- type StackScriptsResponse
- type TestInterface
- type TestResponse
- type TestService
- type Volume
- type VolumeId
Constants ¶
const (
// API Client Version
ClientVersion = "0.1"
)
Variables ¶
Functions ¶
func WaitForPendingJobs ¶
expose a means to wait for a linode's pending jobs to complete
Types ¶
type AccountInfo ¶
type AccountInfo struct { AccountSince CustomTime `json:"ACTIVE_SINCE"` TransferPool int `json:"TRANSFER_POOL"` TransferUsed int `json:"TRANSFER_USED"` TransferBillable int `json:"TRANSFER_BILLABLE"` BillingMethod string `json:"BILLING_METHOD"` Managed bool `json:"MANAGED"` Balance float32 `json:"BALANCE"` }
type AccountInfoResponse ¶
type AccountInfoResponse struct { Response AccountInfo AccountInfo }
Response for account.info API
type AccountInterface ¶
type AccountInterface interface { EstimateInvoice(string, int, int, int) (*EstimateInvoiceResponse, error) Info() (*AccountInfoResponse, error) }
AccountService is an interface generated for "github.com/appscode/linodego".AccountService.
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
Account Service
func (*AccountService) EstimateInvoice ¶
func (t *AccountService) EstimateInvoice(mode string, planId int, paymentTerm int, linodeId int) (*EstimateInvoiceResponse, error)
Estimate Invoice
func (*AccountService) Info ¶
func (t *AccountService) Info() (*AccountInfoResponse, error)
Get Account Info
type ApiInterface ¶
type ApiInterface interface {
Spec(*ApiResponse) error
}
ApiService is an interface generated for "github.com/appscode/linodego".ApiService.
type ApiResponse ¶
Response for api.spec Service
type AvailDataCentersResponse ¶
type AvailDataCentersResponse struct { Response DataCenters []DataCenter }
Response for avail.datacenters API
type AvailDistributionsResponse ¶
type AvailDistributionsResponse struct { Response Distributions []Distribution }
Response for avail.distributions API
type AvailInterface ¶
type AvailInterface interface { DataCenters() (*AvailDataCentersResponse, error) Distributions() (*AvailDistributionsResponse, error) FilterKernels(int, int) (*KernelsResponse, error) Kernels(map[string]string) (*KernelsResponse, error) LinodePlans() (*LinodePlansResponse, error) NodeBalancers() (*NodeBalancersResponse, error) StackScripts() (*StackScriptsResponse, error) }
AvailService is an interface generated for "github.com/appscode/linodego".AvailService.
type AvailService ¶
type AvailService struct {
// contains filtered or unexported fields
}
Avail Service
func (*AvailService) DataCenters ¶
func (t *AvailService) DataCenters() (*AvailDataCentersResponse, error)
Get DataCenters
func (*AvailService) Distributions ¶
func (t *AvailService) Distributions() (*AvailDistributionsResponse, error)
Get Distributions
func (*AvailService) FilterKernels ¶
func (t *AvailService) FilterKernels(isxen int, iskvm int) (*KernelsResponse, error)
Get filtered Kernels
func (*AvailService) Kernels ¶
func (t *AvailService) Kernels(args map[string]string) (*KernelsResponse, error)
Get Kernels
func (*AvailService) LinodePlans ¶
func (t *AvailService) LinodePlans() (*LinodePlansResponse, error)
Get Linode Plans
func (*AvailService) NodeBalancers ¶
func (t *AvailService) NodeBalancers() (*NodeBalancersResponse, error)
Get Node Balancers
func (*AvailService) StackScripts ¶
func (t *AvailService) StackScripts() (*StackScriptsResponse, error)
Get All Stackscripts
type Client ¶
type Client struct { // Linode API Key ApiKey string // HTTP client to communicate with Linode API HTTPClient *http.Client // Base URL BaseURL *url.URL // Whether to use POST for API request, default is false UsePost bool // Services Test TestInterface Api ApiInterface Avail AvailInterface Account AccountInterface Image ImageInterface Linode LinodeInterface Job LinodeJobInterface Config LinodeConfigInterface Ip LinodeIPInterface Disk LinodeDiskInterface StackScript StackScriptInterface Volume LinodeVolumeInterface NodeBalancer NodeBalancerInterface NodeBalancerConfig NodeBalancerConfigInterface Node NodeBalancerNodeInterface }
Client of Linode v1 API
type CustomBool ¶
type CustomBool struct {
Bool bool
}
CustomBool is a type to handle Linode's insistance of using ints as boolean values.
func (*CustomBool) MarshalJSON ¶
func (cb *CustomBool) MarshalJSON() ([]byte, error)
func (*CustomBool) UnmarshalJSON ¶
func (cb *CustomBool) UnmarshalJSON(b []byte) error
type CustomBoolImpl ¶
CustomBool is an interface generated for "github.com/appscode/linodego".CustomBool.
type CustomShortTime ¶
func (*CustomShortTime) IsSet ¶
func (ct *CustomShortTime) IsSet() bool
func (*CustomShortTime) MarshalJSON ¶
func (ct *CustomShortTime) MarshalJSON() ([]byte, error)
func (*CustomShortTime) UnmarshalJSON ¶
func (ct *CustomShortTime) UnmarshalJSON(b []byte) (err error)
type CustomString ¶
type CustomString struct {
// contains filtered or unexported fields
}
A special class to handle marshaling string response from Linode As sometimes Linode returns integer instead of string from API https://github.com/taoh/linodego/issues/1
func (*CustomString) MarshalJSON ¶
func (cs *CustomString) MarshalJSON() ([]byte, error)
func (*CustomString) String ¶
func (cs *CustomString) String() string
func (*CustomString) UnmarshalJSON ¶
func (cs *CustomString) UnmarshalJSON(b []byte) (err error)
type CustomStringImpl ¶
type CustomStringImpl interface { MarshalJSON() ([]byte, error) String() string UnmarshalJSON([]byte) error }
CustomString is an interface generated for "github.com/appscode/linodego".CustomString.
type CustomTime ¶
func (*CustomTime) IsSet ¶
func (ct *CustomTime) IsSet() bool
func (*CustomTime) MarshalJSON ¶
func (ct *CustomTime) MarshalJSON() ([]byte, error)
func (*CustomTime) UnmarshalJSON ¶
func (ct *CustomTime) UnmarshalJSON(b []byte) (err error)
type DataCenter ¶
type Disk ¶
type Disk struct { UpdateDt CustomTime `json:"UPDATE_DT"` DiskId int `json:"DISKID"` Label CustomString `json:"LABEL"` Type string `json:"TYPE"` LinodeId int `json:"LINODEID"` IsReadOnly int `json:"ISREADONLY"` Status int `json:"STATUS"` CreateDt CustomTime `json:"CREATE_DT"` Size int `json:"SIZE"` }
type Distribution ¶
type Distribution struct { Is64Bit int `json:"IS64BIT"` Label CustomString `json:"LABEL"` MinImageSize int `json:"MINIMAGESIZE"` DistributionId int `json:"DISTRIBUTIONID"` CreatedDt CustomTime `json:"CREATE_DT"` RequiresPVOPSKernel int `json:"REQUIRESPVOPSKERNEL"` }
type EstimateInvoice ¶
type EstimateInvoice struct { InvoiceTo CustomShortTime `json:"INVOICE_TO"` Amount float32 `json:"AMOUNT"` }
type EstimateInvoiceResponse ¶
type EstimateInvoiceResponse struct { Response EstimateInvoice EstimateInvoice }
Response for account.estimateinvoice API
type FullIPAddress ¶
type Image ¶
type Image struct { CreateDt CustomTime `json:"CREATE_DT"` Creator string `json:"CREATOR"` Description string `json:"DESCRIPTION"` FsType string `json:"FS_TYPE"` ImageId int `json:"IMAGEID"` IsPublic int `json:"ISPUBLIC"` Label CustomString `json:"LABEL"` LastUsedDt CustomTime `json:"LAST_USED_DT"` MinSize int `json:"MINSIZE"` Status string `json:"STATUS"` Type string `json:"TYPE"` }
type ImageInterface ¶
type ImageInterface interface { Delete(int) (*ImageResponse, error) List() (*ImagesListResponse, error) Update(int, string, string) (*ImageResponse, error) }
ImageService is an interface generated for "github.com/appscode/linodego".ImageService.
type ImageResponse ¶
Response for image.update or image.delete API
type ImageService ¶
type ImageService struct {
// contains filtered or unexported fields
}
Image Service
func (*ImageService) Delete ¶
func (t *ImageService) Delete(imageId int) (*ImageResponse, error)
Delete given Image
func (*ImageService) List ¶
func (t *ImageService) List() (*ImagesListResponse, error)
List all images
func (*ImageService) Update ¶
func (t *ImageService) Update(imageId int, label string, description string) (*ImageResponse, error)
Update given Image
type ImagesListResponse ¶
Response for image.list API
type Job ¶
type Job struct { EnteredDt CustomTime `json:"ENTERED_DT"` Action string `json:"ACTION"` Label string `json:"LABEL"` HostStartDt CustomTime `json:"HOST_START_DT"` LinodeId int `json:"LINODEID"` HostFinishDt CustomTime `json:"HOST_FINISH_DT"` HostMessage string `json:"HOST_MESSAGE"` JobId int `json:"JOBID"` HostSuccess CustomString `json:"HOST_SUCCESS"` // Linode API returns empty string if HostSuccess is false. 1 otherwise. }
type Kernel ¶
type Kernel struct { Label CustomString `json:"LABEL"` IsKvm int `json:"ISKVM"` IsXen int `json:"ISXEN"` IsPVOPS int `json:"ISPVOPS"` KernelId int `json:"KERNELID"` }
type KernelsResponse ¶
Response for avail.kernels API
type Linode ¶
type Linode struct { TotalXFer int `json:"TOTALXFER"` BackupsEnabled int `json:"BACKUPSENABLED"` WatchDog int `json:"WATCHDOG"` LpmDisplayGroup string `json:"LPM_DISPLAYGROUP"` AlertBwQuotaEnabled int `json:"ALERT_BWQUOTA_ENABLED"` Status int `json:"STATUS"` TotalRAM int `json:"TOTALRAM"` AlertDiskIOThreshold int `json:"ALERT_DISKIO_THRESHOLD"` BackupWindow int `json:"BACKUPWINDOW"` AlertBwOutEnabled int `json:"ALERT_BWOUT_ENABLED"` AlertBwOutThreshold int `json:"ALERT_BWOUT_THRESHOLD"` Label CustomString `json:"LABEL"` AlertCPUEnabled int `json:"ALERT_CPU_ENABLED"` AlertBwQuotaThreshold int `json:"ALERT_BWQUOTA_THRESHOLD"` AlertBwInThreshold int `json:"ALERT_BWIN_THRESHOLD"` BackupWeeklyDay int `json:"BACKUPWEEKLYDAY"` DataCenterId int `json:"DATACENTERID"` AlertCPUThreshold int `json:"ALERT_CPU_THRESHOLD"` TotalHD int `json:"TOTALHD"` AlertDiskIOEnabled int `json:"ALERT_DISKIO_ENABLED"` AlertBwInEnabled int `json:"ALERT_BWIN_ENABLED"` LinodeId int `json:"LINODEID"` CreateDt CustomTime `json:"CREATE_DT"` PlanId int `json:"PLANID"` DistributionVendor string `json:"DISTRIBUTIONVENDOR"` }
type LinodeConfig ¶
type LinodeConfig struct { HelperDisableUpdateDB int `json:"helper_disableUpdateDB"` RootDeviceRO bool `json:"RootDeviceRO"` RootDeviceCustom string `json:"RootDeviceCustom"` Label CustomString `json:"Label"` DiskList string `json:"DiskList"` LinodeId int `json:"LinodeID"` Comments string `json:"Comments"` ConfigId int `json:"ConfigID"` HelperXen int `json:"helper_xen"` // Depreciated, use HelperDistro instead HelperDistro CustomBool `json:"helper_distro"` RunLevel string `json:"RunLevel"` HelperDepmod CustomBool `json:"helper_depmod"` KernelId int `json:"KernelID"` RootDeviceNum int `json:"RootDeviceNum"` HelperLibtls CustomBool `json:"helper_libtls"` HelperNetwork CustomBool `json:"helper_network"` RAMLimit int `json:"RAMLimit"` }
type LinodeConfigId ¶
type LinodeConfigId struct {
LinodeConfigId int `json:"ConfigID"`
}
type LinodeConfigInterface ¶
type LinodeConfigInterface interface { Create(int, int, string, map[string]string) (*LinodeConfigResponse, error) Delete(int, int) (*LinodeConfigResponse, error) List(int, int) (*LinodeConfigListResponse, error) Update(int, int, int, map[string]string) (*LinodeConfigResponse, error) }
LinodeConfigService is an interface generated for "github.com/appscode/linodego".LinodeConfigService.
type LinodeConfigListResponse ¶
type LinodeConfigListResponse struct { Response LinodeConfigs []LinodeConfig }
Response for linode.config.list API
type LinodeConfigResponse ¶
type LinodeConfigResponse struct { Response LinodeConfigId LinodeConfigId }
Response for general config APIs
type LinodeConfigService ¶
type LinodeConfigService struct {
// contains filtered or unexported fields
}
Linode Config Service
func (*LinodeConfigService) Create ¶
func (t *LinodeConfigService) Create(linodeId int, kernelId int, label string, args map[string]string) (*LinodeConfigResponse, error)
Create Config
func (*LinodeConfigService) Delete ¶
func (t *LinodeConfigService) Delete(linodeId int, configId int) (*LinodeConfigResponse, error)
Delete Config
func (*LinodeConfigService) List ¶
func (t *LinodeConfigService) List(linodeId int, configId int) (*LinodeConfigListResponse, error)
Get Config List. If configId is greater than 0, limit results to given config.
func (*LinodeConfigService) Update ¶
func (t *LinodeConfigService) Update(configId int, linodeId int, kernelId int, args map[string]string) (*LinodeConfigResponse, error)
Update Config. See https://www.linode.com/api/linode/linode.config.update for allowed arguments.
type LinodeDiskInterface ¶
type LinodeDiskInterface interface { Create(int, string, string, int, map[string]string) (*LinodeDiskJobResponse, error) CreateFromDistribution(int, int, string, int, map[string]string) (*LinodeDiskJobResponse, error) CreateFromImage(int, int, string, int, map[string]string) (*LinodeDiskJobResponse, error) CreateFromStackscript(int, int, string, string, int, int, string, map[string]string) (*LinodeDiskJobResponse, error) Delete(int, int) (*LinodeDiskJobResponse, error) Duplicate(int, int) (*LinodeDiskJobResponse, error) Imagize(int, int, string, string) (*LinodeDiskJobResponse, error) List(int, int) (*LinodeDiskListResponse, error) Resize(int, int, int) (*LinodeDiskJobResponse, error) Update(int, int, string, bool) (*LinodeDiskJobResponse, error) }
LinodeDiskService is an interface generated for "github.com/appscode/linodego".LinodeDiskService.
type LinodeDiskJobResponse ¶
Response for general Disk jobs APIs
type LinodeDiskListResponse ¶
Response for linode.disk.list API
type LinodeDiskService ¶
type LinodeDiskService struct {
// contains filtered or unexported fields
}
Linode Disk Service
func (*LinodeDiskService) Create ¶
func (t *LinodeDiskService) Create(linodeId int, diskType string, label string, size int, args map[string]string) (*LinodeDiskJobResponse, error)
Create disk
func (*LinodeDiskService) CreateFromDistribution ¶
func (t *LinodeDiskService) CreateFromDistribution(distributionId int, linodeId int, label string, size int, args map[string]string) (*LinodeDiskJobResponse, error)
Create from Distribution
func (*LinodeDiskService) CreateFromImage ¶
func (t *LinodeDiskService) CreateFromImage(imageId int, linodeId int, label string, size int, args map[string]string) (*LinodeDiskJobResponse, error)
Create from image
func (*LinodeDiskService) CreateFromStackscript ¶
func (t *LinodeDiskService) CreateFromStackscript( stackScriptId int, linodeId int, label string, stackScriptUDFResponses string, distributionId int, size int, rootPass string, args map[string]string) (*LinodeDiskJobResponse, error)
Create from stackscript
func (*LinodeDiskService) Delete ¶
func (t *LinodeDiskService) Delete(linodeId int, diskId int) (*LinodeDiskJobResponse, error)
Delete disk
func (*LinodeDiskService) Duplicate ¶
func (t *LinodeDiskService) Duplicate(linodeId int, diskId int) (*LinodeDiskJobResponse, error)
Duplicate Disk
func (*LinodeDiskService) Imagize ¶
func (t *LinodeDiskService) Imagize(linodeId int, diskId int, description string, label string) (*LinodeDiskJobResponse, error)
Imagize a disk
func (*LinodeDiskService) List ¶
func (t *LinodeDiskService) List(linodeId int, diskId int) (*LinodeDiskListResponse, error)
List all disks. If diskId is greater than 0, limit the results to given disk.
func (*LinodeDiskService) Resize ¶
func (t *LinodeDiskService) Resize(linodeId int, diskId int, size int) (*LinodeDiskJobResponse, error)
Resize a disk
func (*LinodeDiskService) Update ¶
func (t *LinodeDiskService) Update(linodeId int, diskId int, label string, isReadOnly bool) (*LinodeDiskJobResponse, error)
Update a disk
type LinodeIPAddress ¶
type LinodeIPAddressResponse ¶
IP Address Response
type LinodeIPInterface ¶
type LinodeIPInterface interface { AddPrivate(int) (*LinodeIPAddressResponse, error) AddPublic(int) (*LinodeIPAddressResponse, error) List(int, int) (*LinodeIPListResponse, error) SetRDNS(int, string) (*LinodeRDNSIPAddressResponse, error) Swap(int, int, int) (*LinodeLinodeIPAddressResponse, error) }
LinodeIPService is an interface generated for "github.com/appscode/linodego".LinodeIPService.
type LinodeIPListResponse ¶
type LinodeIPListResponse struct { Response FullIPAddresses []FullIPAddress }
IP List Response
type LinodeIPService ¶
type LinodeIPService struct {
// contains filtered or unexported fields
}
Linode IP Service
func (*LinodeIPService) AddPrivate ¶
func (t *LinodeIPService) AddPrivate(linodeId int) (*LinodeIPAddressResponse, error)
Add Private IP
func (*LinodeIPService) AddPublic ¶
func (t *LinodeIPService) AddPublic(linodeId int) (*LinodeIPAddressResponse, error)
Add Public IP
func (*LinodeIPService) List ¶
func (t *LinodeIPService) List(linodeId int, ipAddressId int) (*LinodeIPListResponse, error)
List All Ips. If linodeId or ipAddressId is less than 0, all IPs are returned. Otherwise, limits the reuslt to the given linodeId, ipAddressId or both.
func (*LinodeIPService) SetRDNS ¶
func (t *LinodeIPService) SetRDNS(ipAddressId int, hostname string) (*LinodeRDNSIPAddressResponse, error)
Set RDNS
func (*LinodeIPService) Swap ¶
func (t *LinodeIPService) Swap(ipAddressId int, withIPAddressId int, toLinodeId int) (*LinodeLinodeIPAddressResponse, error)
Swap Ips
type LinodeInterface ¶
type LinodeInterface interface { Boot(int, int) (*JobResponse, error) Clone(int, int, int, int) (*LinodeResponse, error) Create(int, int, int) (*LinodeResponse, error) Delete(int, bool) (*LinodeResponse, error) List(int) (*LinodesListResponse, error) Reboot(int, int) (*JobResponse, error) Resize(int, int) (*LinodeResponse, error) Shutdown(int) (*JobResponse, error) Update(int, map[string]interface{}) (*LinodeResponse, error) }
LinodeService is an interface generated for "github.com/appscode/linodego".LinodeService.
type LinodeJobInterface ¶
type LinodeJobInterface interface {
List(int, int, bool) (*LinodesJobListResponse, error)
}
LinodeJobService is an interface generated for "github.com/appscode/linodego".LinodeJobService.
type LinodeJobService ¶
type LinodeJobService struct {
// contains filtered or unexported fields
}
Job service
func (*LinodeJobService) List ¶
func (t *LinodeJobService) List(linodeId int, jobId int, pendingOnly bool) (*LinodesJobListResponse, error)
List all jobs. If jobId is greater than 0, limit the list to given jobId.
type LinodeLinodeIPAddressResponse ¶
type LinodeLinodeIPAddressResponse struct { Response LinodeIPAddresses []LinodeIPAddress }
Full IP Address Response
type LinodeNodeBalancer ¶
type LinodeNodeBalancer struct { NodeBalancerId int `json:"NODEBALANCERID"` Label CustomString `json:"LABEL"` DataCenterId int `json:"DATACENTERID"` HostName string `json:"HOSTNAME"` Address4 string `json:"ADDRESS4"` Address6 string `json:"ADDRESS6"` ClientConnThrottle int `json:"CLIENTCONNTHROTTLE"` }
type LinodeNodeBalancerId ¶
type LinodeNodeBalancerId struct {
NodeBalancerId int `json:"NODEBALANCERID"`
}
type LinodePlan ¶
type LinodePlansResponse ¶
type LinodePlansResponse struct { Response LinodePlans []LinodePlan }
Response for avail.linodeplans API
type LinodeRDNSIPAddressResponse ¶
type LinodeRDNSIPAddressResponse struct { Response RDNSIPAddress RDNSIPAddress }
IP Address with RDNS Response
type LinodeResponse ¶
General Linode API Response
type LinodeService ¶
type LinodeService struct {
// contains filtered or unexported fields
}
Linode Service
func (*LinodeService) Boot ¶
func (t *LinodeService) Boot(linodeId int, configId int) (*JobResponse, error)
Boot Linode
func (*LinodeService) Clone ¶
func (t *LinodeService) Clone(linodeId int, dataCenterId int, planId int, paymentTerm int) (*LinodeResponse, error)
Clone Linode
func (*LinodeService) Create ¶
func (t *LinodeService) Create(dataCenterId int, planId int, paymentTerm int) (*LinodeResponse, error)
Create Linode
func (*LinodeService) Delete ¶
func (t *LinodeService) Delete(linodeId int, skipChecks bool) (*LinodeResponse, error)
Delete Linode
func (*LinodeService) List ¶
func (t *LinodeService) List(linodeId int) (*LinodesListResponse, error)
List all Linodes. If linodeId is less than 0, all linodes are returned. Otherwise, only returns the linode for given Id.
func (*LinodeService) Reboot ¶
func (t *LinodeService) Reboot(linodeId int, configId int) (*JobResponse, error)
Reboot Linode
func (*LinodeService) Resize ¶
func (t *LinodeService) Resize(linodeId int, planId int) (*LinodeResponse, error)
Resize Linode
func (*LinodeService) Shutdown ¶
func (t *LinodeService) Shutdown(linodeId int) (*JobResponse, error)
Shutdown Linode
func (*LinodeService) Update ¶
func (t *LinodeService) Update(linodeId int, args map[string]interface{}) (*LinodeResponse, error)
Update Linode
type LinodeVolumeInterface ¶
type LinodeVolumeInterface interface { Clone(int, string) (*LinodeVolumeResponse, error) Create(int, string, map[string]string) (*LinodeVolumeResponse, error) Delete(int) (*LinodeVolumeResponse, error) List(int) (*LinodeVolumeListResponse, error) Update(int, map[string]string) (*LinodeVolumeResponse, error) }
LinodeVolumeService is an interface generated for "github.com/appscode/linodego".LinodeVolumeService.
type LinodeVolumeListResponse ¶
Response for volume.list API
type LinodeVolumeResponse ¶
Response for general config APIs
type LinodeVolumeService ¶
type LinodeVolumeService struct {
// contains filtered or unexported fields
}
Linode Volume Service
func (*LinodeVolumeService) Clone ¶
func (t *LinodeVolumeService) Clone(cloneFromId int, label string) (*LinodeVolumeResponse, error)
Clone Volume
func (*LinodeVolumeService) Create ¶
func (t *LinodeVolumeService) Create(size int, label string, args map[string]string) (*LinodeVolumeResponse, error)
Create Volume
func (*LinodeVolumeService) Delete ¶
func (t *LinodeVolumeService) Delete(volumeId int) (*LinodeVolumeResponse, error)
Delete Volume
func (*LinodeVolumeService) List ¶
func (t *LinodeVolumeService) List(volumeId int) (*LinodeVolumeListResponse, error)
List all volumes. If volumeId is greater than 0, limit the results to given volume.
func (*LinodeVolumeService) Update ¶
func (t *LinodeVolumeService) Update(volumeId int, args map[string]string) (*LinodeVolumeResponse, error)
Update Volume. See https://www.linode.com/api/volume/volume.update for allowed arguments.
type LinodesJobListResponse ¶
Resonse for linode.job.list API
type LinodesListResponse ¶
Response for linode.list API
type NodeBalancer ¶
type NodeBalancerConfig ¶
type NodeBalancerConfig struct { Stickiness CustomString `json:"STICKINESS"` CheckPath CustomString `json:"CHECK_PATH"` Port int `json:"PORT"` CheckBody CustomString `json:"CHECK_BODY"` Check CustomString `json:"CHECK"` CheckInterval int `json:"CHECK_INTERVAL"` Protocol CustomString `json:"PROTOCOL"` ConfigId int `json:"CONFIGID"` Algorithm CustomString `json:"ALGORITHM"` CheckTimeout int `json:"CHECK_TIMEOUT"` NodeBalancerId int `json:"NODEBALANCERID"` CheckAttempts int `json:"CHECK_ATTEMPTS"` CheckPassive int `json:"CHECK_PASSIVE"` SslFingerprint CustomString `json:"SSL_FINGERPRINT"` SslCommonName CustomString `json:"SSL_COMMONNAME"` }
type NodeBalancerConfigId ¶
type NodeBalancerConfigId struct {
NodeBalancerConfigId int `json:"ConfigID"`
}
type NodeBalancerConfigInterface ¶
type NodeBalancerConfigInterface interface { Create(int, map[string]string) (*NodeBalancerConfigResponse, error) Delete(int, int) (*NodeBalancerConfigResponse, error) List(int, int) (*NodeBalancerConfigListResponse, error) Update(int, map[string]string) (*NodeBalancerConfigResponse, error) }
NodeBalancerConfigService is an interface generated for "github.com/appscode/linodego".NodeBalancerConfigService.
type NodeBalancerConfigListResponse ¶
type NodeBalancerConfigListResponse struct { Response NodeBalancerConfigs []NodeBalancerConfig }
Response for nodebalancer.config.list API
type NodeBalancerConfigResponse ¶
type NodeBalancerConfigResponse struct { Response NodeBalancerConfigId NodeBalancerConfigId }
Response for general config APIs
type NodeBalancerConfigService ¶
type NodeBalancerConfigService struct {
// contains filtered or unexported fields
}
NodeBalancer Config Service
func (*NodeBalancerConfigService) Create ¶
func (t *NodeBalancerConfigService) Create(nodeBalancerId int, args map[string]string) (*NodeBalancerConfigResponse, error)
Create Config
func (*NodeBalancerConfigService) Delete ¶
func (t *NodeBalancerConfigService) Delete(nodeBalancerId int, configId int) (*NodeBalancerConfigResponse, error)
Delete Config
func (*NodeBalancerConfigService) List ¶
func (t *NodeBalancerConfigService) List(nodeBalancerId int, configId int) (*NodeBalancerConfigListResponse, error)
Get Config List. If configId is greater than 0, limit results to given config.
func (*NodeBalancerConfigService) Update ¶
func (t *NodeBalancerConfigService) Update(configId int, args map[string]string) (*NodeBalancerConfigResponse, error)
Update Config. See https://www.linode.com/api/nodebalancer/nodebalancer.config.update for allowed arguments.
type NodeBalancerInterface ¶
type NodeBalancerInterface interface { Create(int, string, map[string]string) (*NodeBalancerResponse, error) Delete(int) (*NodeBalancerResponse, error) List(int) (*NodeBalancerListResponse, error) Update(int, map[string]string) (*NodeBalancerResponse, error) }
NodeBalancerService is an interface generated for "github.com/appscode/linodego".NodeBalancerService.
type NodeBalancerListResponse ¶
type NodeBalancerListResponse struct { Response NodeBalancer []LinodeNodeBalancer }
Response for nodebalancer.list API
type NodeBalancerNode ¶
type NodeBalancerNode struct { Weight int `json:"WEIGHT"` Address CustomString `json:"ADDRESS"` Label CustomString `json:"LABEL"` NodeId int `json:"NODEID"` Mode CustomString `json:"MODE"` ConfigId int `json:"CONFIGID"` Status CustomString `json:"STATUS"` NodeBalancerId int `json:"NODEBALANCERID"` }
type NodeBalancerNodeId ¶
type NodeBalancerNodeId struct {
NodeId int `json:"NODEID"`
}
type NodeBalancerNodeInterface ¶
type NodeBalancerNodeInterface interface { Create(int, string, string, map[string]string) (*NodeBalancerNodeResponse, error) Delete(int) (*NodeBalancerNodeResponse, error) List(int, int) (*NodeBalancerNodeListResponse, error) Update(int, map[string]string) (*NodeBalancerNodeResponse, error) }
NodeBalancerNodeService is an interface generated for "github.com/appscode/linodego".NodeBalancerNodeService.
type NodeBalancerNodeListResponse ¶
type NodeBalancerNodeListResponse struct { Response NodeBalancerNodes []NodeBalancerNode }
Response for nodebalancer.config.list API
type NodeBalancerNodeResponse ¶
type NodeBalancerNodeResponse struct { Response NodeBalancerNodeId NodeBalancerNodeId }
Response for general config APIs
type NodeBalancerNodeService ¶
type NodeBalancerNodeService struct {
// contains filtered or unexported fields
}
NodeBalancer Config Service
func (*NodeBalancerNodeService) Create ¶
func (t *NodeBalancerNodeService) Create(configId int, label string, address string, args map[string]string) (*NodeBalancerNodeResponse, error)
Create Node
func (*NodeBalancerNodeService) Delete ¶
func (t *NodeBalancerNodeService) Delete(nodeId int) (*NodeBalancerNodeResponse, error)
Delete Node
func (*NodeBalancerNodeService) List ¶
func (t *NodeBalancerNodeService) List(configId int, nodeId int) (*NodeBalancerNodeListResponse, error)
Get Node List. If configId is greater than 0, limit results to given node.
func (*NodeBalancerNodeService) Update ¶
func (t *NodeBalancerNodeService) Update(NodeId int, args map[string]string) (*NodeBalancerNodeResponse, error)
Update Node. See https://www.linode.com/api/linode/linode.config.update for allowed arguments.
type NodeBalancerResponse ¶
type NodeBalancerResponse struct { Response NodeBalancerId LinodeNodeBalancerId }
Response for general config APIs
type NodeBalancerService ¶
type NodeBalancerService struct {
// contains filtered or unexported fields
}
Nodebalancer Service
func (*NodeBalancerService) Create ¶
func (t *NodeBalancerService) Create(datacenterId int, label string, args map[string]string) (*NodeBalancerResponse, error)
Create NodeBalancer
func (*NodeBalancerService) Delete ¶
func (t *NodeBalancerService) Delete(nodeBalancerId int) (*NodeBalancerResponse, error)
Delete Nodebalancer
func (*NodeBalancerService) List ¶
func (t *NodeBalancerService) List(nodeBalancerId int) (*NodeBalancerListResponse, error)
List all nodebalancers. If nodeBalancerId is greater than 0, limit the results to given nodebalancer.
func (*NodeBalancerService) Update ¶
func (t *NodeBalancerService) Update(nodeBalancerId int, args map[string]string) (*NodeBalancerResponse, error)
Update Nodebalancer. See https://www.linode.com/api/nodebalancer/nodebalancer.update for allowed arguments.
type NodeBalancersResponse ¶
type NodeBalancersResponse struct { Response NodeBalancers []NodeBalancer }
Response for avail.nodebalancers API
type RDNSIPAddress ¶
type Response ¶
type Response struct { Errors []Error `json:"ERRORARRAY"` RawData json.RawMessage `json:"DATA"` Action string `json:"ACTION"` }
type StackScript ¶
type StackScript struct { Script string `json:"SCRIPT"` Description CustomString `json:"DESCRIPTION"` DistributionidList CustomString `json:"DISTRIBUTIONIDLIST"` Label CustomString `json:"LABEL"` DeploymentsTotal int `json:"DEPLOYMENTSTOTAL"` LatestRev int `json:"LATESTREV"` CreatedDt CustomTime `json:"CREATE_DT"` DeploymentsActive int `json:"DEPLOYMENTSACTIVE"` StackScriptId int `json:"STACKSCRIPTID"` RevNote CustomString `json:"REV_NOTE"` RevDt CustomTime `json:"REV_DT"` IsPublic int `json:"ISPUBLIC"` UserId int `json:"USERID"` }
type StackScriptId ¶
type StackScriptId struct {
StackScriptId int `json:"StackScriptID"`
}
type StackScriptInterface ¶
type StackScriptInterface interface { Create(string, string, string, map[string]string) (*StackScriptResponse, error) Delete(int) (*StackScriptResponse, error) List(int) (*StackScriptListResponse, error) Update(int, map[string]string) (*StackScriptResponse, error) }
StackScriptService is an interface generated for "github.com/appscode/linodego".StackScriptService.
type StackScriptListResponse ¶
type StackScriptListResponse struct { Response StackScripts []StackScript }
Response for linode.config.list API
type StackScriptResponse ¶
type StackScriptResponse struct { Response StackScriptId StackScriptId }
Response for general config APIs
type StackScriptService ¶
type StackScriptService struct {
// contains filtered or unexported fields
}
Linode Config Service
func (*StackScriptService) Create ¶
func (t *StackScriptService) Create(label, distributionIDList, script string, args map[string]string) (*StackScriptResponse, error)
Create Config
func (*StackScriptService) Delete ¶
func (t *StackScriptService) Delete(scriptId int) (*StackScriptResponse, error)
Delete Config
func (*StackScriptService) List ¶
func (t *StackScriptService) List(scriptId int) (*StackScriptListResponse, error)
Get Config List. If scriptId is greater than 0, limit results to given config.
func (*StackScriptService) Update ¶
func (t *StackScriptService) Update(scriptId int, args map[string]string) (*StackScriptResponse, error)
Update Config. See https://www.linode.com/api/stackscript/stackscript.update for allowed arguments.
type StackScriptsResponse ¶
type StackScriptsResponse struct { Response StackScripts []StackScript }
Response for avail.stackscripts API
type TestInterface ¶
type TestInterface interface {
Echo(string, string, *TestResponse) error
}
TestService is an interface generated for "github.com/appscode/linodego".TestService.
type TestResponse ¶
Test Service Response
type TestService ¶
type TestService struct {
// contains filtered or unexported fields
}
Test Service
func (*TestService) Echo ¶
func (t *TestService) Echo(key string, val string, v *TestResponse) error
Echo request with the given key and value
Source Files
¶
- account_service.go
- api_service.go
- avail_service.go
- custombool.go
- customstring.go
- doc.go
- image_service.go
- linode_config_service.go
- linode_disk_service.go
- linode_ip_service.go
- linode_job_service.go
- linode_service.go
- linodego.go
- nodebalancer_config_service.go
- nodebalancer_node_service.go
- nodebalancer_service.go
- stackscript_service.go
- test_service.go
- time.go
- types.go
- volume_service.go