Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinodeClient ¶
type LinodeClient interface {
LinodeNodeBalancerClient
LinodeInstanceClient
LinodeVPCClient
LinodeObjectStorageClient
LinodeDNSClient
}
LinodeClient is an interface that defines the methods that a Linode client must have to interact with Linode. It defines all the functions that are required to create, delete, and get resources from Linode such as object storage buckets, node balancers, linodes, and VPCs.
type LinodeDNSClient ¶ added in v0.4.0
type LinodeDNSClient interface {
CreateDomainRecord(ctx context.Context, domainID int, recordReq linodego.DomainRecordCreateOptions) (*linodego.DomainRecord, error)
UpdateDomainRecord(ctx context.Context, domainID int, domainRecordID int, recordReq linodego.DomainRecordUpdateOptions) (*linodego.DomainRecord, error)
ListDomainRecords(ctx context.Context, domainID int, opts *linodego.ListOptions) ([]linodego.DomainRecord, error)
ListDomains(ctx context.Context, opts *linodego.ListOptions) ([]linodego.Domain, error)
DeleteDomainRecord(ctx context.Context, domainID int, domainRecordID int) error
}
LinodeDNSClient defines the methods that interact with Linode's Domains service.
type LinodeInstanceClient ¶
type LinodeInstanceClient interface {
GetInstanceIPAddresses(ctx context.Context, linodeID int) (*linodego.InstanceIPAddressResponse, error)
ListInstances(ctx context.Context, opts *linodego.ListOptions) ([]linodego.Instance, error)
CreateInstance(ctx context.Context, opts linodego.InstanceCreateOptions) (*linodego.Instance, error)
BootInstance(ctx context.Context, linodeID int, configID int) error
ListInstanceConfigs(ctx context.Context, linodeID int, opts *linodego.ListOptions) ([]linodego.InstanceConfig, error)
UpdateInstanceConfig(ctx context.Context, linodeID int, configID int, opts linodego.InstanceConfigUpdateOptions) (*linodego.InstanceConfig, error)
GetInstanceDisk(ctx context.Context, linodeID int, diskID int) (*linodego.InstanceDisk, error)
ResizeInstanceDisk(ctx context.Context, linodeID int, diskID int, size int) error
CreateInstanceDisk(ctx context.Context, linodeID int, opts linodego.InstanceDiskCreateOptions) (*linodego.InstanceDisk, error)
GetInstance(ctx context.Context, linodeID int) (*linodego.Instance, error)
DeleteInstance(ctx context.Context, linodeID int) error
GetRegion(ctx context.Context, regionID string) (*linodego.Region, error)
GetImage(ctx context.Context, imageID string) (*linodego.Image, error)
CreateStackscript(ctx context.Context, opts linodego.StackscriptCreateOptions) (*linodego.Stackscript, error)
ListStackscripts(ctx context.Context, opts *linodego.ListOptions) ([]linodego.Stackscript, error)
GetType(ctx context.Context, typeID string) (*linodego.LinodeType, error)
}
LinodeInstanceClient defines the methods that interact with Linode's Instance service.
type LinodeNodeBalancerClient ¶
type LinodeNodeBalancerClient interface {
ListNodeBalancers(ctx context.Context, opts *linodego.ListOptions) ([]linodego.NodeBalancer, error)
CreateNodeBalancer(ctx context.Context, opts linodego.NodeBalancerCreateOptions) (*linodego.NodeBalancer, error)
CreateNodeBalancerConfig(ctx context.Context, nodebalancerID int, opts linodego.NodeBalancerConfigCreateOptions) (*linodego.NodeBalancerConfig, error)
DeleteNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, nodeID int) error
DeleteNodeBalancer(ctx context.Context, nodebalancerID int) error
CreateNodeBalancerNode(ctx context.Context, nodebalancerID int, configID int, opts linodego.NodeBalancerNodeCreateOptions) (*linodego.NodeBalancerNode, error)
}
LinodeNodeBalancerClient defines the methods that interact with Linode's Node Balancer service.
type LinodeObjectStorageClient ¶
type LinodeObjectStorageClient interface {
GetObjectStorageBucket(ctx context.Context, cluster, label string) (*linodego.ObjectStorageBucket, error)
CreateObjectStorageBucket(ctx context.Context, opts linodego.ObjectStorageBucketCreateOptions) (*linodego.ObjectStorageBucket, error)
GetObjectStorageKey(ctx context.Context, keyID int) (*linodego.ObjectStorageKey, error)
CreateObjectStorageKey(ctx context.Context, opts linodego.ObjectStorageKeyCreateOptions) (*linodego.ObjectStorageKey, error)
DeleteObjectStorageKey(ctx context.Context, keyID int) error
}
LinodeObjectStorageClient defines the methods that interact with Linode's Object Storage service.
type LinodeVPCClient ¶
type LinodeVPCClient interface {
GetVPC(ctx context.Context, vpcID int) (*linodego.VPC, error)
ListVPCs(ctx context.Context, opts *linodego.ListOptions) ([]linodego.VPC, error)
CreateVPC(ctx context.Context, opts linodego.VPCCreateOptions) (*linodego.VPC, error)
DeleteVPC(ctx context.Context, vpcID int) error
}
LinodeVPCClient defines the methods that interact with Linode's VPC service.