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) AssignVPCIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
- func (c *Client) AttachSubnetToInstance(networkID, subnetID string, route *CreateRoute) (*Route, error)
- func (c *Client) AttachVPCSubnetToInstance(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) CreateDiskImage(params *CreateDiskImageParams) (*CreateDiskImageResponse, error)
- func (c *Client) CreateInstance(config *InstanceConfig) (*Instance, error)
- func (c *Client) CreateInstanceSnapshot(instanceID string, params *CreateInstanceSnapshotParams) (*InstanceSnapshot, 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) CreateSnapshotSchedule(r *CreateSnapshotScheduleRequest) (*SnapshotSchedule, error)
- func (c *Client) CreateSubnet(networkID string, subnet SubnetConfig) (*Subnet, error)
- func (c *Client) CreateTeam(name string) (*Team, error)
- func (c *Client) CreateVPCLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error)
- func (c *Client) CreateVPCNetwork(nc NetworkConfig) (*NetworkResult, error)
- func (c *Client) CreateVPCSubnet(networkID string, subnet SubnetConfig) (*Subnet, error)
- func (c *Client) CreateVolumeSnapshot(volumeID string, config *VolumeSnapshotConfig) (*VolumeSnapshot, 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) DeleteDiskImage(id string) 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) DeleteInstanceSnapshot(instanceID, snapshotID string) error
- func (c *Client) DeleteInstanceVncSession(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) DeleteResourceSnapshot(id string) (*SimpleResponse, error)
- func (c *Client) DeleteRole(id string) (*SimpleResponse, error)
- func (c *Client) DeleteSSHKey(id string) (*SimpleResponse, error)
- func (c *Client) DeleteSnapshotSchedule(id string) (*SimpleResponse, error)
- func (c *Client) DeleteSubnet(networkID, subnetID string) (*SimpleResponse, error)
- func (c *Client) DeleteTeam(id string) (*SimpleResponse, error)
- func (c *Client) DeleteVPCFirewall(id string) (*SimpleResponse, error)
- func (c *Client) DeleteVPCFirewallRule(id string, ruleID string) (*SimpleResponse, error)
- func (c *Client) DeleteVPCIP(id string) (*SimpleResponse, error)
- func (c *Client) DeleteVPCLoadBalancer(id string) (*SimpleResponse, error)
- func (c *Client) DeleteVPCNetwork(id string) (*SimpleResponse, error)
- func (c *Client) DeleteVPCSubnet(networkID, subnetID string) (*SimpleResponse, error)
- func (c *Client) DeleteVolume(id string) (*SimpleResponse, error)
- func (c *Client) DeleteVolumeAndAllSnapshot(volumeID string) (*SimpleResponse, error)
- func (c *Client) DeleteVolumeSnapshot(id string) (*SimpleResponse, error)
- func (c *Client) DeleteWebhook(id string) (*SimpleResponse, error)
- func (c *Client) DetachSubnetFromInstance(networkID, subnetID string) (*SimpleResponse, error)
- func (c *Client) DetachVPCSubnetFromInstance(networkID, subnetID string) (*SimpleResponse, error)
- func (c *Client) DetachVolume(id string) (*SimpleResponse, error)
- func (c *Client) DisableRecoveryMode(id string) (*SimpleResponse, error)
- func (c *Client) DisconnectRegion(r *DisconnectRegionRequest) error
- func (c *Client) EnableRecoveryMode(id string) (*SimpleResponse, error)
- func (c *Client) ExchangeAuthToken(er *ExchangeAuthTokenRequest) (*ExchangeAuthTokenResponse, 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) 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) FindSnapshotSchedule(search string) (*SnapshotSchedule, error)
- func (c *Client) FindSubnet(search, networkID string) (*Subnet, error)
- func (c *Client) FindTeam(search string) (*Team, error)
- func (c *Client) FindVPCFirewall(search string) (*Firewall, error)
- func (c *Client) FindVPCFirewallRule(firewallID string, search string) (*FirewallRule, error)
- func (c *Client) FindVPCIP(search string) (*IP, error)
- func (c *Client) FindVPCLoadBalancer(search string) (*LoadBalancer, error)
- func (c *Client) FindVPCNetwork(search string) (*Network, error)
- func (c *Client) FindVPCSubnet(search, networkID string) (*Subnet, 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) GetDefaultVPCNetwork() (*Network, 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) GetInstanceSnapshot(instanceID, snapshotID string) (*InstanceSnapshot, error)
- func (c *Client) GetInstanceVnc(id string, duration ...string) (CreateInstanceVncResp, error)
- func (c *Client) GetInstanceVncStatus(id string) (*InstanceVnc, 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) 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) GetRecoveryStatus(id string) (*SimpleResponse, error)
- func (c *Client) GetResourceSnapshot(id string) (*ResourceSnapshot, error)
- func (c *Client) GetSnapshotSchedule(id string) (*SnapshotSchedule, error)
- func (c *Client) GetSubnet(networkID, subnetID string) (*Subnet, error)
- func (c *Client) GetUserEverything(userID string) (*UserEverything, error)
- func (c *Client) GetVPCIP(id string) (*IP, error)
- func (c *Client) GetVPCLoadBalancer(id string) (*LoadBalancer, error)
- func (c *Client) GetVPCNetwork(id string) (*Network, error)
- func (c *Client) GetVPCSubnet(networkID, subnetID string) (*Subnet, error)
- func (c *Client) GetVolume(id string) (*Volume, error)
- func (c *Client) GetVolumeSnapshot(id string) (*VolumeSnapshot, error)
- func (c *Client) GetVolumeSnapshotByVolumeID(volumeID, snapshotID string) (*VolumeSnapshot, error)
- func (c *Client) HardRebootInstance(id string) (*SimpleResponse, error)
- func (c *Client) IsUsingDefaultRules(firewallID string) (bool, error)
- func (c *Client) ListAccounts() (*PaginatedAccounts, error)
- func (c *Client) ListAccountsInOrganisation() ([]Account, error)
- func (c *Client) ListActions(listRequest *ActionListRequest) (*PaginateActionList, error)
- func (c *Client) ListAllActions(filters *ActionListRequest) ([]Action, 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(includeCustom ...bool) ([]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) ListInstanceSnapshots(instanceID string) ([]InstanceSnapshot, error)
- func (c *Client) ListInstances(page int, perPage int) (*PaginatedInstanceList, 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) ListMemberships() (*MembershipResponse, 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) ListResourceSnapshots() ([]ResourceSnapshot, error)
- func (c *Client) ListRoles() ([]Role, error)
- func (c *Client) ListSSHKeys() ([]SSHKey, error)
- func (c *Client) ListSnapshotSchedules() ([]SnapshotSchedule, 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) ListVPCFirewallRules(id string) ([]FirewallRule, error)
- func (c *Client) ListVPCFirewalls() ([]Firewall, error)
- func (c *Client) ListVPCIPs() (*PaginatedIPs, error)
- func (c *Client) ListVPCLoadBalancers() ([]LoadBalancer, error)
- func (c *Client) ListVPCNetworks() ([]Network, error)
- func (c *Client) ListVPCSubnets(networkID string) ([]Subnet, error)
- func (c *Client) ListVolumeSnapshots() ([]VolumeSnapshot, error)
- func (c *Client) ListVolumeSnapshotsByVolumeID(volumeID string) ([]VolumeSnapshot, 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) NewVPCFirewall(firewall *FirewallConfig) (*FirewallResult, error)
- func (c *Client) NewVPCFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error)
- func (c *Client) NewVPCIP(v *CreateIPRequest) (*IP, error)
- func (c *Client) NewVPCNetwork(label string) (*NetworkResult, 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) RenameVPCFirewall(id string, f *FirewallConfig) (*SimpleResponse, error)
- func (c *Client) RenameVPCNetwork(label, id string) (*NetworkResult, error)
- func (c *Client) ResizeVolume(id string, size int) (*SimpleResponse, error)
- func (c *Client) RestoreDatabase(id string, v *RestoreDatabaseRequest) (*SimpleResponse, error)
- func (c *Client) RestoreInstanceSnapshot(instanceID, snapshotID string, params *RestoreInstanceSnapshotParams) (*InstanceRestoreInfo, error)
- func (c *Client) RestoreResourceSnapshot(id string, req *RestoreResourceSnapshotRequest) (*ResourceSnapshotRestore, 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) UnassignVPCIP(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) UpdateInstanceAllowedIPs(id string, allowedIPs []string) (*SimpleResponse, error)
- func (c *Client) UpdateInstanceBandwidth(id string, bandwidthLimit int) (*SimpleResponse, error)
- func (c *Client) UpdateInstanceSnapshot(instanceID, snapshotID string, params *UpdateInstanceSnapshotParams) (*InstanceSnapshot, 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) UpdateResourceSnapshot(id string, req *UpdateResourceSnapshotRequest) (*ResourceSnapshot, error)
- func (c *Client) UpdateSSHKey(name string, sshKeyID string) (*SSHKey, error)
- func (c *Client) UpdateSnapshotSchedule(id string, r *UpdateSnapshotScheduleRequest) (*SnapshotSchedule, error)
- func (c *Client) UpdateTeamMember(teamID, teamMemberID, permissions, roles string) (*TeamMember, error)
- func (c *Client) UpdateVPCIP(id string, v *UpdateIPRequest) (*IP, error)
- func (c *Client) UpdateVPCLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error)
- func (c *Client) UpdateVPCNetwork(id string, nc NetworkConfig) (*NetworkResult, 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 CreateDiskImageParams
- type CreateDiskImageResponse
- type CreateIPRequest
- type CreateInstanceSnapshotParams
- type CreateInstanceVncResp
- type CreateObjectStoreCredentialRequest
- type CreateObjectStoreRequest
- type CreateRegionRequest
- type CreateRoute
- type CreateSnapshotInstance
- type CreateSnapshotScheduleRequest
- 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 ErrPaginationCapExceeded
- type ExchangeAuthTokenRequest
- type ExchangeAuthTokenResponse
- 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) CreateVolumeSnapshot(volumeID string, config *VolumeSnapshotConfig) (*VolumeSnapshot, 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) DeleteVolumeAndAllSnapshot(volumeID string) (*SimpleResponse, error)
- func (c *FakeClient) DeleteVolumeSnapshot(snapshotID 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) GetVolumeSnapshot(snapshotID string) (*VolumeSnapshot, error)
- func (c *FakeClient) GetVolumeSnapshotByVolumeID(volumeID, snapshotID string) (*VolumeSnapshot, 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(includeCustom ...bool) ([]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) ListMemberships() (*MembershipResponse, 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) ListVolumeSnapshots() ([]VolumeSnapshot, error)
- func (c *FakeClient) ListVolumeSnapshotsByVolumeID(volumeID string) ([]VolumeSnapshot, 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 HealthCheck
- type IP
- type Instance
- type InstanceConfig
- type InstancePool
- type InstanceRestoreInfo
- type InstanceSize
- type InstanceSnapshot
- type InstanceSnapshotInfo
- type InstanceSnapshotStatus
- type InstanceSnapshotVolumeStatus
- type InstanceVnc
- type KubernetesCluster
- type KubernetesClusterConfig
- type KubernetesClusterPoolConfig
- type KubernetesClusterPoolUpdateConfig
- type KubernetesInstalledApplication
- type KubernetesInstance
- type KubernetesMarketplaceApplication
- type KubernetesMarketplacePlan
- type KubernetesPlanConfiguration
- type KubernetesPool
- type KubernetesVersion
- type LastSnapshotInfo
- type LoadBalancer
- type LoadBalancerBackend
- type LoadBalancerBackendConfig
- type LoadBalancerConfig
- type LoadBalancerInstancePoolConfig
- type LoadBalancerOptions
- type LoadBalancerUpdateConfig
- type MembershipAccount
- type MembershipOrganisation
- type MembershipResponse
- 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 PaginatedKubernetesClusters
- type PaginatedObjectStoreCredentials
- type PaginatedObjectstores
- type Permission
- type PlacementRule
- type ProcessInfo
- type Quota
- type Region
- type RequiredPools
- type ResourceSnapshot
- type ResourceSnapshotRestore
- type RestoreDatabaseRequest
- type RestoreInstanceSnapshotParams
- type RestoreInstanceSnapshotRequest
- type RestoreResourceSnapshotRequest
- type Result
- type Role
- type Route
- type SSHKey
- type SimpleResponse
- type SnapshotInstance
- type SnapshotRetention
- type SnapshotSchedule
- type SnapshotScheduleStatus
- type Subnet
- type SubnetConfig
- type SupportedSoftwareVersion
- type Team
- type TeamMember
- type UpdateApplicationRequest
- type UpdateDatabaseRequest
- type UpdateIPRequest
- type UpdateInstanceSnapshotParams
- type UpdateObjectStoreCredentialRequest
- type UpdateObjectStoreRequest
- type UpdateResourceSnapshotRequest
- type UpdateSnapshotScheduleRequest
- type User
- type UserEverything
- type VLANConnectConfig
- type ValueAdvanceClientForTesting
- type Volume
- type VolumeAttachConfig
- type VolumeConfig
- type VolumeResult
- type VolumeSnapshot
- type VolumeSnapshotConfig
- type VolumeStatus
- 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" // DNSRecordTypeNS represents an NS record DNSRecordTypeNS = "NS" )
const ( // DefaultInstanceUser is the default username used in newly created instances. DefaultInstanceUser string = "civo" )
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
type AffinityRule struct {
Type string `json:"type"`
Exclusive bool `json:"exclusive"`
Tags []string `json:"tags"`
}
AffinityRule represents a affinity rule
type Application ¶
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 ¶
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 ¶
ApplicationConfiguration is a configuration for installed application
type AssignedTo ¶
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 ¶
type AttachedVolume struct {
// ID of the volume to attach
ID string `json:"id"`
}
AttachedVolume disk information
type BucketOwner ¶
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 ¶
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 ¶
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 ¶
func (c *Client) AssignIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
AssignIP assigns a reserved IP to a Civo resource
func (*Client) AssignVPCIP ¶
func (c *Client) AssignVPCIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
AssignVPCIP assigns a reserved IP to a Civo resource using VPC API path
func (*Client) AttachSubnetToInstance ¶
func (c *Client) AttachSubnetToInstance(networkID, subnetID string, route *CreateRoute) (*Route, error)
AttachSubnetToInstance attaches a subnet to an instance
func (*Client) AttachVPCSubnetToInstance ¶
func (c *Client) AttachVPCSubnetToInstance(networkID, subnetID string, route *CreateRoute) (*Route, error)
AttachVPCSubnetToInstance attaches a subnet to an instance using VPC API path
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 ¶
func (c *Client) ConnectRegion(r *ConnectRegionRequest) error
ConnectRegion connects a region to CivoAPI
func (*Client) CreateApplication ¶
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 ¶
func (c *Client) CreateDatabaseBackup(did string, v *DatabaseBackupCreateRequest) (*DatabaseBackup, error)
CreateDatabaseBackup create database backup
func (*Client) CreateDiskImage ¶
func (c *Client) CreateDiskImage(params *CreateDiskImageParams) (*CreateDiskImageResponse, error)
CreateDiskImage creates a new disk image entry and returns a pre-signed URL for uploading
func (*Client) CreateInstance ¶
func (c *Client) CreateInstance(config *InstanceConfig) (*Instance, error)
CreateInstance creates a new instance in the account
func (*Client) CreateInstanceSnapshot ¶
func (c *Client) CreateInstanceSnapshot(instanceID string, params *CreateInstanceSnapshotParams) (*InstanceSnapshot, error)
CreateInstanceSnapshot creates a new snapshot of an instance
func (*Client) CreateKubernetesClusterPool ¶
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 ¶
func (c *Client) CreateNetwork(nc NetworkConfig) (*NetworkResult, error)
CreateNetwork creates a new network
func (*Client) CreateOrganisation ¶
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 ¶
func (c *Client) CreateRegion(r *CreateRegionRequest) (*Region, error)
CreateRegion is a function to create a region
func (*Client) CreateRole ¶
CreateRole creates a new role with a set of permissions for use within an organisation
func (*Client) CreateSnapshotSchedule ¶
func (c *Client) CreateSnapshotSchedule(r *CreateSnapshotScheduleRequest) (*SnapshotSchedule, error)
CreateSnapshotSchedule creates a new snapshot schedule
func (*Client) CreateSubnet ¶
func (c *Client) CreateSubnet(networkID string, subnet SubnetConfig) (*Subnet, error)
CreateSubnet creates a new subnet for a private network
func (*Client) CreateTeam ¶
CreateTeam creates a new team in the account
func (*Client) CreateVPCLoadBalancer ¶
func (c *Client) CreateVPCLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error)
CreateVPCLoadBalancer creates a new load balancer using VPC API path
func (*Client) CreateVPCNetwork ¶
func (c *Client) CreateVPCNetwork(nc NetworkConfig) (*NetworkResult, error)
CreateVPCNetwork creates a new network using VPC API path
func (*Client) CreateVPCSubnet ¶
func (c *Client) CreateVPCSubnet(networkID string, subnet SubnetConfig) (*Subnet, error)
CreateVPCSubnet creates a new subnet for a private network using VPC API path
func (*Client) CreateVolumeSnapshot ¶
func (c *Client) CreateVolumeSnapshot(volumeID string, config *VolumeSnapshotConfig) (*VolumeSnapshot, error)
CreateVolumeSnapshot creates a snapshot of a volume
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 ¶
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 ¶
func (c *Client) DeleteDatabase(id string) (*SimpleResponse, error)
DeleteDatabase deletes a database
func (*Client) DeleteDatabaseBackup ¶
func (c *Client) DeleteDatabaseBackup(dbid, id string) (*SimpleResponse, error)
DeleteDatabaseBackup deletes a database backup
func (*Client) DeleteDiskImage ¶
DeleteDiskImage deletes a disk image by its ID
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 ¶
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) DeleteInstanceSnapshot ¶
DeleteInstanceSnapshot deletes a snapshot of an instance
func (*Client) DeleteInstanceVncSession ¶
func (c *Client) DeleteInstanceVncSession(id string) (*SimpleResponse, error)
DeleteInstanceVncSession terminates the VNC session for an instance.
func (*Client) DeleteKubernetesCluster ¶
func (c *Client) DeleteKubernetesCluster(id string) (*SimpleResponse, error)
DeleteKubernetesCluster deletes a cluster
func (*Client) DeleteKubernetesClusterPool ¶
func (c *Client) DeleteKubernetesClusterPool(id, poolID string) (*SimpleResponse, error)
DeleteKubernetesClusterPool delete a pool inside the cluster
func (*Client) DeleteKubernetesClusterPoolInstance ¶
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 ¶
func (c *Client) DeleteObjectStore(id string) (*SimpleResponse, error)
DeleteObjectStore deletes an objectstore
func (*Client) DeleteObjectStoreCredential ¶
func (c *Client) DeleteObjectStoreCredential(id string) (*SimpleResponse, error)
DeleteObjectStoreCredential deletes an objectstore credential
func (*Client) DeleteResourceSnapshot ¶
func (c *Client) DeleteResourceSnapshot(id string) (*SimpleResponse, error)
DeleteResourceSnapshot deletes a resource snapshot
func (*Client) DeleteRole ¶
func (c *Client) DeleteRole(id string) (*SimpleResponse, error)
DeleteRole removes a non-built-in role from an organisation
func (*Client) DeleteSSHKey ¶
func (c *Client) DeleteSSHKey(id string) (*SimpleResponse, error)
DeleteSSHKey deletes an SSH key
func (*Client) DeleteSnapshotSchedule ¶
func (c *Client) DeleteSnapshotSchedule(id string) (*SimpleResponse, error)
DeleteSnapshotSchedule deletes a snapshot schedule
func (*Client) DeleteSubnet ¶
func (c *Client) DeleteSubnet(networkID, subnetID string) (*SimpleResponse, error)
DeleteSubnet deletes a subnet
func (*Client) DeleteTeam ¶
func (c *Client) DeleteTeam(id string) (*SimpleResponse, error)
DeleteTeam removes a team (and therefore all team member access)
func (*Client) DeleteVPCFirewall ¶
func (c *Client) DeleteVPCFirewall(id string) (*SimpleResponse, error)
DeleteVPCFirewall deletes a firewall using VPC API path
func (*Client) DeleteVPCFirewallRule ¶
func (c *Client) DeleteVPCFirewallRule(id string, ruleID string) (*SimpleResponse, error)
DeleteVPCFirewallRule deletes a firewall rule using VPC API path
func (*Client) DeleteVPCIP ¶
func (c *Client) DeleteVPCIP(id string) (*SimpleResponse, error)
DeleteVPCIP deletes a reserved IP using VPC API path
func (*Client) DeleteVPCLoadBalancer ¶
func (c *Client) DeleteVPCLoadBalancer(id string) (*SimpleResponse, error)
DeleteVPCLoadBalancer deletes a load balancer using VPC API path
func (*Client) DeleteVPCNetwork ¶
func (c *Client) DeleteVPCNetwork(id string) (*SimpleResponse, error)
DeleteVPCNetwork deletes a private network using VPC API path
func (*Client) DeleteVPCSubnet ¶
func (c *Client) DeleteVPCSubnet(networkID, subnetID string) (*SimpleResponse, error)
DeleteVPCSubnet deletes a subnet using VPC API path
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) DeleteVolumeAndAllSnapshot ¶
func (c *Client) DeleteVolumeAndAllSnapshot(volumeID string) (*SimpleResponse, error)
DeleteVolumeAndAllSnapshot deletes a volume and all its snapshots
func (*Client) DeleteVolumeSnapshot ¶
func (c *Client) DeleteVolumeSnapshot(id string) (*SimpleResponse, error)
DeleteVolumeSnapshot deletes a volume snapshot
func (*Client) DeleteWebhook ¶
func (c *Client) DeleteWebhook(id string) (*SimpleResponse, error)
DeleteWebhook deletes a webhook
func (*Client) DetachSubnetFromInstance ¶
func (c *Client) DetachSubnetFromInstance(networkID, subnetID string) (*SimpleResponse, error)
DetachSubnetFromInstance detaches a subnet from an instance
func (*Client) DetachVPCSubnetFromInstance ¶
func (c *Client) DetachVPCSubnetFromInstance(networkID, subnetID string) (*SimpleResponse, error)
DetachVPCSubnetFromInstance detaches a subnet from an instance using VPC API path
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) DisableRecoveryMode ¶
func (c *Client) DisableRecoveryMode(id string) (*SimpleResponse, error)
DisableRecoveryMode disables recovery mode for the specified instance
func (*Client) DisconnectRegion ¶
func (c *Client) DisconnectRegion(r *DisconnectRegionRequest) error
DisconnectRegion disconnects a region to CivoAPI
func (*Client) EnableRecoveryMode ¶
func (c *Client) EnableRecoveryMode(id string) (*SimpleResponse, error)
EnableRecoveryMode enables recovery mode for the specified instance
func (*Client) ExchangeAuthToken ¶
func (c *Client) ExchangeAuthToken(er *ExchangeAuthTokenRequest) (*ExchangeAuthTokenResponse, error)
ExchangeAuthToken exchanges an apikey with a new civo JWT
func (*Client) FindApplication ¶
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 ¶
FindDatabase finds a database by either part of the ID or part of the name
func (*Client) FindDatabaseBackup ¶
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 ¶
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 ¶
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 ¶
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) 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 ¶
FindKubernetesClusterInstance finds a Kubernetes cluster instance by either part of the ID or part of the name
func (*Client) FindKubernetesClusterPool ¶
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 ¶
func (c *Client) FindObjectStore(search string) (*ObjectStore, error)
FindObjectStore finds an objectstore by name or by accesskeyID
func (*Client) FindObjectStoreCredential ¶
func (c *Client) FindObjectStoreCredential(search string) (*ObjectStoreCredential, error)
FindObjectStoreCredential finds an objectstore credential by name or by accesskeyID. All pages of the credential list are iterated so the search covers every credential the account owns, not just the first page.
func (*Client) FindRegion ¶
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) FindSnapshotSchedule ¶
func (c *Client) FindSnapshotSchedule(search string) (*SnapshotSchedule, error)
FindSnapshotSchedule finds a snapshot schedule by ID or name
func (*Client) FindSubnet ¶
FindSubnet finds a subnet by either part of the ID or part of the name
func (*Client) FindVPCFirewall ¶
FindVPCFirewall finds a firewall by either part of the ID or part of the name using VPC API path
func (*Client) FindVPCFirewallRule ¶
func (c *Client) FindVPCFirewallRule(firewallID string, search string) (*FirewallRule, error)
FindVPCFirewallRule finds a firewall rule by ID or part of the same using VPC API path
func (*Client) FindVPCLoadBalancer ¶
func (c *Client) FindVPCLoadBalancer(search string) (*LoadBalancer, error)
FindVPCLoadBalancer finds a load balancer by either part of the ID or part of the name using VPC API path
func (*Client) FindVPCNetwork ¶
FindVPCNetwork finds a network by either part of the ID or part of the name using VPC API path
func (*Client) FindVPCSubnet ¶
FindVPCSubnet finds a subnet by either part of the ID or part of the name using VPC API path
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 ¶
GetAccountID returns the account ID
func (*Client) GetApplication ¶
func (c *Client) GetApplication(id string) (*Application, error)
GetApplication returns an application by ID
func (*Client) GetApplicationLogAuth ¶
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 ¶
GetDatabase finds a database by the database UUID
func (*Client) GetDatabaseBackup ¶
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 ¶
GetDefaultRegion finds the default region for an account
func (*Client) GetDefaultVPCNetwork ¶
GetDefaultVPCNetwork finds the default private network for an account using VPC API path
func (*Client) GetDiskImage ¶
GetDiskImage get one disk image using the id
func (*Client) GetDiskImageByName ¶
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) GetInstanceSnapshot ¶
func (c *Client) GetInstanceSnapshot(instanceID, snapshotID string) (*InstanceSnapshot, error)
GetInstanceSnapshot gets a snapshot of an instance by ID or name
func (*Client) GetInstanceVnc ¶
func (c *Client) GetInstanceVnc(id string, duration ...string) (CreateInstanceVncResp, error)
GetInstanceVnc enables and gets the VNC information for an instance duration is optional and follows Go's duration string format (e.g. "30m", "1h", "24h")
func (*Client) GetInstanceVncStatus ¶
func (c *Client) GetInstanceVncStatus(id string) (*InstanceVnc, error)
GetInstanceVncStatus returns the VNC status for an instance
func (*Client) GetKubernetesCluster ¶
func (c *Client) GetKubernetesCluster(id string) (*KubernetesCluster, error)
GetKubernetesCluster returns a single kubernetes cluster by its full ID
func (*Client) GetKubernetesClusterPool ¶
func (c *Client) GetKubernetesClusterPool(cid, pid string) (*KubernetesPool, error)
GetKubernetesClusterPool returns a pool for a kubernetes cluster
func (*Client) GetLoadBalancer ¶
func (c *Client) GetLoadBalancer(id string) (*LoadBalancer, error)
GetLoadBalancer returns a load balancer
func (*Client) GetNetwork ¶
GetNetwork gets a network with ID
func (*Client) GetObjectStore ¶
func (c *Client) GetObjectStore(id string) (*ObjectStore, error)
GetObjectStore finds an objectstore by the full ID
func (*Client) GetObjectStoreCredential ¶
func (c *Client) GetObjectStoreCredential(id string) (*ObjectStoreCredential, error)
GetObjectStoreCredential finds an objectstore credential by the full ID
func (*Client) GetObjectStoreStats ¶
func (c *Client) GetObjectStoreStats(id string) (*ObjectStoreStats, error)
GetObjectStoreStats returns the stats for an objectstore
func (*Client) GetOrganisation ¶
func (c *Client) GetOrganisation() (*Organisation, error)
GetOrganisation returns the organisation associated with the current account
func (*Client) GetRecoveryStatus ¶
func (c *Client) GetRecoveryStatus(id string) (*SimpleResponse, error)
GetRecoveryStatus gets the recovery status for the specified instance
func (*Client) GetResourceSnapshot ¶
func (c *Client) GetResourceSnapshot(id string) (*ResourceSnapshot, error)
GetResourceSnapshot retrieves a specific resource snapshot by ID
func (*Client) GetSnapshotSchedule ¶
func (c *Client) GetSnapshotSchedule(id string) (*SnapshotSchedule, error)
GetSnapshotSchedule retrieves a specific snapshot schedule by ID
func (*Client) GetUserEverything ¶
func (c *Client) GetUserEverything(userID string) (*UserEverything, error)
GetUserEverything returns the organisation associated with the current account
func (*Client) GetVPCLoadBalancer ¶
func (c *Client) GetVPCLoadBalancer(id string) (*LoadBalancer, error)
GetVPCLoadBalancer returns a load balancer using VPC API path
func (*Client) GetVPCNetwork ¶
GetVPCNetwork gets a network with ID using VPC API path
func (*Client) GetVPCSubnet ¶
GetVPCSubnet gets a subnet with ID using VPC API path
func (*Client) GetVolumeSnapshot ¶
func (c *Client) GetVolumeSnapshot(id string) (*VolumeSnapshot, error)
GetVolumeSnapshot retrieves a volume snapshot based on the provided snapshot ID.
func (*Client) GetVolumeSnapshotByVolumeID ¶
func (c *Client) GetVolumeSnapshotByVolumeID(volumeID, snapshotID string) (*VolumeSnapshot, error)
GetVolumeSnapshotByVolumeID retrieves a specific volume snapshot by volume ID and snapshot ID
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) IsUsingDefaultRules ¶
IsUsingDefaultRules checks if the firewall is using the default rules
func (*Client) ListAccounts ¶
func (c *Client) ListAccounts() (*PaginatedAccounts, error)
ListAccounts lists all accounts
func (*Client) ListAccountsInOrganisation ¶
ListAccountsInOrganisation returns all the accounts in the current account's organisation
func (*Client) ListActions ¶
func (c *Client) ListActions(listRequest *ActionListRequest) (*PaginateActionList, error)
ListActions returns a page of actions. Callers that want to enumerate every action matching the supplied filters should use ListAllActions instead — without explicit Page/PerPage values this function returns only the server-side first page (default 20 items).
func (*Client) ListAllActions ¶
func (c *Client) ListAllActions(filters *ActionListRequest) ([]Action, error)
ListAllActions returns every action matching the supplied filters by iterating server-side pagination internally. Any Page/PerPage values set on filters are ignored (the SDK chooses these to maximise iteration safety; see paginateAll in pagination.go).
Pass nil for filters to enumerate all actions on the account with no filter criteria.
func (*Client) ListAllInstances ¶
ListAllInstances returns every Instance owned by the calling API account by iterating the paginated /v2/instances endpoint until exhausted.
func (*Client) ListApplications ¶
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 ¶
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 ¶
ListDanglingVolumes returns all dangling volumes (Volumes which have a cluster ID set but that cluster doesn't exist anymore)
func (*Client) ListDatabaseBackup ¶
func (c *Client) ListDatabaseBackup(did string) (*PaginatedDatabaseBackup, error)
ListDatabaseBackup lists backups for database.
The SDK iterates server-side pagination internally so the returned PaginatedDatabaseBackup always contains every backup for the database. The merged response has Page=1, Pages=1, PerPage=len(Items).
func (*Client) ListDatabases ¶
func (c *Client) ListDatabases() (*PaginatedDatabases, error)
ListDatabases returns a list of all databases
func (*Client) ListDiskImages ¶
ListDiskImages return all disk image in system includeCustom when true will also return custom images (default: false)
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 ¶
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 available sizes of instances TODO: Rename to Size because this return all size (k8s, vm, database)
func (*Client) ListInstanceSnapshots ¶
func (c *Client) ListInstanceSnapshots(instanceID string) ([]InstanceSnapshot, error)
ListInstanceSnapshots lists all snapshots for an instance
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) ListKubernetesClusterInstances ¶
ListKubernetesClusterInstances returns all cluster instances
func (*Client) ListKubernetesClusterPools ¶
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) ListMemberships ¶
func (c *Client) ListMemberships() (*MembershipResponse, error)
ListMemberships returns all the memberships(to accounts and organisations) for the user
func (*Client) ListNetworks ¶
ListNetworks list all private networks
func (*Client) ListObjectStoreCredentials ¶
func (c *Client) ListObjectStoreCredentials(page, perPage int) (*PaginatedObjectStoreCredentials, error)
ListObjectStoreCredentials returns all object store credentials in that specific region
func (*Client) ListObjectStores ¶
func (c *Client) ListObjectStores() (*PaginatedObjectstores, error)
ListObjectStores returns all objectstores in that specific region
func (*Client) ListPermissions ¶
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) ListResourceSnapshots ¶
func (c *Client) ListResourceSnapshots() ([]ResourceSnapshot, error)
ListResourceSnapshots returns all resource snapshots
func (*Client) ListSSHKeys ¶
ListSSHKeys list all SSH key for an account
func (*Client) ListSnapshotSchedules ¶
func (c *Client) ListSnapshotSchedules() ([]SnapshotSchedule, error)
ListSnapshotSchedules returns all snapshot schedules
func (*Client) ListSubnets ¶
ListSubnets list all subnets for a private network
func (*Client) ListTeamMembers ¶
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) ListVPCFirewallRules ¶
func (c *Client) ListVPCFirewallRules(id string) ([]FirewallRule, error)
ListVPCFirewallRules gets all rules for a firewall using VPC API path
func (*Client) ListVPCFirewalls ¶
ListVPCFirewalls returns all firewall owned by the calling API account using VPC API path
func (*Client) ListVPCIPs ¶
func (c *Client) ListVPCIPs() (*PaginatedIPs, error)
ListVPCIPs returns all reserved IPs in that specific region using VPC API path.
The SDK iterates server-side pagination internally so the returned PaginatedIPs always contains every IP the account owns in the region. The merged response has Page=1, Pages=1, PerPage=len(Items).
func (*Client) ListVPCLoadBalancers ¶
func (c *Client) ListVPCLoadBalancers() ([]LoadBalancer, error)
ListVPCLoadBalancers returns all load balancers owned by the calling API account using VPC API path
func (*Client) ListVPCNetworks ¶
ListVPCNetworks lists all private networks using VPC API path
func (*Client) ListVPCSubnets ¶
ListVPCSubnets lists all subnets for a private network using VPC API path
func (*Client) ListVolumeSnapshots ¶
func (c *Client) ListVolumeSnapshots() ([]VolumeSnapshot, error)
ListVolumeSnapshots returns all snapshots owned by the calling API account
func (*Client) ListVolumeSnapshotsByVolumeID ¶
func (c *Client) ListVolumeSnapshotsByVolumeID(volumeID string) ([]VolumeSnapshot, error)
ListVolumeSnapshotsByVolumeID returns all snapshots for a specific volume by volume ID
func (*Client) ListVolumeTypes ¶
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 ¶
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 ¶
func (c *Client) NewApplicationConfig() (*ApplicationConfig, error)
NewApplicationConfig returns an initialized config for a new application
func (*Client) NewDatabase ¶
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 ¶
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 ¶
func (c *Client) NewObjectStore(v *CreateObjectStoreRequest) (*ObjectStore, error)
NewObjectStore creates a new objectstore
func (*Client) NewObjectStoreCredential ¶
func (c *Client) NewObjectStoreCredential(v *CreateObjectStoreCredentialRequest) (*ObjectStoreCredential, error)
NewObjectStoreCredential creates a new objectstore credential
func (*Client) NewSSHKey ¶
func (c *Client) NewSSHKey(name string, publicKey string) (*SimpleResponse, error)
NewSSHKey creates a new SSH key record
func (*Client) NewVPCFirewall ¶
func (c *Client) NewVPCFirewall(firewall *FirewallConfig) (*FirewallResult, error)
NewVPCFirewall creates a new firewall record using VPC API path
func (*Client) NewVPCFirewallRule ¶
func (c *Client) NewVPCFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error)
NewVPCFirewallRule creates a new rule within a firewall using VPC API path
func (*Client) NewVPCIP ¶
func (c *Client) NewVPCIP(v *CreateIPRequest) (*IP, error)
NewVPCIP creates a new reserved IP using VPC API path
func (*Client) NewVPCNetwork ¶
func (c *Client) NewVPCNetwork(label string) (*NetworkResult, error)
NewVPCNetwork creates a new private network using VPC API path
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 ¶
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 ¶
func (c *Client) RemoveTeamMember(teamID, teamMemberID string) (*SimpleResponse, error)
RemoveTeamMember removes the specified team member from the specified team
func (*Client) RenameFirewall ¶
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 ¶
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 ¶
RenameTeam changes the human set name for a team
func (*Client) RenameVPCFirewall ¶
func (c *Client) RenameVPCFirewall(id string, f *FirewallConfig) (*SimpleResponse, error)
RenameVPCFirewall renames a firewall using VPC API path
func (*Client) RenameVPCNetwork ¶
func (c *Client) RenameVPCNetwork(label, id string) (*NetworkResult, error)
RenameVPCNetwork renames an existing private network using VPC API path
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 ¶
func (c *Client) RestoreDatabase(id string, v *RestoreDatabaseRequest) (*SimpleResponse, error)
RestoreDatabase restore a database
func (*Client) RestoreInstanceSnapshot ¶
func (c *Client) RestoreInstanceSnapshot(instanceID, snapshotID string, params *RestoreInstanceSnapshotParams) (*InstanceRestoreInfo, error)
RestoreInstanceSnapshot restores a snapshot of an instance
func (*Client) RestoreResourceSnapshot ¶
func (c *Client) RestoreResourceSnapshot(id string, req *RestoreResourceSnapshotRequest) (*ResourceSnapshotRestore, error)
RestoreResourceSnapshot restores a resource from a snapshot
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 ¶
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 ¶
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) UnassignVPCIP ¶
func (c *Client) UnassignVPCIP(id, region string) (*SimpleResponse, error)
UnassignVPCIP unassigns a reserved IP from a Civo resource using VPC API path
func (*Client) UpdateApplication ¶
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 ¶
func (c *Client) UpdateDNSRecord(r *DNSRecord, rc *DNSRecordConfig) (*DNSRecord, error)
UpdateDNSRecord updates the DNS record
func (*Client) UpdateDatabase ¶
func (c *Client) UpdateDatabase(id string, v *UpdateDatabaseRequest) (*Database, error)
UpdateDatabase updates a database
func (*Client) UpdateDatabaseBackup ¶
func (c *Client) UpdateDatabaseBackup(did string, v *DatabaseBackupUpdateRequest) (*DatabaseBackup, error)
UpdateDatabaseBackup update database backup
func (*Client) UpdateIP ¶
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) UpdateInstanceAllowedIPs ¶
func (c *Client) UpdateInstanceAllowedIPs(id string, allowedIPs []string) (*SimpleResponse, error)
UpdateInstanceAllowedIPs sets the list of IP addresses that an instance is allowed to use
func (*Client) UpdateInstanceBandwidth ¶
func (c *Client) UpdateInstanceBandwidth(id string, bandwidthLimit int) (*SimpleResponse, error)
UpdateInstanceBandwidth sets the list of IP addresses that an instance is allowed to use
func (*Client) UpdateInstanceSnapshot ¶
func (c *Client) UpdateInstanceSnapshot(instanceID, snapshotID string, params *UpdateInstanceSnapshotParams) (*InstanceSnapshot, error)
UpdateInstanceSnapshot updates a snapshot of an instance
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 ¶
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 ¶
func (c *Client) UpdateNetwork(id string, nc NetworkConfig) (*NetworkResult, error)
UpdateNetwork updates an existing network
func (*Client) UpdateObjectStore ¶
func (c *Client) UpdateObjectStore(id string, v *UpdateObjectStoreRequest) (*ObjectStore, error)
UpdateObjectStore updates an objectstore
func (*Client) UpdateObjectStoreCredential ¶
func (c *Client) UpdateObjectStoreCredential(id string, v *UpdateObjectStoreCredentialRequest) (*ObjectStoreCredential, error)
UpdateObjectStoreCredential updates an objectstore credential
func (*Client) UpdateResourceSnapshot ¶
func (c *Client) UpdateResourceSnapshot(id string, req *UpdateResourceSnapshotRequest) (*ResourceSnapshot, error)
UpdateResourceSnapshot updates a resource snapshot
func (*Client) UpdateSSHKey ¶
UpdateSSHKey update a SSH key record
func (*Client) UpdateSnapshotSchedule ¶
func (c *Client) UpdateSnapshotSchedule(id string, r *UpdateSnapshotScheduleRequest) (*SnapshotSchedule, error)
UpdateSnapshotSchedule updates a snapshot schedule
func (*Client) UpdateTeamMember ¶
func (c *Client) UpdateTeamMember(teamID, teamMemberID, permissions, roles string) (*TeamMember, error)
UpdateTeamMember changes the permissions or roles for a specified team member
func (*Client) UpdateVPCIP ¶
func (c *Client) UpdateVPCIP(id string, v *UpdateIPRequest) (*IP, error)
UpdateVPCIP updates a reserved IP using VPC API path
func (*Client) UpdateVPCLoadBalancer ¶
func (c *Client) UpdateVPCLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error)
UpdateVPCLoadBalancer updates a load balancer using VPC API path
func (*Client) UpdateVPCNetwork ¶
func (c *Client) UpdateVPCNetwork(id string, nc NetworkConfig) (*NetworkResult, error)
UpdateVPCNetwork updates an existing network using VPC API path
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 ¶
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)
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(includeCustom ...bool) ([]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)
// VolumeSnapshot
GetVolumeSnapshotByVolumeID(volumeID, snapshotID string) (*VolumeSnapshot, error)
ListVolumeSnapshotsByVolumeID(volumeID string) ([]VolumeSnapshot, error)
CreateVolumeSnapshot(volumeID string, config *VolumeSnapshotConfig) (*VolumeSnapshot, error)
DeleteVolumeAndAllSnapshot(volumeID string) (*SimpleResponse, error)
ListVolumeSnapshots() ([]VolumeSnapshot, error)
GetVolumeSnapshot(id string) (*VolumeSnapshot, error)
DeleteVolumeSnapshot(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
ListMemberships() (*MembershipResponse, error)
}
Clienter is the interface the real civogo.Client and civogo.FakeClient implement
type Component ¶
type Component struct {
ID, Name, Version string
}
Component is a struct to define a User-Agent from a client
type Condition ¶
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 ¶
type ConfigAdvanceClientForTesting struct {
Method string
Value []ValueAdvanceClientForTesting
}
ConfigAdvanceClientForTesting initializes a Client connecting to a local test server and allows for specifying methods
type ConnectRegionRequest ¶
type ConnectRegionRequest struct {
Code string `json:"code"`
}
ConnectRegionRequest is the request to connect a region
type CreateDatabaseRequest ¶
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 CreateDiskImageParams ¶
type CreateDiskImageParams struct {
Name string `json:"name"`
Distribution string `json:"distribution"`
Version string `json:"version"`
Source string `json:"source"`
OS string `json:"os,omitempty"`
InitialUser string `json:"initial_user,omitempty"`
Region string `json:"region,omitempty"`
ImageSHA256 string `json:"image_sha256"`
ImageMD5 string `json:"image_md5"`
LogoBase64 string `json:"logo_base64,omitempty"`
ImageSizeBytes int64 `json:"image_size_bytes"` // Size of the image in bytes
}
CreateDiskImageParams represents the parameters for creating a new disk image
type CreateDiskImageResponse ¶
type CreateDiskImageResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Distribution string `json:"distribution"`
Version string `json:"version"`
OS string `json:"os"`
Region string `json:"region"`
Status string `json:"status"`
InitialUser string `json:"initial_user,omitempty"`
DiskImageURL string `json:"disk_image_url"`
DiskImageSizeBytes int64 `json:"disk_image_size_bytes,omitempty"`
LogoURL string `json:"logo_url"`
ImageSize int64 `json:"image_size"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
DistributionDefault bool `json:"distribution_default,omitempty"`
}
CreateDiskImageResponse represents the response from creating a new disk image
type CreateIPRequest ¶
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 CreateInstanceSnapshotParams ¶
type CreateInstanceSnapshotParams struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
}
CreateInstanceSnapshotParams represents the parameters for creating a new instance snapshot
type CreateInstanceVncResp ¶
type CreateInstanceVncResp struct {
URI string `json:"uri,omitempty"`
Duration string `json:"duration,omitempty"`
}
CreateInstanceVncResp represents VNC information for a new instance console
type CreateObjectStoreCredentialRequest ¶
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 ¶
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 ¶
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 ¶
type CreateRoute struct {
ResourceID string `json:"resource_id"`
ResourceType string `json:"resource_type"`
}
CreateRoute contains incoming request parameters for creating a route object
type CreateSnapshotInstance ¶
type CreateSnapshotInstance struct {
InstanceID string `json:"instance_id"`
IncludeVolumes bool `json:"include_volumes"`
}
CreateSnapshotInstance represents an instance in the create request
type CreateSnapshotScheduleRequest ¶
type CreateSnapshotScheduleRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
CronExpression string `json:"cron_expression"`
Retention SnapshotRetention `json:"retention"`
Instances []CreateSnapshotInstance `json:"instances"`
}
CreateSnapshotScheduleRequest represents the request to create a new snapshot schedule
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
type DatabaseUserInfo struct {
Username string `json:"username"`
Password string `json:"password"`
Port int `json:"port"`
}
DatabaseUserInfo represents the user information
type DisconnectRegionRequest ¶
type DisconnectRegionRequest struct {
Code string `json:"code"`
}
DisconnectRegionRequest is the request to disconnect a region
type DiskImage ¶
type DiskImage struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
State string `json:"state"`
InitialUser string `json:"initial_user,omitempty"`
Distribution string `json:"distribution"`
OS string `json:"os,omitempty"`
Description string `json:"description"`
Label string `json:"label"`
DiskImageURL string `json:"disk_image_url,omitempty"`
DiskImageSizeBytes int64 `json:"disk_image_size_bytes,omitempty"`
LogoURL string `json:"logo_url,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"` // User information (because multiple users can operate under the same account)
DistributionDefault bool `json:"distribution_default"`
}
DiskImage represents a serialized structure
type ErrPaginationCapExceeded ¶
ErrPaginationCapExceeded is returned by paginateAll when the iteration would exceed paginationMaxPages or paginationMaxItems. Callers seeing this should switch to an explicit-page API (e.g. ListInstances) and process results in chunks.
func (ErrPaginationCapExceeded) Error ¶
func (e ErrPaginationCapExceeded) Error() string
type ExchangeAuthTokenRequest ¶
type ExchangeAuthTokenRequest struct {
Scope string `json:"scope"`
}
ExchangeAuthTokenRequest contains data that can be passed to ExchangeAuthToken
type ExchangeAuthTokenResponse ¶
type ExchangeAuthTokenResponse struct {
// The access token issued by the authorization server
AccessToken string `json:"access_token"`
// The type of the token issued
TokenType string `json:"token_type"`
// The refresh token, which can be used to obtain new access tokens
RefreshToken string `json:"refresh_token"`
// The lifetime in seconds of the access token
ExpiresIn int32 `json:"expires_in"`
// The ID token, which is a JWT that contains user profile information
IDToken string `json:"id_token"`
// The id of the account associated with the provided API Key
AccountID string `json:"account_id"`
}
ExchangeAuthTokenResponse is the response returned by a successful ExchangeAuthToken
type FakeClient ¶
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
VolumeSnapshots []VolumeSnapshot
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 ¶
func NewFakeClient() (*FakeClient, error)
NewFakeClient initializes a Client that doesn't attach to a
func (*FakeClient) AddAccountToOrganisation ¶
func (c *FakeClient) AddAccountToOrganisation(accountID string) ([]Account, error)
AddAccountToOrganisation implemented in a fake way for automated tests
func (*FakeClient) AddTeamMember ¶
func (c *FakeClient) AddTeamMember(teamID, userID, permissions, roles string) ([]TeamMember, error)
AddTeamMember implemented in a fake way for automated tests
func (*FakeClient) AssignIP ¶
func (c *FakeClient) AssignIP(id, resourceID, resourceType, region string) (*SimpleResponse, error)
AssignIP assigns a fake IP
func (*FakeClient) AttachVolume ¶
func (c *FakeClient) AttachVolume(id string, cfg VolumeAttachConfig) (*SimpleResponse, error)
AttachVolume implemented in a fake way for automated tests
func (*FakeClient) ConnectRegion ¶
func (c *FakeClient) ConnectRegion(r *ConnectRegionRequest) error
ConnectRegion implemented in a fake way for automated tests
func (*FakeClient) CreateDNSDomain ¶
func (c *FakeClient) CreateDNSDomain(name string) (*DNSDomain, error)
CreateDNSDomain implemented in a fake way for automated tests
func (*FakeClient) CreateDNSRecord ¶
func (c *FakeClient) CreateDNSRecord(domainID string, r *DNSRecordConfig) (*DNSRecord, error)
CreateDNSRecord implemented in a fake way for automated tests
func (*FakeClient) CreateInstance ¶
func (c *FakeClient) CreateInstance(config *InstanceConfig) (*Instance, error)
CreateInstance implemented in a fake way for automated tests
func (*FakeClient) CreateLoadBalancer ¶
func (c *FakeClient) CreateLoadBalancer(r *LoadBalancerConfig) (*LoadBalancer, error)
CreateLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) CreateNetwork ¶
func (c *FakeClient) CreateNetwork(config NetworkConfig) (*NetworkResult, error)
CreateNetwork creates a new network within the FakeClient, including VLAN configurations
func (*FakeClient) CreateOrganisation ¶
func (c *FakeClient) CreateOrganisation(name string) (*Organisation, error)
CreateOrganisation implemented in a fake way for automated tests
func (*FakeClient) CreateRegion ¶
func (c *FakeClient) CreateRegion(r *CreateRegionRequest) (*Region, error)
CreateRegion implemented in a fake way for automated tests
func (*FakeClient) CreateRole ¶
func (c *FakeClient) CreateRole(name, permissions string) (*Role, error)
CreateRole implemented in a fake way for automated tests
func (*FakeClient) CreateTeam ¶
func (c *FakeClient) CreateTeam(name string) (*Team, error)
CreateTeam implemented in a fake way for automated tests
func (*FakeClient) CreateVolumeSnapshot ¶
func (c *FakeClient) CreateVolumeSnapshot(volumeID string, config *VolumeSnapshotConfig) (*VolumeSnapshot, error)
CreateVolumeSnapshot implemented in a fake way for automated tests
func (*FakeClient) CreateWebhook ¶
func (c *FakeClient) CreateWebhook(r *WebhookConfig) (*Webhook, error)
CreateWebhook implemented in a fake way for automated tests
func (*FakeClient) DeleteDNSDomain ¶
func (c *FakeClient) DeleteDNSDomain(d *DNSDomain) (*SimpleResponse, error)
DeleteDNSDomain implemented in a fake way for automated tests
func (*FakeClient) DeleteDNSRecord ¶
func (c *FakeClient) DeleteDNSRecord(r *DNSRecord) (*SimpleResponse, error)
DeleteDNSRecord implemented in a fake way for automated tests
func (*FakeClient) DeleteFirewall ¶
func (c *FakeClient) DeleteFirewall(id string) (*SimpleResponse, error)
DeleteFirewall implemented in a fake way for automated tests
func (*FakeClient) DeleteFirewallRule ¶
func (c *FakeClient) DeleteFirewallRule(id string, ruleID string) (*SimpleResponse, error)
DeleteFirewallRule implemented in a fake way for automated tests
func (*FakeClient) DeleteIP ¶
func (c *FakeClient) DeleteIP(id string) (*SimpleResponse, error)
DeleteIP deletes a fake IP
func (*FakeClient) DeleteInstance ¶
func (c *FakeClient) DeleteInstance(id string) (*SimpleResponse, error)
DeleteInstance implemented in a fake way for automated tests
func (*FakeClient) DeleteKubernetesCluster ¶
func (c *FakeClient) DeleteKubernetesCluster(id string) (*SimpleResponse, error)
DeleteKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) DeleteKubernetesClusterPoolInstance ¶
func (c *FakeClient) DeleteKubernetesClusterPoolInstance(cid, pid, id string) (*SimpleResponse, error)
DeleteKubernetesClusterPoolInstance implemented in a fake way for automated tests
func (*FakeClient) DeleteLoadBalancer ¶
func (c *FakeClient) DeleteLoadBalancer(id string) (*SimpleResponse, error)
DeleteLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) DeleteNetwork ¶
func (c *FakeClient) DeleteNetwork(id string) (*SimpleResponse, error)
DeleteNetwork implemented in a fake way for automated tests
func (*FakeClient) DeleteRole ¶
func (c *FakeClient) DeleteRole(id string) (*SimpleResponse, error)
DeleteRole implemented in a fake way for automated tests
func (*FakeClient) DeleteSSHKey ¶
func (c *FakeClient) DeleteSSHKey(id string) (*SimpleResponse, error)
DeleteSSHKey implemented in a fake way for automated tests
func (*FakeClient) DeleteTeam ¶
func (c *FakeClient) DeleteTeam(id string) (*SimpleResponse, error)
DeleteTeam implemented in a fake way for automated tests
func (*FakeClient) DeleteVolume ¶
func (c *FakeClient) DeleteVolume(id string) (*SimpleResponse, error)
DeleteVolume implemented in a fake way for automated tests
func (*FakeClient) DeleteVolumeAndAllSnapshot ¶
func (c *FakeClient) DeleteVolumeAndAllSnapshot(volumeID string) (*SimpleResponse, error)
DeleteVolumeAndAllSnapshot implemented in a fake way for automated tests
func (*FakeClient) DeleteVolumeSnapshot ¶
func (c *FakeClient) DeleteVolumeSnapshot(snapshotID string) (*SimpleResponse, error)
DeleteVolumeSnapshot implemented in a fake way for automated tests
func (*FakeClient) DeleteWebhook ¶
func (c *FakeClient) DeleteWebhook(id string) (*SimpleResponse, error)
DeleteWebhook implemented in a fake way for automated tests
func (*FakeClient) DetachVolume ¶
func (c *FakeClient) DetachVolume(id string) (*SimpleResponse, error)
DetachVolume implemented in a fake way for automated tests
func (*FakeClient) DisconnectRegion ¶
func (c *FakeClient) DisconnectRegion(r *DisconnectRegionRequest) error
DisconnectRegion implemented in a fake way for automated tests
func (*FakeClient) FindDNSDomain ¶
func (c *FakeClient) FindDNSDomain(search string) (*DNSDomain, error)
FindDNSDomain implemented in a fake way for automated tests
func (*FakeClient) FindDiskImage ¶
func (c *FakeClient) FindDiskImage(search string) (*DiskImage, error)
FindDiskImage implemented in a fake way for automated tests
func (*FakeClient) FindFirewall ¶
func (c *FakeClient) FindFirewall(search string) (*Firewall, error)
FindFirewall implemented in a fake way for automated tests
func (*FakeClient) FindFirewallRule ¶
func (c *FakeClient) FindFirewallRule(firewallID string, search string) (*FirewallRule, error)
FindFirewallRule implemented in a fake way for automated tests
func (*FakeClient) FindIP ¶
func (c *FakeClient) FindIP(search string) (*IP, error)
FindIP finds a fake IP
func (*FakeClient) FindInstance ¶
func (c *FakeClient) FindInstance(search string) (*Instance, error)
FindInstance implemented in a fake way for automated tests
func (*FakeClient) FindInstanceSizes ¶
func (c *FakeClient) FindInstanceSizes(search string) (*InstanceSize, error)
FindInstanceSizes implemented in a fake way for automated tests
func (*FakeClient) FindKubernetesCluster ¶
func (c *FakeClient) FindKubernetesCluster(search string) (*KubernetesCluster, error)
FindKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) FindKubernetesClusterInstance ¶
func (c *FakeClient) FindKubernetesClusterInstance(clusterID, search string) (*Instance, error)
FindKubernetesClusterInstance implemented in a fake way for automated tests
func (*FakeClient) FindKubernetesClusterPool ¶
func (c *FakeClient) FindKubernetesClusterPool(cid, search string) (*KubernetesPool, error)
FindKubernetesClusterPool implemented in a fake way for automated tests
func (*FakeClient) FindLoadBalancer ¶
func (c *FakeClient) FindLoadBalancer(search string) (*LoadBalancer, error)
FindLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) FindNetwork ¶
func (c *FakeClient) FindNetwork(search string) (*Network, error)
FindNetwork implemented in a fake way for automated tests
func (*FakeClient) FindSSHKey ¶
func (c *FakeClient) FindSSHKey(search string) (*SSHKey, error)
FindSSHKey implemented in a fake way for automated tests
func (*FakeClient) FindVolume ¶
func (c *FakeClient) FindVolume(search string) (*Volume, error)
FindVolume implemented in a fake way for automated tests
func (*FakeClient) FindWebhook ¶
func (c *FakeClient) FindWebhook(search string) (*Webhook, error)
FindWebhook implemented in a fake way for automated tests
func (*FakeClient) GetDNSDomain ¶
func (c *FakeClient) GetDNSDomain(name string) (*DNSDomain, error)
GetDNSDomain implemented in a fake way for automated tests
func (*FakeClient) GetDNSRecord ¶
func (c *FakeClient) GetDNSRecord(domainID, domainRecordID string) (*DNSRecord, error)
GetDNSRecord implemented in a fake way for automated tests
func (*FakeClient) GetDefaultNetwork ¶
func (c *FakeClient) GetDefaultNetwork() (*Network, error)
GetDefaultNetwork implemented in a fake way for automated tests
func (*FakeClient) GetDiskImage ¶
func (c *FakeClient) GetDiskImage(id string) (*DiskImage, error)
GetDiskImage implemented in a fake way for automated tests
func (*FakeClient) GetIP ¶
func (c *FakeClient) GetIP(id string) (*IP, error)
GetIP returns a fake IP
func (*FakeClient) GetInstance ¶
func (c *FakeClient) GetInstance(id string) (*Instance, error)
GetInstance implemented in a fake way for automated tests
func (*FakeClient) GetInstanceConsoleURL ¶
func (c *FakeClient) GetInstanceConsoleURL(id string) (string, error)
GetInstanceConsoleURL implemented in a fake way for automated tests
func (*FakeClient) GetKubernetesCluster ¶
func (c *FakeClient) GetKubernetesCluster(id string) (*KubernetesCluster, error)
GetKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) GetKubernetesClusterPool ¶
func (c *FakeClient) GetKubernetesClusterPool(cid, pid string) (*KubernetesPool, error)
GetKubernetesClusterPool implemented in a fake way for automated tests
func (*FakeClient) GetLoadBalancer ¶
func (c *FakeClient) GetLoadBalancer(id string) (*LoadBalancer, error)
GetLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) GetOrganisation ¶
func (c *FakeClient) GetOrganisation() (*Organisation, error)
GetOrganisation implemented in a fake way for automated tests
func (*FakeClient) GetQuota ¶
func (c *FakeClient) GetQuota() (*Quota, error)
GetQuota implemented in a fake way for automated tests
func (*FakeClient) GetVolume ¶
func (c *FakeClient) GetVolume(id string) (*Volume, error)
GetVolume implemented in a fake way for automated tests
func (*FakeClient) GetVolumeSnapshot ¶
func (c *FakeClient) GetVolumeSnapshot(snapshotID string) (*VolumeSnapshot, error)
GetVolumeSnapshot implemented in a fake way for automated tests
func (*FakeClient) GetVolumeSnapshotByVolumeID ¶
func (c *FakeClient) GetVolumeSnapshotByVolumeID(volumeID, snapshotID string) (*VolumeSnapshot, error)
GetVolumeSnapshotByVolumeID implemented in a fake way for automated tests
func (*FakeClient) HardRebootInstance ¶
func (c *FakeClient) HardRebootInstance(id string) (*SimpleResponse, error)
HardRebootInstance implemented in a fake way for automated tests
func (*FakeClient) ListAccountsInOrganisation ¶
func (c *FakeClient) ListAccountsInOrganisation() ([]Account, error)
ListAccountsInOrganisation implemented in a fake way for automated tests
func (*FakeClient) ListAllInstances ¶
func (c *FakeClient) ListAllInstances() ([]Instance, error)
ListAllInstances implemented in a fake way for automated tests
func (*FakeClient) ListAvailableKubernetesVersions ¶
func (c *FakeClient) ListAvailableKubernetesVersions() ([]KubernetesVersion, error)
ListAvailableKubernetesVersions implemented in a fake way for automated tests
func (*FakeClient) ListCharges ¶
func (c *FakeClient) ListCharges(from, to time.Time) ([]Charge, error)
ListCharges implemented in a fake way for automated tests
func (*FakeClient) ListDNSDomains ¶
func (c *FakeClient) ListDNSDomains() ([]DNSDomain, error)
ListDNSDomains implemented in a fake way for automated tests
func (*FakeClient) ListDNSRecords ¶
func (c *FakeClient) ListDNSRecords(dnsDomainID string) ([]DNSRecord, error)
ListDNSRecords implemented in a fake way for automated tests
func (*FakeClient) ListDiskImages ¶
func (c *FakeClient) ListDiskImages(includeCustom ...bool) ([]DiskImage, error)
ListDiskImages implemented in a fake way for automated tests
func (*FakeClient) ListFirewallRules ¶
func (c *FakeClient) ListFirewallRules(id string) ([]FirewallRule, error)
ListFirewallRules implemented in a fake way for automated tests
func (*FakeClient) ListFirewalls ¶
func (c *FakeClient) ListFirewalls() ([]Firewall, error)
ListFirewalls implemented in a fake way for automated tests
func (*FakeClient) ListIPs ¶
func (c *FakeClient) ListIPs() (*PaginatedIPs, error)
ListIPs returns a list of fake IPs
func (*FakeClient) ListInstanceSizes ¶
func (c *FakeClient) ListInstanceSizes() ([]InstanceSize, error)
ListInstanceSizes implemented in a fake way for automated tests
func (*FakeClient) ListInstances ¶
func (c *FakeClient) ListInstances(page int, perPage int) (*PaginatedInstanceList, error)
ListInstances implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesClusterInstances ¶
func (c *FakeClient) ListKubernetesClusterInstances(id string) ([]Instance, error)
ListKubernetesClusterInstances implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesClusterPools ¶
func (c *FakeClient) ListKubernetesClusterPools(cid string) ([]KubernetesPool, error)
ListKubernetesClusterPools implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesClusters ¶
func (c *FakeClient) ListKubernetesClusters() (*PaginatedKubernetesClusters, error)
ListKubernetesClusters implemented in a fake way for automated tests
func (*FakeClient) ListKubernetesMarketplaceApplications ¶
func (c *FakeClient) ListKubernetesMarketplaceApplications() ([]KubernetesMarketplaceApplication, error)
ListKubernetesMarketplaceApplications implemented in a fake way for automated tests
func (*FakeClient) ListLoadBalancers ¶
func (c *FakeClient) ListLoadBalancers() ([]LoadBalancer, error)
ListLoadBalancers implemented in a fake way for automated tests
func (*FakeClient) ListMemberships ¶
func (c *FakeClient) ListMemberships() (*MembershipResponse, error)
ListMemberships implemented in a fake way for automated tests
func (*FakeClient) ListNetworks ¶
func (c *FakeClient) ListNetworks() ([]Network, error)
ListNetworks implemented in a fake way for automated tests
func (*FakeClient) ListPermissions ¶
func (c *FakeClient) ListPermissions() ([]Permission, error)
ListPermissions implemented in a fake way for automated tests
func (*FakeClient) ListRegions ¶
func (c *FakeClient) ListRegions() ([]Region, error)
ListRegions implemented in a fake way for automated tests
func (*FakeClient) ListRoles ¶
func (c *FakeClient) ListRoles() ([]Role, error)
ListRoles implemented in a fake way for automated tests
func (*FakeClient) ListSSHKeys ¶
func (c *FakeClient) ListSSHKeys() ([]SSHKey, error)
ListSSHKeys implemented in a fake way for automated tests
func (*FakeClient) ListTeamMembers ¶
func (c *FakeClient) ListTeamMembers(teamID string) ([]TeamMember, error)
ListTeamMembers implemented in a fake way for automated tests
func (*FakeClient) ListTeams ¶
func (c *FakeClient) ListTeams() ([]Team, error)
ListTeams implemented in a fake way for automated tests
func (*FakeClient) ListVolumeSnapshots ¶
func (c *FakeClient) ListVolumeSnapshots() ([]VolumeSnapshot, error)
ListVolumeSnapshots implemented in a fake way for automated tests
func (*FakeClient) ListVolumeSnapshotsByVolumeID ¶
func (c *FakeClient) ListVolumeSnapshotsByVolumeID(volumeID string) ([]VolumeSnapshot, error)
ListVolumeSnapshotsByVolumeID implemented in a fake way for automated tests
func (*FakeClient) ListVolumes ¶
func (c *FakeClient) ListVolumes() ([]Volume, error)
ListVolumes implemented in a fake way for automated tests
func (*FakeClient) ListWebhooks ¶
func (c *FakeClient) ListWebhooks() ([]Webhook, error)
ListWebhooks implemented in a fake way for automated tests
func (*FakeClient) MovePublicIPToInstance ¶
func (c *FakeClient) MovePublicIPToInstance(id, ipAddress string) (*SimpleResponse, error)
MovePublicIPToInstance implemented in a fake way for automated tests
func (*FakeClient) NewFirewall ¶
func (c *FakeClient) NewFirewall(*FirewallConfig) (*FirewallResult, error)
NewFirewall implemented in a fake way for automated tests
func (*FakeClient) NewFirewallRule ¶
func (c *FakeClient) NewFirewallRule(r *FirewallRuleConfig) (*FirewallRule, error)
NewFirewallRule implemented in a fake way for automated tests
func (*FakeClient) NewIP ¶
func (c *FakeClient) NewIP(v *CreateIPRequest) (*IP, error)
NewIP creates a fake IP
func (*FakeClient) NewInstanceConfig ¶
func (c *FakeClient) NewInstanceConfig() (*InstanceConfig, error)
NewInstanceConfig implemented in a fake way for automated tests
func (*FakeClient) NewKubernetesClusters ¶
func (c *FakeClient) NewKubernetesClusters(kc *KubernetesClusterConfig) (*KubernetesCluster, error)
NewKubernetesClusters implemented in a fake way for automated tests
func (*FakeClient) NewNetwork ¶
func (c *FakeClient) NewNetwork(label string) (*NetworkResult, error)
NewNetwork implemented in a fake way for automated tests
func (*FakeClient) NewSSHKey ¶
func (c *FakeClient) NewSSHKey(name string, publicKey string) (*SimpleResponse, error)
NewSSHKey implemented in a fake way for automated tests
func (*FakeClient) NewVolume ¶
func (c *FakeClient) NewVolume(v *VolumeConfig) (*VolumeResult, error)
NewVolume implemented in a fake way for automated tests
func (*FakeClient) Ping ¶
func (c *FakeClient) Ping() error
Ping implemented in a fake way for automated tests
func (*FakeClient) RebootInstance ¶
func (c *FakeClient) RebootInstance(id string) (*SimpleResponse, error)
RebootInstance implemented in a fake way for automated tests
func (*FakeClient) RecycleKubernetesCluster ¶
func (c *FakeClient) RecycleKubernetesCluster(id string, hostname string) (*SimpleResponse, error)
RecycleKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) RemoveTeamMember ¶
func (c *FakeClient) RemoveTeamMember(teamID, teamMemberID string) (*SimpleResponse, error)
RemoveTeamMember implemented in a fake way for automated tests
func (*FakeClient) RenameFirewall ¶
func (c *FakeClient) RenameFirewall(id string, f *FirewallConfig) (*SimpleResponse, error)
RenameFirewall implemented in a fake way for automated tests
func (*FakeClient) RenameNetwork ¶
func (c *FakeClient) RenameNetwork(label, id string) (*NetworkResult, error)
RenameNetwork implemented in a fake way for automated tests
func (*FakeClient) RenameOrganisation ¶
func (c *FakeClient) RenameOrganisation(name string) (*Organisation, error)
RenameOrganisation implemented in a fake way for automated tests
func (*FakeClient) RenameTeam ¶
func (c *FakeClient) RenameTeam(teamID, name string) (*Team, error)
RenameTeam implemented in a fake way for automated tests
func (*FakeClient) ResizeVolume ¶
func (c *FakeClient) ResizeVolume(id string, size int) (*SimpleResponse, error)
ResizeVolume implemented in a fake way for automated tests
func (*FakeClient) SetInstanceFirewall ¶
func (c *FakeClient) SetInstanceFirewall(id, firewallID string) (*SimpleResponse, error)
SetInstanceFirewall implemented in a fake way for automated tests
func (*FakeClient) SetInstanceTags ¶
func (c *FakeClient) SetInstanceTags(i *Instance, tags string) (*SimpleResponse, error)
SetInstanceTags implemented in a fake way for automated tests
func (*FakeClient) SoftRebootInstance ¶
func (c *FakeClient) SoftRebootInstance(id string) (*SimpleResponse, error)
SoftRebootInstance implemented in a fake way for automated tests
func (*FakeClient) StartInstance ¶
func (c *FakeClient) StartInstance(id string) (*SimpleResponse, error)
StartInstance implemented in a fake way for automated tests
func (*FakeClient) StopInstance ¶
func (c *FakeClient) StopInstance(id string) (*SimpleResponse, error)
StopInstance implemented in a fake way for automated tests
func (*FakeClient) UnassignIP ¶
func (c *FakeClient) UnassignIP(id, region string) (*SimpleResponse, error)
UnassignIP unassigns a fake IP
func (*FakeClient) UpdateDNSDomain ¶
func (c *FakeClient) UpdateDNSDomain(d *DNSDomain, name string) (*DNSDomain, error)
UpdateDNSDomain implemented in a fake way for automated tests
func (*FakeClient) UpdateDNSRecord ¶
func (c *FakeClient) UpdateDNSRecord(r *DNSRecord, rc *DNSRecordConfig) (*DNSRecord, error)
UpdateDNSRecord implemented in a fake way for automated tests
func (*FakeClient) UpdateIP ¶
func (c *FakeClient) UpdateIP(id string, v *UpdateIPRequest) (*IP, error)
UpdateIP updates a fake IP
func (*FakeClient) UpdateInstance ¶
func (c *FakeClient) UpdateInstance(i *Instance) (*SimpleResponse, error)
UpdateInstance implemented in a fake way for automated tests
func (*FakeClient) UpdateKubernetesCluster ¶
func (c *FakeClient) UpdateKubernetesCluster(id string, kc *KubernetesClusterConfig) (*KubernetesCluster, error)
UpdateKubernetesCluster implemented in a fake way for automated tests
func (*FakeClient) UpdateKubernetesClusterPool ¶
func (c *FakeClient) UpdateKubernetesClusterPool(cid, pid string, config *KubernetesClusterPoolUpdateConfig) (*KubernetesPool, error)
UpdateKubernetesClusterPool implemented in a fake way for automated tests
func (*FakeClient) UpdateLoadBalancer ¶
func (c *FakeClient) UpdateLoadBalancer(id string, r *LoadBalancerUpdateConfig) (*LoadBalancer, error)
UpdateLoadBalancer implemented in a fake way for automated tests
func (*FakeClient) UpdateSSHKey ¶
func (c *FakeClient) UpdateSSHKey(name string, sshKeyID string) (*SSHKey, error)
UpdateSSHKey implemented in a fake way for automated tests
func (*FakeClient) UpdateTeamMember ¶
func (c *FakeClient) UpdateTeamMember(teamID, teamMemberID, permissions, roles string) (*TeamMember, error)
UpdateTeamMember implemented in a fake way for automated tests
func (*FakeClient) UpdateWebhook ¶
func (c *FakeClient) UpdateWebhook(id string, r *WebhookConfig) (*Webhook, error)
UpdateWebhook implemented in a fake way for automated tests
func (*FakeClient) UpgradeInstance ¶
func (c *FakeClient) UpgradeInstance(id, newSize string) (*SimpleResponse, error)
UpgradeInstance implemented in a fake way for automated tests
type Feature ¶
type Feature struct {
Iaas bool `json:"iaas"`
Kubernetes bool `json:"kubernetes"`
ObjectStore bool `json:"object_store"`
LoadBalancer bool `json:"loadbalancer"`
GPU bool `json:"gpu"`
DBaaS bool `json:"dbaas"`
Volume bool `json:"volume"`
PaaS bool `json:"paas"`
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 HealthCheck ¶
HealthCheck represents the health check configuration for an instance pool.
type IP ¶
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"`
NetworkBandwidthLimit int `json:"network_bandwidth_limit,omitempty"`
AllowedIPs []string `json:"allowed_ips,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"`
VolumeType string `json:"volume_type,omitempty"`
AttachedVolumes []AttachedVolume `json:"attached_volumes"`
PlacementRule PlacementRule `json:"placement_rule"`
NetworkBandwidthLimit int `json:"network_bandwidth_limit,omitempty"`
AllowedIPs []string `json:"allowed_ips,omitempty"`
}
InstanceConfig describes the parameters for a new instance none of the fields are mandatory and will be automatically set with default values
type InstancePool ¶
type InstancePool struct {
Tags []string `json:"tags"`
Names []string `json:"names"`
Protocol string `json:"protocol,omitempty"`
SourcePort int32 `json:"source_port"`
TargetPort int32 `json:"target_port"`
HealthCheck HealthCheck `json:"health_check"`
}
InstancePool represents an instance pool configuration in a load balancer.
type InstanceRestoreInfo ¶
type InstanceRestoreInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Hostname string `json:"hostname"`
Description string `json:"description"`
FromSnapshot string `json:"from_snapshot"`
PrivateIPv4 string `json:"private_ipv4"`
OverwriteExisting bool `json:"overwrite_existing"`
Status struct {
State string `json:"state"`
} `json:"status"`
CreatedAt time.Time `json:"created_at"`
CompletedAt *time.Time `json:"completed_at"` // Use pointer for nullable time
}
InstanceRestoreInfo represents the instance details in a restore operation response
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 InstanceSnapshot ¶
type InstanceSnapshot struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
IncludedVolumes []string `json:"included_volumes,omitempty"`
Status InstanceSnapshotStatus `json:"status,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
}
InstanceSnapshot represents a snapshot of an instance
type InstanceSnapshotInfo ¶
type InstanceSnapshotInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
IncludedVolumes []string `json:"included_volumes,omitempty"`
Status struct {
State string `json:"state"`
Volumes []VolumeStatus `json:"volumes,omitempty"`
} `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
InstanceSnapshotInfo represents instance-specific snapshot details
type InstanceSnapshotStatus ¶
type InstanceSnapshotStatus struct {
State string `json:"state"`
Volumes []InstanceSnapshotVolumeStatus `json:"volumes,omitempty"`
}
InstanceSnapshotStatus represents the status of an instance snapshot
type InstanceSnapshotVolumeStatus ¶
InstanceSnapshotVolumeStatus represents the status of a volume in an instance snapshot
type InstanceVnc ¶
type InstanceVnc struct {
URI string `json:"uri,omitempty"`
Expiration string `json:"expiration,omitempty"`
}
InstanceVnc represents VNC information for an instances
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"`
VolumeType string `json:"volume_type,omitempty"`
}
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"`
VolumeType string `json:"volume_type,omitempty"`
}
KubernetesClusterConfig is used to create a new cluster
type KubernetesClusterPoolConfig ¶
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 ¶
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 ¶
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 LastSnapshotInfo ¶
type LastSnapshotInfo struct {
ID string `json:"id"`
Name string `json:"name"`
State string `json:"state"`
}
LastSnapshotInfo contains information about the last snapshot taken
type LoadBalancer ¶
type LoadBalancer struct {
ID string `json:"id"`
Name string `json:"name"`
ServiceName string `json:"service_name,omitempty"`
NetworkID string `json:"network_id,omitempty"`
Algorithm string `json:"algorithm"`
Backends []LoadBalancerBackend `json:"backends,omitempty"`
InstancePool []InstancePool `json:"instance_pools,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"`
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,omitempty"`
InstancePools []LoadBalancerInstancePoolConfig `json:"instance_pools,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"`
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 LoadBalancerInstancePoolConfig ¶
type LoadBalancerInstancePoolConfig struct {
Tags []string `json:"tags"`
Names []string `json:"names"`
Protocol string `json:"protocol,omitempty"`
SourcePort int32 `json:"source_port"`
TargetPort int32 `json:"target_port"`
HealthCheck HealthCheck `json:"health_check"`
}
LoadBalancerInstancePoolConfig represents an instance pool configuration in a load balancer.
type LoadBalancerOptions ¶
type LoadBalancerOptions struct {
ServerTimeout string `json:"server_timeout,omitempty"`
ClientTimeout string `json:"client_timeout,omitempty"`
}
LoadBalancerOptions are additional loadbalancer options
type LoadBalancerUpdateConfig ¶
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"`
InstancePools []LoadBalancerInstancePoolConfig `json:"instance_pools,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 MembershipAccount ¶
type MembershipAccount struct {
ID string `json:"id"`
EmailAddress string `json:"email_address"`
Label string `json:"label"`
OrganisationID string `json:"organisation_id,omitempty"`
}
MembershipAccount is the DTO for an account.
type MembershipOrganisation ¶
MembershipOrganisation is the DTO for an organisation.
type MembershipResponse ¶
type MembershipResponse struct {
Accounts []MembershipAccount
Organisations []MembershipOrganisation
}
MembershipResponse is the response for the memberships of a user
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"`
FreeIPCount int `json:"free_ip_count,omitempty"`
}
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 PaginatedKubernetesClusters ¶
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 ¶
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 ¶
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 ¶
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 ¶
type PlacementRule struct {
AffinityRules []AffinityRule `json:"affinity_rules,omitempty"`
NodeSelector map[string]string `json:"node_selector,omitempty"`
}
PlacementRule represents a placement rule
type ProcessInfo ¶
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 ¶
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 ResourceSnapshot ¶
type ResourceSnapshot struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ResourceType string `json:"resource_type"`
CreatedAt time.Time `json:"created_at"`
Instance *InstanceSnapshotInfo `json:"instance,omitempty"`
}
ResourceSnapshot represents a snapshot of any resource type
type ResourceSnapshotRestore ¶
type ResourceSnapshotRestore struct {
ResourceType string `json:"resource_type"`
Instance *InstanceRestoreInfo `json:"instance,omitempty"`
}
ResourceSnapshotRestore represents the response from a restore operation
type RestoreDatabaseRequest ¶
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 RestoreInstanceSnapshotParams ¶
type RestoreInstanceSnapshotParams struct {
Description string `json:"description,omitempty"`
Hostname string `json:"hostname,omitempty"`
PrivateIPv4 string `json:"private_ipv4,omitempty"`
OverwriteExisting bool `json:"overwrite_existing,omitempty"`
}
RestoreInstanceSnapshotParams represents the parameters for restoring an instance snapshot
type RestoreInstanceSnapshotRequest ¶
type RestoreInstanceSnapshotRequest struct {
Description string `json:"description,omitempty"`
Hostname string `json:"hostname,omitempty"`
PrivateIPv4 string `json:"private_ipv4,omitempty"`
IncludeVolumes bool `json:"include_volumes,omitempty"`
OverwriteExisting bool `json:"overwrite_existing,omitempty"`
}
RestoreInstanceSnapshotRequest represents the request to restore an instance snapshot
type RestoreResourceSnapshotRequest ¶
type RestoreResourceSnapshotRequest struct {
Instance *RestoreInstanceSnapshotRequest `json:"instance,omitempty"`
}
RestoreResourceSnapshotRequest represents the request to restore a resource snapshot
type Role ¶
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 ¶
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 SnapshotInstance ¶
type SnapshotInstance struct {
ID string `json:"id"`
Size string `json:"size,omitempty"`
IncludedVolumes []string `json:"included_volumes,omitempty"`
}
SnapshotInstance represents an instance to be snapshotted
type SnapshotRetention ¶
type SnapshotRetention struct {
Period string `json:"period,omitempty"`
MaxSnapshots int `json:"max_snapshots,omitempty"`
}
SnapshotRetention defines how snapshots should be retained
type SnapshotSchedule ¶
type SnapshotSchedule struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
CronExpression string `json:"cron_expression"`
Paused bool `json:"paused"`
Retention SnapshotRetention `json:"retention"`
Instances []SnapshotInstance `json:"instances"`
Status SnapshotScheduleStatus `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
SnapshotSchedule represents a snapshot schedule configuration
type SnapshotScheduleStatus ¶
type SnapshotScheduleStatus struct {
State string `json:"state"`
LastSnapshot LastSnapshotInfo `json:"last_snapshot"`
}
SnapshotScheduleStatus represents the current status of a snapshot schedule
type Subnet ¶
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 ¶
type SubnetConfig struct {
Name string `json:"name" validate:"required" schema:"name"`
}
SubnetConfig contains incoming request parameters for the subnet object
type SupportedSoftwareVersion ¶
type SupportedSoftwareVersion struct {
SoftwareVersion string `json:"software_version"`
Default bool `json:"default"`
}
SupportedSoftwareVersion contains the information related to a specific software version
type Team ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 UpdateInstanceSnapshotParams ¶
type UpdateInstanceSnapshotParams struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
}
UpdateInstanceSnapshotParams represents the parameters for updating an instance snapshot
type UpdateObjectStoreCredentialRequest ¶
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 ¶
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 UpdateResourceSnapshotRequest ¶
type UpdateResourceSnapshotRequest struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
}
UpdateResourceSnapshotRequest represents the request to update a resource snapshot
type UpdateSnapshotScheduleRequest ¶
type UpdateSnapshotScheduleRequest struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Paused *bool `json:"paused,omitempty"`
}
UpdateSnapshotScheduleRequest represents the request to update a snapshot schedule
type User ¶
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 ¶
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 ¶
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 ¶
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 ¶
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"`
VolumeType string `json:"volume_type"`
SnapshotID string `json:"snapshot_id,omitempty"`
}
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 VolumeSnapshot ¶
type VolumeSnapshot struct {
Name string `json:"name"`
SnapshotID string `json:"snapshot_id"`
SnapshotDescription string `json:"snapshot_description"`
VolumeID string `json:"volume_id"`
InstanceID string `json:"instance_id,omitempty"`
SourceVolumeName string `json:"source_volume_name"`
RestoreSize int `json:"restore_size"`
State string `json:"state"`
CreationTime string `json:"creation_time,omitempty"`
}
VolumeSnapshot is the point-in-time copy of a Volume
type VolumeSnapshotConfig ¶
type VolumeSnapshotConfig struct {
Name string `json:"name"`
Description string `json:"description"`
Region string `json:"region"`
}
VolumeSnapshotConfig is the configuration for creating a new VolumeSnapshot
type VolumeStatus ¶
VolumeStatus represents the status of a volume in a snapshot
type VolumeType ¶
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
- auth.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
- instance_snapshot.go
- ip.go
- kubernetes.go
- loadbalancer.go
- membership.go
- network.go
- objectstore.go
- objectstore_credential.go
- organisation.go
- pagination.go
- permission.go
- ping.go
- pool.go
- quota.go
- region.go
- resource_snapshot.go
- role.go
- snapshot_schedule.go
- ssh_key.go
- team.go
- user.go
- volume.go
- volume_snapshot.go
- volumetype.go
- vpc.go
- webhook.go