Documentation ¶
Index ¶
- Constants
- Variables
- type Account
- type Action
- type ActionListRequest
- type Actions
- type AffinityRule
- type Application
- type ApplicationConfig
- type ApplicationConfiguration
- type AssignedTo
- type AttachedVolume
- type BucketOwner
- type Charge
- type Client
- func NewAdvancedClientForTesting(responses []ConfigAdvanceClientForTesting) (*Client, *httptest.Server, error)
- func NewClient(apiKey, region string) (*Client, error)
- func NewClientForTesting(responses map[string]string) (*Client, *httptest.Server, error)
- func NewClientForTestingWithServer(server *httptest.Server) (*Client, error)
- func NewClientWithURL(apiKey, civoAPIURL, region string) (*Client, error)
- func (c *Client) AddAccountToOrganisation(organisationID, organisationToken string) ([]Account, error)
- func (c *Client) AddTeamMember(teamID, userID, permissions, roles string) ([]TeamMember, error)
- func (c *Client) AssignIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
- func (c *Client) AttachSubnetToInstance(networkID, subnetID string, route *CreateRoute) (*Route, error)
- func (c *Client) AttachVolume(id string, v VolumeAttachConfig) (*SimpleResponse, error)
- func (c *Client) ConnectRegion(r *ConnectRegionRequest) error
- func (c *Client) CreateApplication(config *ApplicationConfig) (*Application, error)
- func (c *Client) CreateDNSDomain(name string) (*DNSDomain, error)
- func (c *Client) CreateDNSRecord(domainID string, r *DNSRecordConfig) (*DNSRecord, error)
- func (c *Client) CreateDatabaseBackup(did string, v *DatabaseBackupCreateRequest) (*DatabaseBackup, error)
- func (c *Client) CreateInstance(config *InstanceConfig) (*Instance, error)
- func (c *Client) CreateKfCluster(req CreateKfClusterReq) (*KfCluster, error)
- func (c *Client) CreateKubernetesClusterPool(id string, i *KubernetesClusterPoolConfig) (*SimpleResponse, error)
- func (c *Client) CreateLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error)
- func (c *Client) CreateNetwork(nc NetworkConfig) (*NetworkResult, error)
- func (c *Client) CreateOrganisation(name string) (*Organisation, error)
- func (c *Client) CreateRegion(r *CreateRegionRequest) (*Region, error)
- func (c *Client) CreateRole(name, permissions string) (*Role, error)
- func (c *Client) CreateSubnet(networkID string, subnet SubnetConfig) (*Subnet, error)
- func (c *Client) CreateTeam(name string) (*Team, error)
- func (c *Client) CreateWebhook(r *WebhookConfig) (*Webhook, error)
- func (c *Client) DecodeSimpleResponse(resp []byte) (*SimpleResponse, error)
- func (c *Client) DeleteApplication(id string) (*SimpleResponse, error)
- func (c *Client) DeleteDNSDomain(d *DNSDomain) (*SimpleResponse, error)
- func (c *Client) DeleteDNSRecord(r *DNSRecord) (*SimpleResponse, error)
- func (c *Client) DeleteDatabase(id string) (*SimpleResponse, error)
- func (c *Client) DeleteDatabaseBackup(dbid, id string) (*SimpleResponse, error)
- func (c *Client) DeleteFirewall(id string) (*SimpleResponse, error)
- func (c *Client) DeleteFirewallRule(id string, ruleID string) (*SimpleResponse, error)
- func (c *Client) DeleteIP(id string) (*SimpleResponse, error)
- func (c *Client) DeleteInstance(id string) (*SimpleResponse, error)
- func (c *Client) DeleteKfCluster(id string) (*SimpleResponse, error)
- func (c *Client) DeleteKubernetesCluster(id string) (*SimpleResponse, error)
- func (c *Client) DeleteKubernetesClusterPool(id, poolID string) (*SimpleResponse, error)
- func (c *Client) DeleteKubernetesClusterPoolInstance(cid, pid, id string) (*SimpleResponse, error)
- func (c *Client) DeleteLoadBalancer(id string) (*SimpleResponse, error)
- func (c *Client) DeleteNetwork(id string) (*SimpleResponse, error)
- func (c *Client) DeleteObjectStore(id string) (*SimpleResponse, error)
- func (c *Client) DeleteObjectStoreCredential(id string) (*SimpleResponse, error)
- func (c *Client) DeleteRole(id string) (*SimpleResponse, error)
- func (c *Client) DeleteSSHKey(id string) (*SimpleResponse, error)
- func (c *Client) DeleteSubnet(networkID, subnetID string) (*SimpleResponse, error)
- func (c *Client) DeleteTeam(id string) (*SimpleResponse, error)
- func (c *Client) DeleteVolume(id string) (*SimpleResponse, error)
- func (c *Client) DeleteWebhook(id string) (*SimpleResponse, error)
- func (c *Client) DetachSubnetFromInstance(networkID, subnetID string) (*SimpleResponse, error)
- func (c *Client) DetachVolume(id string) (*SimpleResponse, error)
- func (c *Client) DisconnectRegion(r *DisconnectRegionRequest) error
- func (c *Client) FindApplication(search string) (*Application, error)
- func (c *Client) FindDNSDomain(search string) (*DNSDomain, error)
- func (c *Client) FindDatabase(search string) (*Database, error)
- func (c *Client) FindDatabaseBackup(dbid, search string) (*DatabaseBackup, error)
- func (c *Client) FindDiskImage(search string) (*DiskImage, error)
- func (c *Client) FindFirewall(search string) (*Firewall, error)
- func (c *Client) FindFirewallRule(firewallID string, search string) (*FirewallRule, error)
- func (c *Client) FindIP(search string) (*IP, error)
- func (c *Client) FindInstance(search string) (*Instance, error)
- func (c *Client) FindInstanceSizes(search string) (*InstanceSize, error)
- func (c *Client) FindKfCluster(search string) (*KfCluster, error)
- func (c *Client) FindKubernetesCluster(search string) (*KubernetesCluster, error)
- func (c *Client) FindKubernetesClusterInstance(clusterID, search string) (*Instance, error)
- func (c *Client) FindKubernetesClusterPool(cid, search string) (*KubernetesPool, error)
- func (c *Client) FindLoadBalancer(search string) (*LoadBalancer, error)
- func (c *Client) FindNetwork(search string) (*Network, error)
- func (c *Client) FindObjectStore(search string) (*ObjectStore, error)
- func (c *Client) FindObjectStoreCredential(search string) (*ObjectStoreCredential, error)
- func (c *Client) FindRegion(search string) (*Region, error)
- func (c *Client) FindSSHKey(search string) (*SSHKey, error)
- func (c *Client) FindSubnet(search, networkID string) (*Subnet, error)
- func (c *Client) FindTeam(search string) (*Team, error)
- func (c *Client) FindVolume(search string) (*Volume, error)
- func (c *Client) FindWebhook(search string) (*Webhook, error)
- func (c *Client) GetAccountID() string
- func (c *Client) GetApplication(id string) (*Application, error)
- func (c *Client) GetApplicationLogAuth(id string) (string, error)
- func (c *Client) GetDNSDomain(name string) (*DNSDomain, error)
- func (c *Client) GetDNSRecord(domainID, domainRecordID string) (*DNSRecord, error)
- func (c *Client) GetDatabase(id string) (*Database, error)
- func (c *Client) GetDatabaseBackup(dbid, id string) (*DatabaseBackup, error)
- func (c *Client) GetDefaultNetwork() (*Network, error)
- func (c *Client) GetDefaultRegion() (*Region, error)
- func (c *Client) GetDiskImage(id string) (*DiskImage, error)
- func (c *Client) GetDiskImageByName(name string) (*DiskImage, error)
- func (c *Client) GetIP(id string) (*IP, error)
- func (c *Client) GetInstance(id string) (*Instance, error)
- func (c *Client) GetInstanceConsoleURL(id string) (string, error)
- func (c *Client) GetInstanceVnc(id string) (InstanceVnc, error)
- func (c *Client) GetKfCluster(id string) (*KfCluster, error)
- func (c *Client) GetKubernetesCluster(id string) (*KubernetesCluster, error)
- func (c *Client) GetKubernetesClusterPool(cid, pid string) (*KubernetesPool, error)
- func (c *Client) GetLoadBalancer(id string) (*LoadBalancer, error)
- func (c *Client) GetMostRecentDistro(name string) (*DiskImage, error)
- func (c *Client) GetNetwork(id string) (*Network, error)
- func (c *Client) GetObjectStore(id string) (*ObjectStore, error)
- func (c *Client) GetObjectStoreCredential(id string) (*ObjectStoreCredential, error)
- func (c *Client) GetObjectStoreStats(id string) (*ObjectStoreStats, error)
- func (c *Client) GetOrganisation() (*Organisation, error)
- func (c *Client) GetQuota() (*Quota, error)
- func (c *Client) GetSubnet(networkID, subnetID string) (*Subnet, error)
- func (c *Client) GetUserEverything(userID string) (*UserEverything, error)
- func (c *Client) GetVolume(id string) (*Volume, error)
- func (c *Client) HardRebootInstance(id string) (*SimpleResponse, error)
- func (c *Client) ListAccounts() (*PaginatedAccounts, error)
- func (c *Client) ListAccountsInOrganisation() ([]Account, error)
- func (c *Client) ListActions(listRequest *ActionListRequest) (*PaginateActionList, error)
- func (c *Client) ListAllInstances() ([]Instance, error)
- func (c *Client) ListApplications() (*PaginatedApplications, error)
- func (c *Client) ListAvailableKubernetesVersions() ([]KubernetesVersion, error)
- func (c *Client) ListCharges(from, to time.Time) ([]Charge, error)
- func (c *Client) ListDBVersions() (map[string][]SupportedSoftwareVersion, error)
- func (c *Client) ListDNSDomains() ([]DNSDomain, error)
- func (c *Client) ListDNSRecords(dnsDomainID string) ([]DNSRecord, error)
- func (c *Client) ListDanglingVolumes() ([]Volume, error)
- func (c *Client) ListDatabaseBackup(did string) (*PaginatedDatabaseBackup, error)
- func (c *Client) ListDatabases() (*PaginatedDatabases, error)
- func (c *Client) ListDiskImages() ([]DiskImage, error)
- func (c *Client) ListFirewallRules(id string) ([]FirewallRule, error)
- func (c *Client) ListFirewalls() ([]Firewall, error)
- func (c *Client) ListIPs() (*PaginatedIPs, error)
- func (c *Client) ListInstanceSizes() ([]InstanceSize, error)
- func (c *Client) ListInstances(page int, perPage int) (*PaginatedInstanceList, error)
- func (c *Client) ListKfClusters() (*PaginatedKfClusters, error)
- func (c *Client) ListKubernetesClusterInstances(id string) ([]Instance, error)
- func (c *Client) ListKubernetesClusterPools(cid string) ([]KubernetesPool, error)
- func (c *Client) ListKubernetesClusters() (*PaginatedKubernetesClusters, error)
- func (c *Client) ListKubernetesMarketplaceApplications() ([]KubernetesMarketplaceApplication, error)
- func (c *Client) ListLoadBalancers() ([]LoadBalancer, error)
- func (c *Client) ListNetworks() ([]Network, error)
- func (c *Client) ListObjectStoreCredentials(page, perPage int) (*PaginatedObjectStoreCredentials, error)
- func (c *Client) ListObjectStores() (*PaginatedObjectstores, error)
- func (c *Client) ListPermissions() ([]Permission, error)
- func (c *Client) ListRegions() ([]Region, error)
- func (c *Client) ListRoles() ([]Role, error)
- func (c *Client) ListSSHKeys() ([]SSHKey, error)
- func (c *Client) ListSubnets(networkID string) ([]Subnet, error)
- func (c *Client) ListTeamMembers(teamID string) ([]TeamMember, error)
- func (c *Client) ListTeams() ([]Team, error)
- func (c *Client) ListVolumeTypes() ([]VolumeType, error)
- func (c *Client) ListVolumes() ([]Volume, error)
- func (c *Client) ListVolumesForCluster(clusterID string) ([]Volume, error)
- func (c *Client) ListWebhooks() ([]Webhook, error)
- func (c *Client) MovePublicIPToInstance(id, ipAddress string) (*SimpleResponse, error)
- func (c *Client) NewApplicationConfig() (*ApplicationConfig, error)
- func (c *Client) NewDatabase(v *CreateDatabaseRequest) (*Database, error)
- func (c *Client) NewFirewall(firewall *FirewallConfig) (*FirewallResult, error)
- func (c *Client) NewFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error)
- func (c *Client) NewIP(v *CreateIPRequest) (*IP, error)
- func (c *Client) NewInstanceConfig() (*InstanceConfig, error)
- func (c *Client) NewKubernetesClusters(kc *KubernetesClusterConfig) (*KubernetesCluster, error)
- func (c *Client) NewNetwork(label string) (*NetworkResult, error)
- func (c *Client) NewObjectStore(v *CreateObjectStoreRequest) (*ObjectStore, error)
- func (c *Client) NewObjectStoreCredential(v *CreateObjectStoreCredentialRequest) (*ObjectStoreCredential, error)
- func (c *Client) NewSSHKey(name string, publicKey string) (*SimpleResponse, error)
- func (c *Client) NewVolume(v *VolumeConfig) (*VolumeResult, error)
- func (c *Client) Ping() error
- func (c *Client) RebootInstance(id string) (*SimpleResponse, error)
- func (c *Client) RecycleKubernetesCluster(id string, hostname string) (*SimpleResponse, error)
- func (c *Client) RemoveTeamMember(teamID, teamMemberID string) (*SimpleResponse, error)
- func (c *Client) RenameFirewall(id string, f *FirewallConfig) (*SimpleResponse, error)
- func (c *Client) RenameNetwork(label, id string) (*NetworkResult, error)
- func (c *Client) RenameOrganisation(name string) (*Organisation, error)
- func (c *Client) RenameTeam(teamID, name string) (*Team, error)
- func (c *Client) ResizeVolume(id string, size int) (*SimpleResponse, error)
- func (c *Client) RestoreDatabase(id string, v *RestoreDatabaseRequest) (*SimpleResponse, error)
- func (c *Client) SendDeleteRequest(requestURL string) ([]byte, error)
- func (c *Client) SendGetRequest(requestURL string) ([]byte, error)
- func (c *Client) SendPostRequest(requestURL string, params interface{}) ([]byte, error)
- func (c *Client) SendPutRequest(requestURL string, params interface{}) ([]byte, error)
- func (c *Client) SetInstanceFirewall(id, firewallID string) (*SimpleResponse, error)
- func (c *Client) SetInstanceTags(i *Instance, tags string) (*SimpleResponse, error)
- func (c *Client) SetUserAgent(component *Component)
- func (c *Client) SoftRebootInstance(id string) (*SimpleResponse, error)
- func (c *Client) StartInstance(id string) (*SimpleResponse, error)
- func (c *Client) StopInstance(id string) (*SimpleResponse, error)
- func (c *Client) UnassignIP(id, region string) (*SimpleResponse, error)
- func (c *Client) UpdateApplication(id string, application *UpdateApplicationRequest) (*Application, error)
- func (c *Client) UpdateDNSDomain(d *DNSDomain, name string) (*DNSDomain, error)
- func (c *Client) UpdateDNSRecord(r *DNSRecord, rc *DNSRecordConfig) (*DNSRecord, error)
- func (c *Client) UpdateDatabase(id string, v *UpdateDatabaseRequest) (*Database, error)
- func (c *Client) UpdateDatabaseBackup(did string, v *DatabaseBackupUpdateRequest) (*DatabaseBackup, error)
- func (c *Client) UpdateIP(id string, v *UpdateIPRequest) (*IP, error)
- func (c *Client) UpdateInstance(i *Instance) (*SimpleResponse, error)
- func (c *Client) UpdateKfCluster(id string, kfc *UpdateKfClusterReq) (*KfCluster, error)
- func (c *Client) UpdateKubernetesCluster(id string, i *KubernetesClusterConfig) (*KubernetesCluster, error)
- func (c *Client) UpdateKubernetesClusterPool(cid, pid string, config *KubernetesClusterPoolUpdateConfig) (*KubernetesPool, error)
- func (c *Client) UpdateLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error)
- func (c *Client) UpdateNetwork(id string, nc NetworkConfig) (*NetworkResult, error)
- func (c *Client) UpdateObjectStore(id string, v *UpdateObjectStoreRequest) (*ObjectStore, error)
- func (c *Client) UpdateObjectStoreCredential(id string, v *UpdateObjectStoreCredentialRequest) (*ObjectStoreCredential, error)
- func (c *Client) UpdateSSHKey(name string, sshKeyID string) (*SSHKey, error)
- func (c *Client) UpdateTeamMember(teamID, teamMemberID, permissions, roles string) (*TeamMember, error)
- func (c *Client) UpdateWebhook(id string, r *WebhookConfig) (*Webhook, error)
- func (c *Client) UpgradeInstance(id, newSize string) (*SimpleResponse, error)
- type Clienter
- type Component
- type Condition
- type ConfigAdvanceClientForTesting
- type ConnectRegionRequest
- type CreateDatabaseRequest
- type CreateIPRequest
- type CreateKfClusterReq
- type CreateObjectStoreCredentialRequest
- type CreateObjectStoreRequest
- type CreateRegionRequest
- type CreateRoute
- type DNSDomain
- type DNSRecord
- type DNSRecordConfig
- type DNSRecordType
- type Database
- type DatabaseBackup
- type DatabaseBackupCreateRequest
- type DatabaseBackupUpdateRequest
- type DatabaseUserInfo
- type DisconnectRegionRequest
- type DiskImage
- type EnvVar
- type FakeClient
- func (c *FakeClient) AddAccountToOrganisation(accountID string) ([]Account, error)
- func (c *FakeClient) AddTeamMember(teamID, userID, permissions, roles string) ([]TeamMember, error)
- func (c *FakeClient) AssignIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
- func (c *FakeClient) AttachVolume(id string, cfg VolumeAttachConfig) (*SimpleResponse, error)
- func (c *FakeClient) ConnectRegion(r *ConnectRegionRequest) error
- func (c *FakeClient) CreateDNSDomain(name string) (*DNSDomain, error)
- func (c *FakeClient) CreateDNSRecord(domainID string, r *DNSRecordConfig) (*DNSRecord, error)
- func (c *FakeClient) CreateInstance(config *InstanceConfig) (*Instance, error)
- func (c *FakeClient) CreateLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error)
- func (c *FakeClient) CreateNetwork(config NetworkConfig) (*NetworkResult, error)
- func (c *FakeClient) CreateOrganisation(name string) (*Organisation, error)
- func (c *FakeClient) CreateRegion(r *CreateRegionRequest) (*Region, error)
- func (c *FakeClient) CreateRole(name, permissions string) (*Role, error)
- func (c *FakeClient) CreateTeam(name string) (*Team, error)
- func (c *FakeClient) CreateWebhook(r *WebhookConfig) (*Webhook, error)
- func (c *FakeClient) DeleteDNSDomain(d *DNSDomain) (*SimpleResponse, error)
- func (c *FakeClient) DeleteDNSRecord(r *DNSRecord) (*SimpleResponse, error)
- func (c *FakeClient) DeleteFirewall(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteFirewallRule(id string, ruleID string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteIP(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteInstance(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteKubernetesCluster(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteKubernetesClusterPoolInstance(cid, pid, id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteLoadBalancer(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteNetwork(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteRole(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteSSHKey(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteTeam(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteVolume(id string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteWebhook(id string) (*SimpleResponse, error)
- func (c *FakeClient) DetachVolume(id string) (*SimpleResponse, error)
- func (c *FakeClient) DisconnectRegion(r *DisconnectRegionRequest) error
- func (c *FakeClient) FindDNSDomain(search string) (*DNSDomain, error)
- func (c *FakeClient) FindDiskImage(search string) (*DiskImage, error)
- func (c *FakeClient) FindFirewall(search string) (*Firewall, error)
- func (c *FakeClient) FindFirewallRule(firewallID string, search string) (*FirewallRule, error)
- func (c *FakeClient) FindIP(search string) (*IP, error)
- func (c *FakeClient) FindInstance(search string) (*Instance, error)
- func (c *FakeClient) FindInstanceSizes(search string) (*InstanceSize, error)
- func (c *FakeClient) FindKubernetesCluster(search string) (*KubernetesCluster, error)
- func (c *FakeClient) FindKubernetesClusterInstance(clusterID, search string) (*Instance, error)
- func (c *FakeClient) FindKubernetesClusterPool(cid, search string) (*KubernetesPool, error)
- func (c *FakeClient) FindLoadBalancer(search string) (*LoadBalancer, error)
- func (c *FakeClient) FindNetwork(search string) (*Network, error)
- func (c *FakeClient) FindSSHKey(search string) (*SSHKey, error)
- func (c *FakeClient) FindVolume(search string) (*Volume, error)
- func (c *FakeClient) FindWebhook(search string) (*Webhook, error)
- func (c *FakeClient) GetDNSDomain(name string) (*DNSDomain, error)
- func (c *FakeClient) GetDNSRecord(domainID, domainRecordID string) (*DNSRecord, error)
- func (c *FakeClient) GetDefaultNetwork() (*Network, error)
- func (c *FakeClient) GetDiskImage(id string) (*DiskImage, error)
- func (c *FakeClient) GetIP(id string) (*IP, error)
- func (c *FakeClient) GetInstance(id string) (*Instance, error)
- func (c *FakeClient) GetInstanceConsoleURL(id string) (string, error)
- func (c *FakeClient) GetKubernetesCluster(id string) (*KubernetesCluster, error)
- func (c *FakeClient) GetKubernetesClusterPool(cid, pid string) (*KubernetesPool, error)
- func (c *FakeClient) GetLoadBalancer(id string) (*LoadBalancer, error)
- func (c *FakeClient) GetOrganisation() (*Organisation, error)
- func (c *FakeClient) GetQuota() (*Quota, error)
- func (c *FakeClient) GetVolume(id string) (*Volume, error)
- func (c *FakeClient) HardRebootInstance(id string) (*SimpleResponse, error)
- func (c *FakeClient) ListAccountsInOrganisation() ([]Account, error)
- func (c *FakeClient) ListAllInstances() ([]Instance, error)
- func (c *FakeClient) ListAvailableKubernetesVersions() ([]KubernetesVersion, error)
- func (c *FakeClient) ListCharges(from, to time.Time) ([]Charge, error)
- func (c *FakeClient) ListDNSDomains() ([]DNSDomain, error)
- func (c *FakeClient) ListDNSRecords(dnsDomainID string) ([]DNSRecord, error)
- func (c *FakeClient) ListDiskImages() ([]DiskImage, error)
- func (c *FakeClient) ListFirewallRules(id string) ([]FirewallRule, error)
- func (c *FakeClient) ListFirewalls() ([]Firewall, error)
- func (c *FakeClient) ListIPs() (*PaginatedIPs, error)
- func (c *FakeClient) ListInstanceSizes() ([]InstanceSize, error)
- func (c *FakeClient) ListInstances(page int, perPage int) (*PaginatedInstanceList, error)
- func (c *FakeClient) ListKubernetesClusterInstances(id string) ([]Instance, error)
- func (c *FakeClient) ListKubernetesClusterPools(cid string) ([]KubernetesPool, error)
- func (c *FakeClient) ListKubernetesClusters() (*PaginatedKubernetesClusters, error)
- func (c *FakeClient) ListKubernetesMarketplaceApplications() ([]KubernetesMarketplaceApplication, error)
- func (c *FakeClient) ListLoadBalancers() ([]LoadBalancer, error)
- func (c *FakeClient) ListNetworks() ([]Network, error)
- func (c *FakeClient) ListPermissions() ([]Permission, error)
- func (c *FakeClient) ListRegions() ([]Region, error)
- func (c *FakeClient) ListRoles() ([]Role, error)
- func (c *FakeClient) ListSSHKeys() ([]SSHKey, error)
- func (c *FakeClient) ListTeamMembers(teamID string) ([]TeamMember, error)
- func (c *FakeClient) ListTeams() ([]Team, error)
- func (c *FakeClient) ListVolumes() ([]Volume, error)
- func (c *FakeClient) ListWebhooks() ([]Webhook, error)
- func (c *FakeClient) MovePublicIPToInstance(id, ipAddress string) (*SimpleResponse, error)
- func (c *FakeClient) NewFirewall(*FirewallConfig) (*FirewallResult, error)
- func (c *FakeClient) NewFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error)
- func (c *FakeClient) NewIP(v *CreateIPRequest) (*IP, error)
- func (c *FakeClient) NewInstanceConfig() (*InstanceConfig, error)
- func (c *FakeClient) NewKubernetesClusters(kc *KubernetesClusterConfig) (*KubernetesCluster, error)
- func (c *FakeClient) NewNetwork(label string) (*NetworkResult, error)
- func (c *FakeClient) NewSSHKey(name string, publicKey string) (*SimpleResponse, error)
- func (c *FakeClient) NewVolume(v *VolumeConfig) (*VolumeResult, error)
- func (c *FakeClient) Ping() error
- func (c *FakeClient) RebootInstance(id string) (*SimpleResponse, error)
- func (c *FakeClient) RecycleKubernetesCluster(id string, hostname string) (*SimpleResponse, error)
- func (c *FakeClient) RemoveTeamMember(teamID, teamMemberID string) (*SimpleResponse, error)
- func (c *FakeClient) RenameFirewall(id string, f *FirewallConfig) (*SimpleResponse, error)
- func (c *FakeClient) RenameNetwork(label, id string) (*NetworkResult, error)
- func (c *FakeClient) RenameOrganisation(name string) (*Organisation, error)
- func (c *FakeClient) RenameTeam(teamID, name string) (*Team, error)
- func (c *FakeClient) ResizeVolume(id string, size int) (*SimpleResponse, error)
- func (c *FakeClient) SetInstanceFirewall(id, firewallID string) (*SimpleResponse, error)
- func (c *FakeClient) SetInstanceTags(i *Instance, tags string) (*SimpleResponse, error)
- func (c *FakeClient) SoftRebootInstance(id string) (*SimpleResponse, error)
- func (c *FakeClient) StartInstance(id string) (*SimpleResponse, error)
- func (c *FakeClient) StopInstance(id string) (*SimpleResponse, error)
- func (c *FakeClient) UnassignIP(id, region string) (*SimpleResponse, error)
- func (c *FakeClient) UpdateDNSDomain(d *DNSDomain, name string) (*DNSDomain, error)
- func (c *FakeClient) UpdateDNSRecord(r *DNSRecord, rc *DNSRecordConfig) (*DNSRecord, error)
- func (c *FakeClient) UpdateIP(id string, v *UpdateIPRequest) (*IP, error)
- func (c *FakeClient) UpdateInstance(i *Instance) (*SimpleResponse, error)
- func (c *FakeClient) UpdateKubernetesCluster(id string, kc *KubernetesClusterConfig) (*KubernetesCluster, error)
- func (c *FakeClient) UpdateKubernetesClusterPool(cid, pid string, config *KubernetesClusterPoolUpdateConfig) (*KubernetesPool, error)
- func (c *FakeClient) UpdateLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error)
- func (c *FakeClient) UpdateSSHKey(name string, sshKeyID string) (*SSHKey, error)
- func (c *FakeClient) UpdateTeamMember(teamID, teamMemberID, permissions, roles string) (*TeamMember, error)
- func (c *FakeClient) UpdateWebhook(id string, r *WebhookConfig) (*Webhook, error)
- func (c *FakeClient) UpgradeInstance(id, newSize string) (*SimpleResponse, error)
- type Feature
- type Firewall
- type FirewallConfig
- type FirewallResult
- type FirewallRule
- type FirewallRuleConfig
- type HTTPError
- type IP
- type Instance
- type InstanceConfig
- type InstanceConsole
- type InstanceSize
- type InstanceVnc
- type KfCluster
- type KubernetesCluster
- type KubernetesClusterConfig
- type KubernetesClusterPoolConfig
- type KubernetesClusterPoolUpdateConfig
- type KubernetesInstalledApplication
- type KubernetesInstance
- type KubernetesMarketplaceApplication
- type KubernetesMarketplacePlan
- type KubernetesPlanConfiguration
- type KubernetesPool
- type KubernetesVersion
- type LoadBalancer
- type LoadBalancerBackend
- type LoadBalancerBackendConfig
- type LoadBalancerConfig
- type LoadBalancerOptions
- type LoadBalancerUpdateConfig
- type Network
- type NetworkConfig
- type NetworkResult
- type ObjectStore
- type ObjectStoreCredential
- type ObjectStoreStats
- type Organisation
- type PaginateActionList
- type PaginatedAccounts
- type PaginatedApplications
- type PaginatedDatabaseBackup
- type PaginatedDatabases
- type PaginatedIPs
- type PaginatedInstanceList
- type PaginatedKfClusters
- type PaginatedKubernetesClusters
- type PaginatedObjectStoreCredentials
- type PaginatedObjectstores
- type Permission
- type PlacementRule
- type ProcessInfo
- type Quota
- type Region
- type RequiredPools
- type RestoreDatabaseRequest
- type Result
- type Role
- type Route
- type SSHKey
- type SimpleResponse
- type Subnet
- type SubnetConfig
- type SupportedSoftwareVersion
- type Team
- type TeamMember
- type UpdateApplicationRequest
- type UpdateDatabaseRequest
- type UpdateIPRequest
- type UpdateKfClusterReq
- type UpdateObjectStoreCredentialRequest
- type UpdateObjectStoreRequest
- type User
- type UserEverything
- type VLANConnectConfig
- type ValueAdvanceClientForTesting
- type Volume
- type VolumeAttachConfig
- type VolumeConfig
- type VolumeResult
- type VolumeType
- type Webhook
- type WebhookConfig
Constants ¶
const ( // DNSRecordTypeA represents an A record DNSRecordTypeA = "A" // DNSRecordTypeCName represents an CNAME record DNSRecordTypeCName = "CNAME" // DNSRecordTypeMX represents an MX record DNSRecordTypeMX = "MX" // DNSRecordTypeSRV represents an SRV record DNSRecordTypeSRV = "SRV" // DNSRecordTypeTXT represents an TXT record DNSRecordTypeTXT = "TXT" )
const ResultSuccess = "success"
ResultSuccess represents a successful SimpleResponse
Variables ¶
var ( // ErrDNSDomainNotFound is returned when the domain is not found ErrDNSDomainNotFound = fmt.Errorf("domain not found") // ErrDNSRecordNotFound is returned when the record is not found ErrDNSRecordNotFound = fmt.Errorf("record not found") )
var ( ResponseDecodeFailedError = constError("ResponseDecodeFailed") DisabledServiceError = constError("DisabledServiceError") NoAPIKeySuppliedError = constError("NoAPIKeySuppliedError") MultipleMatchesError = constError("MultipleMatchesError") ZeroMatchesError = constError("ZeroMatchesError") IDisEmptyError = constError("IDisEmptyError") TimeoutError = constError("TimeoutError") CivoStatsdRecordFailedError = constError("CivoStatsdRecordFailedError") AuthenticationFailedError = constError("AuthenticationFailedError") CommonError = constError("Error") // Volume Error CannotRescueNewVolumeError = constError("CannotRescueNewVolumeError") CannotRestoreNewVolumeError = constError("CannotRestoreNewVolumeError") CannotScaleAlreadyRescalingClusterError = constError("CannotScaleAlreadyRescalingClusterError") VolumeInvalidSizeError = constError("VolumeInvalidSizeError") DatabaseAccountDestroyError = constError("DatabaseAccountDestroyError") DatabaseAccountNotFoundError = constError("DatabaseAccountNotFoundError") DatabaseAccountAccessDeniedError = constError("DatabaseAccountAccessDeniedError") DatabaseCreatingAccountError = constError("DatabaseCreatingAccountError") DatabaseUpdatingAccountError = constError("DatabaseUpdatingAccountError") DatabaseAccountStatsError = constError("DatabaseAccountStatsError") DatabaseActionListingError = constError("DatabaseActionListingError") DatabaseActionCreateError = constError("DatabaseActionCreateError") DatabaseAPIKeyCreateError = constError("DatabaseApiKeyCreateError") DatabaseAPIKeyDuplicateError = constError("DatabaseApiKeyDuplicateError") DatabaseAPIKeyNotFoundError = constError("DatabaseApiKeyNotFoundError") DatabaseAPIkeyDestroyError = constError("DatabaseAPIkeyDestroyError") DatabaseAuditLogListingError = constError("DatabaseAuditLogListingError") DatabaseBlueprintNotFoundError = constError("DatabaseBlueprintNotFoundError") DatabaseBlueprintDeleteFailedError = constError("DatabaseBlueprintDeleteFailedError") DatabaseBlueprintCreateError = constError("DatabaseBlueprintCreateError") DatabaseBlueprintUpdateError = constError("DatabaseBlueprintUpdateError") ParameterEmptyVolumeIDError = constError("ParameterEmptyVolumeIDError") ParameterEmptyOpenstackVolumeIDError = constError("ParameterEmptyOpenstackVolumeIDError") DatabaseChangeAPIKeyError = constError("DatabaseChangeAPIKeyError") DatabaseChargeListingError = constError("DatabaseChargeListingError") DatabaseConnectionFailedError = constError("DatabaseConnectionFailedError") DatabaseDNSDomainCreateError = constError("DatabaseDnsDomainCreateError") DatabaseDNSDomainUpdateError = constError("DatabaseDnsDomainUpdateError") DatabaseDNSDomainDuplicateNameError = constError("DatabaseDnsDomainDuplicateNameError") DatabaseDNSDomainNotFoundError = constError("DatabaseDNSDomainNotFoundError") DatabaseDNSRecordCreateError = constError("DatabaseDNSRecordCreateError") DatabaseDNSRecordNotFoundError = constError("DatabaseDNSRecordNotFoundError") DatabaseDNSRecordUpdateError = constError("DatabaseDNSRecordUpdateError") DatabaseListingDNSDomainsError = constError("DatabaseListingDNSDomainsError") DatabaseFirewallCreateError = constError("DatabaseFirewallCreateError") DatabaseFirewallRulesInvalidParams = constError("DatabaseFirewallRulesInvalidParams") DatabaseFirewallDuplicateNameError = constError("DatabaseFirewallDuplicateNameError") DatabaseFirewallMismatchError = constError("DatabaseFirewallMismatchError") DatabaseFirewallNotFoundError = constError("DatabaseFirewallNotFoundError") DatabaseFirewallSaveFailedError = constError("DatabaseFirewallSaveFailedError") DatabaseFirewallDeleteFailedError = constError("DatabaseFirewallDeleteFailedError") DatabaseFirewallRuleCreateError = constError("DatabaseFirewallRuleCreateError") DatabaseFirewallRuleDeleteFailedError = constError("DatabaseFirewallRuleDeleteFailedError") DatabaseFirewallRulesFindError = constError("DatabaseFirewallRulesFindError") DatabaseListingFirewallsError = constError("DatabaseListingFirewallsError") FirewallDuplicateError = constError("FirewallDuplicateError") // Instances Errors DatabaseInstanceAlreadyinRescueStateError = constError("DatabaseInstanceAlreadyinRescueStateError") DatabaseInstanceBuildError = constError("DatabaseInstanceBuildError") DatabaseInstanceBuildMultipleWithExistingPublicIPError = constError("DatabaseInstanceBuildMultipleWithExistingPublicIPError") DatabaseInstanceCreateError = constError("DatabaseInstanceCreateError") DatabaseInstanceSnapshotTooBigError = constError("DatabaseInstanceSnapshotTooBigError") DatabaseInstanceDuplicateError = constError("DatabaseInstanceDuplicateError") DatabaseInstanceDuplicateNameError = constError("DatabaseInstanceDuplicateNameError") DatabaseInstanceListError = constError("DatabaseInstanceListError") DatabaseInstanceNotFoundError = constError("DatabaseInstanceNotFoundError") DatabaseInstanceNotInOpenStackError = constError("DatabaseInstanceNotInOpenStackError") DatabaseCannotManageClusterInstanceError = constError("DatabaseCannotManageClusterInstanceError") DatabaseOldInstanceFindError = constError("DatabaseOldInstanceFindError") DatabaseCannotMoveIPError = constError("DatabaseCannotMoveIPError") DatabaseIPFindError = constError("DatabaseIPFindError") // Kubernetes Errors DatabaseKubernetesClusterInvalidError = constError("DatabaseKubernetesClusterInvalid") DatabaseKubernetesApplicationNotFoundError = constError("DatabaseKubernetesApplicationNotFound") DatabaseKubernetesApplicationInvalidPlanError = constError("DatabaseKubernetesApplicationInvalidPlan") DatabaseKubernetesClusterDuplicateError = constError("DatabaseKubernetesClusterDuplicate") DatabaseKubernetesClusterNotFoundError = constError("DatabaseKubernetesClusterNotFound") DatabaseKubernetesNodeNotFoundError = constError("DatabaseKubernetesNodeNotFound") DatabaseClusterPoolNotFoundError = constError("DatabaseClusterPoolNotFound") DatabaseClusterPoolInstanceNotFoundError = constError("DatabaseClusterPoolInstanceNotFound") DatabaseClusterPoolInstanceDeleteFailedError = constError("DatabaseClusterPoolInstanceDeleteFailed") DatabaseClusterPoolNoSufficientInstancesAvailableError = constError("DatabaseClusterPoolNoSufficientInstancesAvailable") DatabaseListingAccountsError = constError("DatabaseListingAccountsError") DatabaseListingMembershipsError = constError("DatabaseListingMembershipsError") DatabaseMembershipCannotDeleteError = constError("DatabaseMembershipCannotDeleteError") DatabaseMembershipsGrantAccessError = constError("DatabaseMembershipsGrantAccessError") DatabaseMembershipsInvalidInvitationError = constError("DatabaseMembershipsInvalidInvitationError") DatabaseMembershipsInvalidStatusError = constError("DatabaseMembershipsInvalidStatusError") DatabaseMembershipsNotFoundError = constError("DatabaseMembershipsNotFoundError") DatabaseMembershipsSuspendedError = constError("DatabaseMembershipsSuspendedError") DatabaseLoadBalancerSaveError = constError("DatabaseLoadBalancerSaveError") DatabaseLoadBalancerDeleteError = constError("DatabaseLoadBalancerDeleteError") DatabaseLoadBalancerUpdateError = constError("DatabaseLoadBalancerUpdateError") DatabaseLoadBalancerDuplicateError = constError("DatabaseLoadBalancerDuplicateError") DatabaseLoadBalancerExistsError = constError("DatabaseLoadBalancerExistsError") DatabaseLoadBalancerNotFoundError = constError("DatabaseLoadBalancerNotFoundError") DatabaseNetworksListError = constError("DatabaseNetworksListError") DatabaseNetworkCreateError = constError("DatabaseNetworkCreateError") DatabaseNetworkExistsError = constError("DatabaseNetworkExistsError") DatabaseNetworkDeleteLastError = constError("DatabaseNetworkDeleteLastError") DatabaseNetworkDeleteWithInstanceError = constError("DatabaseNetworkDeleteWithInstanceError") DatabaseNetworkInUseByVolumes = constError("DatabaseNetworkInUseByVolumes") DatabaseNetworkDuplicateNameError = constError("DatabaseNetworkDuplicateNameError") DatabaseNetworkLookupError = constError("DatabaseNetworkLookupError") DatabaseNetworkNotFoundError = constError("DatabaseNetworkNotFoundError") DatabaseNetworkSaveError = constError("DatabaseNetworkSaveError") DatabasePrivateIPFromPublicIPError = constError("DatabasePrivateIPFromPublicIPError") DatabaseQuotaNotFoundError = constError("DatabaseQuotaNotFoundError") DatabaseQuotaUpdateError = constError("DatabaseQuotaUpdateError") QuotaLimitReachedError = constError("QuotaLimitReachedError") DatabaseServiceNotFoundError = constError("DatabaseServiceNotFoundError") DatabaseSizeNotFoundError = constError("DatabaseServiceNotFoundError") DatabaseSizesListError = constError("DatabaseSizesListError") DatabaseSnapshotCannotDeleteInUseError = constError("DatabaseSnapshotCannotDeleteInUseError") DatabaseSnapshotCannotReplaceError = constError("DatabaseSnapshotCannotReplaceError") DatabaseSnapshotCreateError = constError("DatabaseSnapshotCreateError") DatabaseSnapshotCreateInstanceNotFoundError = constError("DatabaseSnapshotCreateInstanceNotFoundError") DatabaseSnapshotCreateAlreadyInProcessError = constError("DatabaseSnapshotCreateAlreadyInProcessError") DatabaseSnapshotNotFoundError = constError("DatabaseSnapshotNotFoundError") DatabaseSnapshotsListError = constError("DatabaseSnapshotsListError") DatabaseSSHKeyDestroyError = constError("DatabaseSSHKeyDestroyError") DatabaseSSHKeyCreateError = constError("DatabaseSSHKeyCreateError") DatabaseSSHKeyUpdateError = constError("DatabaseSSHKeyUpdateError") DatabaseSSHKeyDuplicateNameError = constError("DatabaseSSHKeyDuplicateNameError") DatabaseSSHKeyNotFoundError = constError("DatabaseSSHKeyNotFoundError") SSHKeyDuplicateError = constError("SSHKeyDuplicateError") DatabaseTeamCannotDeleteError = constError("DatabaseTeamCannotDeleteError") DatabaseTeamCreateError = constError("DatabaseTeamCreateError") DatabaseTeamListingError = constError("DatabaseTeamListingError") DatabaseTeamMembershipCreateError = constError("DatabaseTeamMembershipCreateError") DatabaseTeamNotFoundError = constError("DatabaseTeamNotFoundError") DatabaseTemplateDestroyError = constError("DatabaseTemplateDestroyError") DatabaseTemplateNotFoundError = constError("DatabaseTemplateNotFoundError") DatabaseTemplateUpdateError = constError("DatabaseTemplateUpdateError") DatabaseTemplateWouldConflictError = constError("DatabaseTemplateWouldConflictError") DatabaseImageIDInvalidError = constError("DatabaseImageIDInvalidError") DatabaseUserAlreadyExistsError = constError("DatabaseUserAlreadyExistsError") DatabaseUserNewError = constError("DatabaseUserNewError") DatabaseUserConfirmedError = constError("DatabaseUserConfirmedError") DatabaseUserSuspendedError = constError("DatabaseUserSuspendedError") DatabaseUserLoginFailedError = constError("DatabaseUserLoginFailedError") DatabaseUserNoChangeStatusError = constError("DatabaseUserNoChangeStatusError") DatabaseUserNotFoundError = constError("DatabaseUserNotFoundError") DatabaseUserPasswordInvalidError = constError("DatabaseUserPasswordInvalidError") DatabaseUserPasswordSecuringFailedError = constError("DatabaseUserPasswordSecuringFailedError") DatabaseUserUpdateError = constError("DatabaseUserUpdateError") DatabaseCreatingUserError = constError("DatabaseCreatingUserError") DatabaseVolumeIDInvalidError = constError("DatabaseVolumeIDInvalidError") DatabaseVolumeDuplicateNameError = constError("DatabaseVolumeDuplicateNameError") DatabaseVolumeCannotMultipleAttachError = constError("DatabaseVolumeCannotMultipleAttachError") DatabaseVolumeStillAttachedCannotResizeError = constError("DatabaseVolumeStillAttachedCannotResizeError") DatabaseVolumeNotAttachedError = constError("DatabaseVolumeNotAttachedError") DatabaseVolumeNotFoundError = constError("DatabaseVolumeNotFoundError") DatabaseVolumeDeleteFailedError = constError("DatabaseVolumeDeleteFailedError") DatabaseWebhookDestroyError = constError("DatabaseWebhookDestroyError") DatabaseWebhookNotFoundError = constError("DatabaseWebhookNotFoundError") DatabaseWebhookUpdateError = constError("DatabaseWebhookUpdateError") DatabaseWebhookWouldConflictError = constError("DatabaseWebhookWouldConflictError") OpenstackConnectionFailedError = constError("OpenstackConnectionFailedError") OpenstackCreatingProjectError = constError("OpenstackCreatingProjectError") OpenstackCreatingUserError = constError("OpenstackCreatingUserError") OpenstackFirewallCreateError = constError("OpenstackFirewallCreateError") OpenstackFirewallDestroyError = constError("OpenstackFirewallDestroyError") OpenstackFirewallRuleDestroyError = constError("OpenstackFirewallRuleDestroyError") OpenstackInstanceCreateError = constError("OpenstackInstanceCreateError") OpenstackInstanceDestroyError = constError("OpenstackInstanceDestroyError") OpenstackInstanceFindError = constError("OpenstackInstanceFindError") OpenstackInstanceRebootError = constError("OpenstackInstanceRebootError") OpenstackInstanceRebuildError = constError("OpenstackInstanceRebuildError") OpenstackInstanceResizeError = constError("OpenstackInstanceResizeError") OpenstackInstanceRestoreError = constError("OpenstackInstanceRestoreError") OpenstackInstanceSetFirewallError = constError("OpenstackInstanceSetFirewallError") OpenstackInstanceStartError = constError("OpenstackInstanceStartError") OpenstackInstanceStopError = constError("OpenstackInstanceStopError") OpenstackIPCreateError = constError("OpenstackIPCreateError") OpenstackNetworkCreateFailedError = constError("OpenstackNetworkCreateFailedError") OpenstackNnetworkDestroyFailedError = constError("OpenstackNnetworkDestroyFailedError") OpenstackNetworkEnsureConfiguredError = constError("OpenstackNetworkEnsureConfiguredError") OpenstackPublicIPConnectError = constError("OpenstackPublicIPConnectError") OpenstackQuotaApplyError = constError("OpenstackQuotaApplyError") OpenstackSnapshotDestroyError = constError("OpenstackSnapshotDestroyError") OpenstackSSHKeyUploadError = constError("OpenstackSSHKeyUploadError") OpenstackProjectDestroyError = constError("OpenstackProjectDestroyError") OpenstackProjectFindError = constError("OpenstackProjectFindError") OpenstackUserDestroyError = constError("OpenstackUserDestroyError") OpenstackURLGlanceError = constError("OpenstackUrlGlanceError") OpenstackURLNovaError = constError("OpenstackURLNovaError") AuthenticationInvalidKeyError = constError("AuthenticationInvalidKeyError") AuthenticationAccessDeniedError = constError("AuthenticationAccessDeniedError") InstanceStateMustBeActiveOrShutoffError = constError("InstanceStateMustBeActiveOrShutoffError") MarshalingObjectsToJSONError = constError("MarshalingObjectsToJsonError") NetworkCreateDefaultError = constError("NetworkCreateDefaultError") NetworkDeleteDefaultError = constError("NetworkDeleteDefaultError") ParameterTimeValueError = constError("ParameterTimeValueError") ParameterDateRangeTooLongError = constError("ParameterDateRangeTooLongError") ParameterDNSRecordTypeError = constError("ParameterDnsRecordTypeError") ParameterDNSRecordCnameApexError = constError("ParameterDNSRecordCnameApexError") ParameterPublicKeyEmptyError = constError("ParameterPublicKeyEmptyError") ParameterDateRangeError = constError("ParameterDateRangeError") ParameterIDMissingError = constError("ParameterIDMissingError") ParameterIDToIntegerError = constError("ParameterIDToIntegerError") ParameterImageAndVolumeIDMissingError = constError("ParameterImageAndVolumeIDMissingError") ParameterLabelInvalidError = constError("ParameterLabelInvalidError") ParameterNameInvalidError = constError("ParameterNameInvalidError") ParameterPrivateIPMissingError = constError("ParameterPrivateIPMissingError") ParameterPublicIPMissingError = constError("ParameterPublicIPMissingError") ParameterSizeMissingError = constError("ParameterSizeMissingError") ParameterVolumeSizeIncorrectError = constError("ParameterVolumeSizeIncorrectError") ParameterVolumeSizeMustIncreaseError = constError("ParameterVolumeSizeMustIncreaseError") CannotResizeVolumeError = constError("CannotResizeVolumeError") ParameterSnapshotMissingError = constError("ParameterSnapshotMissingError") ParameterSnapshotIncorrectFormatError = constError("ParameterSnapshotIncorrectFormatError") ParameterStartPortMissingError = constError("ParameterStartPortMissingError") DatabaseTemplateParseRequestError = constError("DatabaseTemplateParseRequestError") ParameterValueMissingError = constError("ParameterValueMissingError") OutOFCapacityError = constError("OutOFCapacityError") CannotGetConsoleError = constError("CannotGetConsoleError") DatabaseDNSDomainInvalidError = constError("DatabaseDNSDomainInvalidError") DatabaseFirewallExistsError = constError("DatabaseFirewallExistsError") DatabaseKubernetesClusterNoPoolsError = constError("DatabaseKubernetesClusterNoPoolsError") DatabaseKubernetesClusterInvalidVersionError = constError("DatabaseKubernetesClusterInvalidVersionError") DatabaseNamespacesListError = constError("DatabaseNamespacesListError") DatabaseNamespaceCreateError = constError("DatabaseNamespaceCreateError") DatabaseNamespaceExistsError = constError("DatabaseNamespaceExistsError") DatabaseNamespaceDeleteLastError = constError("DatabaseNamespaceDeleteLastError") DatabaseNamespaceDeleteWithInstanceError = constError("DatabaseNamespaceDeleteWithInstanceError") DatabaseNamespaceDuplicateNameError = constError("DatabaseNamespaceDuplicateNameError") DatabaseNamespaceLookupError = constError("DatabaseNamespaceLookupError") DatabaseNamespaceNotFoundError = constError("DatabaseNamespaceNotFoundError") DatabaseNamespaceSaveError = constError("DatabaseNamespaceSaveError") DatabaseQuotaLockFailedError = constError("DatabaseQuotaLockFailedError") DatabaseDiskImageNotFoundError = constError("DatabaseDiskImageNotFoundError") DatabaseDiskImageNotImplementedError = constError("DatabaseDiskImageNotImplementedError") DatabaseTemplateExistsError = constError("DatabaseTemplateExistsError") DatabaseTemplateSaveFailedError = constError("DatabaseTemplateSaveFailedError") KubernetesClusterInvalidNameError = constError("KubernetesClusterInvalidNameError") AccountNotEnabledIncCardError = constError("AccountNotEnabledIncCardError") AccountNotEnabledWithoutCardError = constError("AccountNotEnabledWithoutCardError") UnknownError = constError("UnknownError") AuthenticationError = constError("AuthenticationError") InternalServerError = constError("InternalServerError") )
Errors raised by package civogo
var ErrAppDomainNotFound = fmt.Errorf("domain not found")
ErrAppDomainNotFound is returned when the domain is not found
Functions ¶
This section is empty.
Types ¶
type Account ¶ added in v0.2.50
type Account struct { ID string `json:"id"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Label string `json:"label,omitempty"` EmailAddress string `json:"email_address,omitempty"` APIKey string `json:"api_key,omitempty"` Token string `json:"token,omitempty"` Flags string `json:"flags,omitempty"` Timezone string `json:"timezone,omitempty"` Partner string `json:"partner,omitempty"` DefaultUserID string `json:"default_user_id,omitempty"` Status string `json:"status,omitempty"` EmailConfirmed bool `json:"email_confirmed,omitempty"` CreditCardAdded bool `json:"credit_card_added,omitempty"` Enabled bool `json:"enabled,omitempty"` }
Account is the owner of Civo resources such as instances, Kubernetes clusters, volumes, etc Really the Account should be defined with Account endpoints, but there aren't any that are publicly-useful
type Action ¶ added in v0.3.14
type Action struct { ID int `json:"id" gorm:"autoIncrement"` CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"` UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"` AccountID string `json:"account_id"` UserID string `json:"user_id"` Type string `json:"type"` Details string `json:"details,omitempty"` RelatedID string `json:"related_id,omitempty"` RelatedType string `json:"related_type,omitempty"` Debug bool `json:"debug"` }
Action is a struct for an individual action within the database and when serialized
type ActionListRequest ¶ added in v0.3.14
type ActionListRequest struct { PerPage int `json:"per_page,omitempty" url:"per_page,omitempty"` Page int `json:"page,omitempty" url:"page,omitempty"` IncludeDebug bool `json:"include_debug,omitempty" url:"include_debug,omitempty"` ResourceID string `json:"resource_id,omitempty" url:"resource_id,omitempty"` Details string `json:"details,omitempty" url:"details,omitempty"` RelatedID string `json:"related_id,omitempty" url:"related_id,omitempty"` ResourceType string `json:"resource_type,omitempty" url:"resource_type,omitempty"` ActionType string `json:"action_type,omitempty" url:"action_type,omitempty"` CreatedAt string `json:"created_at,omitempty" url:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty" url:"updated_at,omitempty"` UserID string `json:"user_id,omitempty" url:"user_id,omitempty"` }
ActionListRequest is a struct for the request to list actions
type Actions ¶ added in v0.2.90
type Actions struct { // Action is one of "assign", "unassign" Action string `json:"action"` AssignToID string `json:"assign_to_id"` AssignToType string `json:"assign_to_type"` // Region is the region the IP will be created in Region string `json:"region"` }
Actions for IP
type AffinityRule ¶ added in v0.3.81
type AffinityRule struct { Type string `json:"type"` Exclusive bool `json:"exclusive"` Tags []string `json:"tags"` }
AffinityRule represents a affinity rule
type Application ¶ added in v0.2.76
type Application struct { Name string `json:"name" validate:"required"` ID string `json:"id"` NetworkID string `json:"network_id" validate:"required"` Description string `json:"description"` Image string `json:"image"` Size string `json:"size"` ProcessInfo []ProcessInfo `json:"process_info,omitempty"` Domains []string `json:"domains,omitempty"` SSHKeyIDs []string `json:"ssh_key_ids,omitempty"` Config []EnvVar `json:"config,omitempty"` // Status can be one of: // - "building": Implies platform is building // - "available": Implies platform is available to accept image // - "ready": Implies app is ready Status string `json:"status"` }
Application is the struct for the Application model
type ApplicationConfig ¶ added in v0.2.76
type ApplicationConfig struct { Name string `json:"name" validate:"required"` NetworkID string `json:"network_id" validate:"required"` Description string `json:"description"` Size string `json:"size"` SSHKeyIDs []string `json:"ssh_key_ids,omitempty"` }
ApplicationConfig describes the parameters for a new CivoApp
type ApplicationConfiguration ¶ added in v0.2.8
ApplicationConfiguration is a configuration for installed application
type AssignedTo ¶ added in v0.2.90
type AssignedTo struct { ID string `json:"id"` // Type can be one of the following: // - instance // - loadbalancer Type string `json:"type"` Name string `json:"name"` }
AssignedTo represents IP assigned to resource
type AttachedVolume ¶ added in v0.3.75
type AttachedVolume struct { // ID of the volume to attach ID string `json:"id"` }
AttachedVolume disk information
type BucketOwner ¶ added in v0.3.7
type BucketOwner struct { AccessKeyID string `json:"access_key_id,omitempty"` Name string `json:"name,omitempty"` CredentialID string `json:"credential_id,omitempty"` }
BucketOwner is the struct for owner details of an Object Store
type Charge ¶
type Charge struct { Code string `json:"code"` Label string `json:"label"` From time.Time `json:"from"` To time.Time `json:"to"` NumHours int `json:"num_hours"` SizeGigabytes int `json:"size_gb"` }
Charge represents a Civo resource with number of hours within the specified billing period
type Client ¶
type Client struct { BaseURL *url.URL UserAgent string APIKey string Region string LastJSONResponse string // contains filtered or unexported fields }
Client is the means of connecting to the Civo API service
func NewAdvancedClientForTesting ¶
func NewAdvancedClientForTesting(responses []ConfigAdvanceClientForTesting) (*Client, *httptest.Server, error)
NewAdvancedClientForTesting initializes a Client connecting to a local test server and allows for specifying methods
func NewClientForTesting ¶
NewClientForTesting initializes a Client connecting to a local test server
func NewClientForTestingWithServer ¶
NewClientForTestingWithServer initializes a Client connecting to a passed-in local test server
func NewClientWithURL ¶
NewClientWithURL initializes a Client with a specific API URL
func (*Client) AddAccountToOrganisation ¶ added in v0.2.50
func (c *Client) AddAccountToOrganisation(organisationID, organisationToken string) ([]Account, error)
AddAccountToOrganisation sets the link between second, third, etc accounts and the existing organisation
func (*Client) AddTeamMember ¶ added in v0.2.50
func (c *Client) AddTeamMember(teamID, userID, permissions, roles string) ([]TeamMember, error)
AddTeamMember adds a team member to the specified team, with permissions and roles (which are combinative)
func (*Client) AssignIP ¶ added in v0.2.90
func (c *Client) AssignIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
AssignIP assigns a reserved IP to a Civo resource
func (*Client) AttachSubnetToInstance ¶ added in v0.3.17
func (c *Client) AttachSubnetToInstance(networkID, subnetID string, route *CreateRoute) (*Route, error)
AttachSubnetToInstance attaches a subnet to an instance
func (*Client) AttachVolume ¶
func (c *Client) AttachVolume(id string, v VolumeAttachConfig) (*SimpleResponse, error)
AttachVolume attaches a volume to an instance https://www.civo.com/api/volumes#attach-a-volume-to-an-instance
func (*Client) ConnectRegion ¶ added in v0.3.72
func (c *Client) ConnectRegion(r *ConnectRegionRequest) error
ConnectRegion connects a region to CivoAPI
func (*Client) CreateApplication ¶ added in v0.2.76
func (c *Client) CreateApplication(config *ApplicationConfig) (*Application, error)
CreateApplication creates a new application
func (*Client) CreateDNSDomain ¶
CreateDNSDomain registers a new Domain
func (*Client) CreateDNSRecord ¶
func (c *Client) CreateDNSRecord(domainID string, r *DNSRecordConfig) (*DNSRecord, error)
CreateDNSRecord creates a new DNS record
func (*Client) CreateDatabaseBackup ¶ added in v0.3.44
func (c *Client) CreateDatabaseBackup(did string, v *DatabaseBackupCreateRequest) (*DatabaseBackup, error)
CreateDatabaseBackup create database backup
func (*Client) CreateInstance ¶
func (c *Client) CreateInstance(config *InstanceConfig) (*Instance, error)
CreateInstance creates a new instance in the account
func (*Client) CreateKfCluster ¶ added in v0.3.29
func (c *Client) CreateKfCluster(req CreateKfClusterReq) (*KfCluster, error)
CreateKfCluster creates a new kubeflow cluster
func (*Client) CreateKubernetesClusterPool ¶ added in v0.3.49
func (c *Client) CreateKubernetesClusterPool(id string, i *KubernetesClusterPoolConfig) (*SimpleResponse, error)
CreateKubernetesClusterPool update a single kubernetes cluster by its full ID
func (*Client) CreateLoadBalancer ¶
func (c *Client) CreateLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error)
CreateLoadBalancer creates a new load balancer
func (*Client) CreateNetwork ¶ added in v0.3.15
func (c *Client) CreateNetwork(nc NetworkConfig) (*NetworkResult, error)
CreateNetwork creates a new network
func (*Client) CreateOrganisation ¶ added in v0.2.50
func (c *Client) CreateOrganisation(name string) (*Organisation, error)
CreateOrganisation creates an organisation with the current account as the only linked member (errors if it's already linked)
func (*Client) CreateRegion ¶ added in v0.3.71
func (c *Client) CreateRegion(r *CreateRegionRequest) (*Region, error)
CreateRegion is a function to create a region
func (*Client) CreateRole ¶ added in v0.2.50
CreateRole creates a new role with a set of permissions for use within an organisation
func (*Client) CreateSubnet ¶ added in v0.3.15
func (c *Client) CreateSubnet(networkID string, subnet SubnetConfig) (*Subnet, error)
CreateSubnet creates a new subnet for a private network
func (*Client) CreateTeam ¶ added in v0.2.50
CreateTeam creates a new team in the account
func (*Client) CreateWebhook ¶
func (c *Client) CreateWebhook(r *WebhookConfig) (*Webhook, error)
CreateWebhook creates a new webhook
func (*Client) DecodeSimpleResponse ¶
func (c *Client) DecodeSimpleResponse(resp []byte) (*SimpleResponse, error)
DecodeSimpleResponse parses a response body in to a SimpleResponse object
func (*Client) DeleteApplication ¶ added in v0.2.76
func (c *Client) DeleteApplication(id string) (*SimpleResponse, error)
DeleteApplication deletes an application
func (*Client) DeleteDNSDomain ¶
func (c *Client) DeleteDNSDomain(d *DNSDomain) (*SimpleResponse, error)
DeleteDNSDomain deletes the Domain that matches the name
func (*Client) DeleteDNSRecord ¶
func (c *Client) DeleteDNSRecord(r *DNSRecord) (*SimpleResponse, error)
DeleteDNSRecord deletes the DNS record
func (*Client) DeleteDatabase ¶ added in v0.3.20
func (c *Client) DeleteDatabase(id string) (*SimpleResponse, error)
DeleteDatabase deletes a database
func (*Client) DeleteDatabaseBackup ¶ added in v0.3.64
func (c *Client) DeleteDatabaseBackup(dbid, id string) (*SimpleResponse, error)
DeleteDatabaseBackup deletes a database backup
func (*Client) DeleteFirewall ¶
func (c *Client) DeleteFirewall(id string) (*SimpleResponse, error)
DeleteFirewall deletes an firewall
func (*Client) DeleteFirewallRule ¶
func (c *Client) DeleteFirewallRule(id string, ruleID string) (*SimpleResponse, error)
DeleteFirewallRule deletes an firewall
func (*Client) DeleteIP ¶ added in v0.2.90
func (c *Client) DeleteIP(id string) (*SimpleResponse, error)
DeleteIP deletes an IP
func (*Client) DeleteInstance ¶
func (c *Client) DeleteInstance(id string) (*SimpleResponse, error)
DeleteInstance deletes an instance and frees its resources
func (*Client) DeleteKfCluster ¶ added in v0.3.29
func (c *Client) DeleteKfCluster(id string) (*SimpleResponse, error)
DeleteKfCluster deletes an application
func (*Client) DeleteKubernetesCluster ¶
func (c *Client) DeleteKubernetesCluster(id string) (*SimpleResponse, error)
DeleteKubernetesCluster deletes a cluster
func (*Client) DeleteKubernetesClusterPool ¶ added in v0.3.48
func (c *Client) DeleteKubernetesClusterPool(id, poolID string) (*SimpleResponse, error)
DeleteKubernetesClusterPool delete a pool inside the cluster
func (*Client) DeleteKubernetesClusterPoolInstance ¶ added in v0.2.75
func (c *Client) DeleteKubernetesClusterPoolInstance(cid, pid, id string) (*SimpleResponse, error)
DeleteKubernetesClusterPoolInstance deletes a instance from pool
func (*Client) DeleteLoadBalancer ¶
func (c *Client) DeleteLoadBalancer(id string) (*SimpleResponse, error)
DeleteLoadBalancer deletes a load balancer
func (*Client) DeleteNetwork ¶
func (c *Client) DeleteNetwork(id string) (*SimpleResponse, error)
DeleteNetwork deletes a private network
func (*Client) DeleteObjectStore ¶ added in v0.2.83
func (c *Client) DeleteObjectStore(id string) (*SimpleResponse, error)
DeleteObjectStore deletes an objectstore
func (*Client) DeleteObjectStoreCredential ¶ added in v0.3.4
func (c *Client) DeleteObjectStoreCredential(id string) (*SimpleResponse, error)
DeleteObjectStoreCredential deletes an objectstore credential
func (*Client) DeleteRole ¶ added in v0.2.50
func (c *Client) DeleteRole(id string) (*SimpleResponse, error)
DeleteRole removes a non-built-in role from an organisation
func (*Client) DeleteSSHKey ¶ added in v0.2.0
func (c *Client) DeleteSSHKey(id string) (*SimpleResponse, error)
DeleteSSHKey deletes an SSH key
func (*Client) DeleteSubnet ¶ added in v0.3.15
func (c *Client) DeleteSubnet(networkID, subnetID string) (*SimpleResponse, error)
DeleteSubnet deletes a subnet
func (*Client) DeleteTeam ¶ added in v0.2.50
func (c *Client) DeleteTeam(id string) (*SimpleResponse, error)
DeleteTeam removes a team (and therefore all team member access)
func (*Client) DeleteVolume ¶
func (c *Client) DeleteVolume(id string) (*SimpleResponse, error)
DeleteVolume deletes a volumes https://www.civo.com/api/volumes#deleting-a-volume
func (*Client) DeleteWebhook ¶
func (c *Client) DeleteWebhook(id string) (*SimpleResponse, error)
DeleteWebhook deletes a webhook
func (*Client) DetachSubnetFromInstance ¶ added in v0.3.17
func (c *Client) DetachSubnetFromInstance(networkID, subnetID string) (*SimpleResponse, error)
DetachSubnetFromInstance detaches a subnet from an instance
func (*Client) DetachVolume ¶
func (c *Client) DetachVolume(id string) (*SimpleResponse, error)
DetachVolume attach volume from any instances https://www.civo.com/api/volumes#attach-a-volume-to-an-instance
func (*Client) DisconnectRegion ¶ added in v0.3.72
func (c *Client) DisconnectRegion(r *DisconnectRegionRequest) error
DisconnectRegion disconnects a region to CivoAPI
func (*Client) FindApplication ¶ added in v0.2.76
func (c *Client) FindApplication(search string) (*Application, error)
FindApplication finds an application by either part of the ID or part of the name
func (*Client) FindDNSDomain ¶
FindDNSDomain finds a domain name by either part of the ID or part of the name
func (*Client) FindDatabase ¶ added in v0.3.20
FindDatabase finds a database by either part of the ID or part of the name
func (*Client) FindDatabaseBackup ¶ added in v0.3.64
func (c *Client) FindDatabaseBackup(dbid, search string) (*DatabaseBackup, error)
FindDatabaseBackup finds a database by either part of the ID or part of the name
func (*Client) FindDiskImage ¶ added in v0.2.37
FindDiskImage finds a disk image by either part of the ID or part of the name
func (*Client) FindFirewall ¶
FindFirewall finds a firewall by either part of the ID or part of the name
func (*Client) FindFirewallRule ¶ added in v0.1.7
func (c *Client) FindFirewallRule(firewallID string, search string) (*FirewallRule, error)
FindFirewallRule finds a firewall Rule by ID or part of the same
func (*Client) FindInstance ¶
FindInstance finds a instance by either part of the ID or part of the hostname
func (*Client) FindInstanceSizes ¶ added in v0.2.20
func (c *Client) FindInstanceSizes(search string) (*InstanceSize, error)
FindInstanceSizes finds a instance size name by either part of the ID or part of the name
func (*Client) FindKfCluster ¶ added in v0.3.29
FindKfCluster finds a kubeflow cluster by either part of the ID or part of the name
func (*Client) FindKubernetesCluster ¶
func (c *Client) FindKubernetesCluster(search string) (*KubernetesCluster, error)
FindKubernetesCluster finds a Kubernetes cluster by either part of the ID or part of the name
func (*Client) FindKubernetesClusterInstance ¶ added in v0.2.61
FindKubernetesClusterInstance finds a Kubernetes cluster instance by either part of the ID or part of the name
func (*Client) FindKubernetesClusterPool ¶ added in v0.2.75
func (c *Client) FindKubernetesClusterPool(cid, search string) (*KubernetesPool, error)
FindKubernetesClusterPool finds a pool by either part of the ID
func (*Client) FindLoadBalancer ¶
func (c *Client) FindLoadBalancer(search string) (*LoadBalancer, error)
FindLoadBalancer finds a load balancer by either part of the ID or part of the name
func (*Client) FindNetwork ¶
FindNetwork finds a network by either part of the ID or part of the name
func (*Client) FindObjectStore ¶ added in v0.2.83
func (c *Client) FindObjectStore(search string) (*ObjectStore, error)
FindObjectStore finds an objectstore by name or by accesskeyID
func (*Client) FindObjectStoreCredential ¶ added in v0.3.4
func (c *Client) FindObjectStoreCredential(search string) (*ObjectStoreCredential, error)
FindObjectStoreCredential finds an objectstore credential by name or by accesskeyID
func (*Client) FindRegion ¶ added in v0.2.24
FindRegion is a function to find a region
func (*Client) FindSSHKey ¶
FindSSHKey finds an SSH key by either part of the ID or part of the name
func (*Client) FindSubnet ¶ added in v0.3.15
FindSubnet finds a subnet by either part of the ID or part of the name
func (*Client) FindTeam ¶ added in v0.2.63
FindTeam finds a team by either part of the ID or part of the name
func (*Client) FindVolume ¶
FindVolume finds a volume by either part of the ID or part of the name
func (*Client) FindWebhook ¶
FindWebhook finds a webhook by either part of the ID or part of the name
func (*Client) GetAccountID ¶ added in v0.2.80
GetAccountID returns the account ID
func (*Client) GetApplication ¶ added in v0.2.76
func (c *Client) GetApplication(id string) (*Application, error)
GetApplication returns an application by ID
func (*Client) GetApplicationLogAuth ¶ added in v0.2.82
GetApplicationLogAuth returns an application log auth
func (*Client) GetDNSDomain ¶
GetDNSDomain returns the DNS Domain that matches the name
func (*Client) GetDNSRecord ¶
GetDNSRecord returns the Record that matches the domain ID and domain record ID
func (*Client) GetDatabase ¶ added in v0.3.20
GetDatabase finds a database by the database UUID
func (*Client) GetDatabaseBackup ¶ added in v0.3.64
func (c *Client) GetDatabaseBackup(dbid, id string) (*DatabaseBackup, error)
GetDatabaseBackup finds a database by the database UUID
func (*Client) GetDefaultNetwork ¶
GetDefaultNetwork finds the default private network for an account
func (*Client) GetDefaultRegion ¶ added in v0.2.26
GetDefaultRegion finds the default region for an account
func (*Client) GetDiskImage ¶ added in v0.2.37
GetDiskImage get one disk image using the id
func (*Client) GetDiskImageByName ¶ added in v0.2.57
GetDiskImageByName finds the DiskImage for an account with the specified code
func (*Client) GetInstance ¶
GetInstance returns a single Instance by its full ID
func (*Client) GetInstanceConsoleURL ¶ added in v0.1.1
GetInstanceConsoleURL gets the web URL for an instance's console
func (*Client) GetInstanceVnc ¶ added in v0.3.80
func (c *Client) GetInstanceVnc(id string) (InstanceVnc, error)
GetInstanceVnc enables and gets the VNC information for an instance
func (*Client) GetKfCluster ¶ added in v0.3.29
GetKfCluster returns a kubeflow cluster by ID
func (*Client) GetKubernetesCluster ¶ added in v0.2.30
func (c *Client) GetKubernetesCluster(id string) (*KubernetesCluster, error)
GetKubernetesCluster returns a single kubernetes cluster by its full ID
func (*Client) GetKubernetesClusterPool ¶ added in v0.2.75
func (c *Client) GetKubernetesClusterPool(cid, pid string) (*KubernetesPool, error)
GetKubernetesClusterPool returns a pool for a kubernetes cluster
func (*Client) GetLoadBalancer ¶ added in v0.2.61
func (c *Client) GetLoadBalancer(id string) (*LoadBalancer, error)
GetLoadBalancer returns a load balancer
func (*Client) GetMostRecentDistro ¶ added in v0.3.63
GetMostRecentDistro finds the highest version of a specified distro
func (*Client) GetNetwork ¶ added in v0.2.96
GetNetwork gets a network with ID
func (*Client) GetObjectStore ¶ added in v0.2.83
func (c *Client) GetObjectStore(id string) (*ObjectStore, error)
GetObjectStore finds an objectstore by the full ID
func (*Client) GetObjectStoreCredential ¶ added in v0.3.4
func (c *Client) GetObjectStoreCredential(id string) (*ObjectStoreCredential, error)
GetObjectStoreCredential finds an objectstore credential by the full ID
func (*Client) GetObjectStoreStats ¶ added in v0.3.56
func (c *Client) GetObjectStoreStats(id string) (*ObjectStoreStats, error)
GetObjectStoreStats returns the stats for an objectstore
func (*Client) GetOrganisation ¶ added in v0.2.50
func (c *Client) GetOrganisation() (*Organisation, error)
GetOrganisation returns the organisation associated with the current account
func (*Client) GetUserEverything ¶ added in v0.2.56
func (c *Client) GetUserEverything(userID string) (*UserEverything, error)
GetUserEverything returns the organisation associated with the current account
func (*Client) HardRebootInstance ¶
func (c *Client) HardRebootInstance(id string) (*SimpleResponse, error)
HardRebootInstance harshly reboots an instance (like shutting the power off and booting it again)
func (*Client) ListAccounts ¶ added in v0.2.80
func (c *Client) ListAccounts() (*PaginatedAccounts, error)
ListAccounts lists all accounts
func (*Client) ListAccountsInOrganisation ¶ added in v0.2.50
ListAccountsInOrganisation returns all the accounts in the current account's organisation
func (*Client) ListActions ¶ added in v0.3.14
func (c *Client) ListActions(listRequest *ActionListRequest) (*PaginateActionList, error)
ListActions returns a page of actions
func (*Client) ListAllInstances ¶
ListAllInstances returns all (well, upto 99,999,999 instances) Instances owned by the calling API account
func (*Client) ListApplications ¶ added in v0.2.76
func (c *Client) ListApplications() (*PaginatedApplications, error)
ListApplications returns all applications in that specific region
func (*Client) ListAvailableKubernetesVersions ¶
func (c *Client) ListAvailableKubernetesVersions() ([]KubernetesVersion, error)
ListAvailableKubernetesVersions returns all version of kubernetes available
func (*Client) ListCharges ¶
ListCharges returns all charges for the calling API account
func (*Client) ListDBVersions ¶ added in v0.3.26
func (c *Client) ListDBVersions() (map[string][]SupportedSoftwareVersion, error)
ListDBVersions returns a list of all database versions
func (*Client) ListDNSDomains ¶
ListDNSDomains returns all Domains owned by the calling API account
func (*Client) ListDNSRecords ¶
ListDNSRecords returns all the records associated with domainID
func (*Client) ListDanglingVolumes ¶ added in v0.3.13
ListDanglingVolumes returns all dangling volumes (Volumes which have a cluster ID set but that cluster doesn't exist anymore)
func (*Client) ListDatabaseBackup ¶ added in v0.3.44
func (c *Client) ListDatabaseBackup(did string) (*PaginatedDatabaseBackup, error)
ListDatabaseBackup lists backups for database
func (*Client) ListDatabases ¶ added in v0.3.20
func (c *Client) ListDatabases() (*PaginatedDatabases, error)
ListDatabases returns a list of all databases
func (*Client) ListDiskImages ¶ added in v0.2.37
ListDiskImages return all disk image in system
func (*Client) ListFirewallRules ¶
func (c *Client) ListFirewallRules(id string) ([]FirewallRule, error)
ListFirewallRules get all rules for a firewall
func (*Client) ListFirewalls ¶
ListFirewalls returns all firewall owned by the calling API account
func (*Client) ListIPs ¶ added in v0.2.90
func (c *Client) ListIPs() (*PaginatedIPs, error)
ListIPs returns all reserved IPs in that specific region
func (*Client) ListInstanceSizes ¶
func (c *Client) ListInstanceSizes() ([]InstanceSize, error)
ListInstanceSizes returns all availble sizes of instances TODO: Rename to Size because this return all size (k8s, vm, database, kfaas)
func (*Client) ListInstances ¶
func (c *Client) ListInstances(page int, perPage int) (*PaginatedInstanceList, error)
ListInstances returns a page of Instances owned by the calling API account
func (*Client) ListKfClusters ¶ added in v0.3.29
func (c *Client) ListKfClusters() (*PaginatedKfClusters, error)
ListKfClusters returns all applications in that specific region
func (*Client) ListKubernetesClusterInstances ¶ added in v0.2.61
ListKubernetesClusterInstances returns all cluster instances
func (*Client) ListKubernetesClusterPools ¶ added in v0.2.75
func (c *Client) ListKubernetesClusterPools(cid string) ([]KubernetesPool, error)
ListKubernetesClusterPools returns all the pools for a kubernetes cluster
func (*Client) ListKubernetesClusters ¶
func (c *Client) ListKubernetesClusters() (*PaginatedKubernetesClusters, error)
ListKubernetesClusters returns all cluster of kubernetes in the account
func (*Client) ListKubernetesMarketplaceApplications ¶
func (c *Client) ListKubernetesMarketplaceApplications() ([]KubernetesMarketplaceApplication, error)
ListKubernetesMarketplaceApplications returns all application inside marketplace
func (*Client) ListLoadBalancers ¶
func (c *Client) ListLoadBalancers() ([]LoadBalancer, error)
ListLoadBalancers returns all load balancers owned by the calling API account
func (*Client) ListNetworks ¶
ListNetworks list all private networks
func (*Client) ListObjectStoreCredentials ¶ added in v0.3.4
func (c *Client) ListObjectStoreCredentials(page, perPage int) (*PaginatedObjectStoreCredentials, error)
ListObjectStoreCredentials returns all object store credentials in that specific region
func (*Client) ListObjectStores ¶ added in v0.2.83
func (c *Client) ListObjectStores() (*PaginatedObjectstores, error)
ListObjectStores returns all objectstores in that specific region
func (*Client) ListPermissions ¶ added in v0.2.50
func (c *Client) ListPermissions() ([]Permission, error)
ListPermissions returns all permissions available to be assigned to team member
func (*Client) ListRegions ¶
ListRegions returns all load balancers owned by the calling API account
func (*Client) ListSSHKeys ¶
ListSSHKeys list all SSH key for an account
func (*Client) ListSubnets ¶ added in v0.3.15
ListSubnets list all subnets for a private network
func (*Client) ListTeamMembers ¶ added in v0.2.50
func (c *Client) ListTeamMembers(teamID string) ([]TeamMember, error)
ListTeamMembers returns a list of all team members (and their permissions) in the specified team
func (*Client) ListVolumeTypes ¶ added in v0.3.82
func (c *Client) ListVolumeTypes() ([]VolumeType, error)
ListVolumeTypes returns a page of Instances owned by the calling API account
func (*Client) ListVolumes ¶
ListVolumes returns all volumes owned by the calling API account https://www.civo.com/api/volumes#list-volumes
func (*Client) ListVolumesForCluster ¶ added in v0.3.13
ListVolumesForCluster returns all volumes for a cluster
func (*Client) ListWebhooks ¶
ListWebhooks returns a list of all webhook within the current account
func (*Client) MovePublicIPToInstance ¶
func (c *Client) MovePublicIPToInstance(id, ipAddress string) (*SimpleResponse, error)
MovePublicIPToInstance moves a public IP to the specified instance
func (*Client) NewApplicationConfig ¶ added in v0.2.76
func (c *Client) NewApplicationConfig() (*ApplicationConfig, error)
NewApplicationConfig returns an initialized config for a new application
func (*Client) NewDatabase ¶ added in v0.3.20
func (c *Client) NewDatabase(v *CreateDatabaseRequest) (*Database, error)
NewDatabase creates a new database
func (*Client) NewFirewall ¶
func (c *Client) NewFirewall(firewall *FirewallConfig) (*FirewallResult, error)
NewFirewall creates a new firewall record
func (*Client) NewFirewallRule ¶
func (c *Client) NewFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error)
NewFirewallRule creates a new rule within a firewall
func (*Client) NewIP ¶ added in v0.2.90
func (c *Client) NewIP(v *CreateIPRequest) (*IP, error)
NewIP creates a new IP
func (*Client) NewInstanceConfig ¶
func (c *Client) NewInstanceConfig() (*InstanceConfig, error)
NewInstanceConfig returns an initialized config for a new instance
func (*Client) NewKubernetesClusters ¶
func (c *Client) NewKubernetesClusters(kc *KubernetesClusterConfig) (*KubernetesCluster, error)
NewKubernetesClusters create a new cluster of kubernetes
func (*Client) NewNetwork ¶
func (c *Client) NewNetwork(label string) (*NetworkResult, error)
NewNetwork creates a new private network
func (*Client) NewObjectStore ¶ added in v0.2.83
func (c *Client) NewObjectStore(v *CreateObjectStoreRequest) (*ObjectStore, error)
NewObjectStore creates a new objectstore
func (*Client) NewObjectStoreCredential ¶ added in v0.3.4
func (c *Client) NewObjectStoreCredential(v *CreateObjectStoreCredentialRequest) (*ObjectStoreCredential, error)
NewObjectStoreCredential creates a new objectstore credential
func (*Client) NewSSHKey ¶ added in v0.2.0
func (c *Client) NewSSHKey(name string, publicKey string) (*SimpleResponse, error)
NewSSHKey creates a new SSH key record
func (*Client) NewVolume ¶
func (c *Client) NewVolume(v *VolumeConfig) (*VolumeResult, error)
NewVolume creates a new volume https://www.civo.com/api/volumes#create-a-new-volume
func (*Client) Ping ¶ added in v0.3.63
Ping checks if Civo API is reachable and responding. Returns no error if API is reachable and running.
func (*Client) RebootInstance ¶
func (c *Client) RebootInstance(id string) (*SimpleResponse, error)
RebootInstance reboots an instance (short version of HardRebootInstance)
func (*Client) RecycleKubernetesCluster ¶
func (c *Client) RecycleKubernetesCluster(id string, hostname string) (*SimpleResponse, error)
RecycleKubernetesCluster create a new cluster of kubernetes
func (*Client) RemoveTeamMember ¶ added in v0.2.50
func (c *Client) RemoveTeamMember(teamID, teamMemberID string) (*SimpleResponse, error)
RemoveTeamMember removes the specified team member from the specified team
func (*Client) RenameFirewall ¶ added in v0.1.9
func (c *Client) RenameFirewall(id string, f *FirewallConfig) (*SimpleResponse, error)
RenameFirewall rename firewall
func (*Client) RenameNetwork ¶
func (c *Client) RenameNetwork(label, id string) (*NetworkResult, error)
RenameNetwork renames an existing private network
func (*Client) RenameOrganisation ¶ added in v0.2.50
func (c *Client) RenameOrganisation(name string) (*Organisation, error)
RenameOrganisation changes the human set name of the organisation (e.g. for re-branding efforts)
func (*Client) RenameTeam ¶ added in v0.2.50
RenameTeam changes the human set name for a team
func (*Client) ResizeVolume ¶
func (c *Client) ResizeVolume(id string, size int) (*SimpleResponse, error)
ResizeVolume resizes a volume https://www.civo.com/api/volumes#resizing-a-volume
func (*Client) RestoreDatabase ¶ added in v0.3.45
func (c *Client) RestoreDatabase(id string, v *RestoreDatabaseRequest) (*SimpleResponse, error)
RestoreDatabase restore a database
func (*Client) SendDeleteRequest ¶
SendDeleteRequest sends a correctly authenticated delete request to the API server
func (*Client) SendGetRequest ¶
SendGetRequest sends a correctly authenticated get request to the API server
func (*Client) SendPostRequest ¶
SendPostRequest sends a correctly authenticated post request to the API server
func (*Client) SendPutRequest ¶
SendPutRequest sends a correctly authenticated put request to the API server
func (*Client) SetInstanceFirewall ¶
func (c *Client) SetInstanceFirewall(id, firewallID string) (*SimpleResponse, error)
SetInstanceFirewall changes the current firewall for an instance
func (*Client) SetInstanceTags ¶
func (c *Client) SetInstanceTags(i *Instance, tags string) (*SimpleResponse, error)
SetInstanceTags sets the tags for the specified instance
func (*Client) SetUserAgent ¶ added in v0.3.12
SetUserAgent sets the user agent for the client
func (*Client) SoftRebootInstance ¶
func (c *Client) SoftRebootInstance(id string) (*SimpleResponse, error)
SoftRebootInstance requests the VM to shut down nicely
func (*Client) StartInstance ¶
func (c *Client) StartInstance(id string) (*SimpleResponse, error)
StartInstance starts the instance booting from the shutdown state
func (*Client) StopInstance ¶
func (c *Client) StopInstance(id string) (*SimpleResponse, error)
StopInstance shuts the power down to the instance
func (*Client) UnassignIP ¶ added in v0.2.90
func (c *Client) UnassignIP(id, region string) (*SimpleResponse, error)
UnassignIP unassigns a reserved IP from a Civo resource UnassignIP is an idempotent operation. If you unassign on a unassigned IP, it will return a 200 OK.
func (*Client) UpdateApplication ¶ added in v0.2.76
func (c *Client) UpdateApplication(id string, application *UpdateApplicationRequest) (*Application, error)
UpdateApplication updates an application
func (*Client) UpdateDNSDomain ¶
UpdateDNSDomain updates the provided domain with name
func (*Client) UpdateDNSRecord ¶ added in v0.1.4
func (c *Client) UpdateDNSRecord(r *DNSRecord, rc *DNSRecordConfig) (*DNSRecord, error)
UpdateDNSRecord updates the DNS record
func (*Client) UpdateDatabase ¶ added in v0.3.20
func (c *Client) UpdateDatabase(id string, v *UpdateDatabaseRequest) (*Database, error)
UpdateDatabase updates a database
func (*Client) UpdateDatabaseBackup ¶ added in v0.3.44
func (c *Client) UpdateDatabaseBackup(did string, v *DatabaseBackupUpdateRequest) (*DatabaseBackup, error)
UpdateDatabaseBackup update database backup
func (*Client) UpdateIP ¶ added in v0.2.90
func (c *Client) UpdateIP(id string, v *UpdateIPRequest) (*IP, error)
UpdateIP updates an IP
func (*Client) UpdateInstance ¶
func (c *Client) UpdateInstance(i *Instance) (*SimpleResponse, error)
UpdateInstance updates an Instance's hostname, reverse DNS or notes
func (*Client) UpdateKfCluster ¶ added in v0.3.29
func (c *Client) UpdateKfCluster(id string, kfc *UpdateKfClusterReq) (*KfCluster, error)
UpdateKfCluster updates a kubeflow cluster
func (*Client) UpdateKubernetesCluster ¶
func (c *Client) UpdateKubernetesCluster(id string, i *KubernetesClusterConfig) (*KubernetesCluster, error)
UpdateKubernetesCluster update a single kubernetes cluster by its full ID
func (*Client) UpdateKubernetesClusterPool ¶ added in v0.2.77
func (c *Client) UpdateKubernetesClusterPool(cid, pid string, config *KubernetesClusterPoolUpdateConfig) (*KubernetesPool, error)
UpdateKubernetesClusterPool updates a pool for a kubernetes cluster
func (*Client) UpdateLoadBalancer ¶
func (c *Client) UpdateLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error)
UpdateLoadBalancer updates a load balancer
func (*Client) UpdateNetwork ¶ added in v0.3.15
func (c *Client) UpdateNetwork(id string, nc NetworkConfig) (*NetworkResult, error)
UpdateNetwork updates an existing network
func (*Client) UpdateObjectStore ¶ added in v0.2.83
func (c *Client) UpdateObjectStore(id string, v *UpdateObjectStoreRequest) (*ObjectStore, error)
UpdateObjectStore updates an objectstore
func (*Client) UpdateObjectStoreCredential ¶ added in v0.3.4
func (c *Client) UpdateObjectStoreCredential(id string, v *UpdateObjectStoreCredentialRequest) (*ObjectStoreCredential, error)
UpdateObjectStoreCredential updates an objectstore credential
func (*Client) UpdateSSHKey ¶ added in v0.2.0
UpdateSSHKey update a SSH key record
func (*Client) UpdateTeamMember ¶ added in v0.2.50
func (c *Client) UpdateTeamMember(teamID, teamMemberID, permissions, roles string) (*TeamMember, error)
UpdateTeamMember changes the permissions or roles for a specified team member
func (*Client) UpdateWebhook ¶
func (c *Client) UpdateWebhook(id string, r *WebhookConfig) (*Webhook, error)
UpdateWebhook updates a webhook
func (*Client) UpgradeInstance ¶
func (c *Client) UpgradeInstance(id, newSize string) (*SimpleResponse, error)
UpgradeInstance resizes the instance up to the new specification it's not possible to resize the instance to a smaller size
type Clienter ¶ added in v0.2.30
type Clienter interface { // Charges ListCharges(from, to time.Time) ([]Charge, error) // DNS ListDNSDomains() ([]DNSDomain, error) FindDNSDomain(search string) (*DNSDomain, error) CreateDNSDomain(name string) (*DNSDomain, error) GetDNSDomain(name string) (*DNSDomain, error) UpdateDNSDomain(d *DNSDomain, name string) (*DNSDomain, error) DeleteDNSDomain(d *DNSDomain) (*SimpleResponse, error) CreateDNSRecord(domainID string, r *DNSRecordConfig) (*DNSRecord, error) ListDNSRecords(dnsDomainID string) ([]DNSRecord, error) GetDNSRecord(domainID, domainRecordID string) (*DNSRecord, error) UpdateDNSRecord(r *DNSRecord, rc *DNSRecordConfig) (*DNSRecord, error) DeleteDNSRecord(r *DNSRecord) (*SimpleResponse, error) // Firewalls ListFirewalls() ([]Firewall, error) FindFirewall(search string) (*Firewall, error) NewFirewall(*FirewallConfig) (*FirewallResult, error) RenameFirewall(id string, f *FirewallConfig) (*SimpleResponse, error) DeleteFirewall(id string) (*SimpleResponse, error) NewFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error) ListFirewallRules(id string) ([]FirewallRule, error) FindFirewallRule(firewallID string, search string) (*FirewallRule, error) DeleteFirewallRule(id string, ruleID string) (*SimpleResponse, error) // Instances ListInstances(page int, perPage int) (*PaginatedInstanceList, error) ListAllInstances() ([]Instance, error) FindInstance(search string) (*Instance, error) GetInstance(id string) (*Instance, error) NewInstanceConfig() (*InstanceConfig, error) CreateInstance(config *InstanceConfig) (*Instance, error) SetInstanceTags(i *Instance, tags string) (*SimpleResponse, error) UpdateInstance(i *Instance) (*SimpleResponse, error) DeleteInstance(id string) (*SimpleResponse, error) RebootInstance(id string) (*SimpleResponse, error) HardRebootInstance(id string) (*SimpleResponse, error) SoftRebootInstance(id string) (*SimpleResponse, error) StopInstance(id string) (*SimpleResponse, error) StartInstance(id string) (*SimpleResponse, error) GetInstanceConsoleURL(id string) (string, error) UpgradeInstance(id, newSize string) (*SimpleResponse, error) MovePublicIPToInstance(id, ipAddress string) (*SimpleResponse, error) SetInstanceFirewall(id, firewallID string) (*SimpleResponse, error) // Instance sizes ListInstanceSizes() ([]InstanceSize, error) FindInstanceSizes(search string) (*InstanceSize, error) // Clusters ListKubernetesClusters() (*PaginatedKubernetesClusters, error) FindKubernetesCluster(search string) (*KubernetesCluster, error) NewKubernetesClusters(kc *KubernetesClusterConfig) (*KubernetesCluster, error) GetKubernetesCluster(id string) (*KubernetesCluster, error) UpdateKubernetesCluster(id string, i *KubernetesClusterConfig) (*KubernetesCluster, error) ListKubernetesMarketplaceApplications() ([]KubernetesMarketplaceApplication, error) DeleteKubernetesCluster(id string) (*SimpleResponse, error) RecycleKubernetesCluster(id string, hostname string) (*SimpleResponse, error) ListAvailableKubernetesVersions() ([]KubernetesVersion, error) ListKubernetesClusterInstances(id string) ([]Instance, error) FindKubernetesClusterInstance(clusterID, search string) (*Instance, error) //Pools ListKubernetesClusterPools(cid string) ([]KubernetesPool, error) GetKubernetesClusterPool(cid, pid string) (*KubernetesPool, error) FindKubernetesClusterPool(cid, search string) (*KubernetesPool, error) DeleteKubernetesClusterPoolInstance(cid, pid, id string) (*SimpleResponse, error) UpdateKubernetesClusterPool(cid, pid string, config *KubernetesClusterPoolUpdateConfig) (*KubernetesPool, error) // Networks GetDefaultNetwork() (*Network, error) NewNetwork(label string) (*NetworkResult, error) CreateNetwork(configs NetworkConfig) (*NetworkResult, error) ListNetworks() ([]Network, error) FindNetwork(search string) (*Network, error) RenameNetwork(label, id string) (*NetworkResult, error) DeleteNetwork(id string) (*SimpleResponse, error) // Quota GetQuota() (*Quota, error) // Regions ListRegions() ([]Region, error) CreateRegion(r *CreateRegionRequest) (*Region, error) ConnectRegion(r *ConnectRegionRequest) error DisconnectRegion(r *DisconnectRegionRequest) error // SSHKeys ListSSHKeys() ([]SSHKey, error) NewSSHKey(name string, publicKey string) (*SimpleResponse, error) UpdateSSHKey(name string, sshKeyID string) (*SSHKey, error) FindSSHKey(search string) (*SSHKey, error) DeleteSSHKey(id string) (*SimpleResponse, error) // DiskImages ListDiskImages() ([]DiskImage, error) GetDiskImage(id string) (*DiskImage, error) FindDiskImage(search string) (*DiskImage, error) // Volumes ListVolumes() ([]Volume, error) GetVolume(id string) (*Volume, error) FindVolume(search string) (*Volume, error) NewVolume(v *VolumeConfig) (*VolumeResult, error) ResizeVolume(id string, size int) (*SimpleResponse, error) AttachVolume(id string, cfg VolumeAttachConfig) (*SimpleResponse, error) DetachVolume(id string) (*SimpleResponse, error) DeleteVolume(id string) (*SimpleResponse, error) // Webhooks CreateWebhook(r *WebhookConfig) (*Webhook, error) ListWebhooks() ([]Webhook, error) FindWebhook(search string) (*Webhook, error) UpdateWebhook(id string, r *WebhookConfig) (*Webhook, error) DeleteWebhook(id string) (*SimpleResponse, error) // Reserved IPs ListIPs() (*PaginatedIPs, error) FindIP(search string) (*IP, error) GetIP(id string) (*IP, error) NewIP(v *CreateIPRequest) (*IP, error) UpdateIP(id string, v *UpdateIPRequest) (*IP, error) DeleteIP(id string) (*SimpleResponse, error) AssignIP(id, resourceID, resourceType, region string) (*SimpleResponse, error) UnassignIP(id, region string) (*SimpleResponse, error) // LoadBalancer ListLoadBalancers() ([]LoadBalancer, error) GetLoadBalancer(id string) (*LoadBalancer, error) FindLoadBalancer(search string) (*LoadBalancer, error) CreateLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error) UpdateLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error) DeleteLoadBalancer(id string) (*SimpleResponse, error) // Ping Ping() error }
Clienter is the interface the real civogo.Client and civogo.FakeClient implement
type Component ¶ added in v0.3.12
type Component struct {
ID, Name, Version string
}
Component is a struct to define a User-Agent from a client
type Condition ¶ added in v0.3.38
type Condition struct { Type string `json:"type"` Status metav1.ConditionStatus `json:"status"` Synced bool `json:"synced"` LastTransitionTime metav1.Time `json:"last_transition_time"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` }
Condition is a condition for a Kubernetes cluster
type ConfigAdvanceClientForTesting ¶ added in v0.2.86
type ConfigAdvanceClientForTesting struct { Method string Value []ValueAdvanceClientForTesting }
ConfigAdvanceClientForTesting initializes a Client connecting to a local test server and allows for specifying methods
type ConnectRegionRequest ¶ added in v0.3.72
type ConnectRegionRequest struct {
Code string `json:"code"`
}
ConnectRegionRequest is the request to connect a region
type CreateDatabaseRequest ¶ added in v0.3.20
type CreateDatabaseRequest struct { Name string `json:"name" validate:"required"` Size string `json:"size" validate:"required"` Software string `json:"software" validate:"required"` SoftwareVersion string `json:"software_version"` NetworkID string `json:"network_id"` Nodes int `json:"nodes"` FirewallID string `json:"firewall_id"` FirewallRules string `json:"firewall_rule"` Region string `json:"region"` }
CreateDatabaseRequest holds fields required to creates a new database
type CreateIPRequest ¶ added in v0.2.90
type CreateIPRequest struct { // Name is an optional parameter. If not provided, name will be the IP address Name string `json:"name,omitempty"` // Region is the region the IP will be created in Region string `json:"region"` }
CreateIPRequest is a struct for creating an IP
type CreateKfClusterReq ¶ added in v0.3.29
type CreateKfClusterReq struct { Name string `json:"name" validate:"required"` NetworkID string `json:"network_id" validate:"required"` FirewallID string `json:"firewall_id,omitempty"` Size string `json:"size,omitempty"` Region string `json:"region,omitempty"` }
CreateKfClusterReq is the request for creating a KfCluster.
type CreateObjectStoreCredentialRequest ¶ added in v0.3.4
type CreateObjectStoreCredentialRequest struct { Name string `json:"name" validate:"required"` AccessKeyID *string `json:"access_key_id"` SecretAccessKeyID *string `json:"secret_access_key_id"` MaxSizeGB *int `json:"max_size_gb,omitempty"` Region string `json:"region,omitempty"` }
CreateObjectStoreCredentialRequest holds the request to create a new object store credential
type CreateObjectStoreRequest ¶ added in v0.2.83
type CreateObjectStoreRequest struct { Name string `json:"name,omitempty"` MaxSizeGB int64 `json:"max_size_gb" validate:"required"` AccessKeyID string `json:"access_key_id,omitempty"` Region string `json:"region"` }
CreateObjectStoreRequest holds the request to create a new object storage
type CreateRegionRequest ¶ added in v0.3.71
type CreateRegionRequest struct { Code string `json:"code"` CountryISOCode string `json:"country_iso_code" ` Private bool `json:"private,omitempty"` AccountIDs []string `json:"account_ids,omitempty"` // Kubeconfig should be a base64 encoded kubeconfig content Kubeconfig string `json:"kubeconfig"` // ComputeSoftDeletionHours can only be configured for private regions. ComputeSoftDeletionHours *int `json:"compute_soft_deletion_hours" ` Features map[string]bool `json:"features" ` }
CreateRegionRequest is the request to create a new region
type CreateRoute ¶ added in v0.3.17
type CreateRoute struct { ResourceID string `json:"resource_id"` ResourceType string `json:"resource_type"` }
CreateRoute contains incoming request parameters for creating a route object
type DNSDomain ¶
type DNSDomain struct { // The ID of the domain ID string `json:"id"` // The ID of the account AccountID string `json:"account_id"` // The Name of the domain Name string `json:"name"` }
DNSDomain represents a domain registered within Civo's infrastructure
type DNSRecord ¶
type DNSRecord struct { ID string `json:"id"` AccountID string `json:"account_id,omitempty"` DNSDomainID string `json:"domain_id,omitempty"` Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` Type DNSRecordType `json:"type,omitempty"` Priority int `json:"priority,omitempty"` TTL int `json:"ttl,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
DNSRecord represents a DNS record registered within Civo's infrastructure
type DNSRecordConfig ¶
type DNSRecordConfig struct { Type DNSRecordType `json:"type"` Name string `json:"name"` Value string `json:"value"` Priority int `json:"priority"` TTL int `json:"ttl"` }
DNSRecordConfig describes the parameters for a new DNS record none of the fields are mandatory and will be automatically set with default values
type DNSRecordType ¶
type DNSRecordType string
DNSRecordType represents the allowed record types: a, cname, mx or txt
type Database ¶ added in v0.3.20
type Database struct { ID string `json:"id"` Name string `json:"name"` Nodes int `json:"nodes"` Size string `json:"size"` Software string `json:"software"` SoftwareVersion string `json:"software_version"` PublicIPv4 string `json:"public_ipv4"` PrivateIPv4 string `json:"private_ipv4"` NetworkID string `json:"network_id"` FirewallID string `json:"firewall_id"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` DatabaseUserInfo []DatabaseUserInfo `json:"database_user_info"` DNSEntry string `json:"dns_entry,omitempty"` Status string `json:"status"` }
Database holds the database information
type DatabaseBackup ¶ added in v0.3.44
type DatabaseBackup struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Software string `json:"software,omitempty"` Status string `json:"status,omitempty"` Schedule string `json:"schedule,omitempty"` DatabaseName string `json:"database_name,omitempty"` DatabaseID string `json:"database_id,omitempty"` IsScheduled bool `json:"is_scheduled,omitempty"` CreatedAt time.Time `json:"created_at"` }
DatabaseBackup represents a backup
type DatabaseBackupCreateRequest ¶ added in v0.3.44
type DatabaseBackupCreateRequest struct { // Name is the name of the database backup to be created Name string `json:"name"` // Schedule is used for scheduled backup Schedule string `json:"schedule"` // Types is used for manual backup Type string `json:"type"` // Region is name of the region Region string `json:"region"` }
DatabaseBackupCreateRequest represents a backup create request
type DatabaseBackupUpdateRequest ¶ added in v0.3.44
type DatabaseBackupUpdateRequest struct { // Name is name name of the backup Name string `json:"name"` // Schedule is schedule for scheduled backup Schedule string `json:"schedule"` // Region is name of the region Region string `json:"region"` }
DatabaseBackupUpdateRequest represents a backup update request
type DatabaseUserInfo ¶ added in v0.3.54
type DatabaseUserInfo struct { Username string `json:"username"` Password string `json:"password"` Port int `json:"port"` }
DatabaseUserInfo represents the user information
type DisconnectRegionRequest ¶ added in v0.3.72
type DisconnectRegionRequest struct {
Code string `json:"code"`
}
DisconnectRegionRequest is the request to disconnect a region
type DiskImage ¶ added in v0.2.37
type DiskImage struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` State string `json:"state,omitempty"` Distribution string `json:"distribution,omitempty"` Description string `json:"description,omitempty"` Label string `json:"label,omitempty"` }
DiskImage represents a DiskImage for launching instances from
type FakeClient ¶ added in v0.2.30
type FakeClient struct { LastID int64 Charges []Charge Domains []DNSDomain DomainRecords []DNSRecord Firewalls []Firewall FirewallRules []FirewallRule InstanceSizes []InstanceSize Instances []Instance Clusters []KubernetesCluster IP []IP Networks []Network Volumes []Volume SSHKeys []SSHKey Webhooks []Webhook DiskImage []DiskImage Quota Quota Organisation Organisation OrganisationAccounts []Account OrganisationRoles []Role OrganisationTeams []Team OrganisationTeamMembers map[string][]TeamMember LoadBalancers []LoadBalancer Pools []KubernetesPool PingErr error }
FakeClient is a temporary storage structure for use when you don't want to communicate with a real Civo API server
func NewFakeClient ¶ added in v0.2.30
func NewFakeClient() (*FakeClient, error)
NewFakeClient initializes a Client that doesn't attach to a
func (*FakeClient) AddAccountToOrganisation ¶ added in v0.2.50
func (c *FakeClient) AddAccountToOrganisation(accountID string) ([]Account, error)
AddAccountToOrganisation implemented in a fake way for automated tests
func (*FakeClient) AddTeamMember ¶ added in v0.2.50
func (c *FakeClient) AddTeamMember(teamID, userID, permissions, roles string) ([]TeamMember, error)
AddTeamMember implemented in a fake way for automated tests
func (*FakeClient) AssignIP ¶ added in v0.2.93
func (c *FakeClient) AssignIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
AssignIP assigns a fake IP
func (*FakeClient) AttachVolume ¶ added in v0.2.30
func (c *FakeClient) AttachVolume(id string, cfg VolumeAttachConfig) (*SimpleResponse, error)
AttachVolume implemented in a fake way for automated tests
func (*FakeClient) ConnectRegion ¶ added in v0.3.72
func (c *FakeClient) ConnectRegion(r *ConnectRegionRequest) error
ConnectRegion implemented in a fake way for automated tests
func (*FakeClient) CreateDNSDomain ¶ added in v0.2.30
func (c *FakeClient) CreateDNSDomain(name string) (*DNSDomain, error)
CreateDNSDomain implemented in a fake way for automated tests
func (*FakeClient) CreateDNSRecord ¶ added in v0.2.30
func (c *FakeClient) CreateDNSRecord(domainID string, r *DNSRecordConfig) (*DNSRecord, error)
CreateDNSRecord implemented in a fake way for automated tests
func (*FakeClient) CreateInstance ¶ added in v0.2.30
func (c *FakeClient) CreateInstance(config *InstanceConfig) (*Instance, error)
CreateInstance implemented in a fake way for automated tests
func (*FakeClient) CreateLoadBalancer ¶ added in v0.2.30
func (c *FakeClient) CreateLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error)
CreateLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) CreateNetwork ¶ added in v0.3.66
func (c *FakeClient) CreateNetwork(config NetworkConfig) (*NetworkResult, error)
CreateNetwork creates a new network within the FakeClient, including VLAN configurations
func (*FakeClient) CreateOrganisation ¶ added in v0.2.50
func (c *FakeClient) CreateOrganisation(name string) (*Organisation, error)
CreateOrganisation implemented in a fake way for automated tests
func (*FakeClient) CreateRegion ¶ added in v0.3.71
func (c *FakeClient) CreateRegion(r *CreateRegionRequest) (*Region, error)
CreateRegion implemented in a fake way for automated tests
func (*FakeClient) CreateRole ¶ added in v0.2.50
func (c *FakeClient) CreateRole(name, permissions string) (*Role, error)
CreateRole implemented in a fake way for automated tests
func (*FakeClient) CreateTeam ¶ added in v0.2.50
func (c *FakeClient) CreateTeam(name string) (*Team, error)
CreateTeam implemented in a fake way for automated tests
func (*FakeClient) CreateWebhook ¶ added in v0.2.30
func (c *FakeClient) CreateWebhook(r *WebhookConfig) (*Webhook, error)
CreateWebhook implemented in a fake way for automated tests
func (*FakeClient) DeleteDNSDomain ¶ added in v0.2.30
func (c *FakeClient) DeleteDNSDomain(d *DNSDomain) (*SimpleResponse, error)
DeleteDNSDomain implemented in a fake way for automated tests
func (*FakeClient) DeleteDNSRecord ¶ added in v0.2.30
func (c *FakeClient) DeleteDNSRecord(r *DNSRecord) (*SimpleResponse, error)
DeleteDNSRecord implemented in a fake way for automated tests
func (*FakeClient) DeleteFirewall ¶ added in v0.2.30
func (c *FakeClient) DeleteFirewall(id string) (*SimpleResponse, error)
DeleteFirewall implemented in a fake way for automated tests
func (*FakeClient) DeleteFirewallRule ¶ added in v0.2.30
func (c *FakeClient) DeleteFirewallRule(id string, ruleID string) (*SimpleResponse, error)
DeleteFirewallRule implemented in a fake way for automated tests
func (*FakeClient) DeleteIP ¶ added in v0.2.93
func (c *FakeClient) DeleteIP(id string) (*SimpleResponse, error)
DeleteIP deletes a fake IP
func (*FakeClient) DeleteInstance ¶ added in v0.2.30
func (c *FakeClient) DeleteInstance(id string) (*SimpleResponse, error)
DeleteInstance implemented in a fake way for automated tests
func (*FakeClient) DeleteKubernetesCluster ¶ added in v0.2.30
func (c *FakeClient) DeleteKubernetesCluster(id string) (*SimpleResponse, error)
DeleteKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) DeleteKubernetesClusterPoolInstance ¶ added in v0.2.75
func (c *FakeClient) DeleteKubernetesClusterPoolInstance(cid, pid, id string) (*SimpleResponse, error)
DeleteKubernetesClusterPoolInstance implemented in a fake way for automated tests
func (*FakeClient) DeleteLoadBalancer ¶ added in v0.2.30
func (c *FakeClient) DeleteLoadBalancer(id string) (*SimpleResponse, error)
DeleteLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) DeleteNetwork ¶ added in v0.2.30
func (c *FakeClient) DeleteNetwork(id string) (*SimpleResponse, error)
DeleteNetwork implemented in a fake way for automated tests
func (*FakeClient) DeleteRole ¶ added in v0.2.50
func (c *FakeClient) DeleteRole(id string) (*SimpleResponse, error)
DeleteRole implemented in a fake way for automated tests
func (*FakeClient) DeleteSSHKey ¶ added in v0.2.30
func (c *FakeClient) DeleteSSHKey(id string) (*SimpleResponse, error)
DeleteSSHKey implemented in a fake way for automated tests
func (*FakeClient) DeleteTeam ¶ added in v0.2.50
func (c *FakeClient) DeleteTeam(id string) (*SimpleResponse, error)
DeleteTeam implemented in a fake way for automated tests
func (*FakeClient) DeleteVolume ¶ added in v0.2.30
func (c *FakeClient) DeleteVolume(id string) (*SimpleResponse, error)
DeleteVolume implemented in a fake way for automated tests
func (*FakeClient) DeleteWebhook ¶ added in v0.2.30
func (c *FakeClient) DeleteWebhook(id string) (*SimpleResponse, error)
DeleteWebhook implemented in a fake way for automated tests
func (*FakeClient) DetachVolume ¶ added in v0.2.30
func (c *FakeClient) DetachVolume(id string) (*SimpleResponse, error)
DetachVolume implemented in a fake way for automated tests
func (*FakeClient) DisconnectRegion ¶ added in v0.3.72
func (c *FakeClient) DisconnectRegion(r *DisconnectRegionRequest) error
DisconnectRegion implemented in a fake way for automated tests
func (*FakeClient) FindDNSDomain ¶ added in v0.2.30
func (c *FakeClient) FindDNSDomain(search string) (*DNSDomain, error)
FindDNSDomain implemented in a fake way for automated tests
func (*FakeClient) FindDiskImage ¶ added in v0.2.37
func (c *FakeClient) FindDiskImage(search string) (*DiskImage, error)
FindDiskImage implemented in a fake way for automated tests
func (*FakeClient) FindFirewall ¶ added in v0.2.30
func (c *FakeClient) FindFirewall(search string) (*Firewall, error)
FindFirewall implemented in a fake way for automated tests
func (*FakeClient) FindFirewallRule ¶ added in v0.2.30
func (c *FakeClient) FindFirewallRule(firewallID string, search string) (*FirewallRule, error)
FindFirewallRule implemented in a fake way for automated tests
func (*FakeClient) FindIP ¶ added in v0.2.93
func (c *FakeClient) FindIP(search string) (*IP, error)
FindIP finds a fake IP
func (*FakeClient) FindInstance ¶ added in v0.2.30
func (c *FakeClient) FindInstance(search string) (*Instance, error)
FindInstance implemented in a fake way for automated tests
func (*FakeClient) FindInstanceSizes ¶ added in v0.2.30
func (c *FakeClient) FindInstanceSizes(search string) (*InstanceSize, error)
FindInstanceSizes implemented in a fake way for automated tests
func (*FakeClient) FindKubernetesCluster ¶ added in v0.2.30
func (c *FakeClient) FindKubernetesCluster(search string) (*KubernetesCluster, error)
FindKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) FindKubernetesClusterInstance ¶ added in v0.2.68
func (c *FakeClient) FindKubernetesClusterInstance(clusterID, search string) (*Instance, error)
FindKubernetesClusterInstance implemented in a fake way for automated tests
func (*FakeClient) FindKubernetesClusterPool ¶ added in v0.2.75
func (c *FakeClient) FindKubernetesClusterPool(cid, search string) (*KubernetesPool, error)
FindKubernetesClusterPool implemented in a fake way for automated tests
func (*FakeClient) FindLoadBalancer ¶ added in v0.2.30
func (c *FakeClient) FindLoadBalancer(search string) (*LoadBalancer, error)
FindLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) FindNetwork ¶ added in v0.2.30
func (c *FakeClient) FindNetwork(search string) (*Network, error)
FindNetwork implemented in a fake way for automated tests
func (*FakeClient) FindSSHKey ¶ added in v0.2.30
func (c *FakeClient) FindSSHKey(search string) (*SSHKey, error)
FindSSHKey implemented in a fake way for automated tests
func (*FakeClient) FindVolume ¶ added in v0.2.30
func (c *FakeClient) FindVolume(search string) (*Volume, error)
FindVolume implemented in a fake way for automated tests
func (*FakeClient) FindWebhook ¶ added in v0.2.30
func (c *FakeClient) FindWebhook(search string) (*Webhook, error)
FindWebhook implemented in a fake way for automated tests
func (*FakeClient) GetDNSDomain ¶ added in v0.2.30
func (c *FakeClient) GetDNSDomain(name string) (*DNSDomain, error)
GetDNSDomain implemented in a fake way for automated tests
func (*FakeClient) GetDNSRecord ¶ added in v0.2.30
func (c *FakeClient) GetDNSRecord(domainID, domainRecordID string) (*DNSRecord, error)
GetDNSRecord implemented in a fake way for automated tests
func (*FakeClient) GetDefaultNetwork ¶ added in v0.2.30
func (c *FakeClient) GetDefaultNetwork() (*Network, error)
GetDefaultNetwork implemented in a fake way for automated tests
func (*FakeClient) GetDiskImage ¶ added in v0.2.37
func (c *FakeClient) GetDiskImage(id string) (*DiskImage, error)
GetDiskImage implemented in a fake way for automated tests
func (*FakeClient) GetIP ¶ added in v0.2.93
func (c *FakeClient) GetIP(id string) (*IP, error)
GetIP returns a fake IP
func (*FakeClient) GetInstance ¶ added in v0.2.30
func (c *FakeClient) GetInstance(id string) (*Instance, error)
GetInstance implemented in a fake way for automated tests
func (*FakeClient) GetInstanceConsoleURL ¶ added in v0.2.30
func (c *FakeClient) GetInstanceConsoleURL(id string) (string, error)
GetInstanceConsoleURL implemented in a fake way for automated tests
func (*FakeClient) GetKubernetesCluster ¶ added in v0.2.30
func (c *FakeClient) GetKubernetesCluster(id string) (*KubernetesCluster, error)
GetKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) GetKubernetesClusterPool ¶ added in v0.2.75
func (c *FakeClient) GetKubernetesClusterPool(cid, pid string) (*KubernetesPool, error)
GetKubernetesClusterPool implemented in a fake way for automated tests
func (*FakeClient) GetLoadBalancer ¶ added in v0.2.68
func (c *FakeClient) GetLoadBalancer(id string) (*LoadBalancer, error)
GetLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) GetOrganisation ¶ added in v0.2.50
func (c *FakeClient) GetOrganisation() (*Organisation, error)
GetOrganisation implemented in a fake way for automated tests
func (*FakeClient) GetQuota ¶ added in v0.2.30
func (c *FakeClient) GetQuota() (*Quota, error)
GetQuota implemented in a fake way for automated tests
func (*FakeClient) GetVolume ¶ added in v0.2.41
func (c *FakeClient) GetVolume(id string) (*Volume, error)
GetVolume implemented in a fake way for automated tests
func (*FakeClient) HardRebootInstance ¶ added in v0.2.30
func (c *FakeClient) HardRebootInstance(id string) (*SimpleResponse, error)
HardRebootInstance implemented in a fake way for automated tests
func (*FakeClient) ListAccountsInOrganisation ¶ added in v0.2.50
func (c *FakeClient) ListAccountsInOrganisation() ([]Account, error)
ListAccountsInOrganisation implemented in a fake way for automated tests
func (*FakeClient) ListAllInstances ¶ added in v0.2.30
func (c *FakeClient) ListAllInstances() ([]Instance, error)
ListAllInstances implemented in a fake way for automated tests
func (*FakeClient) ListAvailableKubernetesVersions ¶ added in v0.2.30
func (c *FakeClient) ListAvailableKubernetesVersions() ([]KubernetesVersion, error)
ListAvailableKubernetesVersions implemented in a fake way for automated tests
func (*FakeClient) ListCharges ¶ added in v0.2.30
func (c *FakeClient) ListCharges(from, to time.Time) ([]Charge, error)
ListCharges implemented in a fake way for automated tests
func (*FakeClient) ListDNSDomains ¶ added in v0.2.30
func (c *FakeClient) ListDNSDomains() ([]DNSDomain, error)
ListDNSDomains implemented in a fake way for automated tests
func (*FakeClient) ListDNSRecords ¶ added in v0.2.30
func (c *FakeClient) ListDNSRecords(dnsDomainID string) ([]DNSRecord, error)
ListDNSRecords implemented in a fake way for automated tests
func (*FakeClient) ListDiskImages ¶ added in v0.2.37
func (c *FakeClient) ListDiskImages() ([]DiskImage, error)
ListDiskImages implemented in a fake way for automated tests
func (*FakeClient) ListFirewallRules ¶ added in v0.2.30
func (c *FakeClient) ListFirewallRules(id string) ([]FirewallRule, error)
ListFirewallRules implemented in a fake way for automated tests
func (*FakeClient) ListFirewalls ¶ added in v0.2.30
func (c *FakeClient) ListFirewalls() ([]Firewall, error)
ListFirewalls implemented in a fake way for automated tests
func (*FakeClient) ListIPs ¶ added in v0.2.93
func (c *FakeClient) ListIPs() (*PaginatedIPs, error)
ListIPs returns a list of fake IPs
func (*FakeClient) ListInstanceSizes ¶ added in v0.2.30
func (c *FakeClient) ListInstanceSizes() ([]InstanceSize, error)
ListInstanceSizes implemented in a fake way for automated tests
func (*FakeClient) ListInstances ¶ added in v0.2.30
func (c *FakeClient) ListInstances(page int, perPage int) (*PaginatedInstanceList, error)
ListInstances implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesClusterInstances ¶ added in v0.2.68
func (c *FakeClient) ListKubernetesClusterInstances(id string) ([]Instance, error)
ListKubernetesClusterInstances implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesClusterPools ¶ added in v0.2.75
func (c *FakeClient) ListKubernetesClusterPools(cid string) ([]KubernetesPool, error)
ListKubernetesClusterPools implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesClusters ¶ added in v0.2.30
func (c *FakeClient) ListKubernetesClusters() (*PaginatedKubernetesClusters, error)
ListKubernetesClusters implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesMarketplaceApplications ¶ added in v0.2.30
func (c *FakeClient) ListKubernetesMarketplaceApplications() ([]KubernetesMarketplaceApplication, error)
ListKubernetesMarketplaceApplications implemented in a fake way for automated tests
func (*FakeClient) ListLoadBalancers ¶ added in v0.2.30
func (c *FakeClient) ListLoadBalancers() ([]LoadBalancer, error)
ListLoadBalancers implemented in a fake way for automated tests
func (*FakeClient) ListNetworks ¶ added in v0.2.30
func (c *FakeClient) ListNetworks() ([]Network, error)
ListNetworks implemented in a fake way for automated tests
func (*FakeClient) ListPermissions ¶ added in v0.2.50
func (c *FakeClient) ListPermissions() ([]Permission, error)
ListPermissions implemented in a fake way for automated tests
func (*FakeClient) ListRegions ¶ added in v0.2.30
func (c *FakeClient) ListRegions() ([]Region, error)
ListRegions implemented in a fake way for automated tests
func (*FakeClient) ListRoles ¶ added in v0.2.50
func (c *FakeClient) ListRoles() ([]Role, error)
ListRoles implemented in a fake way for automated tests
func (*FakeClient) ListSSHKeys ¶ added in v0.2.30
func (c *FakeClient) ListSSHKeys() ([]SSHKey, error)
ListSSHKeys implemented in a fake way for automated tests
func (*FakeClient) ListTeamMembers ¶ added in v0.2.50
func (c *FakeClient) ListTeamMembers(teamID string) ([]TeamMember, error)
ListTeamMembers implemented in a fake way for automated tests
func (*FakeClient) ListTeams ¶ added in v0.2.50
func (c *FakeClient) ListTeams() ([]Team, error)
ListTeams implemented in a fake way for automated tests
func (*FakeClient) ListVolumes ¶ added in v0.2.30
func (c *FakeClient) ListVolumes() ([]Volume, error)
ListVolumes implemented in a fake way for automated tests
func (*FakeClient) ListWebhooks ¶ added in v0.2.30
func (c *FakeClient) ListWebhooks() ([]Webhook, error)
ListWebhooks implemented in a fake way for automated tests
func (*FakeClient) MovePublicIPToInstance ¶ added in v0.2.30
func (c *FakeClient) MovePublicIPToInstance(id, ipAddress string) (*SimpleResponse, error)
MovePublicIPToInstance implemented in a fake way for automated tests
func (*FakeClient) NewFirewall ¶ added in v0.2.30
func (c *FakeClient) NewFirewall(*FirewallConfig) (*FirewallResult, error)
NewFirewall implemented in a fake way for automated tests
func (*FakeClient) NewFirewallRule ¶ added in v0.2.30
func (c *FakeClient) NewFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error)
NewFirewallRule implemented in a fake way for automated tests
func (*FakeClient) NewIP ¶ added in v0.2.93
func (c *FakeClient) NewIP(v *CreateIPRequest) (*IP, error)
NewIP creates a fake IP
func (*FakeClient) NewInstanceConfig ¶ added in v0.2.30
func (c *FakeClient) NewInstanceConfig() (*InstanceConfig, error)
NewInstanceConfig implemented in a fake way for automated tests
func (*FakeClient) NewKubernetesClusters ¶ added in v0.2.30
func (c *FakeClient) NewKubernetesClusters(kc *KubernetesClusterConfig) (*KubernetesCluster, error)
NewKubernetesClusters implemented in a fake way for automated tests
func (*FakeClient) NewNetwork ¶ added in v0.2.30
func (c *FakeClient) NewNetwork(label string) (*NetworkResult, error)
NewNetwork implemented in a fake way for automated tests
func (*FakeClient) NewSSHKey ¶ added in v0.2.30
func (c *FakeClient) NewSSHKey(name string, publicKey string) (*SimpleResponse, error)
NewSSHKey implemented in a fake way for automated tests
func (*FakeClient) NewVolume ¶ added in v0.2.30
func (c *FakeClient) NewVolume(v *VolumeConfig) (*VolumeResult, error)
NewVolume implemented in a fake way for automated tests
func (*FakeClient) Ping ¶ added in v0.3.63
func (c *FakeClient) Ping() error
Ping implemented in a fake way for automated tests
func (*FakeClient) RebootInstance ¶ added in v0.2.30
func (c *FakeClient) RebootInstance(id string) (*SimpleResponse, error)
RebootInstance implemented in a fake way for automated tests
func (*FakeClient) RecycleKubernetesCluster ¶ added in v0.2.30
func (c *FakeClient) RecycleKubernetesCluster(id string, hostname string) (*SimpleResponse, error)
RecycleKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) RemoveTeamMember ¶ added in v0.2.50
func (c *FakeClient) RemoveTeamMember(teamID, teamMemberID string) (*SimpleResponse, error)
RemoveTeamMember implemented in a fake way for automated tests
func (*FakeClient) RenameFirewall ¶ added in v0.2.30
func (c *FakeClient) RenameFirewall(id string, f *FirewallConfig) (*SimpleResponse, error)
RenameFirewall implemented in a fake way for automated tests
func (*FakeClient) RenameNetwork ¶ added in v0.2.30
func (c *FakeClient) RenameNetwork(label, id string) (*NetworkResult, error)
RenameNetwork implemented in a fake way for automated tests
func (*FakeClient) RenameOrganisation ¶ added in v0.2.50
func (c *FakeClient) RenameOrganisation(name string) (*Organisation, error)
RenameOrganisation implemented in a fake way for automated tests
func (*FakeClient) RenameTeam ¶ added in v0.2.50
func (c *FakeClient) RenameTeam(teamID, name string) (*Team, error)
RenameTeam implemented in a fake way for automated tests
func (*FakeClient) ResizeVolume ¶ added in v0.2.30
func (c *FakeClient) ResizeVolume(id string, size int) (*SimpleResponse, error)
ResizeVolume implemented in a fake way for automated tests
func (*FakeClient) SetInstanceFirewall ¶ added in v0.2.30
func (c *FakeClient) SetInstanceFirewall(id, firewallID string) (*SimpleResponse, error)
SetInstanceFirewall implemented in a fake way for automated tests
func (*FakeClient) SetInstanceTags ¶ added in v0.2.30
func (c *FakeClient) SetInstanceTags(i *Instance, tags string) (*SimpleResponse, error)
SetInstanceTags implemented in a fake way for automated tests
func (*FakeClient) SoftRebootInstance ¶ added in v0.2.30
func (c *FakeClient) SoftRebootInstance(id string) (*SimpleResponse, error)
SoftRebootInstance implemented in a fake way for automated tests
func (*FakeClient) StartInstance ¶ added in v0.2.30
func (c *FakeClient) StartInstance(id string) (*SimpleResponse, error)
StartInstance implemented in a fake way for automated tests
func (*FakeClient) StopInstance ¶ added in v0.2.30
func (c *FakeClient) StopInstance(id string) (*SimpleResponse, error)
StopInstance implemented in a fake way for automated tests
func (*FakeClient) UnassignIP ¶ added in v0.2.93
func (c *FakeClient) UnassignIP(id, region string) (*SimpleResponse, error)
UnassignIP unassigns a fake IP
func (*FakeClient) UpdateDNSDomain ¶ added in v0.2.30
func (c *FakeClient) UpdateDNSDomain(d *DNSDomain, name string) (*DNSDomain, error)
UpdateDNSDomain implemented in a fake way for automated tests
func (*FakeClient) UpdateDNSRecord ¶ added in v0.2.30
func (c *FakeClient) UpdateDNSRecord(r *DNSRecord, rc *DNSRecordConfig) (*DNSRecord, error)
UpdateDNSRecord implemented in a fake way for automated tests
func (*FakeClient) UpdateIP ¶ added in v0.2.93
func (c *FakeClient) UpdateIP(id string, v *UpdateIPRequest) (*IP, error)
UpdateIP updates a fake IP
func (*FakeClient) UpdateInstance ¶ added in v0.2.30
func (c *FakeClient) UpdateInstance(i *Instance) (*SimpleResponse, error)
UpdateInstance implemented in a fake way for automated tests
func (*FakeClient) UpdateKubernetesCluster ¶ added in v0.2.30
func (c *FakeClient) UpdateKubernetesCluster(id string, kc *KubernetesClusterConfig) (*KubernetesCluster, error)
UpdateKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) UpdateKubernetesClusterPool ¶ added in v0.2.77
func (c *FakeClient) UpdateKubernetesClusterPool(cid, pid string, config *KubernetesClusterPoolUpdateConfig) (*KubernetesPool, error)
UpdateKubernetesClusterPool implemented in a fake way for automated tests
func (*FakeClient) UpdateLoadBalancer ¶ added in v0.2.30
func (c *FakeClient) UpdateLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error)
UpdateLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) UpdateSSHKey ¶ added in v0.2.30
func (c *FakeClient) UpdateSSHKey(name string, sshKeyID string) (*SSHKey, error)
UpdateSSHKey implemented in a fake way for automated tests
func (*FakeClient) UpdateTeamMember ¶ added in v0.2.50
func (c *FakeClient) UpdateTeamMember(teamID, teamMemberID, permissions, roles string) (*TeamMember, error)
UpdateTeamMember implemented in a fake way for automated tests
func (*FakeClient) UpdateWebhook ¶ added in v0.2.30
func (c *FakeClient) UpdateWebhook(id string, r *WebhookConfig) (*Webhook, error)
UpdateWebhook implemented in a fake way for automated tests
func (*FakeClient) UpgradeInstance ¶ added in v0.2.30
func (c *FakeClient) UpgradeInstance(id, newSize string) (*SimpleResponse, error)
UpgradeInstance implemented in a fake way for automated tests
type Feature ¶ added in v0.2.24
type Feature struct { Iaas bool `json:"iaas"` Kubernetes bool `json:"kubernetes"` ObjectStore bool `json:"object_store"` LoadBalancer bool `json:"loadbalancer"` DBaaS bool `json:"dbaas"` Volume bool `json:"volume"` PaaS bool `json:"paas"` KFaaS bool `json:"kfaas"` PublicIPNodePools bool `json:"public_ip_node_pools"` }
Feature represent a all feature inside a region
type Firewall ¶
type Firewall struct { ID string `json:"id"` Name string `json:"name,omitempty"` RulesCount int `json:"rules_count,omitempty"` InstanceCount int `json:"instance_count"` ClusterCount int `json:"cluster_count"` LoadBalancerCount int `json:"loadbalancer_count"` NetworkID string `json:"network_id,omitempty"` Rules []FirewallRule `json:"rules,omitempty"` }
Firewall represents list of rule in Civo's infrastructure
type FirewallConfig ¶
type FirewallConfig struct { Name string `json:"name"` Region string `json:"region"` NetworkID string `json:"network_id"` // CreateRules if not send the value will be nil, that mean the default rules will be created CreateRules *bool `json:"create_rules,omitempty"` Rules []FirewallRule `json:"rules,omitempty"` }
FirewallConfig is how you specify the details when creating a new firewall
type FirewallResult ¶
type FirewallResult struct { ID string `json:"id"` Name string `json:"name"` Result string `json:"result"` }
FirewallResult is the response from the Civo Firewall APIs
type FirewallRule ¶
type FirewallRule struct { ID string `json:"id,omitempty"` FirewallID string `json:"firewall_id,omitempty"` Protocol string `json:"protocol"` StartPort string `json:"start_port"` EndPort string `json:"end_port"` Cidr []string `json:"cidr"` Direction string `json:"direction"` Action string `json:"action"` Label string `json:"label,omitempty"` Ports string `json:"ports,omitempty"` }
FirewallRule represents a single rule for a given firewall, regarding which ports to open and which protocol, to which CIDR
type FirewallRuleConfig ¶
type FirewallRuleConfig struct { FirewallID string `json:"firewall_id"` Region string `json:"region"` Protocol string `json:"protocol"` StartPort string `json:"start_port"` EndPort string `json:"end_port"` Cidr []string `json:"cidr"` Direction string `json:"direction"` Action string `json:"action"` Label string `json:"label,omitempty"` // Ports will be chosen over StartPort,EndPort if both are provided Ports string `json:"ports,omitempty"` }
FirewallRuleConfig is how you specify the details when creating a new rule
type IP ¶ added in v0.2.90
type IP struct { ID string `json:"id"` Name string `json:"name,omitempty"` IP string `json:"ip,omitempty"` AssignedTo AssignedTo `json:"assigned_to,omitempty"` }
IP represents a serialized structure
type Instance ¶
type Instance struct { ID string `json:"id,omitempty"` OpenstackServerID string `json:"openstack_server_id,omitempty"` Hostname string `json:"hostname,omitempty"` ReverseDNS string `json:"reverse_dns,omitempty"` Size string `json:"size,omitempty"` Region string `json:"region,omitempty"` NetworkID string `json:"network_id,omitempty"` PrivateIP string `json:"private_ip,omitempty"` PublicIP string `json:"public_ip,omitempty"` IPv6 string `json:"ipv6,omitempty"` PseudoIP string `json:"pseudo_ip,omitempty"` TemplateID string `json:"template_id,omitempty"` SourceType string `json:"source_type,omitempty"` SourceID string `json:"source_id,omitempty"` SnapshotID string `json:"snapshot_id,omitempty"` InitialUser string `json:"initial_user,omitempty"` InitialPassword string `json:"initial_password,omitempty"` SSHKey string `json:"ssh_key,omitempty"` SSHKeyID string `json:"ssh_key_id,omitempty"` Status string `json:"status,omitempty"` Notes string `json:"notes,omitempty"` FirewallID string `json:"firewall_id,omitempty"` Tags []string `json:"tags,omitempty"` CivostatsdToken string `json:"civostatsd_token,omitempty"` CivostatsdStats string `json:"civostatsd_stats,omitempty"` CivostatsdStatsPerMinute []string `json:"civostatsd_stats_per_minute,omitempty"` CivostatsdStatsPerHour []string `json:"civostatsd_stats_per_hour,omitempty"` OpenstackImageID string `json:"openstack_image_id,omitempty"` RescuePassword string `json:"rescue_password,omitempty"` VolumeBacked bool `json:"volume_backed,omitempty"` CPUCores int `json:"cpu_cores,omitempty"` RAMMegabytes int `json:"ram_mb,omitempty"` DiskGigabytes int `json:"disk_gb,omitempty"` GPUCount int `json:"gpu_count,omitempty"` GPUType string `json:"gpu_type,omitempty"` Script string `json:"script,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` ReservedIPID string `json:"reserved_ip_id,omitempty"` ReservedIPName string `json:"reserved_ip_name,omitempty"` ReservedIP string `json:"reserved_ip,omitempty"` VolumeType string `json:"volume_type,omitempty"` Subnets []Subnet `json:"subnets,omitempty"` AttachedVolumes []AttachedVolume `json:"attached_volumes,omitempty"` PlacementRule PlacementRule `json:"placement_rule,omitempty"` }
Instance represents a virtual server within Civo's infrastructure
type InstanceConfig ¶
type InstanceConfig struct { Count int `json:"count"` Hostname string `json:"hostname"` ReverseDNS string `json:"reverse_dns"` Size string `json:"size"` Region string `json:"region"` PublicIPRequired string `json:"public_ip"` ReservedIPv4 string `json:"reserved_ipv4"` PrivateIPv4 string `json:"private_ipv4"` NetworkID string `json:"network_id"` TemplateID string `json:"template_id"` SourceType string `json:"source_type"` SourceID string `json:"source_id"` SnapshotID string `json:"snapshot_id"` Subnets []string `json:"subnets,omitempty"` InitialUser string `json:"initial_user"` SSHKeyID string `json:"ssh_key_id"` Script string `json:"script"` Tags []string `json:"-"` TagsList string `json:"tags"` FirewallID string `json:"firewall_id"` AttachedVolumes []AttachedVolume `json:"attached_volumes"` PlacementRule PlacementRule `json:"placement_rule"` }
InstanceConfig describes the parameters for a new instance none of the fields are mandatory and will be automatically set with default values
type InstanceConsole ¶ added in v0.1.1
type InstanceConsole struct {
URL string `json:"url"`
}
InstanceConsole represents a link to a webconsole for an instances
type InstanceSize ¶
type InstanceSize struct { Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` NiceName string `json:"nice_name,omitempty"` CPUCores int `json:"cpu_cores,omitempty"` GPUCount int `json:"gpu_count,omitempty"` GPUType string `json:"gpu_type,omitempty"` RAMMegabytes int `json:"ram_mb,omitempty"` DiskGigabytes int `json:"disk_gb,omitempty"` TransferTerabytes int `json:"transfer_tb,omitempty"` Description string `json:"description,omitempty"` Selectable bool `json:"selectable,omitempty"` }
InstanceSize represents an available size for instances to launch
type InstanceVnc ¶ added in v0.3.80
type InstanceVnc struct { URI string `json:"uri"` Result string `json:"result"` Name string `json:"name"` Label string `json:"label"` }
InstanceVnc represents VNC information for an instances
type KfCluster ¶ added in v0.3.29
type KfCluster struct { ID string `json:"id"` Name string `json:"name"` NetworkID string `json:"network_id"` FirewallID string `json:"firewall_id,omitempty"` Size string `json:"size,omitempty"` KubeflowReady string `json:"kubeflow_ready,omitempty"` DashboardURL string `json:"dashboard_url,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` }
KfCluster represents a cluster with Kubeflow installed.
type KubernetesCluster ¶
type KubernetesCluster struct { ID string `json:"id"` Name string `json:"name,omitempty"` GeneratedName string `json:"generated_name,omitempty"` Version string `json:"version,omitempty"` Status string `json:"status,omitempty"` Ready bool `json:"ready,omitempty"` ClusterType string `json:"cluster_type,omitempty"` NumTargetNode int `json:"num_target_nodes,omitempty"` TargetNodeSize string `json:"target_nodes_size,omitempty"` BuiltAt time.Time `json:"built_at,omitempty"` KubeConfig string `json:"kubeconfig,omitempty"` KubernetesVersion string `json:"kubernetes_version,omitempty"` APIEndPoint string `json:"api_endpoint,omitempty"` MasterIP string `json:"master_ip,omitempty"` DNSEntry string `json:"dns_entry,omitempty"` UpgradeAvailableTo string `json:"upgrade_available_to,omitempty"` Legacy bool `json:"legacy,omitempty"` NetworkID string `json:"network_id,omitempty"` NameSpace string `json:"namespace,omitempty"` Tags []string `json:"tags,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` Instances []KubernetesInstance `json:"instances,omitempty"` Pools []KubernetesPool `json:"pools,omitempty"` RequiredPools []RequiredPools `json:"required_pools,omitempty"` InstalledApplications []KubernetesInstalledApplication `json:"installed_applications,omitempty"` FirewallID string `json:"firewall_id,omitempty"` CNIPlugin string `json:"cni_plugin,omitempty"` CCMInstalled string `json:"ccm_installed,omitempty"` Conditions []Condition `json:"conditions"` }
KubernetesCluster is a Kubernetes item inside the cluster
type KubernetesClusterConfig ¶
type KubernetesClusterConfig struct { Name string `json:"name,omitempty"` Region string `json:"region,omitempty"` ClusterType string `json:"cluster_type,omitempty"` NumTargetNodes int `json:"num_target_nodes,omitempty"` TargetNodesSize string `json:"target_nodes_size,omitempty"` KubernetesVersion string `json:"kubernetes_version,omitempty"` NodeDestroy string `json:"node_destroy,omitempty"` NetworkID string `json:"network_id,omitempty"` Tags string `json:"tags,omitempty"` Pools []KubernetesClusterPoolConfig `json:"pools,omitempty"` Applications string `json:"applications,omitempty"` InstanceFirewall string `json:"instance_firewall,omitempty"` FirewallRule string `json:"firewall_rule,omitempty"` FirewallID string `json:"firewall_id,omitempty"` CNIPlugin string `json:"cni_plugin,omitempty"` }
KubernetesClusterConfig is used to create a new cluster
type KubernetesClusterPoolConfig ¶ added in v0.2.44
type KubernetesClusterPoolConfig struct { Region string `json:"region,omitempty"` ID string `json:"id,omitempty"` Count int `json:"count,omitempty"` Size string `json:"size,omitempty"` Labels map[string]string `json:"labels,omitempty"` Taints []corev1.Taint `json:"taints"` PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"` }
KubernetesClusterPoolConfig is used to create a new cluster pool
type KubernetesClusterPoolUpdateConfig ¶ added in v0.2.81
type KubernetesClusterPoolUpdateConfig struct { ID string `json:"id,omitempty"` Count *int `json:"count,omitempty"` Size string `json:"size,omitempty"` Labels map[string]string `json:"labels,omitempty"` Taints []corev1.Taint `json:"taints"` PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"` Region string `json:"region,omitempty"` }
KubernetesClusterPoolUpdateConfig is used to create a new cluster pool
type KubernetesInstalledApplication ¶
type KubernetesInstalledApplication struct { Application string `json:"application,omitempty"` Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Dependencies []string `json:"dependencies,omitempty"` Maintainer string `json:"maintainer,omitempty"` Description string `json:"description,omitempty"` PostInstall string `json:"post_install,omitempty"` Installed bool `json:"installed,omitempty"` URL string `json:"url,omitempty"` Category string `json:"category,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` ImageURL string `json:"image_url,omitempty"` Plan string `json:"plan,omitempty"` Configuration map[string]ApplicationConfiguration `json:"configuration,omitempty"` }
KubernetesInstalledApplication is an application within our marketplace available for installation
type KubernetesInstance ¶
type KubernetesInstance struct { ID string `json:"id"` Hostname string `json:"hostname,omitempty"` Size string `json:"size,omitempty"` Region string `json:"region,omitempty"` SourceType string `json:"source_type,omitempty"` SourceID string `json:"source_id,omitempty"` InitialUser string `json:"initial_user,omitempty"` InitialPassword string `json:"initial_password,omitempty"` Status string `json:"status,omitempty"` FirewallID string `json:"firewall_id,omitempty"` PublicIP string `json:"public_ip,omitempty"` CPUCores int `json:"cpu_cores,omitempty"` RAMMegabytes int `json:"ram_mb,omitempty"` DiskGigabytes int `json:"disk_gb,omitempty"` Tags []string `json:"tags,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` CivoStatsdToken string `json:"civostatsd_token,omitempty"` }
KubernetesInstance represents a single node/master within a Kubernetes cluster
type KubernetesMarketplaceApplication ¶
type KubernetesMarketplaceApplication struct { Name string `json:"name"` Title string `json:"title,omitempty"` Version string `json:"version"` Default bool `json:"default,omitempty"` Dependencies []string `json:"dependencies,omitempty"` Maintainer string `json:"maintainer"` Description string `json:"description"` PostInstall string `json:"post_install"` URL string `json:"url"` Category string `json:"category"` Plans []KubernetesMarketplacePlan `json:"plans"` }
KubernetesMarketplaceApplication is an application within our marketplace available for installation
type KubernetesMarketplacePlan ¶
type KubernetesMarketplacePlan struct { Label string `json:"label"` Configuration map[string]KubernetesPlanConfiguration `json:"configuration"` }
KubernetesMarketplacePlan is a plan for
type KubernetesPlanConfiguration ¶
type KubernetesPlanConfiguration struct {
Value string `json:"value"`
}
KubernetesPlanConfiguration is a value within a configuration for an application's plan
type KubernetesPool ¶ added in v0.2.43
type KubernetesPool struct { ID string `json:"id"` Count int `json:"count,omitempty"` Size string `json:"size,omitempty"` InstanceNames []string `json:"instance_names,omitempty"` Instances []KubernetesInstance `json:"instances,omitempty"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Taints []corev1.Taint `json:"taints,omitempty"` PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"` }
KubernetesPool represents a single pool within a Kubernetes cluster
type KubernetesVersion ¶
type KubernetesVersion struct { Label string `json:"label"` Version string `json:"version"` Type string `json:"type"` Default bool `json:"default,omitempty"` ClusterType string `json:"clusterType,omitempty"` }
KubernetesVersion represents an available version of k3s to install
type LoadBalancer ¶
type LoadBalancer struct { ID string `json:"id"` Name string `json:"name"` ServiceName string `json:"service_name,omitempty"` Algorithm string `json:"algorithm"` Backends []LoadBalancerBackend `json:"backends"` ExternalTrafficPolicy string `json:"external_traffic_policy,omitempty"` SessionAffinity string `json:"session_affinity,omitempty"` SessionAffinityConfigTimeout int32 `json:"session_affinity_config_timeout,omitempty"` EnableProxyProtocol string `json:"enable_proxy_protocol,omitempty"` PublicIP string `json:"public_ip"` PrivateIP string `json:"private_ip"` FirewallID string `json:"firewall_id"` ClusterID string `json:"cluster_id,omitempty"` State string `json:"state"` ReservedIPID string `json:"reserved_ip_id,omitempty"` ReservedIPName string `json:"reserved_ip_name,omitempty"` ReservedIP string `json:"reserved_ip,omitempty"` MaxConcurrentRequests int `json:"max_concurrent_requests,omitempty"` Options *LoadBalancerOptions `json:"options,omitempty"` }
LoadBalancer represents a load balancer configuration within Civo
type LoadBalancerBackend ¶
type LoadBalancerBackend struct { IP string `json:"ip"` Protocol string `json:"protocol,omitempty"` SourcePort int32 `json:"source_port"` TargetPort int32 `json:"target_port"` HealthCheckPort int32 `json:"health_check_port,omitempty"` }
LoadBalancerBackend represents a backend instance being load-balanced
type LoadBalancerBackendConfig ¶
type LoadBalancerBackendConfig struct { IP string `json:"ip"` Protocol string `json:"protocol,omitempty"` SourcePort int32 `json:"source_port"` TargetPort int32 `json:"target_port"` HealthCheckPort int32 `json:"health_check_port,omitempty"` }
LoadBalancerBackendConfig is the configuration for creating backends
type LoadBalancerConfig ¶
type LoadBalancerConfig struct { Region string `json:"region"` Name string `json:"name"` ServiceName string `json:"service_name,omitempty"` NetworkID string `json:"network_id,omitempty"` Algorithm string `json:"algorithm,omitempty"` Backends []LoadBalancerBackendConfig `json:"backends"` ExternalTrafficPolicy string `json:"external_traffic_policy,omitempty"` SessionAffinity string `json:"session_affinity,omitempty"` SessionAffinityConfigTimeout int32 `json:"session_affinity_config_timeout,omitempty"` EnableProxyProtocol string `json:"enable_proxy_protocol,omitempty"` ClusterID string `json:"cluster_id,omitempty"` FirewallID string `json:"firewall_id,omitempty"` FirewallRules string `json:"firewall_rule,omitempty"` MaxConcurrentRequests *int `json:"max_concurrent_requests,omitempty"` LoadBalancerOptions *LoadBalancerOptions `json:"options,omitempty"` }
LoadBalancerConfig represents a load balancer to be created
type LoadBalancerOptions ¶ added in v0.3.41
type LoadBalancerOptions struct { ServerTimeout string `json:"server_timeout,omitempty"` ClientTimeout string `json:"client_timeout,omitempty"` }
LoadBalancerOptions are additional loadbalancer options
type LoadBalancerUpdateConfig ¶ added in v0.2.61
type LoadBalancerUpdateConfig struct { Region string `json:"region"` Name string `json:"name,omitempty"` ServiceName string `json:"service_name,omitempty"` Algorithm string `json:"algorithm,omitempty"` Backends []LoadBalancerBackendConfig `json:"backends,omitempty"` ExternalTrafficPolicy string `json:"external_traffic_policy,omitempty"` SessionAffinity string `json:"session_affinity,omitempty"` SessionAffinityConfigTimeout int32 `json:"session_affinity_config_timeout,omitempty"` EnableProxyProtocol string `json:"enable_proxy_protocol,omitempty"` FirewallID string `json:"firewall_id,omitempty"` MaxConcurrentRequests *int `json:"max_concurrent_requests,omitempty"` LoadBalancerOptions *LoadBalancerOptions `json:"options,omitempty"` }
LoadBalancerUpdateConfig represents a load balancer to be updated
type Network ¶
type Network struct { ID string `json:"id"` Name string `json:"name,omitempty"` Default bool `json:"default"` CIDR string `json:"cidr,omitempty"` CIDRV6 string `json:"cidr_v6,omitempty"` Label string `json:"label,omitempty"` Status string `json:"status,omitempty"` IPv4Enabled bool `json:"ipv4_enabled,omitempty"` IPv6Enabled bool `json:"ipv6_enabled,omitempty"` NameserversV4 []string `json:"nameservers_v4,omitempty"` NameserversV6 []string `json:"nameservers_v6,omitempty"` VlanID int `json:"vlan_id" validate:"required" schema:"vlan_id"` PhysicalInterface string `json:"physical_interface,omitempty" schema:"physical_interface"` GatewayIPv4 string `json:"gateway_ipv4" validate:"required" schema:"gateway_ipv4"` AllocationPoolV4Start string `json:"allocation_pool_v4_start" validate:"required" schema:"allocation_pool_v4_start"` AllocationPoolV4End string `json:"allocation_pool_v4_end" validate:"required" schema:"allocation_pool_v4_end"` }
Network represents a private network for instances to connect to
type NetworkConfig ¶
type NetworkConfig struct { Label string `json:"label" validate:"required" schema:"label"` Default string `json:"default" schema:"default"` IPv4Enabled *bool `json:"ipv4_enabled"` NameserversV4 []string `json:"nameservers_v4"` CIDRv4 string `json:"cidr_v4"` IPv6Enabled *bool `json:"ipv6_enabled"` NameserversV6 []string `json:"nameservers_v6"` Region string `json:"region"` VLanConfig *VLANConnectConfig `json:"vlan_connect,omitempty"` }
NetworkConfig contains incoming request parameters for the network object
type NetworkResult ¶
type NetworkResult struct { ID string `json:"id"` Label string `json:"label"` Result string `json:"result"` }
NetworkResult represents the result from a network create/update call
type ObjectStore ¶ added in v0.2.83
type ObjectStore struct { ID string `json:"id"` Name string `json:"name"` MaxSize int `json:"max_size"` OwnerInfo BucketOwner `json:"owner_info"` BucketURL string `json:"objectstore_endpoint"` Status string `json:"status"` }
ObjectStore is the struct for the ObjectStore model
type ObjectStoreCredential ¶ added in v0.3.4
type ObjectStoreCredential struct { ID string `json:"id"` Name string `json:"name"` AccessKeyID string `json:"access_key_id"` SecretAccessKeyID string `json:"secret_access_key_id"` MaxSizeGB int `json:"max_size_gb,omitempty"` Suspended bool `json:"suspended"` Status string `json:"status"` }
ObjectStoreCredential holds the credential of an object store
type ObjectStoreStats ¶ added in v0.3.56
type ObjectStoreStats struct { SizeKBUtilised int64 `json:"size_kb_utilised"` MaxSizeKB int64 `json:"max_size_kb"` NumObjects int64 `json:"num_objects"` }
ObjectStoreStats holds the object store stats
type Organisation ¶ added in v0.2.50
type Organisation struct { ID string `json:"id"` Name string `json:"name"` Token string `json:"token"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
Organisation represents a group of accounts treated as a single entity
type PaginateActionList ¶ added in v0.3.14
type PaginateActionList struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []Action `json:"items"` }
PaginateActionList is a struct for a page of actions
type PaginatedAccounts ¶ added in v0.2.80
type PaginatedAccounts struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []Account `json:"items"` }
PaginatedAccounts returns a paginated list of Account object
type PaginatedApplications ¶ added in v0.2.76
type PaginatedApplications struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []Application `json:"items"` }
PaginatedApplications returns a paginated list of Application object
type PaginatedDatabaseBackup ¶ added in v0.3.58
type PaginatedDatabaseBackup struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []DatabaseBackup `json:"items"` }
PaginatedDatabaseBackup is the structure for list response from DB endpoint
type PaginatedDatabases ¶ added in v0.3.20
type PaginatedDatabases struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []Database `json:"items"` }
PaginatedDatabases is the structure for list response from DB endpoint
type PaginatedIPs ¶ added in v0.2.90
type PaginatedIPs struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []IP `json:"items"` }
PaginatedIPs is a paginated list of IPs
type PaginatedInstanceList ¶
type PaginatedInstanceList struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []Instance `json:"items"` }
PaginatedInstanceList returns a paginated list of Instance object
type PaginatedKfClusters ¶ added in v0.3.29
type PaginatedKfClusters struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []KfCluster `json:"items"` }
PaginatedKfClusters returns a paginated list of KfCluster object
type PaginatedKubernetesClusters ¶ added in v0.2.4
type PaginatedKubernetesClusters struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []KubernetesCluster `json:"items"` }
PaginatedKubernetesClusters is a Kubernetes k3s cluster
type PaginatedObjectStoreCredentials ¶ added in v0.3.4
type PaginatedObjectStoreCredentials struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []ObjectStoreCredential `json:"items"` }
PaginatedObjectStoreCredentials is a paginated list of Objectstore credentials
type PaginatedObjectstores ¶ added in v0.2.88
type PaginatedObjectstores struct { Page int `json:"page"` PerPage int `json:"per_page"` Pages int `json:"pages"` Items []ObjectStore `json:"items"` }
PaginatedObjectstores is a paginated list of Objectstores
type Permission ¶ added in v0.2.50
type Permission struct { Code string `json:"code"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
Permission represents a permission and the description for it
type PlacementRule ¶ added in v0.3.81
type PlacementRule struct { AffinityRules []AffinityRule `json:"affinity_rules,omitempty"` NodeSelector map[string]string `json:"node_selector,omitempty"` }
PlacementRule represents a placement rule
type ProcessInfo ¶ added in v0.2.76
type ProcessInfo struct { ProcessType string `json:"processType"` ProcessCount int `json:"processCount"` }
ProcessInfo contains the information about the process obtained from Procfile
type Quota ¶
type Quota struct { ID string `json:"id"` DefaultUserID string `json:"default_user_id"` DefaultUserEmailAddress string `json:"default_user_email_address"` InstanceCountLimit int `json:"instance_count_limit"` InstanceCountUsage int `json:"instance_count_usage"` CPUCoreLimit int `json:"cpu_core_limit"` CPUCoreUsage int `json:"cpu_core_usage"` RAMMegabytesLimit int `json:"ram_mb_limit"` RAMMegabytesUsage int `json:"ram_mb_usage"` DiskGigabytesLimit int `json:"disk_gb_limit"` DiskGigabytesUsage int `json:"disk_gb_usage"` DiskVolumeCountLimit int `json:"disk_volume_count_limit"` DiskVolumeCountUsage int `json:"disk_volume_count_usage"` DiskSnapshotCountLimit int `json:"disk_snapshot_count_limit"` DiskSnapshotCountUsage int `json:"disk_snapshot_count_usage"` PublicIPAddressLimit int `json:"public_ip_address_limit"` PublicIPAddressUsage int `json:"public_ip_address_usage"` SubnetCountLimit int `json:"subnet_count_limit"` SubnetCountUsage int `json:"subnet_count_usage"` NetworkCountLimit int `json:"network_count_limit"` NetworkCountUsage int `json:"network_count_usage"` SecurityGroupLimit int `json:"security_group_limit"` SecurityGroupUsage int `json:"security_group_usage"` SecurityGroupRuleLimit int `json:"security_group_rule_limit"` SecurityGroupRuleUsage int `json:"security_group_rule_usage"` PortCountLimit int `json:"port_count_limit"` PortCountUsage int `json:"port_count_usage"` LoadBalancerCountLimit int `json:"loadbalancer_count_limit"` LoadBalancerCountUsage int `json:"loadbalancer_count_usage"` ObjectStoreGigabytesLimit int `json:"objectstore_gb_limit"` ObjectStoreGigabytesUsage int `json:"objectstore_gb_usage"` DatabaseCountLimit int `json:"database_count_limit"` DatabaseCountUsage int `json:"database_count_usage"` DatabaseSnapshotCountLimit int `json:"database_snapshot_count_limit"` DatabaseSnapshotCountUsage int `json:"database_snapshot_count_usage"` DatabaseCPUCoreLimit int `json:"database_cpu_core_limit"` DatabaseCPUCoreUsage int `json:"database_cpu_core_usage"` DatabaseRAMMegabytesLimit int `json:"database_ram_mb_limit"` DatabaseRAMMegabytesUsage int `json:"database_ram_mb_usage"` DatabaseDiskGigabytesLimit int `json:"database_disk_gb_limit"` DatabaseDiskGigabytesUsage int `json:"database_disk_gb_usage"` }
Quota represents the available limits and usage for an account's Civo quota
type Region ¶
type Region struct { Code string `json:"code"` Name string `json:"name"` Type string `json:"type"` OutOfCapacity bool `json:"out_of_capacity"` Country string `json:"country"` CountryName string `json:"country_name"` Features Feature `json:"features"` Default bool `json:"default"` }
Region represents a geographical/DC region for Civo resources
type RequiredPools ¶ added in v0.2.74
type RequiredPools struct { ID string `json:"id"` Size string `json:"size"` Count int `json:"count"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Taints []corev1.Taint `json:"taints,omitempty"` PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"` }
RequiredPools returns the required pools for a given Kubernetes cluster
type RestoreDatabaseRequest ¶ added in v0.3.45
type RestoreDatabaseRequest struct { // Name is the name of the database restore Name string `json:"name"` // Backup is the name of the database backup Backup string `json:"backup"` // Region is the name of the region Region string `json:"region"` }
RestoreDatabaseRequest is the request body for restoring a database
type Role ¶ added in v0.2.50
type Role struct { ID string `json:"id"` Name string `json:"name,omitempty"` Permissions string `json:"permissions,omitempty"` BuiltIn bool `json:"built_in,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
Role represents a set of permissions
type Route ¶ added in v0.3.17
type Route struct { ID string `json:"id"` SubnetID string `json:"subnet_id"` NetworkID string `json:"network_id"` ResourceID string `json:"resource_id"` ResourceType string `json:"resource_type"` }
Route represents a route within a subnet
type SSHKey ¶
type SSHKey struct { ID string `json:"id"` Name string `json:"name"` Fingerprint string `json:"fingerprint"` PublicKey string `json:"public_key"` CreatedAt time.Time `json:"created_at"` }
SSHKey represents an SSH public key, uploaded to access instances
type SimpleResponse ¶
type SimpleResponse struct { ID string `json:"id"` Result Result `json:"result"` ErrorCode string `json:"code"` ErrorReason string `json:"reason"` ErrorDetails string `json:"details"` }
SimpleResponse is a structure that returns success and/or any error
type Subnet ¶ added in v0.3.15
type Subnet struct { ID string `json:"id"` Name string `json:"name,omitempty"` NetworkID string `json:"network_id"` SubnetSize string `json:"subnet_size,omitempty"` Status string `json:"status,omitempty"` }
Subnet represents a subnet within a private network
type SubnetConfig ¶ added in v0.3.15
type SubnetConfig struct {
Name string `json:"name" validate:"required" schema:"name"`
}
SubnetConfig contains incoming request parameters for the subnet object
type SupportedSoftwareVersion ¶ added in v0.3.26
type SupportedSoftwareVersion struct { SoftwareVersion string `json:"software_version"` Default bool `json:"default"` }
SupportedSoftwareVersion contains the information related to a specific software version
type Team ¶ added in v0.2.50
type Team struct { ID string `json:"id"` Name string `json:"name,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
Team is a named group of users (has many members)
type TeamMember ¶ added in v0.2.50
type TeamMember struct { ID string `json:"id"` TeamID string `json:"team_id,omitempty"` UserID string `json:"user_id,omitempty"` Permissions string `json:"permissions,omitempty"` Roles string `json:"roles,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` }
TeamMember is a link record between User and Team.
type UpdateApplicationRequest ¶ added in v0.2.76
type UpdateApplicationRequest struct { Name string `json:"name"` Advanced bool `json:"advanced"` Image string `json:"image" ` Description string `json:"description"` ProcessInfo []ProcessInfo `json:"process_info"` Size string `json:"size" schema:"size"` SSHKeyIDs []string `json:"ssh_key_ids" ` Config []EnvVar `json:"config"` Domains []string `json:"domains"` }
UpdateApplicationRequest is the struct for the UpdateApplication request
type UpdateDatabaseRequest ¶ added in v0.3.20
type UpdateDatabaseRequest struct { Name string `json:"name"` Nodes *int `json:"nodes"` FirewallID string `json:"firewall_id"` Region string `json:"region"` }
UpdateDatabaseRequest holds fields required to update a database
type UpdateIPRequest ¶ added in v0.2.90
type UpdateIPRequest struct { Name string `json:"name" validate:"required"` // Region is the region the IP will be created in Region string `json:"region"` }
UpdateIPRequest is a struct for creating an IP
type UpdateKfClusterReq ¶ added in v0.3.29
type UpdateKfClusterReq struct { Name string `json:"name,omitempty"` Region string `json:"region,omitempty"` }
UpdateKfClusterReq is the request for updating a KfCluster.
type UpdateObjectStoreCredentialRequest ¶ added in v0.3.4
type UpdateObjectStoreCredentialRequest struct { AccessKeyID *string `json:"access_key_id"` SecretAccessKeyID *string `json:"secret_access_key_id"` MaxSizeGB *int `json:"max_size_gb,omitempty"` Region string `json:"region,omitempty"` }
UpdateObjectStoreCredentialRequest holds the request to update a specified object store credential's details
type UpdateObjectStoreRequest ¶ added in v0.2.83
type UpdateObjectStoreRequest struct { MaxSizeGB int64 `json:"max_size_gb"` // TODO: Enable once we support change of owner // AccessKeyID string `json:"access_key_id,omitempty"` Region string `json:"region"` }
UpdateObjectStoreRequest holds the request to update a specified object storage's details
type User ¶ added in v0.2.56
type User struct { ID string `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` CompanyName string `json:"company_name"` EmailAddress string `json:"email_address"` Status string `json:"status"` Flags string `json:"flags"` Token string `json:"token"` MarketingAllowed int `json:"marketing_allowed"` DefaultAccountID string `json:"default_account_id"` // DefaultAccountID string `json:"account_id"` PasswordDigest string `json:"password_digest"` Partner string `json:"partner"` PartnerUserID string `json:"partner_user_id"` ReferralID string `json:"referral_id"` LastChosenRegion string `json:"last_chosen_region"` }
User is the user struct
type UserEverything ¶ added in v0.2.56
type UserEverything struct { User User Accounts []Account Organisations []Organisation Teams []Team Roles []Role }
UserEverything is the combination structure for all team related data for the current user and account
type VLANConnectConfig ¶ added in v0.3.66
type VLANConnectConfig struct { // VLanID is the ID of the VLAN to connect to VlanID int `json:"vlan_id" validate:"required" schema:"vlan_id"` // PhysicalInterface is the base interface(default: eth0) at which we want to setup VLAN. PhysicalInterface string `json:"physical_interface,omitempty" schema:"physical_interface"` // CIDRv4 is the CIDR of the VLAN to connect to CIDRv4 string `json:"cidr_v4" validate:"required" schema:"cidr_v4"` // GatewayIP is the gateway IP address GatewayIPv4 string `json:"gateway_ipv4" validate:"required" schema:"gateway_ipv4"` // AllocationPoolV4Start address of the allocation pool AllocationPoolV4Start string `json:"allocation_pool_v4_start" validate:"required" schema:"allocation_pool_v4_start"` // AllocationPoolV4End address of the allocation pool AllocationPoolV4End string `json:"allocation_pool_v4_end" validate:"required" schema:"allocation_pool_v4_end"` }
VLANConnectConfig represents the connection of a network to a VLAN
type ValueAdvanceClientForTesting ¶ added in v0.2.86
ValueAdvanceClientForTesting is a struct that holds the URL and the request body
type Volume ¶
type Volume struct { ID string `json:"id"` Name string `json:"name"` InstanceID string `json:"instance_id"` ClusterID string `json:"cluster_id"` NetworkID string `json:"network_id"` MountPoint string `json:"mountpoint"` Status string `json:"status"` VolumeType string `json:"volume_type"` SizeGigabytes int `json:"size_gb"` Bootable bool `json:"bootable"` CreatedAt time.Time `json:"created_at"` }
Volume is a block of attachable storage for our IAAS products https://www.civo.com/api/volumes
type VolumeAttachConfig ¶ added in v0.3.75
type VolumeAttachConfig struct { InstanceID string `json:"instance_id"` AttachAtBoot bool `json:"attach_at_boot"` Region string `json:"region"` }
VolumeAttachConfig is the configuration used to attach volume
type VolumeConfig ¶
type VolumeConfig struct { Name string `json:"name"` Namespace string `json:"namespace"` ClusterID string `json:"cluster_id"` NetworkID string `json:"network_id"` Region string `json:"region"` SizeGigabytes int `json:"size_gb"` Bootable bool `json:"bootable"` }
VolumeConfig are the settings required to create a new Volume
type VolumeResult ¶
type VolumeResult struct { ID string `json:"id"` Name string `json:"name"` Result string `json:"result"` }
VolumeResult is the response from one of our simple API calls
type VolumeType ¶ added in v0.3.82
type VolumeType struct { Name string `json:"name"` Description string `json:"description"` Enabled bool `json:"enabled"` Labels []string `json:"labels"` }
VolumeType represent the storage class related to a volume https://www.civo.com/api/volumes
type Webhook ¶
type Webhook struct { ID string `json:"id"` Events []string `json:"events"` URL string `json:"url"` Secret string `json:"secret"` Disabled bool `json:"disabled"` Failures int `json:"failures"` LasrFailureReason string `json:"last_failure_reason"` }
Webhook is a representation of a saved webhook callback from changes in Civo
type WebhookConfig ¶
type WebhookConfig struct { Events []string `json:"events"` URL string `json:"url"` Secret string `json:"secret"` }
WebhookConfig represents the options required for creating a new webhook
Source Files ¶
- account.go
- action.go
- application.go
- charge.go
- client.go
- database.go
- database_backup.go
- disk_image.go
- dns.go
- errors.go
- fake_client.go
- firewall.go
- instance.go
- instance_size.go
- ip.go
- kfcluster.go
- kubernetes.go
- loadbalancer.go
- network.go
- objectstore.go
- objectstore_credential.go
- organisation.go
- permission.go
- ping.go
- pool.go
- quota.go
- region.go
- role.go
- ssh_key.go
- team.go
- user.go
- volume.go
- volumetype.go
- webhook.go