Documentation
¶
Index ¶
- Constants
- type AttachedLoadBalancerInterface
- type AttachedNetworkInterface
- type Certificate
- type CertificateCreate
- type CertificateDetails
- type CertificateList
- type CertificateService
- func (r CertificateService) Create(ctx context.Context, body CertificateCreate) (certificate Certificate, err error)
- func (r CertificateService) Delete(ctx context.Context, id int) (err error)
- func (r CertificateService) Get(ctx context.Context, id int) (certificate Certificate, err error)
- func (r CertificateService) List(ctx context.Context, cursor goclient.Cursor) (list CertificateList, err error)
- type ElasticIP
- type ElasticIPAttach
- type ElasticIPAttachment
- type ElasticIPCreate
- type ElasticIPList
- type ElasticIPProduct
- type ElasticIPService
- type Image
- type ImageList
- type ImageService
- type KeyPair
- type KeyPairCreate
- type KeyPairList
- type KeyPairService
- type LoadBalancer
- type LoadBalancerAlgorithm
- type LoadBalancerAlgorithmList
- type LoadBalancerCreate
- type LoadBalancerEntityService
- func (l LoadBalancerEntityService) ListAlgorithms(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerAlgorithmList, err error)
- func (l LoadBalancerEntityService) ListHealthCheckTypes(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerHealthCheckTypeList, err error)
- func (l LoadBalancerEntityService) ListProtocols(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerProtocolList, err error)
- type LoadBalancerHealthCheck
- type LoadBalancerHealthCheckOptions
- type LoadBalancerHealthCheckType
- type LoadBalancerHealthCheckTypeList
- type LoadBalancerList
- type LoadBalancerMember
- type LoadBalancerMemberCreate
- type LoadBalancerMemberList
- type LoadBalancerMemberService
- func (m LoadBalancerMemberService) Create(ctx context.Context, body LoadBalancerMemberCreate) (member LoadBalancerMember, err error)
- func (m LoadBalancerMemberService) Delete(ctx context.Context, id int) (err error)
- func (m LoadBalancerMemberService) List(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerMemberList, err error)
- type LoadBalancerNetworkAttachment
- type LoadBalancerPerform
- type LoadBalancerPool
- type LoadBalancerPoolCreate
- type LoadBalancerPoolList
- type LoadBalancerPoolService
- func (l LoadBalancerPoolService) Create(ctx context.Context, body LoadBalancerPoolCreate) (pool LoadBalancerPool, err error)
- func (l LoadBalancerPoolService) Delete(ctx context.Context, id int) (err error)
- func (l LoadBalancerPoolService) Get(ctx context.Context, id int) (pool LoadBalancerPool, err error)
- func (l LoadBalancerPoolService) List(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerPoolList, err error)
- func (l LoadBalancerPoolService) Members(poolID int) LoadBalancerMemberService
- func (l LoadBalancerPoolService) Update(ctx context.Context, id int, body LoadBalancerPoolUpdate) (pool LoadBalancerPool, err error)
- type LoadBalancerPoolUpdate
- type LoadBalancerProtocol
- type LoadBalancerProtocolList
- type LoadBalancerService
- func (l LoadBalancerService) Create(ctx context.Context, body LoadBalancerCreate) (ordering common.Ordering, err error)
- func (l LoadBalancerService) Delete(ctx context.Context, id int) (err error)
- func (l LoadBalancerService) Get(ctx context.Context, id int) (loadBalancer LoadBalancer, err error)
- func (l LoadBalancerService) List(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerList, err error)
- func (l LoadBalancerService) Perform(ctx context.Context, id int, body LoadBalancerPerform) (loadBalancer LoadBalancer, err error)
- func (l LoadBalancerService) Pools(loadBalancerID int) LoadBalancerPoolService
- func (l LoadBalancerService) Update(ctx context.Context, id int, body LoadBalancerUpdate) (loadBalancer LoadBalancer, err error)
- func (l LoadBalancerService) WaitUntilMutable(ctx context.Context, id int) error
- type LoadBalancerStatus
- type LoadBalancerUpdate
- type Network
- type NetworkCreate
- type NetworkInterface
- type NetworkInterfaceCreate
- type NetworkInterfaceList
- type NetworkInterfaceSecurityGroupUpdate
- type NetworkInterfaceSecurityUpdate
- type NetworkInterfaceService
- func (n NetworkInterfaceService) Create(ctx context.Context, body NetworkInterfaceCreate) (networkInterface NetworkInterface, err error)
- func (n NetworkInterfaceService) Delete(ctx context.Context, id int) (err error)
- func (n NetworkInterfaceService) List(ctx context.Context, cursor goclient.Cursor) (list NetworkInterfaceList, err error)
- func (n NetworkInterfaceService) UpdateSecurity(ctx context.Context, id int, body NetworkInterfaceSecurityUpdate) (networkInterface NetworkInterface, err error)
- func (n NetworkInterfaceService) UpdateSecurityGroups(ctx context.Context, id int, body NetworkInterfaceSecurityGroupUpdate) (networkInterface NetworkInterface, err error)
- type NetworkList
- type NetworkService
- func (n NetworkService) Create(ctx context.Context, body NetworkCreate) (network Network, err error)
- func (n NetworkService) Delete(ctx context.Context, id int) (err error)
- func (n NetworkService) Get(ctx context.Context, id int) (network Network, err error)
- func (n NetworkService) List(ctx context.Context, cursor goclient.Cursor) (list NetworkList, err error)
- func (n NetworkService) Update(ctx context.Context, id int, body NetworkUpdate) (network Network, err error)
- type NetworkUpdate
- type Route
- type RouteCreate
- type RouteList
- type RouteService
- type Router
- type RouterCreate
- type RouterInterface
- type RouterInterfaceCreate
- type RouterInterfaceList
- type RouterInterfaceService
- func (r RouterInterfaceService) Create(ctx context.Context, body RouterInterfaceCreate) (routerInterface RouterInterface, err error)
- func (r RouterInterfaceService) Delete(ctx context.Context, id int) (err error)
- func (r RouterInterfaceService) List(ctx context.Context, cursor goclient.Cursor) (list RouterInterfaceList, err error)
- type RouterList
- type RouterService
- func (r RouterService) Create(ctx context.Context, body RouterCreate) (router Router, err error)
- func (r RouterService) Delete(ctx context.Context, id int) (err error)
- func (r RouterService) Get(ctx context.Context, id int) (router Router, err error)
- func (r RouterService) List(ctx context.Context, cursor goclient.Cursor) (list RouterList, err error)
- func (r RouterService) RouterInterfaces(routerID int) RouterInterfaceService
- func (r RouterService) Routes(routerID int) RouteService
- func (r RouterService) Update(ctx context.Context, id int, body RouterUpdate) (router Router, err error)
- type RouterUpdate
- type SecurityGroup
- type SecurityGroupCreate
- type SecurityGroupList
- type SecurityGroupRule
- type SecurityGroupRuleList
- type SecurityGroupRuleOptions
- type SecurityGroupRuleService
- func (s SecurityGroupRuleService) Create(ctx context.Context, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
- func (s SecurityGroupRuleService) Delete(ctx context.Context, id int) (err error)
- func (s SecurityGroupRuleService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupRuleList, err error)
- func (s SecurityGroupRuleService) Update(ctx context.Context, id int, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
- type SecurityGroupService
- func (s SecurityGroupService) Create(ctx context.Context, body SecurityGroupCreate) (securityGroup SecurityGroup, err error)
- func (s SecurityGroupService) Delete(ctx context.Context, id int) (err error)
- func (s SecurityGroupService) Get(ctx context.Context, id int) (securityGroup SecurityGroup, err error)
- func (s SecurityGroupService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupList, err error)
- func (s SecurityGroupService) Rules(securityGroupID int) SecurityGroupRuleService
- func (s SecurityGroupService) Update(ctx context.Context, id int, body SecurityGroupUpdate) (securityGroup SecurityGroup, err error)
- type SecurityGroupUpdate
- type Server
- type ServerAction
- type ServerCreate
- type ServerElasticIPService
- func (s ServerElasticIPService) Attach(ctx context.Context, body ElasticIPAttach) (elasticIP ElasticIP, err error)
- func (s ServerElasticIPService) Detach(ctx context.Context, id int) (err error)
- func (s ServerElasticIPService) List(ctx context.Context, cursor goclient.Cursor) (list ElasticIPList, err error)
- type ServerList
- type ServerNetworkAttachment
- type ServerPerform
- type ServerService
- func (s ServerService) Create(ctx context.Context, body ServerCreate) (ordering common.Ordering, err error)
- func (s ServerService) Delete(ctx context.Context, id int, deleteElasticIP bool) (err error)
- func (s ServerService) Get(ctx context.Context, id int) (server Server, err error)
- func (s ServerService) List(ctx context.Context, cursor goclient.Cursor) (list ServerList, err error)
- func (s ServerService) NetworkInterfaces(serverID int) NetworkInterfaceService
- func (s ServerService) Perform(ctx context.Context, id int, body ServerPerform) (server Server, err error)
- func (s ServerService) Update(ctx context.Context, id int, body ServerUpdate) (server Server, err error)
- func (s ServerService) Upgrade(ctx context.Context, id int, body ServerUpgrade) (ordering common.Ordering, err error)
- type ServerStatus
- type ServerUpdate
- type ServerUpgrade
- type Snapshot
- type SnapshotCreate
- type SnapshotList
- type SnapshotService
- func (s SnapshotService) Create(ctx context.Context, body SnapshotCreate) (snapshot Snapshot, err error)
- func (s SnapshotService) Delete(ctx context.Context, id int) (err error)
- func (s SnapshotService) Get(ctx context.Context, id int) (snapshot Snapshot, err error)
- func (s SnapshotService) List(ctx context.Context, cursor goclient.Cursor) (list SnapshotList, err error)
- func (s SnapshotService) Update(ctx context.Context, id int, body SnapshotUpdate) (snapshot Snapshot, err error)
- type SnapshotStatus
- type SnapshotUpdate
- type Volume
- type VolumeAttach
- type VolumeCreate
- type VolumeExpand
- type VolumeList
- type VolumeRevert
- type VolumeService
- func (v VolumeService) Attach(ctx context.Context, id int, body VolumeAttach) (volume Volume, err error)
- func (v VolumeService) Create(ctx context.Context, body VolumeCreate) (volume Volume, err error)
- func (v VolumeService) Delete(ctx context.Context, id int) (err error)
- func (v VolumeService) Detach(ctx context.Context, id int, instanceID int) (err error)
- func (v VolumeService) Expand(ctx context.Context, id int, body VolumeExpand) (volume Volume, err error)
- func (v VolumeService) Get(ctx context.Context, id int) (volume Volume, err error)
- func (v VolumeService) List(ctx context.Context, cursor goclient.Cursor) (list VolumeList, err error)
- func (v VolumeService) Revert(ctx context.Context, id int, body VolumeRevert) (volume Volume, err error)
- func (v VolumeService) Update(ctx context.Context, id int, body VolumeUpdate) (volume Volume, err error)
- type VolumeStatus
- type VolumeUpdate
Constants ¶
View Source
const ( LoadBalancerStatusActive = iota + 1 LoadBalancerStatusDisabled LoadBalancerStatusWorking LoadBalancerStatusDegraded LoadBalancerStatusError )
View Source
const ( DirectionIngress = "ingress" DirectionEgress = "egress" ProtocolAny = -1 ProtocolICMP = 1 ProtocolTCP = 6 ProtocolUDP = 17 )
View Source
const ( ServerStatusRunning = 1 ServerStatusStopped = 2 ServerStatusSuspended = 3 ServerStatusStarting = 4 ServerStatusStopping = 5 ServerStatusError = 6 ServerStatusUpgrading = 9 ApplicationStatusUnhealthy = 7 ApplicationStatusHealthy = 8 ClusterStatusHealthy = 14 ClusterStatusWorking = 15 ClusterStatusUnhealthy = 16 TaskStatusCreating = 18 TaskStatusNeutral = 10 TaskStatusCordoned = 11 TaskStatusDraining = 12 TaskStatusRebuilding = 13 )
View Source
const ( SnapshotStatusAvailable = 1 SnapshotStatusCreating = 2 SnapshotStatusError = 3 )
View Source
const ( VolumeStatusAvailable = iota + 1 VolumeStatusInUse VolumeStatusWorking VolumeStatusError )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificate ¶ added in v0.2.1
type CertificateCreate ¶ added in v0.2.1
type CertificateDetails ¶ added in v0.2.1
type CertificateList ¶ added in v0.2.1
type CertificateList struct {
Items []Certificate
Pagination goclient.Pagination
}
type CertificateService ¶ added in v0.2.1
type CertificateService struct {
// contains filtered or unexported fields
}
func NewCertificateService ¶ added in v0.2.1
func NewCertificateService(client goclient.Client) CertificateService
func (CertificateService) Create ¶ added in v0.2.1
func (r CertificateService) Create(ctx context.Context, body CertificateCreate) (certificate Certificate, err error)
func (CertificateService) Delete ¶ added in v0.2.1
func (r CertificateService) Delete(ctx context.Context, id int) (err error)
func (CertificateService) Get ¶ added in v0.2.1
func (r CertificateService) Get(ctx context.Context, id int) (certificate Certificate, err error)
func (CertificateService) List ¶ added in v0.2.1
func (r CertificateService) List(ctx context.Context, cursor goclient.Cursor) (list CertificateList, err error)
type ElasticIP ¶ added in v0.2.1
type ElasticIP struct {
ID int `json:"id"`
Product ElasticIPProduct `json:"product"`
Location common.Location `json:"location"`
Price float64 `json:"price"`
PublicIP string `json:"public_ip"`
PrivateIP string `json:"private_ip"`
Attachment ElasticIPAttachment `json:"attached_instance"`
}
type ElasticIPAttach ¶ added in v0.2.1
type ElasticIPAttachment ¶ added in v0.2.1
type ElasticIPCreate ¶ added in v0.2.1
type ElasticIPCreate struct {
LocationID int `json:"location_id"`
}
type ElasticIPList ¶ added in v0.2.1
type ElasticIPList struct {
Items []ElasticIP
Pagination goclient.Pagination
}
type ElasticIPProduct ¶ added in v0.2.1
type ElasticIPProduct = common.BriefProduct
type ElasticIPService ¶ added in v0.2.1
type ElasticIPService struct {
// contains filtered or unexported fields
}
func NewElasticIPService ¶ added in v0.2.1
func NewElasticIPService(client goclient.Client) ElasticIPService
func (ElasticIPService) Create ¶ added in v0.2.1
func (e ElasticIPService) Create(ctx context.Context, body ElasticIPCreate) (elasticIP ElasticIP, err error)
func (ElasticIPService) Delete ¶ added in v0.2.1
func (e ElasticIPService) Delete(ctx context.Context, id int) (err error)
func (ElasticIPService) List ¶ added in v0.2.1
func (e ElasticIPService) List(ctx context.Context, cursor goclient.Cursor) (list ElasticIPList, err error)
type Image ¶
type Image struct {
ID int `json:"id"`
OperatingSystem string `json:"os"`
Version string `json:"version"`
Key string `json:"key"`
Category string `json:"category"`
Type string `json:"type"`
Username string `json:"username"`
MinRootDiskSize int `json:"min_root_disk_size"`
Sorting int `json:"sorting"`
RequiredLicenses []common.Product `json:"required_licenses"`
AvailableLocations []int `json:"available_locations"`
}
type ImageList ¶
type ImageList struct {
Items []Image
Pagination goclient.Pagination
}
type ImageService ¶
type ImageService struct {
// contains filtered or unexported fields
}
func NewImageService ¶
func NewImageService(client goclient.Client) ImageService
type KeyPairCreate ¶
type KeyPairList ¶
type KeyPairList struct {
Items []KeyPair
Pagination goclient.Pagination
}
type KeyPairService ¶
type KeyPairService struct {
// contains filtered or unexported fields
}
func NewKeyPairService ¶
func NewKeyPairService(client goclient.Client) KeyPairService
func (KeyPairService) Create ¶
func (k KeyPairService) Create(ctx context.Context, body KeyPairCreate) (keyPair KeyPair, err error)
func (KeyPairService) Delete ¶
func (k KeyPairService) Delete(ctx context.Context, id int) (err error)
func (KeyPairService) List ¶
func (k KeyPairService) List(ctx context.Context, cursor goclient.Cursor) (list KeyPairList, err error)
type LoadBalancer ¶
type LoadBalancer struct {
ID int `json:"id"`
Name string `json:"name"`
Location common.Location `json:"location"`
Product common.Product `json:"product"`
Status LoadBalancerStatus `json:"status"`
Networks []LoadBalancerNetworkAttachment `json:"networks"`
}
type LoadBalancerAlgorithm ¶
type LoadBalancerAlgorithmList ¶
type LoadBalancerAlgorithmList struct {
Items []LoadBalancerAlgorithm
Pagination goclient.Pagination
}
type LoadBalancerCreate ¶
type LoadBalancerEntityService ¶
type LoadBalancerEntityService struct {
// contains filtered or unexported fields
}
func NewLoadBalancerEntityService ¶
func NewLoadBalancerEntityService(client goclient.Client) LoadBalancerEntityService
func (LoadBalancerEntityService) ListAlgorithms ¶
func (l LoadBalancerEntityService) ListAlgorithms(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerAlgorithmList, err error)
func (LoadBalancerEntityService) ListHealthCheckTypes ¶
func (l LoadBalancerEntityService) ListHealthCheckTypes(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerHealthCheckTypeList, err error)
func (LoadBalancerEntityService) ListProtocols ¶
func (l LoadBalancerEntityService) ListProtocols(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerProtocolList, err error)
type LoadBalancerHealthCheck ¶
type LoadBalancerHealthCheck struct {
Type LoadBalancerHealthCheckType `json:"type"`
HTTPMethod string `json:"http_method"`
HTTPPath string `json:"http_path"`
Interval int `json:"interval"`
Timeout int `json:"timeout"`
HealthyThreshold int `json:"healthy_threshold"`
UnhealthyThreshold int `json:"unhealthy_threshold"`
}
type LoadBalancerHealthCheckOptions ¶
type LoadBalancerHealthCheckOptions struct {
TypeID int `json:"type_id"`
HTTPMethod string `json:"http_method,omitempty"`
HTTPPath string `json:"http_path,omitempty"`
Interval int `json:"interval,omitempty"`
Timeout int `json:"timeout,omitempty"`
HealthyThreshold int `json:"healthy_threshold,omitempty"`
UnhealthyThreshold int `json:"unhealthy_threshold,omitempty"`
}
type LoadBalancerHealthCheckTypeList ¶
type LoadBalancerHealthCheckTypeList struct {
Items []LoadBalancerHealthCheckType
Pagination goclient.Pagination
}
type LoadBalancerList ¶
type LoadBalancerList struct {
Items []LoadBalancer
Pagination goclient.Pagination
}
type LoadBalancerMember ¶
type LoadBalancerMember struct {
ID int `json:"id"`
Name string `json:"name"`
Address string `json:"address"`
Port int `json:"port"`
Status LoadBalancerStatus `json:"status"`
}
type LoadBalancerMemberList ¶
type LoadBalancerMemberList struct {
Items []LoadBalancerMember
Pagination goclient.Pagination
}
type LoadBalancerMemberService ¶
type LoadBalancerMemberService struct {
// contains filtered or unexported fields
}
func NewLoadBalancerMemberService ¶
func NewLoadBalancerMemberService(client goclient.Client, loadBalancerID, poolID int) LoadBalancerMemberService
func (LoadBalancerMemberService) Create ¶
func (m LoadBalancerMemberService) Create(ctx context.Context, body LoadBalancerMemberCreate) (member LoadBalancerMember, err error)
func (LoadBalancerMemberService) Delete ¶
func (m LoadBalancerMemberService) Delete(ctx context.Context, id int) (err error)
func (LoadBalancerMemberService) List ¶
func (m LoadBalancerMemberService) List(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerMemberList, err error)
type LoadBalancerNetworkAttachment ¶
type LoadBalancerNetworkAttachment struct {
Network
Interfaces []AttachedLoadBalancerInterface `json:"network_interfaces"`
}
type LoadBalancerPerform ¶
type LoadBalancerPerform struct {
Action string `json:"action"`
}
type LoadBalancerPool ¶
type LoadBalancerPool struct {
ID int `json:"id"`
Name string `json:"name"`
Status LoadBalancerStatus `json:"status"`
EntryProtocol LoadBalancerProtocol `json:"entry_protocol"`
TargetProtocol LoadBalancerProtocol `json:"target_protocol"`
Certificate Certificate `json:"certificate"`
EntryPort int `json:"entry_port"`
Algorithm LoadBalancerAlgorithm `json:"algorithm"`
StickySession bool `json:"sticky_session"`
HealthCheck LoadBalancerHealthCheck `json:"health_check"`
}
type LoadBalancerPoolCreate ¶
type LoadBalancerPoolCreate struct {
EntryProtocolID int `json:"entry_protocol_id"`
TargetProtocolID int `json:"target_protocol_id"`
CertificateID int `json:"certificate_id,omitempty"`
EntryPort int `json:"entry_port"`
BalancingAlgorithmID int `json:"balancing_algorithm_id"`
StickySession bool `json:"sticky_session"`
Members []LoadBalancerMemberCreate `json:"members,omitempty"`
HealthCheck LoadBalancerHealthCheckOptions `json:"health_check"`
}
type LoadBalancerPoolList ¶
type LoadBalancerPoolList struct {
Items []LoadBalancerPool
Pagination goclient.Pagination
}
type LoadBalancerPoolService ¶
type LoadBalancerPoolService struct {
// contains filtered or unexported fields
}
func NewLoadBalancerPoolService ¶
func NewLoadBalancerPoolService(client goclient.Client, loadBalancerID int) LoadBalancerPoolService
func (LoadBalancerPoolService) Create ¶
func (l LoadBalancerPoolService) Create(ctx context.Context, body LoadBalancerPoolCreate) (pool LoadBalancerPool, err error)
func (LoadBalancerPoolService) Delete ¶
func (l LoadBalancerPoolService) Delete(ctx context.Context, id int) (err error)
func (LoadBalancerPoolService) Get ¶
func (l LoadBalancerPoolService) Get(ctx context.Context, id int) (pool LoadBalancerPool, err error)
func (LoadBalancerPoolService) List ¶
func (l LoadBalancerPoolService) List(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerPoolList, err error)
func (LoadBalancerPoolService) Members ¶
func (l LoadBalancerPoolService) Members(poolID int) LoadBalancerMemberService
func (LoadBalancerPoolService) Update ¶
func (l LoadBalancerPoolService) Update(ctx context.Context, id int, body LoadBalancerPoolUpdate) (pool LoadBalancerPool, err error)
type LoadBalancerPoolUpdate ¶
type LoadBalancerPoolUpdate struct {
CertificateID int `json:"certificate_id,omitempty"`
BalancingAlgorithmID int `json:"balancing_algorithm_id,omitempty"`
StickySession bool `json:"sticky_session,omitempty"`
HealthCheck LoadBalancerHealthCheckOptions `json:"health_check,omitempty"`
}
type LoadBalancerProtocol ¶
type LoadBalancerProtocolList ¶
type LoadBalancerProtocolList struct {
Items []LoadBalancerProtocol
Pagination goclient.Pagination
}
type LoadBalancerService ¶
type LoadBalancerService struct {
// contains filtered or unexported fields
}
func NewLoadBalancerService ¶
func NewLoadBalancerService(client goclient.Client) LoadBalancerService
func (LoadBalancerService) Create ¶
func (l LoadBalancerService) Create(ctx context.Context, body LoadBalancerCreate) (ordering common.Ordering, err error)
func (LoadBalancerService) Delete ¶
func (l LoadBalancerService) Delete(ctx context.Context, id int) (err error)
func (LoadBalancerService) Get ¶
func (l LoadBalancerService) Get(ctx context.Context, id int) (loadBalancer LoadBalancer, err error)
func (LoadBalancerService) List ¶
func (l LoadBalancerService) List(ctx context.Context, cursor goclient.Cursor) (list LoadBalancerList, err error)
func (LoadBalancerService) Perform ¶
func (l LoadBalancerService) Perform(ctx context.Context, id int, body LoadBalancerPerform) (loadBalancer LoadBalancer, err error)
func (LoadBalancerService) Pools ¶
func (l LoadBalancerService) Pools(loadBalancerID int) LoadBalancerPoolService
func (LoadBalancerService) Update ¶
func (l LoadBalancerService) Update(ctx context.Context, id int, body LoadBalancerUpdate) (loadBalancer LoadBalancer, err error)
func (LoadBalancerService) WaitUntilMutable ¶
func (l LoadBalancerService) WaitUntilMutable(ctx context.Context, id int) error
type LoadBalancerStatus ¶
type LoadBalancerUpdate ¶
type LoadBalancerUpdate struct {
Name string `json:"name,omitempty"`
}
type Network ¶
type Network struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
CIDR string `json:"cidr"`
Location common.Location `json:"location"`
DomainNameServers []string `json:"domain_name_servers"`
AllocationPoolStart string `json:"allocation_pool_start"`
AllocationPoolEnd string `json:"allocation_pool_end"`
GatewayIP string `json:"gateway_ip"`
UsedIPs int `json:"used_ips"`
TotalIPs int `json:"total_ips"`
}
type NetworkCreate ¶
type NetworkCreate struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
LocationID int `json:"location_id,omitempty"`
DomainNameServers []string `json:"domain_name_servers,omitempty"`
CIDR string `json:"cidr,omitempty"`
AllocationPoolStart string `json:"allocation_pool_start,omitempty"`
AllocationPoolEnd string `json:"allocation_pool_end,omitempty"`
GatewayIP string `json:"gateway_ip,omitempty"`
}
type NetworkInterface ¶
type NetworkInterface struct {
ID int `json:"id"`
PrivateIP string `json:"private_ip"`
MacAddress string `json:"mac_address"`
Network Network `json:"network"`
AttachedElasticIP ElasticIP `json:"attached_elastic_ip"`
SecurityGroups []SecurityGroup `json:"security_groups"`
Security bool `json:"security"`
}
type NetworkInterfaceCreate ¶
type NetworkInterfaceList ¶
type NetworkInterfaceList struct {
Items []NetworkInterface
Pagination goclient.Pagination
}
type NetworkInterfaceSecurityGroupUpdate ¶
type NetworkInterfaceSecurityGroupUpdate struct {
SecurityGroupIDs []int `json:"security_group_ids"`
}
type NetworkInterfaceSecurityUpdate ¶
type NetworkInterfaceSecurityUpdate struct {
Security bool `json:"security"`
}
type NetworkInterfaceService ¶
type NetworkInterfaceService struct {
// contains filtered or unexported fields
}
func NewNetworkInterfaceService ¶
func NewNetworkInterfaceService(client goclient.Client, serverID int) NetworkInterfaceService
func (NetworkInterfaceService) Create ¶
func (n NetworkInterfaceService) Create(ctx context.Context, body NetworkInterfaceCreate) (networkInterface NetworkInterface, err error)
func (NetworkInterfaceService) Delete ¶
func (n NetworkInterfaceService) Delete(ctx context.Context, id int) (err error)
func (NetworkInterfaceService) List ¶
func (n NetworkInterfaceService) List(ctx context.Context, cursor goclient.Cursor) (list NetworkInterfaceList, err error)
func (NetworkInterfaceService) UpdateSecurity ¶
func (n NetworkInterfaceService) UpdateSecurity(ctx context.Context, id int, body NetworkInterfaceSecurityUpdate) (networkInterface NetworkInterface, err error)
func (NetworkInterfaceService) UpdateSecurityGroups ¶
func (n NetworkInterfaceService) UpdateSecurityGroups(ctx context.Context, id int, body NetworkInterfaceSecurityGroupUpdate) (networkInterface NetworkInterface, err error)
type NetworkList ¶
type NetworkList struct {
Items []Network
Pagination goclient.Pagination
}
type NetworkService ¶
type NetworkService struct {
// contains filtered or unexported fields
}
func NewNetworkService ¶
func NewNetworkService(client goclient.Client) NetworkService
func (NetworkService) Create ¶
func (n NetworkService) Create(ctx context.Context, body NetworkCreate) (network Network, err error)
func (NetworkService) Delete ¶
func (n NetworkService) Delete(ctx context.Context, id int) (err error)
func (NetworkService) List ¶
func (n NetworkService) List(ctx context.Context, cursor goclient.Cursor) (list NetworkList, err error)
func (NetworkService) Update ¶
func (n NetworkService) Update(ctx context.Context, id int, body NetworkUpdate) (network Network, err error)
type NetworkUpdate ¶
type NetworkUpdate struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
DomainNameServers []string `json:"domain_name_servers,omitempty"`
AllocationPoolStart string `json:"allocation_pool_start,omitempty"`
AllocationPoolEnd string `json:"allocation_pool_end,omitempty"`
GatewayIP string `json:"gateway_ip,omitempty"`
}
type RouteCreate ¶
type RouteList ¶
type RouteList struct {
Items []Route
Pagination goclient.Pagination
}
type RouteService ¶
type RouteService struct {
// contains filtered or unexported fields
}
func NewRouteService ¶
func NewRouteService(client goclient.Client, routerID int) RouteService
func (RouteService) Create ¶
func (r RouteService) Create(ctx context.Context, body RouteCreate) (route Route, err error)
type RouterCreate ¶
type RouterInterface ¶
type RouterInterfaceCreate ¶
type RouterInterfaceList ¶
type RouterInterfaceList struct {
Items []RouterInterface
Pagination goclient.Pagination
}
type RouterInterfaceService ¶
type RouterInterfaceService struct {
// contains filtered or unexported fields
}
func NewRouterInterfaceService ¶
func NewRouterInterfaceService(client goclient.Client, routerID int) RouterInterfaceService
func (RouterInterfaceService) Create ¶
func (r RouterInterfaceService) Create(ctx context.Context, body RouterInterfaceCreate) (routerInterface RouterInterface, err error)
func (RouterInterfaceService) Delete ¶
func (r RouterInterfaceService) Delete(ctx context.Context, id int) (err error)
func (RouterInterfaceService) List ¶
func (r RouterInterfaceService) List(ctx context.Context, cursor goclient.Cursor) (list RouterInterfaceList, err error)
type RouterList ¶
type RouterList struct {
Items []Router
Pagination goclient.Pagination
}
type RouterService ¶
type RouterService struct {
// contains filtered or unexported fields
}
func NewRouterService ¶
func NewRouterService(client goclient.Client) RouterService
func (RouterService) Create ¶
func (r RouterService) Create(ctx context.Context, body RouterCreate) (router Router, err error)
func (RouterService) Delete ¶
func (r RouterService) Delete(ctx context.Context, id int) (err error)
func (RouterService) List ¶
func (r RouterService) List(ctx context.Context, cursor goclient.Cursor) (list RouterList, err error)
func (RouterService) RouterInterfaces ¶
func (r RouterService) RouterInterfaces(routerID int) RouterInterfaceService
func (RouterService) Routes ¶
func (r RouterService) Routes(routerID int) RouteService
func (RouterService) Update ¶
func (r RouterService) Update(ctx context.Context, id int, body RouterUpdate) (router Router, err error)
type RouterUpdate ¶
type SecurityGroup ¶
type SecurityGroupCreate ¶
type SecurityGroupList ¶
type SecurityGroupList struct {
Items []SecurityGroup
Pagination goclient.Pagination
}
type SecurityGroupRule ¶
type SecurityGroupRule struct {
ID int `json:"id"`
Direction string `json:"direction"`
Protocol int `json:"protocol"`
FromPort int `json:"from_port"`
ToPort int `json:"to_port"`
ICMPType int `json:"icmp_type"`
ICMPCode int `json:"icmp_code"`
IPRange string `json:"ip_range"`
RemoteSecurityGroup SecurityGroup `json:"remote_security_group"`
}
type SecurityGroupRuleList ¶
type SecurityGroupRuleList struct {
Items []SecurityGroupRule
Pagination goclient.Pagination
}
type SecurityGroupRuleOptions ¶
type SecurityGroupRuleOptions struct {
Direction string `json:"direction"`
Protocol int `json:"protocol"`
FromPort int `json:"from_port,omitempty"`
ToPort int `json:"to_port,omitempty"`
ICMPType int `json:"icmp_type,omitempty"`
ICMPCode int `json:"icmp_code,omitempty"`
IPRange string `json:"ip_range,omitempty"`
RemoteSecurityGroupID int `json:"remote_security_group_id,omitempty"`
}
type SecurityGroupRuleService ¶
type SecurityGroupRuleService struct {
// contains filtered or unexported fields
}
func NewSecurityGroupRuleService ¶
func NewSecurityGroupRuleService(client goclient.Client, securityGroupID int) SecurityGroupRuleService
func (SecurityGroupRuleService) Create ¶
func (s SecurityGroupRuleService) Create(ctx context.Context, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
func (SecurityGroupRuleService) Delete ¶
func (s SecurityGroupRuleService) Delete(ctx context.Context, id int) (err error)
func (SecurityGroupRuleService) List ¶
func (s SecurityGroupRuleService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupRuleList, err error)
func (SecurityGroupRuleService) Update ¶
func (s SecurityGroupRuleService) Update(ctx context.Context, id int, body SecurityGroupRuleOptions) (rule SecurityGroupRule, err error)
type SecurityGroupService ¶
type SecurityGroupService struct {
// contains filtered or unexported fields
}
func NewSecurityGroupService ¶
func NewSecurityGroupService(client goclient.Client) SecurityGroupService
func (SecurityGroupService) Create ¶
func (s SecurityGroupService) Create(ctx context.Context, body SecurityGroupCreate) (securityGroup SecurityGroup, err error)
func (SecurityGroupService) Delete ¶
func (s SecurityGroupService) Delete(ctx context.Context, id int) (err error)
func (SecurityGroupService) Get ¶ added in v0.2.3
func (s SecurityGroupService) Get(ctx context.Context, id int) (securityGroup SecurityGroup, err error)
func (SecurityGroupService) List ¶
func (s SecurityGroupService) List(ctx context.Context, cursor goclient.Cursor) (list SecurityGroupList, err error)
func (SecurityGroupService) Rules ¶
func (s SecurityGroupService) Rules(securityGroupID int) SecurityGroupRuleService
func (SecurityGroupService) Update ¶
func (s SecurityGroupService) Update(ctx context.Context, id int, body SecurityGroupUpdate) (securityGroup SecurityGroup, err error)
type SecurityGroupUpdate ¶
type Server ¶
type Server struct {
ID int `json:"id"`
Name string `json:"name"`
Status ServerStatus `json:"status"`
Image Image `json:"image"`
Product common.Product `json:"product"`
Location common.Location `json:"location"`
Networks []ServerNetworkAttachment `json:"networks"`
KeyPair KeyPair `json:"key_pair"`
}
type ServerAction ¶
type ServerCreate ¶
type ServerCreate struct {
Name string `json:"name"`
LocationID int `json:"location_id"`
ImageID int `json:"image_id"`
ProductID int `json:"product_id"`
AttachExternalIP bool `json:"attach_external_ip"`
NetworkID int `json:"network_id"`
PrivateIP string `json:"private_ip,omitempty"`
KeyPairID int `json:"key_pair_id,omitempty"`
Password string `json:"password,omitempty"`
CloudInit string `json:"cloud_init,omitempty"`
}
type ServerElasticIPService ¶ added in v0.2.1
type ServerElasticIPService struct {
// contains filtered or unexported fields
}
func NewServerElasticIPService ¶ added in v0.2.1
func NewServerElasticIPService(client goclient.Client, serverID int) ServerElasticIPService
func (ServerElasticIPService) Attach ¶ added in v0.2.1
func (s ServerElasticIPService) Attach(ctx context.Context, body ElasticIPAttach) (elasticIP ElasticIP, err error)
func (ServerElasticIPService) Detach ¶ added in v0.2.1
func (s ServerElasticIPService) Detach(ctx context.Context, id int) (err error)
func (ServerElasticIPService) List ¶ added in v0.2.1
func (s ServerElasticIPService) List(ctx context.Context, cursor goclient.Cursor) (list ElasticIPList, err error)
type ServerList ¶
type ServerList struct {
Items []Server
Pagination goclient.Pagination
}
type ServerNetworkAttachment ¶
type ServerNetworkAttachment struct {
Network
Interfaces []AttachedNetworkInterface `json:"network_interfaces"`
}
type ServerPerform ¶
type ServerPerform struct {
Action string `json:"action"`
}
type ServerService ¶
type ServerService struct {
// contains filtered or unexported fields
}
func NewServerService ¶
func NewServerService(client goclient.Client) ServerService
func (ServerService) Create ¶
func (s ServerService) Create(ctx context.Context, body ServerCreate) (ordering common.Ordering, err error)
func (ServerService) List ¶
func (s ServerService) List(ctx context.Context, cursor goclient.Cursor) (list ServerList, err error)
func (ServerService) NetworkInterfaces ¶
func (s ServerService) NetworkInterfaces(serverID int) NetworkInterfaceService
func (ServerService) Perform ¶
func (s ServerService) Perform(ctx context.Context, id int, body ServerPerform) (server Server, err error)
func (ServerService) Update ¶
func (s ServerService) Update(ctx context.Context, id int, body ServerUpdate) (server Server, err error)
func (ServerService) Upgrade ¶
func (s ServerService) Upgrade(ctx context.Context, id int, body ServerUpgrade) (ordering common.Ordering, err error)
type ServerStatus ¶
type ServerStatus struct {
ID int `json:"id"`
Name string `json:"name"`
Key string `json:"key"`
Actions []ServerAction `json:"actions"`
}
type ServerUpdate ¶
type ServerUpdate struct {
Name string `json:"name"`
}
type ServerUpgrade ¶
type ServerUpgrade struct {
ProductID int `json:"product_id"`
}
type SnapshotCreate ¶
type SnapshotList ¶
type SnapshotList struct {
Items []Snapshot
Pagination goclient.Pagination
}
type SnapshotService ¶
type SnapshotService struct {
// contains filtered or unexported fields
}
func NewSnapshotService ¶
func NewSnapshotService(client goclient.Client) SnapshotService
func (SnapshotService) Create ¶
func (s SnapshotService) Create(ctx context.Context, body SnapshotCreate) (snapshot Snapshot, err error)
func (SnapshotService) Delete ¶
func (s SnapshotService) Delete(ctx context.Context, id int) (err error)
func (SnapshotService) List ¶
func (s SnapshotService) List(ctx context.Context, cursor goclient.Cursor) (list SnapshotList, err error)
func (SnapshotService) Update ¶
func (s SnapshotService) Update(ctx context.Context, id int, body SnapshotUpdate) (snapshot Snapshot, err error)
type SnapshotStatus ¶ added in v0.0.1
type SnapshotUpdate ¶
type SnapshotUpdate struct {
Name string `json:"name,omitempty"`
}
type Volume ¶
type Volume struct {
ID int `json:"id"`
Product common.Product `json:"product"`
Location common.Location `json:"location"`
Status VolumeStatus `json:"status"`
Name string `json:"name"`
Size int `json:"size"`
SerialNumber string `json:"serial"`
Snapshots int `json:"snapshots"`
Bootable bool `json:"bootable"`
RootVolume bool `json:"root_volume"`
AttachedTo Server `json:"instance"`
CreatedAt common.Time `json:"created_at"`
}
type VolumeAttach ¶
type VolumeAttach struct {
InstanceID int `json:"instance_id"`
}
type VolumeCreate ¶
type VolumeExpand ¶
type VolumeExpand struct {
Size int `json:"size"`
}
type VolumeList ¶
type VolumeList struct {
Items []Volume
Pagination goclient.Pagination
}
type VolumeRevert ¶
type VolumeRevert struct {
SnapshotID int `json:"snapshot_id"`
}
type VolumeService ¶
type VolumeService struct {
// contains filtered or unexported fields
}
func NewVolumeService ¶
func NewVolumeService(client goclient.Client) VolumeService
func (VolumeService) Attach ¶
func (v VolumeService) Attach(ctx context.Context, id int, body VolumeAttach) (volume Volume, err error)
func (VolumeService) Create ¶
func (v VolumeService) Create(ctx context.Context, body VolumeCreate) (volume Volume, err error)
func (VolumeService) Delete ¶
func (v VolumeService) Delete(ctx context.Context, id int) (err error)
func (VolumeService) Expand ¶
func (v VolumeService) Expand(ctx context.Context, id int, body VolumeExpand) (volume Volume, err error)
func (VolumeService) List ¶
func (v VolumeService) List(ctx context.Context, cursor goclient.Cursor) (list VolumeList, err error)
func (VolumeService) Revert ¶
func (v VolumeService) Revert(ctx context.Context, id int, body VolumeRevert) (volume Volume, err error)
func (VolumeService) Update ¶
func (v VolumeService) Update(ctx context.Context, id int, body VolumeUpdate) (volume Volume, err error)
type VolumeStatus ¶
type VolumeUpdate ¶
type VolumeUpdate struct {
Name string `json:"name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.