Documentation
¶
Overview ¶
Package govultr contains the functionality to interact with the Vultr public HTTP REST API.
Index ¶
- func BoolToBoolPtr(value bool) *bool
- func IntToIntPtr(value int) *int
- func StringToStringPtr(value string) *string
- type Account
- type AccountBandwidth
- type AccountBandwidthPeriod
- type AccountService
- type AccountServiceHandler
- type Application
- type ApplicationService
- type ApplicationServiceHandler
- type AttachVPC2Req
- type AutoSSL
- type AvailableOption
- type BMBareMetalBase
- type Backup
- type BackupSchedule
- type BackupScheduleReq
- type BackupService
- type BackupServiceHandler
- type Bandwidth
- type BareMetalCreate
- type BareMetalPlan
- type BareMetalServer
- type BareMetalServerBandwidth
- type BareMetalServerService
- type BareMetalServerServiceHandler
- func (b *BareMetalServerServiceHandler) AttachVPC(ctx context.Context, serverID, vpcID string) error
- func (b *BareMetalServerServiceHandler) AttachVPC2(ctx context.Context, serverID string, vpc2Req *AttachVPC2Req) error
- func (b *BareMetalServerServiceHandler) Create(ctx context.Context, bmCreate *BareMetalCreate) (*BareMetalServer, *http.Response, error)
- func (b *BareMetalServerServiceHandler) Delete(ctx context.Context, serverID string) error
- func (b *BareMetalServerServiceHandler) DetachVPC(ctx context.Context, serverID, vpcID string) error
- func (b *BareMetalServerServiceHandler) DetachVPC2(ctx context.Context, serverID, vpcID string) error
- func (b *BareMetalServerServiceHandler) Get(ctx context.Context, serverID string) (*BareMetalServer, *http.Response, error)
- func (b *BareMetalServerServiceHandler) GetBandwidth(ctx context.Context, serverID string) (*Bandwidth, *http.Response, error)
- func (b *BareMetalServerServiceHandler) GetUpgrades(ctx context.Context, serverID string) (*Upgrades, *http.Response, error)
- func (b *BareMetalServerServiceHandler) GetUserData(ctx context.Context, serverID string) (*UserData, *http.Response, error)
- func (b *BareMetalServerServiceHandler) GetVNCUrl(ctx context.Context, serverID string) (*VNCUrl, *http.Response, error)
- func (b *BareMetalServerServiceHandler) Halt(ctx context.Context, serverID string) error
- func (b *BareMetalServerServiceHandler) List(ctx context.Context, options *ListOptions) ([]BareMetalServer, *Meta, *http.Response, error)
- func (b *BareMetalServerServiceHandler) ListIPv4s(ctx context.Context, serverID string, options *ListOptions) ([]IPv4, *Meta, *http.Response, error)
- func (b *BareMetalServerServiceHandler) ListIPv6s(ctx context.Context, serverID string, options *ListOptions) ([]IPv6, *Meta, *http.Response, error)
- func (b *BareMetalServerServiceHandler) ListVPC2Info(ctx context.Context, serverID string) ([]VPC2Info, *http.Response, error)
- func (b *BareMetalServerServiceHandler) ListVPCInfo(ctx context.Context, serverID string) ([]VPCInfo, *http.Response, error)
- func (b *BareMetalServerServiceHandler) MassHalt(ctx context.Context, serverList []string) error
- func (b *BareMetalServerServiceHandler) MassReboot(ctx context.Context, serverList []string) error
- func (b *BareMetalServerServiceHandler) MassStart(ctx context.Context, serverList []string) error
- func (b *BareMetalServerServiceHandler) Reboot(ctx context.Context, serverID string) error
- func (b *BareMetalServerServiceHandler) Reinstall(ctx context.Context, serverID string) (*BareMetalServer, *http.Response, error)
- func (b *BareMetalServerServiceHandler) Start(ctx context.Context, serverID string) error
- func (b *BareMetalServerServiceHandler) Update(ctx context.Context, serverID string, bmReq *BareMetalUpdate) (*BareMetalServer, *http.Response, error)
- type BareMetalUpdate
- type BillingService
- type BillingServiceHandler
- func (b *BillingServiceHandler) GetInvoice(ctx context.Context, invoiceID string) (*Invoice, *http.Response, error)
- func (b *BillingServiceHandler) ListHistory(ctx context.Context, options *ListOptions) ([]History, *Meta, *http.Response, error)
- func (b *BillingServiceHandler) ListInvoiceItems(ctx context.Context, invoiceID int, options *ListOptions) ([]InvoiceItem, *Meta, *http.Response, error)
- func (b *BillingServiceHandler) ListInvoices(ctx context.Context, options *ListOptions) ([]Invoice, *Meta, *http.Response, error)
- func (b *BillingServiceHandler) ListPendingCharges(ctx context.Context, options *ListOptions) ([]InvoiceItem, *http.Response, error)
- type BlockStorage
- type BlockStorageAttach
- type BlockStorageCreate
- type BlockStorageDetach
- type BlockStorageService
- type BlockStorageServiceHandler
- func (b *BlockStorageServiceHandler) Attach(ctx context.Context, blockID string, attach *BlockStorageAttach) error
- func (b *BlockStorageServiceHandler) Create(ctx context.Context, blockReq *BlockStorageCreate) (*BlockStorage, *http.Response, error)
- func (b *BlockStorageServiceHandler) Delete(ctx context.Context, blockID string) error
- func (b *BlockStorageServiceHandler) Detach(ctx context.Context, blockID string, detach *BlockStorageDetach) error
- func (b *BlockStorageServiceHandler) Get(ctx context.Context, blockID string) (*BlockStorage, *http.Response, error)
- func (b *BlockStorageServiceHandler) List(ctx context.Context, options *ListOptions) ([]BlockStorage, *Meta, *http.Response, error)
- func (b *BlockStorageServiceHandler) Update(ctx context.Context, blockID string, blockReq *BlockStorageUpdate) error
- type BlockStorageUpdate
- type CDNService
- type CDNServiceHandler
- func (c *CDNServiceHandler) CreatePullZone(ctx context.Context, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
- func (c *CDNServiceHandler) CreatePushZone(ctx context.Context, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
- func (c *CDNServiceHandler) CreatePushZoneFileEndpoint(ctx context.Context, zoneID string, zoneEndpointReq *CDNZoneEndpointReq) (*CDNZoneEndpoint, *http.Response, error)
- func (c *CDNServiceHandler) DeletePullZone(ctx context.Context, zoneID string) error
- func (c *CDNServiceHandler) DeletePushZone(ctx context.Context, zoneID string) error
- func (c *CDNServiceHandler) DeletePushZoneFile(ctx context.Context, zoneID, fileName string) error
- func (c *CDNServiceHandler) GetPullZone(ctx context.Context, zoneID string) (*CDNZone, *http.Response, error)
- func (c *CDNServiceHandler) GetPushZone(ctx context.Context, zoneID string) (*CDNZone, *http.Response, error)
- func (c *CDNServiceHandler) GetPushZoneFile(ctx context.Context, zoneID, fileName string) (*CDNZoneFile, *http.Response, error)
- func (c *CDNServiceHandler) ListPullZones(ctx context.Context) ([]CDNZone, *Meta, *http.Response, error)
- func (c *CDNServiceHandler) ListPushZoneFiles(ctx context.Context, zoneID string) (*CDNZoneFileData, *http.Response, error)
- func (c *CDNServiceHandler) ListPushZones(ctx context.Context) ([]CDNZone, *Meta, *http.Response, error)
- func (c *CDNServiceHandler) PurgePullZone(ctx context.Context, zoneID string) error
- func (c *CDNServiceHandler) UpdatePullZone(ctx context.Context, zoneID string, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
- func (c *CDNServiceHandler) UpdatePushZone(ctx context.Context, zoneID string, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
- type CDNZone
- type CDNZoneEndpoint
- type CDNZoneEndpointInputs
- type CDNZoneEndpointReq
- type CDNZoneFile
- type CDNZoneFileData
- type CDNZoneReq
- type Client
- func (c *Client) DoWithContext(ctx context.Context, r *http.Request, data interface{}) (*http.Response, error)
- func (c *Client) NewRequest(ctx context.Context, method, uri string, body interface{}) (*http.Request, error)
- func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
- func (c *Client) SetBaseURL(baseURL string) error
- func (c *Client) SetRateLimit(t time.Duration)
- func (c *Client) SetRetryLimit(n int)
- func (c *Client) SetUserAgent(ua string)
- type Cluster
- type ClusterReq
- type ClusterReqUpdate
- type ClusterUpgradeReq
- type ContainerRegistry
- type ContainerRegistryDockerCredentials
- type ContainerRegistryMetadata
- type ContainerRegistryPlan
- type ContainerRegistryPlanTypes
- type ContainerRegistryPlans
- type ContainerRegistryRegion
- type ContainerRegistryRegionDataCenter
- type ContainerRegistryRepo
- type ContainerRegistryRepoUpdateReq
- type ContainerRegistryReq
- type ContainerRegistryService
- type ContainerRegistryServiceHandler
- func (h *ContainerRegistryServiceHandler) Create(ctx context.Context, createReq *ContainerRegistryReq) (*ContainerRegistry, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) CreateDockerCredentials(ctx context.Context, vcrID string, createOptions *DockerCredentialsOpt) (*ContainerRegistryDockerCredentials, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) Delete(ctx context.Context, vcrID string) error
- func (h *ContainerRegistryServiceHandler) DeleteRepository(ctx context.Context, vcrID, imageName string) error
- func (h *ContainerRegistryServiceHandler) Get(ctx context.Context, id string) (*ContainerRegistry, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) GetRepository(ctx context.Context, vcrID, imageName string) (*ContainerRegistryRepo, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) List(ctx context.Context, options *ListOptions) ([]ContainerRegistry, *Meta, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) ListPlans(ctx context.Context) (*ContainerRegistryPlans, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) ListRegions(ctx context.Context) ([]ContainerRegistryRegion, *Meta, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) ListRepositories(ctx context.Context, vcrID string, options *ListOptions) ([]ContainerRegistryRepo, *Meta, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) Update(ctx context.Context, vcrID string, updateReq *ContainerRegistryUpdateReq) (*ContainerRegistry, *http.Response, error)
- func (h *ContainerRegistryServiceHandler) UpdateRepository(ctx context.Context, vcrID, imageName string, ...) (*ContainerRegistryRepo, *http.Response, error)
- type ContainerRegistryStorage
- type ContainerRegistryStorageCount
- type ContainerRegistrySubscription
- type ContainerRegistrySubscriptionBilling
- type ContainerRegistryUpdateReq
- type ContainerRegistryUser
- type DBListOptions
- type DBPlanListOptions
- type Database
- type DatabaseAddReplicaReq
- type DatabaseAdvancedOptions
- type DatabaseAlert
- type DatabaseAvailableConnector
- type DatabaseAvailableVersions
- type DatabaseBackup
- type DatabaseBackupRestoreReq
- type DatabaseBackups
- type DatabaseCPUUsage
- type DatabaseConnectionPool
- type DatabaseConnectionPoolCreateReq
- type DatabaseConnectionPoolUpdateReq
- type DatabaseConnections
- type DatabaseConnector
- type DatabaseConnectorConfigurationOption
- type DatabaseConnectorCreateReq
- type DatabaseConnectorStatus
- type DatabaseConnectorTask
- type DatabaseConnectorUpdateReq
- type DatabaseCreateReq
- type DatabaseCredentials
- type DatabaseDB
- type DatabaseDBCreateReq
- type DatabaseDiskUsage
- type DatabaseForkReq
- type DatabaseKafkaConnectAdvancedOptions
- type DatabaseKafkaRESTAdvancedOptions
- type DatabaseListAlertsReq
- type DatabaseMemoryUsage
- type DatabaseMigration
- type DatabaseMigrationStartReq
- type DatabasePlan
- type DatabaseQuota
- type DatabaseQuotaCreateReq
- type DatabaseQuotaUpdateReq
- type DatabaseSchemaRegistryAdvancedOptions
- type DatabaseService
- type DatabaseServiceHandler
- func (d *DatabaseServiceHandler) AddReadOnlyReplica(ctx context.Context, databaseID string, ...) (*Database, *http.Response, error)
- func (d *DatabaseServiceHandler) Create(ctx context.Context, databaseReq *DatabaseCreateReq) (*Database, *http.Response, error)
- func (d *DatabaseServiceHandler) CreateConnectionPool(ctx context.Context, databaseID string, ...) (*DatabaseConnectionPool, *http.Response, error)
- func (d *DatabaseServiceHandler) CreateConnector(ctx context.Context, databaseID string, ...) (*DatabaseConnector, *http.Response, error)
- func (d *DatabaseServiceHandler) CreateDB(ctx context.Context, databaseID string, databaseDBReq *DatabaseDBCreateReq) (*DatabaseDB, *http.Response, error)
- func (d *DatabaseServiceHandler) CreateQuota(ctx context.Context, databaseID string, ...) (*DatabaseQuota, *http.Response, error)
- func (d *DatabaseServiceHandler) CreateTopic(ctx context.Context, databaseID string, ...) (*DatabaseTopic, *http.Response, error)
- func (d *DatabaseServiceHandler) CreateUser(ctx context.Context, databaseID string, databaseUserReq *DatabaseUserCreateReq) (*DatabaseUser, *http.Response, error)
- func (d *DatabaseServiceHandler) Delete(ctx context.Context, databaseID string) error
- func (d *DatabaseServiceHandler) DeleteConnectionPool(ctx context.Context, databaseID, poolName string) error
- func (d *DatabaseServiceHandler) DeleteConnector(ctx context.Context, databaseID, connectorName string) error
- func (d *DatabaseServiceHandler) DeleteDB(ctx context.Context, databaseID, dbname string) error
- func (d *DatabaseServiceHandler) DeleteQuota(ctx context.Context, databaseID, clientID, username string) error
- func (d *DatabaseServiceHandler) DeleteTopic(ctx context.Context, databaseID, topicName string) error
- func (d *DatabaseServiceHandler) DeleteUser(ctx context.Context, databaseID, username string) error
- func (d *DatabaseServiceHandler) DetachMigration(ctx context.Context, databaseID string) error
- func (d *DatabaseServiceHandler) Fork(ctx context.Context, databaseID string, databaseForkReq *DatabaseForkReq) (*Database, *http.Response, error)
- func (d *DatabaseServiceHandler) Get(ctx context.Context, databaseID string) (*Database, *http.Response, error)
- func (d *DatabaseServiceHandler) GetBackupInformation(ctx context.Context, databaseID string) (*DatabaseBackups, *http.Response, error)
- func (d *DatabaseServiceHandler) GetConnectionPool(ctx context.Context, databaseID, poolName string) (*DatabaseConnectionPool, *http.Response, error)
- func (d *DatabaseServiceHandler) GetConnector(ctx context.Context, databaseID, connectorName string) (*DatabaseConnector, *http.Response, error)
- func (d *DatabaseServiceHandler) GetConnectorConfigurationSchema(ctx context.Context, databaseID, connectorClass string) ([]DatabaseConnectorConfigurationOption, *http.Response, error)
- func (d *DatabaseServiceHandler) GetConnectorStatus(ctx context.Context, databaseID, connectorName string) (*DatabaseConnectorStatus, *http.Response, error)
- func (d *DatabaseServiceHandler) GetDB(ctx context.Context, databaseID, dbname string) (*DatabaseDB, *http.Response, error)
- func (d *DatabaseServiceHandler) GetMigrationStatus(ctx context.Context, databaseID string) (*DatabaseMigration, *http.Response, error)
- func (d *DatabaseServiceHandler) GetQuota(ctx context.Context, databaseID, clientID, username string) (*DatabaseQuota, *http.Response, error)
- func (d *DatabaseServiceHandler) GetTopic(ctx context.Context, databaseID, topicName string) (*DatabaseTopic, *http.Response, error)
- func (d *DatabaseServiceHandler) GetUsage(ctx context.Context, databaseID string) (*DatabaseUsage, *http.Response, error)
- func (d *DatabaseServiceHandler) GetUser(ctx context.Context, databaseID, username string) (*DatabaseUser, *http.Response, error)
- func (d *DatabaseServiceHandler) List(ctx context.Context, options *DBListOptions) ([]Database, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) ListAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseAdvancedOptions, []AvailableOption, *http.Response, error)
- func (d *DatabaseServiceHandler) ListAvailableConnectors(ctx context.Context, databaseID string) ([]DatabaseAvailableConnector, *http.Response, error)
- func (d *DatabaseServiceHandler) ListAvailableVersions(ctx context.Context, databaseID string) ([]string, *http.Response, error)
- func (d *DatabaseServiceHandler) ListConnectionPools(ctx context.Context, databaseID string) (*DatabaseConnections, []DatabaseConnectionPool, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) ListConnectors(ctx context.Context, databaseID string) ([]DatabaseConnector, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) ListDBs(ctx context.Context, databaseID string) ([]DatabaseDB, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) ListKafkaConnectAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseKafkaConnectAdvancedOptions, []AvailableOption, *http.Response, error)
- func (d *DatabaseServiceHandler) ListKafkaRESTAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseKafkaRESTAdvancedOptions, []AvailableOption, *http.Response, error)
- func (d *DatabaseServiceHandler) ListMaintenanceUpdates(ctx context.Context, databaseID string) ([]string, *http.Response, error)
- func (d *DatabaseServiceHandler) ListPlans(ctx context.Context, options *DBPlanListOptions) ([]DatabasePlan, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) ListQuotas(ctx context.Context, databaseID string) ([]DatabaseQuota, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) ListSchemaRegistryAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseSchemaRegistryAdvancedOptions, []AvailableOption, *http.Response, ...)
- func (d *DatabaseServiceHandler) ListServiceAlerts(ctx context.Context, databaseID string, ...) ([]DatabaseAlert, *http.Response, error)
- func (d *DatabaseServiceHandler) ListTopics(ctx context.Context, databaseID string) ([]DatabaseTopic, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) ListUsers(ctx context.Context, databaseID string) ([]DatabaseUser, *Meta, *http.Response, error)
- func (d *DatabaseServiceHandler) PauseConnector(ctx context.Context, databaseID, connectorName string) error
- func (d *DatabaseServiceHandler) PromoteReadReplica(ctx context.Context, databaseID string) error
- func (d *DatabaseServiceHandler) RestartConnector(ctx context.Context, databaseID, connectorName string) error
- func (d *DatabaseServiceHandler) RestartConnectorTask(ctx context.Context, databaseID, connectorName string, taskID int) error
- func (d *DatabaseServiceHandler) RestoreFromBackup(ctx context.Context, databaseID string, ...) (*Database, *http.Response, error)
- func (d *DatabaseServiceHandler) ResumeConnector(ctx context.Context, databaseID, connectorName string) error
- func (d *DatabaseServiceHandler) StartMaintenance(ctx context.Context, databaseID string) (string, *http.Response, error)
- func (d *DatabaseServiceHandler) StartMigration(ctx context.Context, databaseID string, ...) (*DatabaseMigration, *http.Response, error)
- func (d *DatabaseServiceHandler) StartVersionUpgrade(ctx context.Context, databaseID string, ...) (string, *http.Response, error)
- func (d *DatabaseServiceHandler) Update(ctx context.Context, databaseID string, databaseReq *DatabaseUpdateReq) (*Database, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateAdvancedOptions(ctx context.Context, databaseID string, ...) (*DatabaseAdvancedOptions, []AvailableOption, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateConnectionPool(ctx context.Context, databaseID, poolName string, ...) (*DatabaseConnectionPool, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateConnector(ctx context.Context, databaseID, connectorName string, ...) (*DatabaseConnector, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateKafkaConnectAdvancedOptions(ctx context.Context, databaseID string, ...) (*DatabaseKafkaConnectAdvancedOptions, []AvailableOption, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateKafkaRESTAdvancedOptions(ctx context.Context, databaseID string, ...) (*DatabaseKafkaRESTAdvancedOptions, []AvailableOption, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateQuota(ctx context.Context, databaseID, clientID, username string, ...) (*DatabaseQuota, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateSchemaRegistryAdvancedOptions(ctx context.Context, databaseID string, ...) (*DatabaseSchemaRegistryAdvancedOptions, []AvailableOption, *http.Response, ...)
- func (d *DatabaseServiceHandler) UpdateTopic(ctx context.Context, databaseID, topicName string, ...) (*DatabaseTopic, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateUser(ctx context.Context, databaseID, username string, ...) (*DatabaseUser, *http.Response, error)
- func (d *DatabaseServiceHandler) UpdateUserACL(ctx context.Context, databaseID, username string, ...) (*DatabaseUser, *http.Response, error)
- type DatabaseTopic
- type DatabaseTopicCreateReq
- type DatabaseTopicUpdateReq
- type DatabaseUpdateReq
- type DatabaseUsage
- type DatabaseUser
- type DatabaseUserACL
- type DatabaseUserACLReq
- type DatabaseUserCreateReq
- type DatabaseUserUpdateReq
- type DatabaseVersionUpgradeReq
- type DockerCredentialsOpt
- type Domain
- type DomainRecord
- type DomainRecordReq
- type DomainRecordService
- type DomainRecordsServiceHandler
- func (d *DomainRecordsServiceHandler) Create(ctx context.Context, domain string, domainRecordReq *DomainRecordReq) (*DomainRecord, *http.Response, error)
- func (d *DomainRecordsServiceHandler) Delete(ctx context.Context, domain, recordID string) error
- func (d *DomainRecordsServiceHandler) Get(ctx context.Context, domain, recordID string) (*DomainRecord, *http.Response, error)
- func (d *DomainRecordsServiceHandler) List(ctx context.Context, domain string, options *ListOptions) ([]DomainRecord, *Meta, *http.Response, error)
- func (d *DomainRecordsServiceHandler) Update(ctx context.Context, domain, recordID string, domainRecordReq *DomainRecordReq) error
- type DomainReq
- type DomainService
- type DomainServiceHandler
- func (d *DomainServiceHandler) Create(ctx context.Context, domainReq *DomainReq) (*Domain, *http.Response, error)
- func (d *DomainServiceHandler) Delete(ctx context.Context, domain string) error
- func (d *DomainServiceHandler) Get(ctx context.Context, domain string) (*Domain, *http.Response, error)
- func (d *DomainServiceHandler) GetDNSSec(ctx context.Context, domain string) ([]string, *http.Response, error)
- func (d *DomainServiceHandler) GetSoa(ctx context.Context, domain string) (*Soa, *http.Response, error)
- func (d *DomainServiceHandler) List(ctx context.Context, options *ListOptions) ([]Domain, *Meta, *http.Response, error)
- func (d *DomainServiceHandler) Update(ctx context.Context, domain, dnsSec string) error
- func (d *DomainServiceHandler) UpdateSoa(ctx context.Context, domain string, soaReq *Soa) error
- type FerretDBCredentials
- type FireWallGroupServiceHandler
- func (f *FireWallGroupServiceHandler) Create(ctx context.Context, fwGroupReq *FirewallGroupReq) (*FirewallGroup, *http.Response, error)
- func (f *FireWallGroupServiceHandler) Delete(ctx context.Context, fwGroupID string) error
- func (f *FireWallGroupServiceHandler) Get(ctx context.Context, fwGroupID string) (*FirewallGroup, *http.Response, error)
- func (f *FireWallGroupServiceHandler) List(ctx context.Context, options *ListOptions) ([]FirewallGroup, *Meta, *http.Response, error)
- func (f *FireWallGroupServiceHandler) Update(ctx context.Context, fwGroupID string, fwGroupReq *FirewallGroupReq) error
- type FireWallRuleService
- type FireWallRuleServiceHandler
- func (f *FireWallRuleServiceHandler) Create(ctx context.Context, fwGroupID string, fwRuleReq *FirewallRuleReq) (*FirewallRule, *http.Response, error)
- func (f *FireWallRuleServiceHandler) Delete(ctx context.Context, fwGroupID string, fwRuleID int) error
- func (f *FireWallRuleServiceHandler) Get(ctx context.Context, fwGroupID string, fwRuleID int) (*FirewallRule, *http.Response, error)
- func (f *FireWallRuleServiceHandler) List(ctx context.Context, fwGroupID string, options *ListOptions) ([]FirewallRule, *Meta, *http.Response, error)
- type FirewallGroup
- type FirewallGroupReq
- type FirewallGroupService
- type FirewallRule
- type FirewallRuleReq
- type ForwardingRule
- type ForwardingRules
- type GenericInfo
- type HealthCheck
- type History
- type IPv4
- type IPv6
- type ISO
- type ISOReq
- type ISOService
- type ISOServiceHandler
- func (i *ISOServiceHandler) Create(ctx context.Context, isoReq *ISOReq) (*ISO, *http.Response, error)
- func (i *ISOServiceHandler) Delete(ctx context.Context, isoID string) error
- func (i *ISOServiceHandler) Get(ctx context.Context, isoID string) (*ISO, *http.Response, error)
- func (i *ISOServiceHandler) List(ctx context.Context, options *ListOptions) ([]ISO, *Meta, *http.Response, error)
- func (i *ISOServiceHandler) ListPublic(ctx context.Context, options *ListOptions) ([]PublicISO, *Meta, *http.Response, error)
- type Inference
- type InferenceAudioUsage
- type InferenceChatUsage
- type InferenceCreateUpdateReq
- type InferenceService
- type InferenceServiceHandler
- func (d *InferenceServiceHandler) Create(ctx context.Context, inferenceReq *InferenceCreateUpdateReq) (*Inference, *http.Response, error)
- func (d *InferenceServiceHandler) Delete(ctx context.Context, inferenceID string) error
- func (d *InferenceServiceHandler) Get(ctx context.Context, inferenceID string) (*Inference, *http.Response, error)
- func (d *InferenceServiceHandler) GetUsage(ctx context.Context, inferenceID string) (*InferenceUsage, *http.Response, error)
- func (d *InferenceServiceHandler) List(ctx context.Context) ([]Inference, *http.Response, error)
- func (d *InferenceServiceHandler) Update(ctx context.Context, inferenceID string, ...) (*Inference, *http.Response, error)
- type InferenceUsage
- type Instance
- type InstanceCreateReq
- type InstanceList
- type InstanceService
- type InstanceServiceHandler
- func (i *InstanceServiceHandler) AttachISO(ctx context.Context, instanceID, isoID string) (*http.Response, error)
- func (i *InstanceServiceHandler) AttachVPC(ctx context.Context, instanceID, vpcID string) error
- func (i *InstanceServiceHandler) AttachVPC2(ctx context.Context, instanceID string, vpc2Req *AttachVPC2Req) error
- func (i *InstanceServiceHandler) Create(ctx context.Context, instanceReq *InstanceCreateReq) (*Instance, *http.Response, error)
- func (i *InstanceServiceHandler) CreateIPv4(ctx context.Context, instanceID string, reboot *bool) (*IPv4, *http.Response, error)
- func (i *InstanceServiceHandler) CreateReverseIPv4(ctx context.Context, instanceID string, reverseReq *ReverseIP) error
- func (i *InstanceServiceHandler) CreateReverseIPv6(ctx context.Context, instanceID string, reverseReq *ReverseIP) error
- func (i *InstanceServiceHandler) DefaultReverseIPv4(ctx context.Context, instanceID, ip string) error
- func (i *InstanceServiceHandler) Delete(ctx context.Context, instanceID string) error
- func (i *InstanceServiceHandler) DeleteIPv4(ctx context.Context, instanceID, ip string) error
- func (i *InstanceServiceHandler) DeleteReverseIPv6(ctx context.Context, instanceID, ip string) error
- func (i *InstanceServiceHandler) DetachISO(ctx context.Context, instanceID string) (*http.Response, error)
- func (i *InstanceServiceHandler) DetachVPC(ctx context.Context, instanceID, vpcID string) error
- func (i *InstanceServiceHandler) DetachVPC2(ctx context.Context, instanceID, vpcID string) error
- func (i *InstanceServiceHandler) Get(ctx context.Context, instanceID string) (*Instance, *http.Response, error)
- func (i *InstanceServiceHandler) GetBackupSchedule(ctx context.Context, instanceID string) (*BackupSchedule, *http.Response, error)
- func (i *InstanceServiceHandler) GetBandwidth(ctx context.Context, instanceID string) (*Bandwidth, *http.Response, error)
- func (i *InstanceServiceHandler) GetNeighbors(ctx context.Context, instanceID string) (*Neighbors, *http.Response, error)
- func (i *InstanceServiceHandler) GetUpgrades(ctx context.Context, instanceID string) (*Upgrades, *http.Response, error)
- func (i *InstanceServiceHandler) GetUserData(ctx context.Context, instanceID string) (*UserData, *http.Response, error)
- func (i *InstanceServiceHandler) Halt(ctx context.Context, instanceID string) error
- func (i *InstanceServiceHandler) ISOStatus(ctx context.Context, instanceID string) (*Iso, *http.Response, error)
- func (i *InstanceServiceHandler) List(ctx context.Context, options *ListOptions) ([]Instance, *Meta, *http.Response, error)
- func (i *InstanceServiceHandler) ListIPv4(ctx context.Context, instanceID string, options *ListOptions) ([]IPv4, *Meta, *http.Response, error)
- func (i *InstanceServiceHandler) ListIPv6(ctx context.Context, instanceID string, options *ListOptions) ([]IPv6, *Meta, *http.Response, error)
- func (i *InstanceServiceHandler) ListReverseIPv6(ctx context.Context, instanceID string) ([]ReverseIP, *http.Response, error)
- func (i *InstanceServiceHandler) ListVPC2Info(ctx context.Context, instanceID string, options *ListOptions) ([]VPC2Info, *Meta, *http.Response, error)
- func (i *InstanceServiceHandler) ListVPCInfo(ctx context.Context, instanceID string, options *ListOptions) ([]VPCInfo, *Meta, *http.Response, error)
- func (i *InstanceServiceHandler) MassHalt(ctx context.Context, instanceList []string) error
- func (i *InstanceServiceHandler) MassReboot(ctx context.Context, instanceList []string) error
- func (i *InstanceServiceHandler) MassStart(ctx context.Context, instanceList []string) error
- func (i *InstanceServiceHandler) Reboot(ctx context.Context, instanceID string) error
- func (i *InstanceServiceHandler) Reinstall(ctx context.Context, instanceID string, reinstallReq *ReinstallReq) (*Instance, *http.Response, error)
- func (i *InstanceServiceHandler) Restore(ctx context.Context, instanceID string, restoreReq *RestoreReq) (*http.Response, error)
- func (i *InstanceServiceHandler) SetBackupSchedule(ctx context.Context, instanceID string, backup *BackupScheduleReq) (*http.Response, error)
- func (i *InstanceServiceHandler) Start(ctx context.Context, instanceID string) error
- func (i *InstanceServiceHandler) Update(ctx context.Context, instanceID string, instanceReq *InstanceUpdateReq) (*Instance, *http.Response, error)
- type InstanceUpdateReq
- type Invoice
- type InvoiceItem
- type Iso
- type KubeConfig
- type KubernetesHandler
- func (k *KubernetesHandler) CreateCluster(ctx context.Context, createReq *ClusterReq) (*Cluster, *http.Response, error)
- func (k *KubernetesHandler) CreateNodePool(ctx context.Context, vkeID string, nodePoolReq *NodePoolReq) (*NodePool, *http.Response, error)
- func (k *KubernetesHandler) DeleteCluster(ctx context.Context, id string) error
- func (k *KubernetesHandler) DeleteClusterWithResources(ctx context.Context, id string) error
- func (k *KubernetesHandler) DeleteNodePool(ctx context.Context, vkeID, nodePoolID string) error
- func (k *KubernetesHandler) DeleteNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
- func (k *KubernetesHandler) GetCluster(ctx context.Context, id string) (*Cluster, *http.Response, error)
- func (k *KubernetesHandler) GetKubeConfig(ctx context.Context, vkeID string) (*KubeConfig, *http.Response, error)
- func (k *KubernetesHandler) GetNodePool(ctx context.Context, vkeID, nodePoolID string) (*NodePool, *http.Response, error)
- func (k *KubernetesHandler) GetUpgrades(ctx context.Context, vkeID string) ([]string, *http.Response, error)
- func (k *KubernetesHandler) GetVersions(ctx context.Context) (*Versions, *http.Response, error)
- func (k *KubernetesHandler) ListClusters(ctx context.Context, options *ListOptions) ([]Cluster, *Meta, *http.Response, error)
- func (k *KubernetesHandler) ListNodePools(ctx context.Context, vkeID string, options *ListOptions) ([]NodePool, *Meta, *http.Response, error)
- func (k *KubernetesHandler) RecycleNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
- func (k *KubernetesHandler) UpdateCluster(ctx context.Context, vkeID string, updateReq *ClusterReqUpdate) error
- func (k *KubernetesHandler) UpdateNodePool(ctx context.Context, vkeID, nodePoolID string, updateReq *NodePoolReqUpdate) (*NodePool, *http.Response, error)
- func (k *KubernetesHandler) Upgrade(ctx context.Context, vkeID string, body *ClusterUpgradeReq) error
- type KubernetesService
- type LBFirewallRule
- type Links
- type ListOptions
- type LoadBalancer
- type LoadBalancerHandler
- func (l *LoadBalancerHandler) Create(ctx context.Context, createReq *LoadBalancerReq) (*LoadBalancer, *http.Response, error)
- func (l *LoadBalancerHandler) CreateForwardingRule(ctx context.Context, lbID string, rule *ForwardingRule) (*ForwardingRule, *http.Response, error)
- func (l *LoadBalancerHandler) Delete(ctx context.Context, lbID string) error
- func (l *LoadBalancerHandler) DeleteAutoSSL(ctx context.Context, lbID string) error
- func (l *LoadBalancerHandler) DeleteForwardingRule(ctx context.Context, lbID, ruleID string) error
- func (l *LoadBalancerHandler) DeleteSSL(ctx context.Context, lbID string) error
- func (l *LoadBalancerHandler) Get(ctx context.Context, lbID string) (*LoadBalancer, *http.Response, error)
- func (l *LoadBalancerHandler) GetFirewallRule(ctx context.Context, lbID, ruleID string) (*LBFirewallRule, *http.Response, error)
- func (l *LoadBalancerHandler) GetForwardingRule(ctx context.Context, lbID, ruleID string) (*ForwardingRule, *http.Response, error)
- func (l *LoadBalancerHandler) List(ctx context.Context, options *ListOptions) ([]LoadBalancer, *Meta, *http.Response, error)
- func (l *LoadBalancerHandler) ListFirewallRules(ctx context.Context, lbID string, options *ListOptions) ([]LBFirewallRule, *Meta, *http.Response, error)
- func (l *LoadBalancerHandler) ListForwardingRules(ctx context.Context, lbID string, options *ListOptions) ([]ForwardingRule, *Meta, *http.Response, error)
- func (l *LoadBalancerHandler) Update(ctx context.Context, lbID string, updateReq *LoadBalancerReq) error
- type LoadBalancerReq
- type LoadBalancerService
- type Log
- type LogMetadata
- type LogsMeta
- type LogsOptions
- type LogsService
- type LogsServiceHandler
- type MarketplaceAppVariable
- type MarketplaceService
- type MarketplaceServiceHandler
- type MaxConnections
- type Meta
- type Neighbors
- type Node
- type NodePool
- type NodePoolReq
- type NodePoolReqUpdate
- type OS
- type OSService
- type OSServiceHandler
- type ObjectStorage
- type ObjectStorageCluster
- type ObjectStorageReq
- type ObjectStorageService
- type ObjectStorageServiceHandler
- func (o *ObjectStorageServiceHandler) Create(ctx context.Context, objReq *ObjectStorageReq) (*ObjectStorage, *http.Response, error)
- func (o *ObjectStorageServiceHandler) Delete(ctx context.Context, id string) error
- func (o *ObjectStorageServiceHandler) Get(ctx context.Context, id string) (*ObjectStorage, *http.Response, error)
- func (o *ObjectStorageServiceHandler) List(ctx context.Context, options *ListOptions) ([]ObjectStorage, *Meta, *http.Response, error)
- func (o *ObjectStorageServiceHandler) ListCluster(ctx context.Context, options *ListOptions) ([]ObjectStorageCluster, *Meta, *http.Response, error)
- func (o *ObjectStorageServiceHandler) ListClusterTiers(ctx context.Context, clusterID int) ([]ObjectStorageTier, *http.Response, error)
- func (o *ObjectStorageServiceHandler) ListTiers(ctx context.Context) ([]ObjectStorageTier, *http.Response, error)
- func (o *ObjectStorageServiceHandler) RegenerateKeys(ctx context.Context, id string) (*S3Keys, *http.Response, error)
- func (o *ObjectStorageServiceHandler) Update(ctx context.Context, id string, objReq *ObjectStorageReq) error
- type ObjectStorageTier
- type PGExtension
- type Plan
- type PlanAvailability
- type PlanService
- type PlanServiceHandler
- type PublicISO
- type Region
- type RegionService
- type RegionServiceHandler
- type ReinstallReq
- type RequestBody
- type RequestCompletionCallback
- type ReservedIP
- type ReservedIPConvertReq
- type ReservedIPReq
- type ReservedIPService
- type ReservedIPServiceHandler
- func (r *ReservedIPServiceHandler) Attach(ctx context.Context, id, instance string) error
- func (r *ReservedIPServiceHandler) Convert(ctx context.Context, ripConvert *ReservedIPConvertReq) (*ReservedIP, *http.Response, error)
- func (r *ReservedIPServiceHandler) Create(ctx context.Context, ripCreate *ReservedIPReq) (*ReservedIP, *http.Response, error)
- func (r *ReservedIPServiceHandler) Delete(ctx context.Context, id string) error
- func (r *ReservedIPServiceHandler) Detach(ctx context.Context, id string) error
- func (r *ReservedIPServiceHandler) Get(ctx context.Context, id string) (*ReservedIP, *http.Response, error)
- func (r *ReservedIPServiceHandler) List(ctx context.Context, options *ListOptions) ([]ReservedIP, *Meta, *http.Response, error)
- func (r *ReservedIPServiceHandler) Update(ctx context.Context, id string, ripUpdate *ReservedIPUpdateReq) (*ReservedIP, *http.Response, error)
- type ReservedIPUpdateReq
- type RestoreReq
- type ReverseIP
- type S3Keys
- type SSHKey
- type SSHKeyReq
- type SSHKeyService
- type SSHKeyServiceHandler
- func (s *SSHKeyServiceHandler) Create(ctx context.Context, sshKeyReq *SSHKeyReq) (*SSHKey, *http.Response, error)
- func (s *SSHKeyServiceHandler) Delete(ctx context.Context, sshKeyID string) error
- func (s *SSHKeyServiceHandler) Get(ctx context.Context, sshKeyID string) (*SSHKey, *http.Response, error)
- func (s *SSHKeyServiceHandler) List(ctx context.Context, options *ListOptions) ([]SSHKey, *Meta, *http.Response, error)
- func (s *SSHKeyServiceHandler) Update(ctx context.Context, sshKeyID string, sshKeyReq *SSHKeyReq) error
- type SSL
- type Snapshot
- type SnapshotReq
- type SnapshotService
- type SnapshotServiceHandler
- func (s *SnapshotServiceHandler) Create(ctx context.Context, snapshotReq *SnapshotReq) (*Snapshot, *http.Response, error)
- func (s *SnapshotServiceHandler) CreateFromURL(ctx context.Context, snapshotURLReq *SnapshotURLReq) (*Snapshot, *http.Response, error)
- func (s *SnapshotServiceHandler) Delete(ctx context.Context, snapshotID string) error
- func (s *SnapshotServiceHandler) Get(ctx context.Context, snapshotID string) (*Snapshot, *http.Response, error)
- func (s *SnapshotServiceHandler) List(ctx context.Context, options *ListOptions) ([]Snapshot, *Meta, *http.Response, error)
- type SnapshotURLReq
- type Soa
- type StartupScript
- type StartupScriptReq
- type StartupScriptService
- type StartupScriptServiceHandler
- func (s *StartupScriptServiceHandler) Create(ctx context.Context, scriptReq *StartupScriptReq) (*StartupScript, *http.Response, error)
- func (s *StartupScriptServiceHandler) Delete(ctx context.Context, scriptID string) error
- func (s *StartupScriptServiceHandler) Get(ctx context.Context, scriptID string) (*StartupScript, *http.Response, error)
- func (s *StartupScriptServiceHandler) List(ctx context.Context, options *ListOptions) ([]StartupScript, *Meta, *http.Response, error)
- func (s *StartupScriptServiceHandler) Update(ctx context.Context, scriptID string, scriptReq *StartupScriptReq) error
- type StickySessions
- type SubAccount
- type SubAccountReq
- type SubAccountService
- type SubAccountServiceHandler
- type SupportedEngines
- type Taint
- type Upgrades
- type User
- type UserData
- type UserReq
- type UserService
- type UserServiceHandler
- func (u *UserServiceHandler) Create(ctx context.Context, userCreate *UserReq) (*User, *http.Response, error)
- func (u *UserServiceHandler) Delete(ctx context.Context, userID string) error
- func (u *UserServiceHandler) Get(ctx context.Context, userID string) (*User, *http.Response, error)
- func (u *UserServiceHandler) List(ctx context.Context, options *ListOptions) ([]User, *Meta, *http.Response, error)
- func (u *UserServiceHandler) Update(ctx context.Context, userID string, userReq *UserReq) error
- type VNCUrl
- type VPC
- type VPC2
- type VPC2AttachDetachReq
- type VPC2Info
- type VPC2Node
- type VPC2Req
- type VPC2Service
- type VPC2ServiceHandler
- func (n *VPC2ServiceHandler) Attach(ctx context.Context, vpcID string, attachReq *VPC2AttachDetachReq) error
- func (n *VPC2ServiceHandler) Create(ctx context.Context, createReq *VPC2Req) (*VPC2, *http.Response, error)
- func (n *VPC2ServiceHandler) Delete(ctx context.Context, vpcID string) error
- func (n *VPC2ServiceHandler) Detach(ctx context.Context, vpcID string, detachReq *VPC2AttachDetachReq) error
- func (n *VPC2ServiceHandler) Get(ctx context.Context, vpcID string) (*VPC2, *http.Response, error)
- func (n *VPC2ServiceHandler) List(ctx context.Context, options *ListOptions) ([]VPC2, *Meta, *http.Response, error)
- func (n *VPC2ServiceHandler) ListNodes(ctx context.Context, vpc2ID string, options *ListOptions) ([]VPC2Node, *Meta, *http.Response, error)
- func (n *VPC2ServiceHandler) Update(ctx context.Context, vpcID, description string) error
- type VPCInfo
- type VPCReq
- type VPCService
- type VPCServiceHandler
- func (n *VPCServiceHandler) Create(ctx context.Context, createReq *VPCReq) (*VPC, *http.Response, error)
- func (n *VPCServiceHandler) Delete(ctx context.Context, vpcID string) error
- func (n *VPCServiceHandler) Get(ctx context.Context, vpcID string) (*VPC, *http.Response, error)
- func (n *VPCServiceHandler) List(ctx context.Context, options *ListOptions) ([]VPC, *Meta, *http.Response, error)
- func (n *VPCServiceHandler) Update(ctx context.Context, vpcID, description string) error
- type Versions
- type VirtualFileSystemStorage
- type VirtualFileSystemStorageAttachment
- type VirtualFileSystemStorageBilling
- type VirtualFileSystemStorageReq
- type VirtualFileSystemStorageService
- type VirtualFileSystemStorageServiceHandler
- func (f *VirtualFileSystemStorageServiceHandler) Attach(ctx context.Context, vfsID, targetID string) (*VirtualFileSystemStorageAttachment, *http.Response, error)
- func (f *VirtualFileSystemStorageServiceHandler) AttachmentGet(ctx context.Context, vfsID, targetID string) (*VirtualFileSystemStorageAttachment, *http.Response, error)
- func (f *VirtualFileSystemStorageServiceHandler) AttachmentList(ctx context.Context, vfsID string) ([]VirtualFileSystemStorageAttachment, *http.Response, error)
- func (f *VirtualFileSystemStorageServiceHandler) Create(ctx context.Context, vfsReq *VirtualFileSystemStorageReq) (*VirtualFileSystemStorage, *http.Response, error)
- func (f *VirtualFileSystemStorageServiceHandler) Delete(ctx context.Context, vfsID string) error
- func (f *VirtualFileSystemStorageServiceHandler) Detach(ctx context.Context, vfsID, targetID string) error
- func (f *VirtualFileSystemStorageServiceHandler) Get(ctx context.Context, vfsID string) (*VirtualFileSystemStorage, *http.Response, error)
- func (f *VirtualFileSystemStorageServiceHandler) List(ctx context.Context, options *ListOptions) ([]VirtualFileSystemStorage, *Meta, *http.Response, error)
- func (f *VirtualFileSystemStorageServiceHandler) Update(ctx context.Context, vfsID string, ...) (*VirtualFileSystemStorage, *http.Response, error)
- type VirtualFileSystemStorageSize
- type VirtualFileSystemStorageUpdateReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToBoolPtr ¶
BoolToBoolPtr helper function that returns a pointer from your bool value
func IntToIntPtr ¶
IntToIntPtr helper function that returns a pointer from your string value
func StringToStringPtr ¶
StringToStringPtr helper function that returns a pointer from your string value
Types ¶
type Account ¶
type Account struct {
Balance float32 `json:"balance"`
PendingCharges float32 `json:"pending_charges"`
LastPaymentDate string `json:"last_payment_date"`
LastPaymentAmount float32 `json:"last_payment_amount"`
Name string `json:"name"`
Email string `json:"email"`
ACL []string `json:"acls"`
}
Account represents a Vultr account
type AccountBandwidth ¶
type AccountBandwidth struct {
PreviousMonth AccountBandwidthPeriod `json:"previous_month"`
CurrentMonthToDate AccountBandwidthPeriod `json:"current_month_to_date"`
CurrentMonthProjected AccountBandwidthPeriod `json:"current_month_projected"`
}
Bandwidth represents a Vultr account bandwidth
type AccountBandwidthPeriod ¶
type AccountBandwidthPeriod struct {
TimestampStart string `json:"timestamp_start"`
TimestampEnd string `json:"timestamp_end"`
GBIn int `json:"gb_in"`
GBOut int `json:"gb_out"`
TotalInstanceHours int `json:"total_instance_hours"`
TotalInstanceCount int `json:"total_instance_count"`
InstanceBandwidthCredits int `json:"instance_bandwidth_credits"`
FreeBandwidthCredits int `json:"free_bandwidth_credits"`
PurchasedBandwidthCredits int `json:"purchased_bandwidth_credits"`
Overage float32 `json:"overage"`
OverageUnitCost float32 `json:"overage_unit_cost"`
OverageCost float32 `json:"overage_cost"`
}
AccountBandwidthPeriod represents a Vultr account bandwidth period
type AccountService ¶
type AccountService interface {
Get(ctx context.Context) (*Account, *http.Response, error)
GetBandwidth(ctx context.Context) (*AccountBandwidth, *http.Response, error)
}
AccountService is the interface to interact with Accounts endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/account
type AccountServiceHandler ¶
type AccountServiceHandler struct {
// contains filtered or unexported fields
}
AccountServiceHandler handles interaction with the account methods for the Vultr API
func (*AccountServiceHandler) GetBandwidth ¶
func (a *AccountServiceHandler) GetBandwidth(ctx context.Context) (*AccountBandwidth, *http.Response, error)
Get Vultr account bandwidth info
type Application ¶
type Application struct {
ID int `json:"id"`
Name string `json:"name"`
ShortName string `json:"short_name"`
DeployName string `json:"deploy_name"`
Type string `json:"type"`
Vendor string `json:"vendor"`
ImageID string `json:"image_id"`
}
Application represents all available apps that can be used to deployed with vultr Instances.
type ApplicationService ¶
type ApplicationService interface {
List(ctx context.Context, options *ListOptions) ([]Application, *Meta, *http.Response, error)
}
ApplicationService is the interface to interact with the Application endpoint on the Vultr API. Link : https://www.vultr.com/api/#tag/application
type ApplicationServiceHandler ¶
type ApplicationServiceHandler struct {
// contains filtered or unexported fields
}
ApplicationServiceHandler handles interaction with the application methods for the Vultr API.
func (*ApplicationServiceHandler) List ¶
func (a *ApplicationServiceHandler) List(ctx context.Context, options *ListOptions) ([]Application, *Meta, *http.Response, error)
List retrieves a list of available applications that can be launched when creating a Vultr instance
type AttachVPC2Req ¶
type AttachVPC2Req struct {
VPCID string `json:"vpc_id,omitempty"`
IPAddress *string `json:"ip_address,omitempty"`
}
AttachVPC2Req parameters for attaching a VPC 2.0 network Deprecated: VPC2 is no longer supported
type AutoSSL ¶
type AutoSSL struct {
DomainZone string `json:"domain_zone"`
DomainSub string `json:"domain_sub,omitempty"`
Domain string `json:"domain,omitempty"`
}
AutoSSL represents valid AutoSSL config
type AvailableOption ¶
type AvailableOption struct {
Name string `json:"name"`
Type string `json:"type"`
Enumerals []string `json:"enumerals,omitempty"`
MinValue *float32 `json:"min_value,omitempty"`
MaxValue *float32 `json:"max_value,omitempty"`
AltValues []int `json:"alt_values,omitempty"`
Units string `json:"units,omitempty"`
}
AvailableOption represents an available advanced configuration option for a Managed Database cluster
type BMBareMetalBase ¶
type BMBareMetalBase struct {
BareMetalBandwidth map[string]BareMetalServerBandwidth `json:"bandwidth"`
}
BMBareMetalBase represents the base struct for a Bare Metal server
type Backup ¶
type Backup struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
Description string `json:"description"`
Size int `json:"size"`
Status string `json:"status"`
}
Backup represents a Vultr backup
type BackupSchedule ¶
type BackupSchedule struct {
Enabled *bool `json:"enabled,omitempty"`
Type string `json:"type,omitempty"`
NextScheduleTimeUTC string `json:"next_scheduled_time_utc,omitempty"`
Hour int `json:"hour,omitempty"`
Dow int `json:"dow,omitempty"`
Dom int `json:"dom,omitempty"`
}
BackupSchedule information for a given instance.
type BackupScheduleReq ¶
type BackupScheduleReq struct {
Type string `json:"type"`
Hour *int `json:"hour,omitempty"`
Dow *int `json:"dow,omitempty"`
Dom int `json:"dom,omitempty"`
}
BackupScheduleReq struct used to create a backup schedule for an instance.
type BackupService ¶
type BackupService interface {
Get(ctx context.Context, backupID string) (*Backup, *http.Response, error)
List(ctx context.Context, options *ListOptions) ([]Backup, *Meta, *http.Response, error)
}
BackupService is the interface to interact with the backup endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/backup
type BackupServiceHandler ¶
type BackupServiceHandler struct {
// contains filtered or unexported fields
}
BackupServiceHandler handles interaction with the backup methods for the Vultr API
type Bandwidth ¶
type Bandwidth struct {
Bandwidth map[string]struct {
IncomingBytes int `json:"incoming_bytes"`
OutgoingBytes int `json:"outgoing_bytes"`
} `json:"bandwidth"`
}
Bandwidth used on a given instance.
type BareMetalCreate ¶
type BareMetalCreate struct {
Region string `json:"region"`
Plan string `json:"plan"`
OsID int `json:"os_id,omitempty"`
StartupScriptID string `json:"script_id,omitempty"`
SnapshotID string `json:"snapshot_id,omitempty"`
EnableIPv6 *bool `json:"enable_ipv6,omitempty"`
Label string `json:"label,omitempty"`
SSHKeyIDs []string `json:"sshkey_id,omitempty"`
AppID int `json:"app_id,omitempty"`
ImageID string `json:"image_id,omitempty"`
UserData string `json:"user_data,omitempty"`
ActivationEmail *bool `json:"activation_email,omitempty"`
Hostname string `json:"hostname,omitempty"`
MdiskMode string `json:"mdisk_mode,omitempty"`
ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
PersistentPxe *bool `json:"persistent_pxe,omitempty"`
IPXEChainURL string `json:"ipxe_chain_url,omitempty"`
Tags []string `json:"tags,omitempty"`
UserScheme string `json:"user_scheme,omitempty"`
// Deprecated: VPC2 is no longer supported
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
// Deprecated: VPC2 is no longer supported
DetachVPC2 []string `json:"detach_vpc2,omitempty"`
// Deprecated: VPC2 is no longer supported
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
AppVariables map[string]string `json:"app_variables,omitempty"`
}
BareMetalCreate represents the optional parameters that can be set when creating a Bare Metal server
type BareMetalPlan ¶
type BareMetalPlan struct {
ID string `json:"id"`
CPUCount int `json:"cpu_count"`
CPUModel string `json:"cpu_model"`
CPUThreads int `json:"cpu_threads"`
RAM int `json:"ram"`
Disk int `json:"disk"`
DiskCount int `json:"disk_count"`
Bandwidth int `json:"bandwidth"`
MonthlyCost float32 `json:"monthly_cost"`
Type string `json:"type"`
Locations []string `json:"locations"`
}
BareMetalPlan represents bare metal plans
type BareMetalServer ¶
type BareMetalServer struct {
ID string `json:"id"`
Os string `json:"os"`
RAM string `json:"ram"`
Disk string `json:"disk"`
MainIP string `json:"main_ip"`
CPUCount int `json:"cpu_count"`
Region string `json:"region"`
DefaultPassword string `json:"default_password"`
DateCreated string `json:"date_created"`
Status string `json:"status"`
NetmaskV4 string `json:"netmask_v4"`
GatewayV4 string `json:"gateway_v4"`
Plan string `json:"plan"`
V6Network string `json:"v6_network"`
V6MainIP string `json:"v6_main_ip"`
V6NetworkSize int `json:"v6_network_size"`
MacAddress int `json:"mac_address"`
Label string `json:"label"`
OsID int `json:"os_id"`
AppID int `json:"app_id"`
ImageID string `json:"image_id"`
SnapshotID string `json:"snapshot_id"`
Features []string `json:"features"`
Tags []string `json:"tags"`
UserScheme string `json:"user_scheme"`
}
BareMetalServer represents a Bare Metal server on Vultr
type BareMetalServerBandwidth ¶
type BareMetalServerBandwidth struct {
IncomingBytes int `json:"incoming_bytes"`
OutgoingBytes int `json:"outgoing_bytes"`
}
BareMetalServerBandwidth represents bandwidth information for a Bare Metal server
type BareMetalServerService ¶
type BareMetalServerService interface {
Create(ctx context.Context, bmCreate *BareMetalCreate) (*BareMetalServer, *http.Response, error)
Get(ctx context.Context, serverID string) (*BareMetalServer, *http.Response, error)
Update(ctx context.Context, serverID string, bmReq *BareMetalUpdate) (*BareMetalServer, *http.Response, error)
Delete(ctx context.Context, serverID string) error
List(ctx context.Context, options *ListOptions) ([]BareMetalServer, *Meta, *http.Response, error)
GetBandwidth(ctx context.Context, serverID string) (*Bandwidth, *http.Response, error)
GetUserData(ctx context.Context, serverID string) (*UserData, *http.Response, error)
GetVNCUrl(ctx context.Context, serverID string) (*VNCUrl, *http.Response, error)
ListIPv4s(ctx context.Context, serverID string, options *ListOptions) ([]IPv4, *Meta, *http.Response, error)
ListIPv6s(ctx context.Context, serverID string, options *ListOptions) ([]IPv6, *Meta, *http.Response, error)
Halt(ctx context.Context, serverID string) error
Reboot(ctx context.Context, serverID string) error
Start(ctx context.Context, serverID string) error
Reinstall(ctx context.Context, serverID string) (*BareMetalServer, *http.Response, error)
MassStart(ctx context.Context, serverList []string) error
MassHalt(ctx context.Context, serverList []string) error
MassReboot(ctx context.Context, serverList []string) error
GetUpgrades(ctx context.Context, serverID string) (*Upgrades, *http.Response, error)
ListVPCInfo(ctx context.Context, serverID string) ([]VPCInfo, *http.Response, error)
AttachVPC(ctx context.Context, serverID, vpcID string) error
DetachVPC(ctx context.Context, serverID, vpcID string) error
// Deprecated: VPC2 is no longer supported
ListVPC2Info(ctx context.Context, serverID string) ([]VPC2Info, *http.Response, error)
// Deprecated: VPC2 is no longer supported
AttachVPC2(ctx context.Context, serverID string, vpc2Req *AttachVPC2Req) error
// Deprecated: VPC2 is no longer supported
DetachVPC2(ctx context.Context, serverID, vpcID string) error
}
BareMetalServerService is the interface to interact with the Bare Metal endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/baremetal
type BareMetalServerServiceHandler ¶
type BareMetalServerServiceHandler struct {
// contains filtered or unexported fields
}
BareMetalServerServiceHandler handles interaction with the Bare Metal methods for the Vultr API
func (*BareMetalServerServiceHandler) AttachVPC ¶
func (b *BareMetalServerServiceHandler) AttachVPC(ctx context.Context, serverID, vpcID string) error
AttachVPC serves to attach a VPC to a bare metal server.
func (*BareMetalServerServiceHandler) AttachVPC2 ¶
func (b *BareMetalServerServiceHandler) AttachVPC2(ctx context.Context, serverID string, vpc2Req *AttachVPC2Req) error
AttachVPC2 to a Bare Metal server. Deprecated: VPC2 is no longer supported
func (*BareMetalServerServiceHandler) Create ¶
func (b *BareMetalServerServiceHandler) Create(ctx context.Context, bmCreate *BareMetalCreate) (*BareMetalServer, *http.Response, error)
Create a new Bare Metal server.
func (*BareMetalServerServiceHandler) Delete ¶
func (b *BareMetalServerServiceHandler) Delete(ctx context.Context, serverID string) error
Delete a Bare Metal server.
func (*BareMetalServerServiceHandler) DetachVPC ¶
func (b *BareMetalServerServiceHandler) DetachVPC(ctx context.Context, serverID, vpcID string) error
DetachVPC will detach a VPC from a bare metal server.
func (*BareMetalServerServiceHandler) DetachVPC2 ¶
func (b *BareMetalServerServiceHandler) DetachVPC2(ctx context.Context, serverID, vpcID string) error
DetachVPC2 from a Bare Metal server. Deprecated: VPC2 is no longer supported
func (*BareMetalServerServiceHandler) Get ¶
func (b *BareMetalServerServiceHandler) Get(ctx context.Context, serverID string) (*BareMetalServer, *http.Response, error)
Get information for a Bare Metal instance.
func (*BareMetalServerServiceHandler) GetBandwidth ¶
func (b *BareMetalServerServiceHandler) GetBandwidth(ctx context.Context, serverID string) (*Bandwidth, *http.Response, error)
GetBandwidth used by a Bare Metal server.
func (*BareMetalServerServiceHandler) GetUpgrades ¶
func (b *BareMetalServerServiceHandler) GetUpgrades(ctx context.Context, serverID string) (*Upgrades, *http.Response, error)
GetUpgrades that are available for a Bare Metal server.
func (*BareMetalServerServiceHandler) GetUserData ¶
func (b *BareMetalServerServiceHandler) GetUserData(ctx context.Context, serverID string) (*UserData, *http.Response, error)
GetUserData for a Bare Metal server. The userdata returned will be in base64 encoding.
func (*BareMetalServerServiceHandler) GetVNCUrl ¶
func (b *BareMetalServerServiceHandler) GetVNCUrl(ctx context.Context, serverID string) (*VNCUrl, *http.Response, error)
GetVNCUrl gets the vnc url for a given Bare Metal server.
func (*BareMetalServerServiceHandler) Halt ¶
func (b *BareMetalServerServiceHandler) Halt(ctx context.Context, serverID string) error
Halt a Bare Metal server. This is a hard power off, meaning that the power to the machine is severed. The data on the machine will not be modified, and you will still be billed for the machine.
func (*BareMetalServerServiceHandler) List ¶
func (b *BareMetalServerServiceHandler) List(ctx context.Context, options *ListOptions) ([]BareMetalServer, *Meta, *http.Response, error)
List all Bare Metal instances in your account.
func (*BareMetalServerServiceHandler) ListIPv4s ¶
func (b *BareMetalServerServiceHandler) ListIPv4s(ctx context.Context, serverID string, options *ListOptions) ([]IPv4, *Meta, *http.Response, error)
ListIPv4s information of a Bare Metal server. IP information is only available for Bare Metal servers in the "active" state.
func (*BareMetalServerServiceHandler) ListIPv6s ¶
func (b *BareMetalServerServiceHandler) ListIPv6s(ctx context.Context, serverID string, options *ListOptions) ([]IPv6, *Meta, *http.Response, error)
ListIPv6s information of a Bare Metal server. IP information is only available for Bare Metal servers in the "active" state. If the Bare Metal server does not have IPv6 enabled, then an empty array is returned.
func (*BareMetalServerServiceHandler) ListVPC2Info ¶
func (b *BareMetalServerServiceHandler) ListVPC2Info(ctx context.Context, serverID string) ([]VPC2Info, *http.Response, error)
ListVPC2Info currently attached to a Bare Metal server. Deprecated: VPC2 is no longer supported
func (*BareMetalServerServiceHandler) ListVPCInfo ¶
func (b *BareMetalServerServiceHandler) ListVPCInfo(ctx context.Context, serverID string) ([]VPCInfo, *http.Response, error)
ListVPCInfo will list all currently attached VPC IP information for the given bare metal server.
func (*BareMetalServerServiceHandler) MassHalt ¶
func (b *BareMetalServerServiceHandler) MassHalt(ctx context.Context, serverList []string) error
MassHalt a list of Bare Metal servers.
func (*BareMetalServerServiceHandler) MassReboot ¶
func (b *BareMetalServerServiceHandler) MassReboot(ctx context.Context, serverList []string) error
MassReboot a list of Bare Metal servers.
func (*BareMetalServerServiceHandler) MassStart ¶
func (b *BareMetalServerServiceHandler) MassStart(ctx context.Context, serverList []string) error
MassStart will start a list of Bare Metal servers the machine is already running, it will be restarted.
func (*BareMetalServerServiceHandler) Reboot ¶
func (b *BareMetalServerServiceHandler) Reboot(ctx context.Context, serverID string) error
Reboot a Bare Metal server. This is a hard reboot, which means that the server is powered off, then back on.
func (*BareMetalServerServiceHandler) Reinstall ¶
func (b *BareMetalServerServiceHandler) Reinstall(ctx context.Context, serverID string) (*BareMetalServer, *http.Response, error)
Reinstall the operating system on a Bare Metal server. All data will be permanently lost, but the IP address will remain the same.
func (*BareMetalServerServiceHandler) Start ¶
func (b *BareMetalServerServiceHandler) Start(ctx context.Context, serverID string) error
Start a Bare Metal server.
func (*BareMetalServerServiceHandler) Update ¶
func (b *BareMetalServerServiceHandler) Update(ctx context.Context, serverID string, bmReq *BareMetalUpdate) (*BareMetalServer, *http.Response, error)
Update a Bare Metal server
type BareMetalUpdate ¶
type BareMetalUpdate struct {
OsID int `json:"os_id,omitempty"`
EnableIPv6 *bool `json:"enable_ipv6,omitempty"`
Label string `json:"label,omitempty"`
AppID int `json:"app_id,omitempty"`
ImageID string `json:"image_id,omitempty"`
UserData string `json:"user_data,omitempty"`
IPXEChainURL string `json:"ipxe_chain_url,omitempty"`
MdiskMode string `json:"mdisk_mode,omitempty"`
Tags []string `json:"tags,omitempty"`
UserScheme string `json:"user_scheme,omitempty"`
// Deprecated: VPC2 is no longer supported
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
// Deprecated: VPC2 is no longer supported
DetachVPC2 []string `json:"detach_vpc2,omitempty"`
// Deprecated: VPC2 is no longer supported
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
}
BareMetalUpdate represents the optional parameters that can be set when updating a Bare Metal server
type BillingService ¶
type BillingService interface {
ListHistory(ctx context.Context, options *ListOptions) ([]History, *Meta, *http.Response, error)
ListInvoices(ctx context.Context, options *ListOptions) ([]Invoice, *Meta, *http.Response, error)
GetInvoice(ctx context.Context, invoiceID string) (*Invoice, *http.Response, error)
ListInvoiceItems(ctx context.Context, invoiceID int, options *ListOptions) ([]InvoiceItem, *Meta, *http.Response, error)
ListPendingCharges(ctx context.Context, options *ListOptions) ([]InvoiceItem, *http.Response, error)
}
BillingService is the interface to interact with the billing endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/billing
type BillingServiceHandler ¶
type BillingServiceHandler struct {
// contains filtered or unexported fields
}
BillingServiceHandler handles interaction with the billing methods for the Vultr API
func (*BillingServiceHandler) GetInvoice ¶
func (b *BillingServiceHandler) GetInvoice(ctx context.Context, invoiceID string) (*Invoice, *http.Response, error)
GetInvoice retrieves an invoice that matches the given invoiceID
func (*BillingServiceHandler) ListHistory ¶
func (b *BillingServiceHandler) ListHistory(ctx context.Context, options *ListOptions) ([]History, *Meta, *http.Response, error)
ListHistory retrieves a list of all billing history on the current account
func (*BillingServiceHandler) ListInvoiceItems ¶
func (b *BillingServiceHandler) ListInvoiceItems(ctx context.Context, invoiceID int, options *ListOptions) ([]InvoiceItem, *Meta, *http.Response, error)
ListInvoiceItems retrieves items in an invoice that matches the given invoiceID
func (*BillingServiceHandler) ListInvoices ¶
func (b *BillingServiceHandler) ListInvoices(ctx context.Context, options *ListOptions) ([]Invoice, *Meta, *http.Response, error)
ListInvoices retrieves a list of all billing invoices on the current account
func (*BillingServiceHandler) ListPendingCharges ¶
func (b *BillingServiceHandler) ListPendingCharges(ctx context.Context, options *ListOptions) ([]InvoiceItem, *http.Response, error)
ListPendingCharges retrieves a list of all pending charges on the current account
type BlockStorage ¶
type BlockStorage struct {
ID string `json:"id"`
Cost float32 `json:"cost"`
Status string `json:"status"`
SizeGB int `json:"size_gb"`
Region string `json:"region"`
DateCreated string `json:"date_created"`
AttachedToInstance string `json:"attached_to_instance"`
Label string `json:"label"`
MountID string `json:"mount_id"`
BlockType string `json:"block_type"`
}
BlockStorage represents Vultr Block-Storage
type BlockStorageAttach ¶
type BlockStorageAttach struct {
InstanceID string `json:"instance_id"`
Live *bool `json:"live,omitempty"`
}
BlockStorageAttach struct used to define if a attach should be restart the instance.
type BlockStorageCreate ¶
type BlockStorageCreate struct {
Region string `json:"region"`
SizeGB int `json:"size_gb"`
Label string `json:"label,omitempty"`
BlockType string `json:"block_type,omitempty"`
}
BlockStorageCreate struct is used for creating Block Storage.
type BlockStorageDetach ¶
type BlockStorageDetach struct {
Live *bool `json:"live,omitempty"`
}
BlockStorageDetach struct used to define if a detach should be restart the instance.
type BlockStorageService ¶
type BlockStorageService interface {
Create(ctx context.Context, blockReq *BlockStorageCreate) (*BlockStorage, *http.Response, error)
Get(ctx context.Context, blockID string) (*BlockStorage, *http.Response, error)
Update(ctx context.Context, blockID string, blockReq *BlockStorageUpdate) error
Delete(ctx context.Context, blockID string) error
List(ctx context.Context, options *ListOptions) ([]BlockStorage, *Meta, *http.Response, error)
Attach(ctx context.Context, blockID string, attach *BlockStorageAttach) error
Detach(ctx context.Context, blockID string, detach *BlockStorageDetach) error
}
BlockStorageService is the interface to interact with Block-Storage endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/block
type BlockStorageServiceHandler ¶
type BlockStorageServiceHandler struct {
// contains filtered or unexported fields
}
BlockStorageServiceHandler handles interaction with the block-storage methods for the Vultr API
func (*BlockStorageServiceHandler) Attach ¶
func (b *BlockStorageServiceHandler) Attach(ctx context.Context, blockID string, attach *BlockStorageAttach) error
Attach will link a given block storage to a given Vultr instance If Live is set to true the block storage will be attached without reloading the instance
func (*BlockStorageServiceHandler) Create ¶
func (b *BlockStorageServiceHandler) Create(ctx context.Context, blockReq *BlockStorageCreate) (*BlockStorage, *http.Response, error)
Create builds out a block storage
func (*BlockStorageServiceHandler) Delete ¶
func (b *BlockStorageServiceHandler) Delete(ctx context.Context, blockID string) error
Delete a block storage subscription from your Vultr account
func (*BlockStorageServiceHandler) Detach ¶
func (b *BlockStorageServiceHandler) Detach(ctx context.Context, blockID string, detach *BlockStorageDetach) error
Detach will de-link a given block storage to the Vultr instance it is attached to If Live is set to true the block storage will be detached without reloading the instance
func (*BlockStorageServiceHandler) Get ¶
func (b *BlockStorageServiceHandler) Get(ctx context.Context, blockID string) (*BlockStorage, *http.Response, error)
Get returns a single block storage instance based ony our blockID you provide from your Vultr Account
func (*BlockStorageServiceHandler) List ¶
func (b *BlockStorageServiceHandler) List(ctx context.Context, options *ListOptions) ([]BlockStorage, *Meta, *http.Response, error)
List returns a list of all block storage instances on your Vultr Account
func (*BlockStorageServiceHandler) Update ¶
func (b *BlockStorageServiceHandler) Update(ctx context.Context, blockID string, blockReq *BlockStorageUpdate) error
Update a block storage subscription.
type BlockStorageUpdate ¶
type BlockStorageUpdate struct {
SizeGB int `json:"size_gb,omitempty"`
Label string `json:"label,omitempty"`
}
BlockStorageUpdate struct is used to update Block Storage.
type CDNService ¶
type CDNService interface {
ListPullZones(ctx context.Context) ([]CDNZone, *Meta, *http.Response, error)
GetPullZone(ctx context.Context, zoneID string) (*CDNZone, *http.Response, error)
CreatePullZone(ctx context.Context, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
UpdatePullZone(ctx context.Context, zoneID string, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
DeletePullZone(ctx context.Context, zoneID string) error
PurgePullZone(ctx context.Context, zoneID string) error
ListPushZones(ctx context.Context) ([]CDNZone, *Meta, *http.Response, error)
GetPushZone(ctx context.Context, zoneID string) (*CDNZone, *http.Response, error)
CreatePushZone(ctx context.Context, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
UpdatePushZone(ctx context.Context, zoneID string, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
DeletePushZone(ctx context.Context, zoneID string) error
ListPushZoneFiles(ctx context.Context, zoneID string) (*CDNZoneFileData, *http.Response, error)
GetPushZoneFile(ctx context.Context, zoneID, fileName string) (*CDNZoneFile, *http.Response, error)
DeletePushZoneFile(ctx context.Context, zoneID, fileName string) error
CreatePushZoneFileEndpoint(ctx context.Context, zoneID string, endpointReq *CDNZoneEndpointReq) (*CDNZoneEndpoint, *http.Response, error) //nolint:lll
}
CDNService is the interface to interact with the CDN endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/CDNs
type CDNServiceHandler ¶
type CDNServiceHandler struct {
// contains filtered or unexported fields
}
CDNServiceHandler handles interaction with the CDN methods for the Vultr API
func (*CDNServiceHandler) CreatePullZone ¶
func (c *CDNServiceHandler) CreatePullZone(ctx context.Context, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
CreatePullZone will create a new CDN pull zone
func (*CDNServiceHandler) CreatePushZone ¶
func (c *CDNServiceHandler) CreatePushZone(ctx context.Context, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
CreatePushZone will create a new CDN push zone
func (*CDNServiceHandler) CreatePushZoneFileEndpoint ¶
func (c *CDNServiceHandler) CreatePushZoneFileEndpoint(ctx context.Context, zoneID string, zoneEndpointReq *CDNZoneEndpointReq) (*CDNZoneEndpoint, *http.Response, error)
CreatePushZoneFileEndpoint will create a new CDN push zone file upload endpoint
func (*CDNServiceHandler) DeletePullZone ¶
func (c *CDNServiceHandler) DeletePullZone(ctx context.Context, zoneID string) error
DeletePullZone will delete a CDN pull zone
func (*CDNServiceHandler) DeletePushZone ¶
func (c *CDNServiceHandler) DeletePushZone(ctx context.Context, zoneID string) error
DeletePushZone will delete a CDN push zone
func (*CDNServiceHandler) DeletePushZoneFile ¶
func (c *CDNServiceHandler) DeletePushZoneFile(ctx context.Context, zoneID, fileName string) error
DeletePushZoneFile delete a file in a CDN push zone
func (*CDNServiceHandler) GetPullZone ¶
func (c *CDNServiceHandler) GetPullZone(ctx context.Context, zoneID string) (*CDNZone, *http.Response, error)
GetPullZone will retrieve data for a CDN pull zone
func (*CDNServiceHandler) GetPushZone ¶
func (c *CDNServiceHandler) GetPushZone(ctx context.Context, zoneID string) (*CDNZone, *http.Response, error)
GetPushZone will retrieve data for a CDN push zone
func (*CDNServiceHandler) GetPushZoneFile ¶
func (c *CDNServiceHandler) GetPushZoneFile(ctx context.Context, zoneID, fileName string) (*CDNZoneFile, *http.Response, error)
GetPushZoneFile will retrieve data on a file in a CDN push zone
func (*CDNServiceHandler) ListPullZones ¶
func (c *CDNServiceHandler) ListPullZones(ctx context.Context) ([]CDNZone, *Meta, *http.Response, error)
ListPullZones will retrieve a CDN pull zone
func (*CDNServiceHandler) ListPushZoneFiles ¶
func (c *CDNServiceHandler) ListPushZoneFiles(ctx context.Context, zoneID string) (*CDNZoneFileData, *http.Response, error)
ListPushZoneFiles will retrieve all CDN push zone file data that have been uploaded
func (*CDNServiceHandler) ListPushZones ¶
func (c *CDNServiceHandler) ListPushZones(ctx context.Context) ([]CDNZone, *Meta, *http.Response, error)
ListPushZones will retrieve a CDN push zone
func (*CDNServiceHandler) PurgePullZone ¶
func (c *CDNServiceHandler) PurgePullZone(ctx context.Context, zoneID string) error
PurgePullZone will clear the cache on a CDN pull zone
func (*CDNServiceHandler) UpdatePullZone ¶
func (c *CDNServiceHandler) UpdatePullZone(ctx context.Context, zoneID string, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
UpdatePullZone will update an existing CDN pull zone
func (*CDNServiceHandler) UpdatePushZone ¶
func (c *CDNServiceHandler) UpdatePushZone(ctx context.Context, zoneID string, zoneReq *CDNZoneReq) (*CDNZone, *http.Response, error)
UpdatePushZone will update an existing CDN push zone
type CDNZone ¶
type CDNZone struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
Status string `json:"status"`
Label string `json:"label"`
OriginScheme string `json:"origin_scheme"`
OriginDomain string `json:"origin_domain"`
VanityDomain string `json:"vanity_domain"`
SSLCert string `json:"ssl_cert"`
SSLCertKey string `json:"ssl_cert_key"`
CDNURL string `json:"cdn_url"`
CacheSize int `json:"cache_size"`
Requests int `json:"requests"`
BytesIn int `json:"in_bytes"`
BytesOut int `json:"out_bytes"`
PacketsPerSec int `json:"packets_per_sec"`
DatePurged string `json:"last_purge"`
CORS bool `json:"cors"`
GZIP bool `json:"gzip"`
BlockAI bool `json:"block_ai"`
BlockBadBots bool `json:"block_bad_bots"`
Regions []string `json:"regions"`
}
CDNZone represents the CDN push/pull zone data
type CDNZoneEndpoint ¶
type CDNZoneEndpoint struct {
URL string `json:"url"`
Inputs CDNZoneEndpointInputs `json:"inputs"`
}
CDNZoneEndpoint is the data for a push zone file endpoint
type CDNZoneEndpointInputs ¶
type CDNZoneEndpointInputs struct {
ACL string `json:"acl"`
Key string `json:"key"`
Policy string `json:"policy"`
Credential string `json:"x-amz-credential"`
Algorithm string `json:"x-amz-algorithm"`
Signature string `json:"x-amz-signature"`
}
CDNZoneEndpointInputs is the data for push zone file endpoint inputs
type CDNZoneEndpointReq ¶
CDNZoneEndpointReq is the data used to create a push zone upload endpoint
type CDNZoneFile ¶
type CDNZoneFile struct {
Name string `json:"name"`
Size int `json:"size"`
DateModified string `json:"last_modified"`
}
CDNZoneFile is the data for a push zone file
type CDNZoneFileData ¶
type CDNZoneFileData struct {
Files []CDNZoneFile `json:"files"`
Count int `json:"count"`
Size int `json:"total_size"`
}
CDNZoneFileData represents the push zone files and metadata
type CDNZoneReq ¶
type CDNZoneReq struct {
Label string `json:"label"`
OriginScheme string `json:"origin_scheme,omitempty"`
OriginDomain string `json:"origin_domain,omitempty"`
VanityDomain string `json:"vanity_domain,omitempty"`
SSLCert string `json:"ssl_cert,omitempty"`
SSLCertKey string `json:"ssl_cert_key,omitempty"`
CORS *bool `json:"cors,omitempty"`
GZIP *bool `json:"gzip,omitempty"`
BlockAI *bool `json:"block_ai,omitempty"`
BlockBadBots *bool `json:"block_bad_bots,omitempty"`
Regions []string `json:"regions,omitempty"`
}
CDNZoneReq is the data used to create a push/pull zone
type Client ¶
type Client struct {
// BASE URL for APIs
BaseURL *url.URL
// User Agent for the client
UserAgent string
// Services used to interact with the API
Account AccountService
Application ApplicationService
Backup BackupService
BareMetalServer BareMetalServerService
Billing BillingService
BlockStorage BlockStorageService
CDN CDNService
ContainerRegistry ContainerRegistryService
Database DatabaseService
Domain DomainService
DomainRecord DomainRecordService
FirewallGroup FirewallGroupService
FirewallRule FireWallRuleService
Instance InstanceService
ISO ISOService
Kubernetes KubernetesService
LoadBalancer LoadBalancerService
Logs LogsService
Marketplace MarketplaceService
ObjectStorage ObjectStorageService
OS OSService
Plan PlanService
Region RegionService
ReservedIP ReservedIPService
Inference InferenceService
Snapshot SnapshotService
SSHKey SSHKeyService
StartupScript StartupScriptService
SubAccount SubAccountService
User UserService
VirtualFileSystemStorage VirtualFileSystemStorageService
VPC VPCService
// Deprecated: VPC2 is no longer supported
VPC2 VPC2Service
// contains filtered or unexported fields
}
Client manages interaction with the Vultr API
func (*Client) DoWithContext ¶
func (c *Client) DoWithContext(ctx context.Context, r *http.Request, data interface{}) (*http.Response, error)
DoWithContext sends an API Request and returns back the response. The API response is checked to see if it was a successful call. A successful call is then checked to see if we need to unmarshal since some resources have their own implements of unmarshal.
func (*Client) NewRequest ¶
func (c *Client) NewRequest(ctx context.Context, method, uri string, body interface{}) (*http.Request, error)
NewRequest creates an API Request
func (*Client) OnRequestCompleted ¶
func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
OnRequestCompleted sets the API request completion callback
func (*Client) SetBaseURL ¶
SetBaseURL Overrides the default BaseUrl
func (*Client) SetRateLimit ¶
SetRateLimit Overrides the default rateLimit. For performance, exponential backoff is used with the minimum wait being 2/3rds the time provided.
func (*Client) SetRetryLimit ¶
SetRetryLimit overrides the default RetryLimit
func (*Client) SetUserAgent ¶
SetUserAgent Overrides the default UserAgent
type Cluster ¶
type Cluster struct {
ID string `json:"id"`
Label string `json:"label"`
DateCreated string `json:"date_created"`
ClusterSubnet string `json:"cluster_subnet"`
ServiceSubnet string `json:"service_subnet"`
IP string `json:"ip"`
Endpoint string `json:"endpoint"`
Version string `json:"version"`
Region string `json:"region"`
Status string `json:"status"`
HAControlPlanes bool `json:"ha_controlplanes"`
FirewallGroupID string `json:"firewall_group_id"`
NodePools []NodePool `json:"node_pools"`
}
Cluster represents a full VKE cluster
type ClusterReq ¶
type ClusterReq struct {
Label string `json:"label"`
Region string `json:"region"`
Version string `json:"version"`
HAControlPlanes bool `json:"ha_controlplanes,omitempty"`
EnableFirewall bool `json:"enable_firewall,omitempty"`
VPCID string `json:"vpc_id,omitempty"`
NodePools []NodePoolReq `json:"node_pools"`
}
ClusterReq struct used to create a cluster
type ClusterReqUpdate ¶
type ClusterReqUpdate struct {
Label string `json:"label"`
}
ClusterReqUpdate struct used to update update a cluster
type ClusterUpgradeReq ¶
type ClusterUpgradeReq struct {
UpgradeVersion string `json:"upgrade_version,omitempty"`
}
ClusterUpgradeReq struct for vke upgradse
type ContainerRegistry ¶
type ContainerRegistry struct {
ID string `json:"id"`
Name string `json:"name"`
URN string `json:"urn"`
Storage ContainerRegistryStorage `json:"storage"`
DateCreated string `json:"date_created"`
Public bool `json:"public"`
RootUser ContainerRegistryUser `json:"root_user"`
Metadata ContainerRegistryMetadata `json:"metadata"`
}
ContainerRegistry represents a Vultr container registry subscription.
type ContainerRegistryDockerCredentials ¶
type ContainerRegistryDockerCredentials []byte
ContainerRegistryDockerCredentials represents the byte array of character data returned after creating a Docker credential
func (*ContainerRegistryDockerCredentials) String ¶
func (c *ContainerRegistryDockerCredentials) String() string
String converts the ContainerRegistryDockerCredentials to a string
func (*ContainerRegistryDockerCredentials) UnmarshalJSON ¶
func (c *ContainerRegistryDockerCredentials) UnmarshalJSON(b []byte) error
UnmarshalJSON is a custom unmarshal function for ContainerRegistryDockerCredentials
type ContainerRegistryMetadata ¶
type ContainerRegistryMetadata struct {
Region ContainerRegistryRegion `json:"region"`
Subscription ContainerRegistrySubscription `json:"subscription"`
}
ContainerRegistryMetadata contains the meta data for the registry
type ContainerRegistryPlan ¶
type ContainerRegistryPlan struct {
VanityName string `json:"vanity_name"`
MaxStorageMB int `json:"max_storage_mb"`
MonthlyPrice int `json:"monthly_price"`
}
ContainerRegistryPlan represent the plan data
type ContainerRegistryPlanTypes ¶
type ContainerRegistryPlanTypes struct {
StartUp ContainerRegistryPlan `json:"start_up"`
Business ContainerRegistryPlan `json:"business"`
Premium ContainerRegistryPlan `json:"premium"`
Enterprise ContainerRegistryPlan `json:"enterprise"`
}
ContainerRegistryPlanTypes represent the different plan types
type ContainerRegistryPlans ¶
type ContainerRegistryPlans struct {
Plans ContainerRegistryPlanTypes `json:"plans"`
}
ContainerRegistryPlans contains all plan types
type ContainerRegistryRegion ¶
type ContainerRegistryRegion struct {
ID int `json:"id"`
Name string `json:"name"`
URN string `json:"urn"`
BaseURL string `json:"base_url"`
Public bool `json:"public"`
DateCreated string `json:"added_at"`
DateModified string `json:"updated_at"`
DataCenter ContainerRegistryRegionDataCenter `json:"data_center"`
}
ContainerRegistryRegion represents the region data
type ContainerRegistryRegionDataCenter ¶
type ContainerRegistryRegionDataCenter struct {
ID int `json:"id"`
Name string `json:"name"`
SiteCode string `json:"site_code"`
Region string `json:"region"`
Country string `json:"country"`
Continent string `json:"continent"`
Description string `json:"description"`
Airport string `json:"airport"`
}
ContainerRegistryRegionDataCenter is the datacenter info for a given region
type ContainerRegistryRepo ¶
type ContainerRegistryRepo struct {
Name string `json:"name"`
Image string `json:"image"`
Description string `json:"description"`
DateCreated string `json:"added_at"`
DateModified string `json:"updated_at"`
PullCount int `json:"pull_count"`
ArtifactCount int `json:"artifact_count"`
}
ContainerRegistryRepo represents the data of a registry repository
type ContainerRegistryRepoUpdateReq ¶
type ContainerRegistryRepoUpdateReq struct {
Description string `json:"description"`
}
ContainerRegistryRepoUpdateReq is the data to update a registry repository
type ContainerRegistryReq ¶
type ContainerRegistryReq struct {
Name string `json:"name"`
Public bool `json:"public"`
Region string `json:"region"`
Plan string `json:"plan"`
}
ContainerRegistryReq represents the data used to create a registry
type ContainerRegistryService ¶
type ContainerRegistryService interface {
Create(ctx context.Context, createReq *ContainerRegistryReq) (*ContainerRegistry, *http.Response, error)
Get(ctx context.Context, vcrID string) (*ContainerRegistry, *http.Response, error)
Update(ctx context.Context, vcrID string, updateReq *ContainerRegistryUpdateReq) (*ContainerRegistry, *http.Response, error)
Delete(ctx context.Context, vcrID string) error
List(ctx context.Context, options *ListOptions) ([]ContainerRegistry, *Meta, *http.Response, error)
ListRepositories(ctx context.Context, vcrID string, options *ListOptions) ([]ContainerRegistryRepo, *Meta, *http.Response, error)
GetRepository(ctx context.Context, vcrID, imageName string) (*ContainerRegistryRepo, *http.Response, error)
UpdateRepository(ctx context.Context, vcrID, imageName string, updateReq *ContainerRegistryRepoUpdateReq) (*ContainerRegistryRepo, *http.Response, error) //nolint:lll
DeleteRepository(ctx context.Context, vcrID, imageName string) error
CreateDockerCredentials(ctx context.Context, vcrID string, createOptions *DockerCredentialsOpt) (*ContainerRegistryDockerCredentials, *http.Response, error) //nolint:lll
ListRegions(ctx context.Context) ([]ContainerRegistryRegion, *Meta, *http.Response, error)
ListPlans(ctx context.Context) (*ContainerRegistryPlans, *http.Response, error)
}
ContainerRegistryService is the interface to interact with the container registry endpoints on the Vultr API. Link : https://www.vultr.com/api/#tag/Container-Registry
type ContainerRegistryServiceHandler ¶
type ContainerRegistryServiceHandler struct {
// contains filtered or unexported fields
}
ContainerRegistryServiceHandler handles interaction between the container registry service and the Vultr API.
func (*ContainerRegistryServiceHandler) Create ¶
func (h *ContainerRegistryServiceHandler) Create(ctx context.Context, createReq *ContainerRegistryReq) (*ContainerRegistry, *http.Response, error)
Create creates a container registry
func (*ContainerRegistryServiceHandler) CreateDockerCredentials ¶
func (h *ContainerRegistryServiceHandler) CreateDockerCredentials(ctx context.Context, vcrID string, createOptions *DockerCredentialsOpt) (*ContainerRegistryDockerCredentials, *http.Response, error)
CreateDockerCredentials will create new Docker credentials used by the Docker CLI
func (*ContainerRegistryServiceHandler) Delete ¶
func (h *ContainerRegistryServiceHandler) Delete(ctx context.Context, vcrID string) error
Delete will delete a container registry
func (*ContainerRegistryServiceHandler) DeleteRepository ¶
func (h *ContainerRegistryServiceHandler) DeleteRepository(ctx context.Context, vcrID, imageName string) error
DeleteRepository remove a repository from the container registry
func (*ContainerRegistryServiceHandler) Get ¶
func (h *ContainerRegistryServiceHandler) Get(ctx context.Context, id string) (*ContainerRegistry, *http.Response, error)
Get retrieves a contrainer registry by ID
func (*ContainerRegistryServiceHandler) GetRepository ¶
func (h *ContainerRegistryServiceHandler) GetRepository(ctx context.Context, vcrID, imageName string) (*ContainerRegistryRepo, *http.Response, error)
GetRepository will return an existing repository of the requested registry ID and image name
func (*ContainerRegistryServiceHandler) List ¶
func (h *ContainerRegistryServiceHandler) List(ctx context.Context, options *ListOptions) ([]ContainerRegistry, *Meta, *http.Response, error)
List retrieves the list of all container registries
func (*ContainerRegistryServiceHandler) ListPlans ¶
func (h *ContainerRegistryServiceHandler) ListPlans(ctx context.Context) (*ContainerRegistryPlans, *http.Response, error)
ListPlans returns a list of plans relevant to the container registry offerings
func (*ContainerRegistryServiceHandler) ListRegions ¶
func (h *ContainerRegistryServiceHandler) ListRegions(ctx context.Context) ([]ContainerRegistryRegion, *Meta, *http.Response, error)
ListRegions will return a list of regions relevant to the container registry API operations
func (*ContainerRegistryServiceHandler) ListRepositories ¶
func (h *ContainerRegistryServiceHandler) ListRepositories(ctx context.Context, vcrID string, options *ListOptions) ([]ContainerRegistryRepo, *Meta, *http.Response, error)
ListRepositories will get a list of the repositories for a existing container registry
func (*ContainerRegistryServiceHandler) Update ¶
func (h *ContainerRegistryServiceHandler) Update(ctx context.Context, vcrID string, updateReq *ContainerRegistryUpdateReq) (*ContainerRegistry, *http.Response, error)
Update will update an existing container registry
func (*ContainerRegistryServiceHandler) UpdateRepository ¶
func (h *ContainerRegistryServiceHandler) UpdateRepository(ctx context.Context, vcrID, imageName string, updateReq *ContainerRegistryRepoUpdateReq) (*ContainerRegistryRepo, *http.Response, error)
UpdateRepository allows updating the repository with the specified registry ID and image name
type ContainerRegistryStorage ¶
type ContainerRegistryStorage struct {
Used ContainerRegistryStorageCount `json:"used"`
Allowed ContainerRegistryStorageCount `json:"allowed"`
}
ContainerRegistryStorage represents the storage usage and limit
type ContainerRegistryStorageCount ¶
type ContainerRegistryStorageCount struct {
Bytes float32 `json:"bytes"`
MegaBytes float32 `json:"mb"`
GigaBytes float32 `json:"gb"`
TeraBytes float32 `json:"tb"`
DateModified string `json:"updated_at"`
}
ContainerRegistryStorageCount represents the different storage usage counts
type ContainerRegistrySubscription ¶
type ContainerRegistrySubscription struct {
Billing ContainerRegistrySubscriptionBilling `json:"billing"`
}
ContainerRegistrySubscription contains the subscription information for the registry
type ContainerRegistrySubscriptionBilling ¶
type ContainerRegistrySubscriptionBilling struct {
MonthlyPrice float32 `json:"monthly_price"`
PendingCharges float32 `json:"pending_charges"`
}
ContainerRegistrySubscriptionBilling represents the subscription billing data on the registry
type ContainerRegistryUpdateReq ¶
type ContainerRegistryUpdateReq struct {
Public *bool `json:"public,omitempty"`
Plan *string `json:"plan,omitempty"`
}
ContainerRegistryUpdateReq represents the data used to update a registry
type ContainerRegistryUser ¶
type ContainerRegistryUser struct {
ID int `json:"id"`
UserName string `json:"username"`
Password string `json:"password"`
Root bool `json:"root"`
DateCreated string `json:"added_at"`
DateModified string `json:"updated_at"`
}
ContainerRegistryUser contains the user data
type DBListOptions ¶
type DBListOptions struct {
Label string `url:"label,omitempty"`
Tag string `url:"tag,omitempty"`
Region string `url:"region,omitempty"`
}
DBListOptions handles GET request parameters for the List endpoint
type DBPlanListOptions ¶
type DBPlanListOptions struct {
Engine string `url:"engine,omitempty"`
Nodes int `url:"nodes,omitempty"`
Region string `url:"region,omitempty"`
}
DBPlanListOptions handles GET request parameters for the ListPlans endpoint
type Database ¶
type Database struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
Plan string `json:"plan"`
PlanDisk int `json:"plan_disk"`
PlanRAM int `json:"plan_ram"`
PlanVCPUs int `json:"plan_vcpus"`
PlanReplicas *int `json:"plan_replicas,omitempty"`
PlanBrokers int `json:"plan_brokers,omitempty"`
Region string `json:"region"`
DatabaseEngine string `json:"database_engine"`
DatabaseEngineVersion string `json:"database_engine_version"`
VPCID string `json:"vpc_id"`
Status string `json:"status"`
Label string `json:"label"`
Tag string `json:"tag"`
DBName string `json:"dbname,omitempty"`
FerretDBCredentials *FerretDBCredentials `json:"ferretdb_credentials,omitempty"`
Host string `json:"host"`
PublicHost string `json:"public_host,omitempty"`
Port string `json:"port"`
SASLPort string `json:"sasl_port,omitempty"`
EnableKafkaREST *bool `json:"enable_kafka_rest,omitempty"`
KafkaRESTURI string `json:"kafka_rest_uri,omitempty"`
EnableSchemaRegistry *bool `json:"enable_schema_registry,omitempty"`
SchemaRegistryURI string `json:"schema_registry_uri,omitempty"`
EnableKafkaConnect *bool `json:"enable_kafka_connect,omitempty"`
User string `json:"user"`
Password string `json:"password"`
AccessKey string `json:"access_key,omitempty"`
AccessCert string `json:"access_cert,omitempty"`
MaintenanceDOW string `json:"maintenance_dow"`
MaintenanceTime string `json:"maintenance_time"`
BackupHour *string `json:"backup_hour,omitempty"`
BackupMinute *string `json:"backup_minute,omitempty"`
LatestBackup string `json:"latest_backup"`
TrustedIPs []string `json:"trusted_ips"`
CACertificate string `json:"ca_certificate"`
MySQLSQLModes []string `json:"mysql_sql_modes,omitempty"`
MySQLRequirePrimaryKey *bool `json:"mysql_require_primary_key,omitempty"`
MySQLSlowQueryLog *bool `json:"mysql_slow_query_log,omitempty"`
MySQLLongQueryTime int `json:"mysql_long_query_time,omitempty"`
PGAvailableExtensions []PGExtension `json:"pg_available_extensions,omitempty"`
EvictionPolicy string `json:"eviction_policy,omitempty"`
ClusterTimeZone string `json:"cluster_time_zone,omitempty"`
ReadReplicas []Database `json:"read_replicas,omitempty"`
}
Database represents a Managed Database subscription
type DatabaseAddReplicaReq ¶
type DatabaseAddReplicaReq struct {
Region string `json:"region,omitempty"`
Label string `json:"label,omitempty"`
}
DatabaseAddReplicaReq struct used to add a read-only replica to a Managed Database
type DatabaseAdvancedOptions ¶
type DatabaseAdvancedOptions struct {
AutovacuumAnalyzeScaleFactor float32 `json:"autovacuum_analyze_scale_factor,omitempty"`
AutovacuumAnalyzeThreshold int `json:"autovacuum_analyze_threshold,omitempty"`
AutovacuumFreezeMaxAge int `json:"autovacuum_freeze_max_age,omitempty"`
AutovacuumMaxWorkers int `json:"autovacuum_max_workers,omitempty"`
AutovacuumNaptime int `json:"autovacuum_naptime,omitempty"`
AutovacuumVacuumCostDelay int `json:"autovacuum_vacuum_cost_delay,omitempty"`
AutovacuumVacuumCostLimit int `json:"autovacuum_vacuum_cost_limit,omitempty"`
AutovacuumVacuumScaleFactor float32 `json:"autovacuum_vacuum_scale_factor,omitempty"`
AutovacuumVacuumThreshold int `json:"autovacuum_vacuum_threshold,omitempty"`
BGWRITERDelay int `json:"bgwriter_delay,omitempty"`
BGWRITERFlushAFter int `json:"bgwriter_flush_after,omitempty"`
BGWRITERLRUMaxPages int `json:"bgwriter_lru_maxpages,omitempty"`
BGWRITERLRUMultiplier float32 `json:"bgwriter_lru_multiplier,omitempty"`
DeadlockTimeout int `json:"deadlock_timeout,omitempty"`
DefaultToastCompression string `json:"default_toast_compression,omitempty"`
IdleInTransactionSessionTimeout int `json:"idle_in_transaction_session_timeout,omitempty"`
Jit *bool `json:"jit,omitempty"`
LogAutovacuumMinDuration int `json:"log_autovacuum_min_duration,omitempty"`
LogErrorVerbosity string `json:"log_error_verbosity,omitempty"`
LogLinePrefix string `json:"log_line_prefix,omitempty"`
LogMinDurationStatement int `json:"log_min_duration_statement,omitempty"`
MaxFilesPerProcess int `json:"max_files_per_process,omitempty"`
MaxLocksPerTransaction int `json:"max_locks_per_transaction,omitempty"`
MaxLogicalReplicationWorkers int `json:"max_logical_replication_workers,omitempty"`
MaxParallelWorkers int `json:"max_parallel_workers,omitempty"`
MaxParallelWorkersPerGather int `json:"max_parallel_workers_per_gather,omitempty"`
MaxPredLocksPerTransaction int `json:"max_pred_locks_per_transaction,omitempty"`
MaxPreparedTransactions int `json:"max_prepared_transactions,omitempty"`
MaxReplicationSlots int `json:"max_replication_slots,omitempty"`
MaxStackDepth int `json:"max_stack_depth,omitempty"`
MaxStandbyArchiveDelay int `json:"max_standby_archive_delay,omitempty"`
MaxStandbyStreamingDelay int `json:"max_standby_streaming_delay,omitempty"`
MaxWalSenders int `json:"max_wal_senders,omitempty"`
MaxWorkerProcesses int `json:"max_worker_processes,omitempty"`
PGPartmanBGWInterval int `json:"pg_partman_bgw.interval,omitempty"`
PGPartmanBGWRole string `json:"pg_partman_bgw.role,omitempty"`
PGStateStatementsTrack string `json:"pg_stat_statements.track,omitempty"`
TempFileLimit int `json:"temp_file_limit,omitempty"`
TrackActivityQuerySize int `json:"track_activity_query_size,omitempty"`
TrackCommitTimestamp string `json:"track_commit_timestamp,omitempty"`
TrackFunctions string `json:"track_functions,omitempty"`
TrackIOTiming string `json:"track_io_timing,omitempty"`
WALSenderTImeout int `json:"wal_sender_timeout,omitempty"`
WALWriterDelay int `json:"wal_writer_delay,omitempty"`
ConnectTimeout int `json:"connect_timeout,omitempty"`
GroupConcatMaxLen int `json:"group_concat_max_len,omitempty"`
InnoDBChangeBufferMaxSize int `json:"innodb_change_buffer_max_size,omitempty"`
InnoDBFlushNeighbors int `json:"innodb_flush_neighbors,omitempty"`
InnoDBFTMinTokenSize int `json:"innodb_ft_min_token_size,omitempty"`
InnoDBFTServerStopwordTable string `json:"innodb_ft_server_stopword_table,omitempty"`
InnoDBLockWaitTimeout int `json:"innodb_lock_wait_timeout,omitempty"`
InnoDBLogBufferSize int `json:"innodb_log_buffer_size,omitempty"`
InnoDBOnlineAlterLogMaxSize int `json:"innodb_online_alter_log_max_size,omitempty"`
InnoDBPrintAllDeadlocks *bool `json:"innodb_print_all_deadlocks,omitempty"`
InnoDBReadIOThreads int `json:"innodb_read_io_threads,omitempty"`
InnoDBRollbackOnTimeout *bool `json:"innodb_rollback_on_timeout,omitempty"`
InnoDBThreadConcurrency int `json:"innodb_thread_concurrency,omitempty"`
InnoDBWriteIOThreads int `json:"innodb_write_io_threads,omitempty"`
InteractiveTimeout int `json:"interactive_timeout,omitempty"`
InternalTmpMemStorageEngine string `json:"internal_tmp_mem_storage_engine,omitempty"`
MaxAllowedPacket int `json:"max_allowed_packet,omitempty"`
MaxHeapTableSize int `json:"max_heap_table_size,omitempty"`
NetBufferLength int `json:"net_buffer_length,omitempty"`
NetReadTimeout int `json:"net_read_timeout,omitempty"`
NetWriteTimeout int `json:"net_write_timeout,omitempty"`
SortBufferSize int `json:"sort_buffer_size,omitempty"`
TmpTableSize int `json:"tmp_table_size,omitempty"`
WaitTimeout int `json:"wait_timeout,omitempty"`
CompressionType string `json:"compression_type,omitempty"`
GroupInitialRebalanceDelayMS int `json:"group_initial_rebalance_delay_ms,omitempty"`
GroupMinSessinTimeoutMS int `json:"group_min_session_timeout_ms,omitempty"`
GroupMaxSessionTimeoutMS int `json:"group_max_session_timeout_ms,omitempty"`
ConnectionsMaxIdleMS int `json:"connections_max_idle_ms,omitempty"`
MaxIncrementalFetchSessionCacheSlots int `json:"max_incremental_fetch_session_cache_slots,omitempty"`
MessageMaxBytes int `json:"message_max_bytes,omitempty"`
OffsetsRetentionMinutes int `json:"offsets_retention_minutes,omitempty"`
LogCleanerDeleteRetentionMS int `json:"log_cleaner_delete_retention_ms,omitempty"`
LogCleanerMinCleanableRatio float32 `json:"log_cleaner_min_cleanable_ratio,omitempty"`
LogCleanerMaxCompactionLagMS int `json:"log_cleaner_max_compaction_lag_ms,omitempty"`
LogCleanerMinCompactionLagMS int `json:"log_cleaner_min_compaction_lag_ms,omitempty"`
LogCleanupPolicy string `json:"log_cleanup_policy,omitempty"`
LogFlushIntervalMessages int `json:"log_flush_interval_messages,omitempty"`
LogFlushIntervalMS int `json:"log_flush_interval_ms,omitempty"`
LogIndexIntervalBytes int `json:"log_index_interval_bytes,omitempty"`
LogIndexSizeMaxBytes int `json:"log_index_size_max_bytes,omitempty"`
LogLocalRetentionMS int `json:"log_local_retention_ms,omitempty"`
LogLocalRetentionBytes int `json:"log_local_retention_bytes,omitempty"`
LogMessageDownconversionEnable *bool `json:"log_message_downconversion_enable,omitempty"`
LogMessageTimestampType string `json:"log_message_timestamp_type,omitempty"`
LogMessageTimestampDifferenceMaxMS int `json:"log_message_timestamp_difference_max_ms,omitempty"`
LogPreallocate *bool `json:"log_preallocate,omitempty"`
LogRetentionBytes int `json:"log_retention_bytes,omitempty"`
LogRetentionHours int `json:"log_retention_hours,omitempty"`
LogRetentionMS int `json:"log_retention_ms,omitempty"`
LogRollJitterMS int `json:"log_roll_jitter_ms,omitempty"`
LogRollMS int `json:"log_roll_ms,omitempty"`
LogSegmentBytes int `json:"log_segment_bytes,omitempty"`
LogSegmentDeleteDelayMS int `json:"log_segment_delete_delay_ms,omitempty"`
AutoCreateTopicsEnable *bool `json:"auto_create_topics_enable,omitempty"`
MinInsyncReplicas int `json:"min_insync_replicas,omitempty"`
NumPartitions int `json:"num_partitions,omitempty"`
DefaultReplicationFactor int `json:"default_replication_factor,omitempty"`
ReplicaFetchMaxBytes int `json:"replica_fetch_max_bytes,omitempty"`
ReplicaFetchResponseMaxBytes int `json:"replica_fetch_response_max_bytes,omitempty"`
MaxConnectionsPerIP int `json:"max_connections_per_ip,omitempty"`
ProducerPurgatoryPurgeIntervalRequests int `json:"producer_purgatory_purge_interval_requests,omitempty"`
SASLOauthbearerExpectedAudience string `json:"sasl_oauthbearer_expected_audience,omitempty"`
SASLOauthbearerExpectedIssuer string `json:"sasl_oauthbearer_expected_issuer,omitempty"`
SASLOauthbearerJWKSEndpointURL string `json:"sasl_oauthbearer_jwks_endpoint_url,omitempty"`
SASLOauthbearerSubClaimName string `json:"sasl_oauthbearer_sub_claim_name,omitempty"`
SocketRequestMaxBytes int `json:"socket_request_max_bytes,omitempty"`
TransactionStateLogSegmentBytes int `json:"transaction_state_log_segment_bytes,omitempty"`
TransactionRemoveExpiredTransactionCleanupIntervalMS int `json:"transaction_remove_expired_transaction_cleanup_interval_ms,omitempty"`
TransactionPartitionVerificationEnable *bool `json:"transaction_partition_verification_enable,omitempty"`
}
DatabaseAdvancedOptions represents user configurable advanced options within a Managed Database cluster
type DatabaseAlert ¶
type DatabaseAlert struct {
Timestamp string `json:"timestamp"`
MessageType string `json:"message_type"`
Description string `json:"description"`
Recommendation string `json:"recommendation,omitempty"`
MaintenanceScheduled string `json:"maintenance_scheduled,omitempty"`
ResourceType string `json:"resource_type,omitempty"`
TableCount int `json:"table_count,omitempty"`
}
DatabaseAlert represents a service alert for a Managed Database cluster
type DatabaseAvailableConnector ¶
type DatabaseAvailableConnector struct {
Class string `json:"class"`
Title string `json:"title"`
Version string `json:"version"`
Type string `json:"type"`
DocURL string `json:"doc_url"`
}
DatabaseAvailableConnector represents an available Kafka connector within a Managed Database cluster
type DatabaseAvailableVersions ¶
type DatabaseAvailableVersions struct {
AvailableVersions []string `json:"available_versions"`
}
DatabaseAvailableVersions represents available versions upgrades for a Managed Database cluster
type DatabaseBackup ¶
DatabaseBackup represents individual backup details for a Managed Database cluster
type DatabaseBackupRestoreReq ¶
type DatabaseBackupRestoreReq struct {
Label string `json:"label,omitempty"`
Type string `json:"type,omitempty"`
Date string `json:"date,omitempty"`
Time string `json:"time,omitempty"`
}
DatabaseBackupRestoreReq struct used to restore the backup of a Managed Database to a new subscription
type DatabaseBackups ¶
type DatabaseBackups struct {
LatestBackup DatabaseBackup `json:"latest_backup,omitempty"`
OldestBackup DatabaseBackup `json:"oldest_backup,omitempty"`
}
DatabaseBackups represents backup information for a Managed Database cluster
type DatabaseCPUUsage ¶
type DatabaseCPUUsage struct {
Percentage float32 `json:"percentage"`
}
DatabaseCPUUsage represents average CPU usage for a Managed Database
type DatabaseConnectionPool ¶
type DatabaseConnectionPool struct {
Name string `json:"name"`
Database string `json:"database"`
Username string `json:"username"`
Mode string `json:"mode"`
Size int `json:"size"`
}
DatabaseConnectionPool represents a PostgreSQL connection pool within a Managed Database cluster
type DatabaseConnectionPoolCreateReq ¶
type DatabaseConnectionPoolCreateReq struct {
Name string `json:"name,omitempty"`
Database string `json:"database,omitempty"`
Username string `json:"username,omitempty"`
Mode string `json:"mode,omitempty"`
Size int `json:"size,omitempty"`
}
DatabaseConnectionPoolCreateReq struct used to create a connection pool within a PostgreSQL Managed Database
type DatabaseConnectionPoolUpdateReq ¶
type DatabaseConnectionPoolUpdateReq struct {
Database string `json:"database,omitempty"`
Username string `json:"username,omitempty"`
Mode string `json:"mode,omitempty"`
Size int `json:"size,omitempty"`
}
DatabaseConnectionPoolUpdateReq struct used to update a connection pool within a PostgreSQL Managed Database
type DatabaseConnections ¶
type DatabaseConnections struct {
Used int `json:"used"`
Available int `json:"available"`
Max int `json:"max"`
}
DatabaseConnections represents a an object containing used and available connections for a PostgreSQL Managed Database cluster
type DatabaseConnector ¶
type DatabaseConnector struct {
Name string `json:"name"`
Class string `json:"class"`
Topics string `json:"topics"`
Config map[string]interface{} `json:"config"`
}
DatabaseConnector represents a Kafka connector within a Managed Database cluster
type DatabaseConnectorConfigurationOption ¶
type DatabaseConnectorConfigurationOption struct {
Name string `json:"name"`
Type string `json:"type"`
Required bool `json:"required"`
DefaultValue string `json:"default_value"`
Description string `json:"description"`
}
DatabaseConnectorConfigurationOption represents a configuration option for a Kafka connector within a Managed Database cluster
type DatabaseConnectorCreateReq ¶
type DatabaseConnectorCreateReq struct {
Name string `json:"name"`
Class string `json:"class"`
Topics string `json:"topics"`
Config map[string]interface{} `json:"config,omitempty"`
}
DatabaseConnectorCreateReq struct used to create a Kafka connector within a Managed Database
type DatabaseConnectorStatus ¶
type DatabaseConnectorStatus struct {
State string `json:"state"`
Tasks []DatabaseConnectorTask `json:"tasks"`
}
DatabaseConnector represents a Kafka connector status within a Managed Database cluster
type DatabaseConnectorTask ¶
type DatabaseConnectorTask struct {
ID int `json:"id"`
State string `json:"state"`
Trace string `json:"trace"`
}
DatabaseConnectorTask represents a Kafka connector task within a Managed Database cluster
type DatabaseConnectorUpdateReq ¶
type DatabaseConnectorUpdateReq struct {
Topics string `json:"topics,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
}
DatabaseConnectorUpdateReq struct used to update a Kafka connector within a Managed Database
type DatabaseCreateReq ¶
type DatabaseCreateReq struct {
DatabaseEngine string `json:"database_engine,omitempty"`
DatabaseEngineVersion string `json:"database_engine_version,omitempty"`
Region string `json:"region,omitempty"`
Plan string `json:"plan,omitempty"`
Label string `json:"label,omitempty"`
Tag string `json:"tag,omitempty"`
VPCID string `json:"vpc_id,omitempty"`
MaintenanceDOW string `json:"maintenance_dow,omitempty"`
MaintenanceTime string `json:"maintenance_time,omitempty"`
BackupHour *string `json:"backup_hour,omitempty"`
BackupMinute *string `json:"backup_minute,omitempty"`
TrustedIPs []string `json:"trusted_ips,omitempty"`
MySQLSQLModes []string `json:"mysql_sql_modes,omitempty"`
MySQLRequirePrimaryKey *bool `json:"mysql_require_primary_key,omitempty"`
MySQLSlowQueryLog *bool `json:"mysql_slow_query_log,omitempty"`
MySQLLongQueryTime int `json:"mysql_long_query_time,omitempty"`
EvictionPolicy string `json:"eviction_policy,omitempty"`
EnableKafkaREST *bool `json:"enable_kafka_rest,omitempty"`
EnableSchemaRegistry *bool `json:"enable_schema_registry,omitempty"`
EnableKafkaConnect *bool `json:"enable_kafka_connect,omitempty"`
}
DatabaseCreateReq struct used to create a database
type DatabaseCredentials ¶
type DatabaseCredentials struct {
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
Database string `json:"database,omitempty"`
IgnoredDatabases string `json:"ignored_databases,omitempty"`
SSL *bool `json:"ssl"`
}
DatabaseCredentials represents migration credentials for migration within a Managed Database cluster
type DatabaseDB ¶
type DatabaseDB struct {
Name string `json:"name"`
}
DatabaseDB represents a logical database within a Managed Database cluster
type DatabaseDBCreateReq ¶
type DatabaseDBCreateReq struct {
Name string `json:"name"`
}
DatabaseDBCreateReq struct used to create a logical database within a Managed Database
type DatabaseDiskUsage ¶
type DatabaseDiskUsage struct {
CurrentGB float32 `json:"current_gb"`
MaxGB int `json:"max_gb"`
Percentage float32 `json:"percentage"`
}
DatabaseDiskUsage represents disk usage details for a Managed Database
type DatabaseForkReq ¶
type DatabaseForkReq struct {
Label string `json:"label,omitempty"`
Region string `json:"region,omitempty"`
Plan string `json:"plan,omitempty"`
Type string `json:"type,omitempty"`
Date string `json:"date,omitempty"`
Time string `json:"time,omitempty"`
}
DatabaseForkReq struct used to fork a Managed Database to a new subscription from a backup
type DatabaseKafkaConnectAdvancedOptions ¶
type DatabaseKafkaConnectAdvancedOptions struct {
ConnectorClientConfigOverridePolicy string `json:"connector_client_config_override_policy,omitempty"`
ConsumerAutoOffsetReset string `json:"consumer_auto_offset_reset,omitempty"`
ConsumerFetchMaxBytes int `json:"consumer_fetch_max_bytes,omitempty"`
ConsumerIsolationLevel string `json:"consumer_isolation_level,omitempty"`
ConsumerMaxPartitionFetchBytes int `json:"consumer_max_partition_fetch_bytes,omitempty"`
ConsumerMaxPollIntervalMS int `json:"consumer_max_poll_interval_ms,omitempty"`
ConsumerMaxPollRecords int `json:"consumer_max_poll_records,omitempty"`
OffsetFlushIntervalMS int `json:"offset_flush_interval_ms,omitempty"`
OffsetFlushTimeoutMS int `json:"offset_flush_timeout_ms,omitempty"`
ProducerBatchSize int `json:"producer_batch_size,omitempty"`
ProducerBufferMemory int `json:"producer_buffer_memory,omitempty"`
ProducerCompressionType string `json:"producer_compression_type,omitempty"`
ProducerLingerMS int `json:"producer_linger_ms,omitempty"`
ProducerMaxRequestSize int `json:"producer_max_request_size,omitempty"`
ScheduledRebalanceMaxDelayMS int `json:"scheduled_rebalance_max_delay_ms,omitempty"`
SessionTimeoutMS int `json:"session_timeout_ms,omitempty"`
}
DatabaseKafkaConnectAdvancedOptions represents user configurable Kafka Connect advanced options within a Managed Database cluster
type DatabaseKafkaRESTAdvancedOptions ¶
type DatabaseKafkaRESTAdvancedOptions struct {
ProducerAcks string `json:"producer_acks,omitempty"`
ProducerCompressionType string `json:"producer_compression_type,omitempty"`
ProducerLingerMS int `json:"producer_linger_ms,omitempty"`
ProducerMaxRequestSize int `json:"producer_max_request_size,omitempty"`
ConsumerEnableAutoCommit *bool `json:"consumer_enable_auto_commit,omitempty"`
ConsumerRequestMaxBytes int `json:"consumer_request_max_bytes,omitempty"`
ConsumerRequestTimeoutMS int `json:"consumer_request_timeout_ms,omitempty"`
NameStrategy string `json:"name_strategy,omitempty"`
NameStrategyValidation *bool `json:"name_strategy_validation,omitempty"`
SimpleConsumerPoolSizeMax int `json:"simpleconsumer_pool_size_max,omitempty"`
}
DatabaseKafkaRESTAdvancedOptions represents user configurable Kafka REST advanced options within a Managed Database cluster
type DatabaseListAlertsReq ¶
type DatabaseListAlertsReq struct {
Period string `json:"period"`
}
DatabaseListAlertsReq struct used to query service alerts for a Managed Database
type DatabaseMemoryUsage ¶
type DatabaseMemoryUsage struct {
CurrentMB float32 `json:"current_mb"`
MaxMB int `json:"max_mb"`
Percentage float32 `json:"percentage"`
}
DatabaseMemoryUsage represents memory usage details for a Managed Database
type DatabaseMigration ¶
type DatabaseMigration struct {
Status string `json:"status"`
Method string `json:"method,omitempty"`
Error string `json:"error,omitempty"`
Credentials DatabaseCredentials `json:"credentials"`
}
DatabaseMigration represents migration details for a Managed Database cluster
type DatabaseMigrationStartReq ¶
type DatabaseMigrationStartReq struct {
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
Database string `json:"database,omitempty"`
IgnoredDatabases string `json:"ignored_databases,omitempty"`
SSL *bool `json:"ssl"`
}
DatabaseMigrationStartReq struct used to start a migration for a Managed Database
type DatabasePlan ¶
type DatabasePlan struct {
ID string `json:"id"`
NumberOfNodes int `json:"number_of_nodes"`
Type string `json:"type"`
VCPUCount int `json:"vcpu_count"`
RAM int `json:"ram"`
Disk int `json:"disk"`
MonthlyCost int `json:"monthly_cost"`
SupportedEngines SupportedEngines `json:"supported_engines"`
MaxConnections *MaxConnections `json:"max_connections,omitempty"`
Locations []string `json:"locations"`
}
DatabasePlan represents a Managed Database plan
type DatabaseQuota ¶
type DatabaseQuota struct {
ClientID string `json:"client_id"`
User string `json:"user"`
ConsumerByteRate int `json:"consumer_byte_rate"`
ProducerByteRate int `json:"producer_byte_rate"`
RequestPercentage int `json:"request_percentage"`
}
DatabaseQuota represents a Kafka quota within a Managed Database cluster
type DatabaseQuotaCreateReq ¶
type DatabaseQuotaCreateReq struct {
ClientID string `json:"client_id"`
User string `json:"user"`
ConsumerByteRate int `json:"consumer_byte_rate"`
ProducerByteRate int `json:"producer_byte_rate"`
RequestPercentage int `json:"request_percentage"`
}
DatabaseQuotaCreateReq struct used to create a Kafka quota within a Managed Database
type DatabaseQuotaUpdateReq ¶
type DatabaseQuotaUpdateReq struct {
ConsumerByteRate int `json:"consumer_byte_rate"`
ProducerByteRate int `json:"producer_byte_rate"`
RequestPercentage int `json:"request_percentage"`
}
DatabaseQuotaUpdateReq struct used to update a Kafka quota within a Managed Database
type DatabaseSchemaRegistryAdvancedOptions ¶
type DatabaseSchemaRegistryAdvancedOptions struct {
LeaderEligibility *bool `json:"leader_eligibility,omitempty"`
SchemaReaderStrictMode *bool `json:"schema_reader_strict_mode,omitempty"`
RetriableErrorsSilenced *bool `json:"retriable_errors_silenced,omitempty"`
}
DatabaseSchemaRegistryAdvancedOptions represents user configurable Schema Registry advanced options within a Managed Database cluster
type DatabaseService ¶
type DatabaseService interface {
ListPlans(ctx context.Context, options *DBPlanListOptions) ([]DatabasePlan, *Meta, *http.Response, error)
List(ctx context.Context, options *DBListOptions) ([]Database, *Meta, *http.Response, error)
Create(ctx context.Context, databaseReq *DatabaseCreateReq) (*Database, *http.Response, error)
Get(ctx context.Context, databaseID string) (*Database, *http.Response, error)
Update(ctx context.Context, databaseID string, databaseReq *DatabaseUpdateReq) (*Database, *http.Response, error)
Delete(ctx context.Context, databaseID string) error
GetUsage(ctx context.Context, databaseID string) (*DatabaseUsage, *http.Response, error)
ListUsers(ctx context.Context, databaseID string) ([]DatabaseUser, *Meta, *http.Response, error)
CreateUser(ctx context.Context, databaseID string, databaseUserReq *DatabaseUserCreateReq) (*DatabaseUser, *http.Response, error)
GetUser(ctx context.Context, databaseID string, username string) (*DatabaseUser, *http.Response, error)
UpdateUser(ctx context.Context, databaseID string, username string, databaseUserReq *DatabaseUserUpdateReq) (*DatabaseUser, *http.Response, error) //nolint:lll
DeleteUser(ctx context.Context, databaseID string, username string) error
UpdateUserACL(ctx context.Context, databaseID string, username string, databaseUserACLReq *DatabaseUserACLReq) (*DatabaseUser, *http.Response, error) //nolint:lll
ListDBs(ctx context.Context, databaseID string) ([]DatabaseDB, *Meta, *http.Response, error)
CreateDB(ctx context.Context, databaseID string, databaseDBReq *DatabaseDBCreateReq) (*DatabaseDB, *http.Response, error)
GetDB(ctx context.Context, databaseID string, dbname string) (*DatabaseDB, *http.Response, error)
DeleteDB(ctx context.Context, databaseID string, dbname string) error
ListTopics(ctx context.Context, databaseID string) ([]DatabaseTopic, *Meta, *http.Response, error)
CreateTopic(ctx context.Context, databaseID string, databaseTopicReq *DatabaseTopicCreateReq) (*DatabaseTopic, *http.Response, error)
GetTopic(ctx context.Context, databaseID string, topicName string) (*DatabaseTopic, *http.Response, error)
UpdateTopic(ctx context.Context, databaseID string, topicName string, databaseTopicReq *DatabaseTopicUpdateReq) (*DatabaseTopic, *http.Response, error) //nolint:lll
DeleteTopic(ctx context.Context, databaseID string, topicName string) error
ListQuotas(ctx context.Context, databaseID string) ([]DatabaseQuota, *Meta, *http.Response, error)
CreateQuota(ctx context.Context, databaseID string, databaseQuotaReq *DatabaseQuotaCreateReq) (*DatabaseQuota, *http.Response, error)
GetQuota(ctx context.Context, databaseID string, clientID, username string) (*DatabaseQuota, *http.Response, error)
UpdateQuota(ctx context.Context, databaseID string, clientID, username string, databaseQuotaReq *DatabaseQuotaUpdateReq) (*DatabaseQuota, *http.Response, error) //nolint:lll
DeleteQuota(ctx context.Context, databaseID string, clientID, username string) error
ListMaintenanceUpdates(ctx context.Context, databaseID string) ([]string, *http.Response, error)
StartMaintenance(ctx context.Context, databaseID string) (string, *http.Response, error)
ListAvailableConnectors(ctx context.Context, databaseID string) ([]DatabaseAvailableConnector, *http.Response, error)
GetConnectorConfigurationSchema(ctx context.Context, databaseID string, connectorClass string) ([]DatabaseConnectorConfigurationOption, *http.Response, error) //nolint:lll
ListConnectors(ctx context.Context, databaseID string) ([]DatabaseConnector, *Meta, *http.Response, error)
CreateConnector(ctx context.Context, databaseID string, databaseConnectorReq *DatabaseConnectorCreateReq) (*DatabaseConnector, *http.Response, error) //nolint:lll
GetConnector(ctx context.Context, databaseID string, connectorName string) (*DatabaseConnector, *http.Response, error)
UpdateConnector(ctx context.Context, databaseID string, connectorName string, databaseConnectorReq *DatabaseConnectorUpdateReq) (*DatabaseConnector, *http.Response, error) //nolint:lll
DeleteConnector(ctx context.Context, databaseID string, connectorName string) error
GetConnectorStatus(ctx context.Context, databaseID string, connectorName string) (*DatabaseConnectorStatus, *http.Response, error)
RestartConnector(ctx context.Context, databaseID string, connectorName string) error
PauseConnector(ctx context.Context, databaseID string, connectorName string) error
ResumeConnector(ctx context.Context, databaseID string, connectorName string) error
RestartConnectorTask(ctx context.Context, databaseID string, connectorName string, taskID int) error
ListServiceAlerts(ctx context.Context, databaseID string, databaseAlertsReq *DatabaseListAlertsReq) ([]DatabaseAlert, *http.Response, error) //nolint:lll
GetMigrationStatus(ctx context.Context, databaseID string) (*DatabaseMigration, *http.Response, error)
StartMigration(ctx context.Context, databaseID string, databaseMigrationReq *DatabaseMigrationStartReq) (*DatabaseMigration, *http.Response, error) //nolint:lll
DetachMigration(ctx context.Context, databaseID string) error
AddReadOnlyReplica(ctx context.Context, databaseID string, databaseReplicaReq *DatabaseAddReplicaReq) (*Database, *http.Response, error)
PromoteReadReplica(ctx context.Context, databaseID string) error
GetBackupInformation(ctx context.Context, databaseID string) (*DatabaseBackups, *http.Response, error)
RestoreFromBackup(ctx context.Context, databaseID string, databaseRestoreReq *DatabaseBackupRestoreReq) (*Database, *http.Response, error)
Fork(ctx context.Context, databaseID string, databaseForkReq *DatabaseForkReq) (*Database, *http.Response, error)
ListConnectionPools(ctx context.Context, databaseID string) (*DatabaseConnections, []DatabaseConnectionPool, *Meta, *http.Response, error)
CreateConnectionPool(ctx context.Context, databaseID string, databaseConnectionPoolReq *DatabaseConnectionPoolCreateReq) (*DatabaseConnectionPool, *http.Response, error) //nolint:lll
GetConnectionPool(ctx context.Context, databaseID string, poolName string) (*DatabaseConnectionPool, *http.Response, error)
UpdateConnectionPool(ctx context.Context, databaseID string, poolName string, databaseConnectionPoolReq *DatabaseConnectionPoolUpdateReq) (*DatabaseConnectionPool, *http.Response, error) //nolint:lll
DeleteConnectionPool(ctx context.Context, databaseID string, poolName string) error
ListAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseAdvancedOptions, []AvailableOption, *http.Response, error)
UpdateAdvancedOptions(ctx context.Context, databaseID string, databaseAdvancedOptionsReq *DatabaseAdvancedOptions) (*DatabaseAdvancedOptions, []AvailableOption, *http.Response, error) //nolint:lll
ListKafkaRESTAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseKafkaRESTAdvancedOptions, []AvailableOption, *http.Response, error) //nolint:lll
UpdateKafkaRESTAdvancedOptions(ctx context.Context, databaseID string, databaseKafkaRESTAdvancedOptionsReq *DatabaseKafkaRESTAdvancedOptions) (*DatabaseKafkaRESTAdvancedOptions, []AvailableOption, *http.Response, error) //nolint:lll
ListSchemaRegistryAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseSchemaRegistryAdvancedOptions, []AvailableOption, *http.Response, error) //nolint:lll
UpdateSchemaRegistryAdvancedOptions(ctx context.Context, databaseID string, databaseSchemaRegistryAdvancedOptionsReq *DatabaseSchemaRegistryAdvancedOptions) (*DatabaseSchemaRegistryAdvancedOptions, []AvailableOption, *http.Response, error) //nolint:lll
ListKafkaConnectAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseKafkaConnectAdvancedOptions, []AvailableOption, *http.Response, error) //nolint:lll
UpdateKafkaConnectAdvancedOptions(ctx context.Context, databaseID string, databaseKafkaConnectAdvancedOptionsReq *DatabaseKafkaConnectAdvancedOptions) (*DatabaseKafkaConnectAdvancedOptions, []AvailableOption, *http.Response, error) //nolint:lll
ListAvailableVersions(ctx context.Context, databaseID string) ([]string, *http.Response, error)
StartVersionUpgrade(ctx context.Context, databaseID string, databaseVersionUpgradeReq *DatabaseVersionUpgradeReq) (string, *http.Response, error) //nolint:lll
}
DatabaseService is the interface to interact with the Database endpoints on the Vultr API Link: https://www.vultr.com/api/#tag/managed-databases
type DatabaseServiceHandler ¶
type DatabaseServiceHandler struct {
// contains filtered or unexported fields
}
DatabaseServiceHandler handles interaction with the server methods for the Vultr API
func (*DatabaseServiceHandler) AddReadOnlyReplica ¶
func (d *DatabaseServiceHandler) AddReadOnlyReplica(ctx context.Context, databaseID string, databaseReplicaReq *DatabaseAddReplicaReq) (*Database, *http.Response, error)
AddReadOnlyReplica will add a read-only replica node to a Managed Database with the given parameters
func (*DatabaseServiceHandler) Create ¶
func (d *DatabaseServiceHandler) Create(ctx context.Context, databaseReq *DatabaseCreateReq) (*Database, *http.Response, error)
Create will create a Managed Database with the given parameters
func (*DatabaseServiceHandler) CreateConnectionPool ¶
func (d *DatabaseServiceHandler) CreateConnectionPool(ctx context.Context, databaseID string, databaseConnectionPoolReq *DatabaseConnectionPoolCreateReq) (*DatabaseConnectionPool, *http.Response, error)
CreateConnectionPool will create a connection pool within the PostgreSQL Managed Database with the given parameters
func (*DatabaseServiceHandler) CreateConnector ¶
func (d *DatabaseServiceHandler) CreateConnector(ctx context.Context, databaseID string, databaseConnectorReq *DatabaseConnectorCreateReq) (*DatabaseConnector, *http.Response, error)
CreateConnector will create a Kafka connector within a Managed Database with the given parameters
func (*DatabaseServiceHandler) CreateDB ¶
func (d *DatabaseServiceHandler) CreateDB(ctx context.Context, databaseID string, databaseDBReq *DatabaseDBCreateReq) (*DatabaseDB, *http.Response, error)
CreateDB will create a logical database within a Managed Database with the given parameters
func (*DatabaseServiceHandler) CreateQuota ¶
func (d *DatabaseServiceHandler) CreateQuota(ctx context.Context, databaseID string, databaseQuotaReq *DatabaseQuotaCreateReq) (*DatabaseQuota, *http.Response, error)
CreateQuota will create a Kafka quota within a Managed Database with the given parameters
func (*DatabaseServiceHandler) CreateTopic ¶
func (d *DatabaseServiceHandler) CreateTopic(ctx context.Context, databaseID string, databaseTopicReq *DatabaseTopicCreateReq) (*DatabaseTopic, *http.Response, error)
CreateTopic will create a Kafka topic within a Managed Database with the given parameters
func (*DatabaseServiceHandler) CreateUser ¶
func (d *DatabaseServiceHandler) CreateUser(ctx context.Context, databaseID string, databaseUserReq *DatabaseUserCreateReq) (*DatabaseUser, *http.Response, error)
CreateUser will create a user within a Managed Database with the given parameters
func (*DatabaseServiceHandler) Delete ¶
func (d *DatabaseServiceHandler) Delete(ctx context.Context, databaseID string) error
Delete a Managed database, all data will be permanently lost
func (*DatabaseServiceHandler) DeleteConnectionPool ¶
func (d *DatabaseServiceHandler) DeleteConnectionPool(ctx context.Context, databaseID, poolName string) error
DeleteConnectionPool will delete a connection pool within a Managed Database
func (*DatabaseServiceHandler) DeleteConnector ¶
func (d *DatabaseServiceHandler) DeleteConnector(ctx context.Context, databaseID, connectorName string) error
DeleteConnector will delete a Kafka connector within a Managed Database
func (*DatabaseServiceHandler) DeleteDB ¶
func (d *DatabaseServiceHandler) DeleteDB(ctx context.Context, databaseID, dbname string) error
DeleteDB will delete a user within a Managed Database
func (*DatabaseServiceHandler) DeleteQuota ¶
func (d *DatabaseServiceHandler) DeleteQuota(ctx context.Context, databaseID, clientID, username string) error
DeleteQuota will delete a Kafka quota within a Managed Database
func (*DatabaseServiceHandler) DeleteTopic ¶
func (d *DatabaseServiceHandler) DeleteTopic(ctx context.Context, databaseID, topicName string) error
DeleteTopic will delete a Kafka topic within a Managed Database
func (*DatabaseServiceHandler) DeleteUser ¶
func (d *DatabaseServiceHandler) DeleteUser(ctx context.Context, databaseID, username string) error
DeleteUser will delete a user within a Managed Database
func (*DatabaseServiceHandler) DetachMigration ¶
func (d *DatabaseServiceHandler) DetachMigration(ctx context.Context, databaseID string) error
DetachMigration will detach a migration from a Managed Database
func (*DatabaseServiceHandler) Fork ¶
func (d *DatabaseServiceHandler) Fork(ctx context.Context, databaseID string, databaseForkReq *DatabaseForkReq) (*Database, *http.Response, error)
Fork will create a new subscription of any plan from a backup of a Managed Database using the given parameters
func (*DatabaseServiceHandler) Get ¶
func (d *DatabaseServiceHandler) Get(ctx context.Context, databaseID string) (*Database, *http.Response, error)
Get will get a Managed Database with the given databaseID
func (*DatabaseServiceHandler) GetBackupInformation ¶
func (d *DatabaseServiceHandler) GetBackupInformation(ctx context.Context, databaseID string) (*DatabaseBackups, *http.Response, error)
GetBackupInformation retrieves backup information for a Managed Database
func (*DatabaseServiceHandler) GetConnectionPool ¶
func (d *DatabaseServiceHandler) GetConnectionPool(ctx context.Context, databaseID, poolName string) (*DatabaseConnectionPool, *http.Response, error)
GetConnectionPool retrieves information on an individual connection pool within a PostgreSQL Managed Database based on a poolName and databaseID
func (*DatabaseServiceHandler) GetConnector ¶
func (d *DatabaseServiceHandler) GetConnector(ctx context.Context, databaseID, connectorName string) (*DatabaseConnector, *http.Response, error)
GetConnector retrieves information on an individual Kafka connector within a Managed Database based on a connectorName and databaseID
func (*DatabaseServiceHandler) GetConnectorConfigurationSchema ¶
func (d *DatabaseServiceHandler) GetConnectorConfigurationSchema(ctx context.Context, databaseID, connectorClass string) ([]DatabaseConnectorConfigurationOption, *http.Response, error)
GetConnectorConfigurationSchema retrieves all available configuration options for a Kafka connector on a Managed Database
func (*DatabaseServiceHandler) GetConnectorStatus ¶
func (d *DatabaseServiceHandler) GetConnectorStatus(ctx context.Context, databaseID, connectorName string) (*DatabaseConnectorStatus, *http.Response, error)
GetConnectorStatus retrieves the status of a Kafka connector within a Managed Database based on a connectorName and databaseID
func (*DatabaseServiceHandler) GetDB ¶
func (d *DatabaseServiceHandler) GetDB(ctx context.Context, databaseID, dbname string) (*DatabaseDB, *http.Response, error)
GetDB retrieves information on an individual logical database within a Managed Database based on a dbname and databaseID
func (*DatabaseServiceHandler) GetMigrationStatus ¶
func (d *DatabaseServiceHandler) GetMigrationStatus(ctx context.Context, databaseID string) (*DatabaseMigration, *http.Response, error)
GetMigrationStatus retrieves the migration status for a Managed Database
func (*DatabaseServiceHandler) GetQuota ¶
func (d *DatabaseServiceHandler) GetQuota(ctx context.Context, databaseID, clientID, username string) (*DatabaseQuota, *http.Response, error)
GetQuota retrieves information on an individual Kafka quota within a Managed Database based on a clientID and databaseID
func (*DatabaseServiceHandler) GetTopic ¶
func (d *DatabaseServiceHandler) GetTopic(ctx context.Context, databaseID, topicName string) (*DatabaseTopic, *http.Response, error)
GetTopic retrieves information on an individual Kafka topic within a Managed Database based on a topicName and databaseID
func (*DatabaseServiceHandler) GetUsage ¶
func (d *DatabaseServiceHandler) GetUsage(ctx context.Context, databaseID string) (*DatabaseUsage, *http.Response, error)
GetUsage retrieves disk, memory, and CPU usage information for a Managed Database
func (*DatabaseServiceHandler) GetUser ¶
func (d *DatabaseServiceHandler) GetUser(ctx context.Context, databaseID, username string) (*DatabaseUser, *http.Response, error)
GetUser retrieves information on an individual user within a Managed Database based on a username and databaseID
func (*DatabaseServiceHandler) List ¶
func (d *DatabaseServiceHandler) List(ctx context.Context, options *DBListOptions) ([]Database, *Meta, *http.Response, error)
List retrieves all databases on your account
func (*DatabaseServiceHandler) ListAdvancedOptions ¶
func (d *DatabaseServiceHandler) ListAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseAdvancedOptions, []AvailableOption, *http.Response, error)
ListAdvancedOptions retrieves all current and available advanced configuration options within a Managed Database
func (*DatabaseServiceHandler) ListAvailableConnectors ¶
func (d *DatabaseServiceHandler) ListAvailableConnectors(ctx context.Context, databaseID string) ([]DatabaseAvailableConnector, *http.Response, error)
ListAvailableConnectors retrieves all available Kafka connectors for a Managed Database
func (*DatabaseServiceHandler) ListAvailableVersions ¶
func (d *DatabaseServiceHandler) ListAvailableVersions(ctx context.Context, databaseID string) ([]string, *http.Response, error)
ListAvailableVersions retrieves all available version upgrades for a Managed Database
func (*DatabaseServiceHandler) ListConnectionPools ¶
func (d *DatabaseServiceHandler) ListConnectionPools(ctx context.Context, databaseID string) (*DatabaseConnections, []DatabaseConnectionPool, *Meta, *http.Response, error)
ListConnectionPools retrieves all connection pools within your PostgreSQL Managed Database
func (*DatabaseServiceHandler) ListConnectors ¶
func (d *DatabaseServiceHandler) ListConnectors(ctx context.Context, databaseID string) ([]DatabaseConnector, *Meta, *http.Response, error)
ListConnectors retrieves all Kafka connectors on a Managed Database
func (*DatabaseServiceHandler) ListDBs ¶
func (d *DatabaseServiceHandler) ListDBs(ctx context.Context, databaseID string) ([]DatabaseDB, *Meta, *http.Response, error)
ListDBs retrieves all logical databases on a Managed Database
func (*DatabaseServiceHandler) ListKafkaConnectAdvancedOptions ¶
func (d *DatabaseServiceHandler) ListKafkaConnectAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseKafkaConnectAdvancedOptions, []AvailableOption, *http.Response, error)
ListKafkaConnectAdvancedOptions retrieves all current and available Kafka Connect advanced options within a Managed Database
func (*DatabaseServiceHandler) ListKafkaRESTAdvancedOptions ¶
func (d *DatabaseServiceHandler) ListKafkaRESTAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseKafkaRESTAdvancedOptions, []AvailableOption, *http.Response, error)
ListKafkaRESTAdvancedOptions retrieves all current and available Kafka REST advanced configuration options within a Managed Database
func (*DatabaseServiceHandler) ListMaintenanceUpdates ¶
func (d *DatabaseServiceHandler) ListMaintenanceUpdates(ctx context.Context, databaseID string) ([]string, *http.Response, error)
ListMaintenanceUpdates retrieves all available maintenance updates for a Managed Database
func (*DatabaseServiceHandler) ListPlans ¶
func (d *DatabaseServiceHandler) ListPlans(ctx context.Context, options *DBPlanListOptions) ([]DatabasePlan, *Meta, *http.Response, error)
ListPlans retrieves all database plans
func (*DatabaseServiceHandler) ListQuotas ¶
func (d *DatabaseServiceHandler) ListQuotas(ctx context.Context, databaseID string) ([]DatabaseQuota, *Meta, *http.Response, error)
ListQuotas retrieves all Kafka quotas on a Managed Database
func (*DatabaseServiceHandler) ListSchemaRegistryAdvancedOptions ¶
func (d *DatabaseServiceHandler) ListSchemaRegistryAdvancedOptions(ctx context.Context, databaseID string) (*DatabaseSchemaRegistryAdvancedOptions, []AvailableOption, *http.Response, error)
ListSchemaRegistryAdvancedOptions retrieves all current and available Schema Registry advanced options within a Managed Database
func (*DatabaseServiceHandler) ListServiceAlerts ¶
func (d *DatabaseServiceHandler) ListServiceAlerts(ctx context.Context, databaseID string, databaseAlertsReq *DatabaseListAlertsReq) ([]DatabaseAlert, *http.Response, error)
ListServiceAlerts queries for service alerts for a Managed Database using the given parameters
func (*DatabaseServiceHandler) ListTopics ¶
func (d *DatabaseServiceHandler) ListTopics(ctx context.Context, databaseID string) ([]DatabaseTopic, *Meta, *http.Response, error)
ListTopics retrieves all Kafka topics on a Managed Database
func (*DatabaseServiceHandler) ListUsers ¶
func (d *DatabaseServiceHandler) ListUsers(ctx context.Context, databaseID string) ([]DatabaseUser, *Meta, *http.Response, error)
ListUsers retrieves all database users on a Managed Database
func (*DatabaseServiceHandler) PauseConnector ¶
func (d *DatabaseServiceHandler) PauseConnector(ctx context.Context, databaseID, connectorName string) error
PauseConnector will pause a Kafka connector within a Managed Database
func (*DatabaseServiceHandler) PromoteReadReplica ¶
func (d *DatabaseServiceHandler) PromoteReadReplica(ctx context.Context, databaseID string) error
PromoteReadReplica will promote a read-only replica to its own standalone Managed Database subscription
func (*DatabaseServiceHandler) RestartConnector ¶
func (d *DatabaseServiceHandler) RestartConnector(ctx context.Context, databaseID, connectorName string) error
RestartConnector will restart a Kafka connector within a Managed Database
func (*DatabaseServiceHandler) RestartConnectorTask ¶
func (d *DatabaseServiceHandler) RestartConnectorTask(ctx context.Context, databaseID, connectorName string, taskID int) error
RestartConnectorTask will restart a Kafka connector task within a Managed Database
func (*DatabaseServiceHandler) RestoreFromBackup ¶
func (d *DatabaseServiceHandler) RestoreFromBackup(ctx context.Context, databaseID string, databaseRestoreReq *DatabaseBackupRestoreReq) (*Database, *http.Response, error)
RestoreFromBackup will create a new subscription of the same plan from a backup of a Managed Database using the given parameters
func (*DatabaseServiceHandler) ResumeConnector ¶
func (d *DatabaseServiceHandler) ResumeConnector(ctx context.Context, databaseID, connectorName string) error
ResumeConnector will resume a paused Kafka connector within a Managed Database
func (*DatabaseServiceHandler) StartMaintenance ¶
func (d *DatabaseServiceHandler) StartMaintenance(ctx context.Context, databaseID string) (string, *http.Response, error)
StartMaintenance will start the maintenance update process for a Managed Database
func (*DatabaseServiceHandler) StartMigration ¶
func (d *DatabaseServiceHandler) StartMigration(ctx context.Context, databaseID string, databaseMigrationReq *DatabaseMigrationStartReq) (*DatabaseMigration, *http.Response, error)
StartMigration will start a migration for a Managed Database using the given credentials
func (*DatabaseServiceHandler) StartVersionUpgrade ¶
func (d *DatabaseServiceHandler) StartVersionUpgrade(ctx context.Context, databaseID string, databaseVersionUpgradeReq *DatabaseVersionUpgradeReq) (string, *http.Response, error)
StartVersionUpgrade will start a migration for a Managed Database using the given credentials
func (*DatabaseServiceHandler) Update ¶
func (d *DatabaseServiceHandler) Update(ctx context.Context, databaseID string, databaseReq *DatabaseUpdateReq) (*Database, *http.Response, error)
Update will update a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateAdvancedOptions ¶
func (d *DatabaseServiceHandler) UpdateAdvancedOptions(ctx context.Context, databaseID string, databaseAdvancedOptionsReq *DatabaseAdvancedOptions) (*DatabaseAdvancedOptions, []AvailableOption, *http.Response, error)
UpdateAdvancedOptions will update advanced configuration options within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateConnectionPool ¶
func (d *DatabaseServiceHandler) UpdateConnectionPool(ctx context.Context, databaseID, poolName string, databaseConnectionPoolReq *DatabaseConnectionPoolUpdateReq) (*DatabaseConnectionPool, *http.Response, error)
UpdateConnectionPool will update a connection pool within the PostgreSQL Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateConnector ¶
func (d *DatabaseServiceHandler) UpdateConnector(ctx context.Context, databaseID, connectorName string, databaseConnectorReq *DatabaseConnectorUpdateReq) (*DatabaseConnector, *http.Response, error)
UpdateConnector will update a Kafka connector within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateKafkaConnectAdvancedOptions ¶
func (d *DatabaseServiceHandler) UpdateKafkaConnectAdvancedOptions(ctx context.Context, databaseID string, databaseKafkaConnectAdvancedOptionsReq *DatabaseKafkaConnectAdvancedOptions) (*DatabaseKafkaConnectAdvancedOptions, []AvailableOption, *http.Response, error)
UpdateKafkaConnectAdvancedOptions will update Kafka Connect advanced options within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateKafkaRESTAdvancedOptions ¶
func (d *DatabaseServiceHandler) UpdateKafkaRESTAdvancedOptions(ctx context.Context, databaseID string, databaseKafkaRESTAdvancedOptionsReq *DatabaseKafkaRESTAdvancedOptions) (*DatabaseKafkaRESTAdvancedOptions, []AvailableOption, *http.Response, error)
UpdateKafkaRESTAdvancedOptions will update Kafka REST advanced configuration options within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateQuota ¶
func (d *DatabaseServiceHandler) UpdateQuota(ctx context.Context, databaseID, clientID, username string, databaseQuotaReq *DatabaseQuotaUpdateReq) (*DatabaseQuota, *http.Response, error)
UpdateQuota will update a Kafka quota within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateSchemaRegistryAdvancedOptions ¶
func (d *DatabaseServiceHandler) UpdateSchemaRegistryAdvancedOptions(ctx context.Context, databaseID string, databaseSchemaRegistryAdvancedOptionsReq *DatabaseSchemaRegistryAdvancedOptions) (*DatabaseSchemaRegistryAdvancedOptions, []AvailableOption, *http.Response, error)
UpdateSchemaRegistryAdvancedOptions will update Schema Registry advanced options within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateTopic ¶
func (d *DatabaseServiceHandler) UpdateTopic(ctx context.Context, databaseID, topicName string, databaseTopicReq *DatabaseTopicUpdateReq) (*DatabaseTopic, *http.Response, error)
UpdateTopic will update a Kafka topic within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateUser ¶
func (d *DatabaseServiceHandler) UpdateUser(ctx context.Context, databaseID, username string, databaseUserReq *DatabaseUserUpdateReq) (*DatabaseUser, *http.Response, error)
UpdateUser will update a user within a Managed Database with the given parameters
func (*DatabaseServiceHandler) UpdateUserACL ¶
func (d *DatabaseServiceHandler) UpdateUserACL(ctx context.Context, databaseID, username string, databaseUserACLReq *DatabaseUserACLReq) (*DatabaseUser, *http.Response, error)
UpdateUserACL will update a user's access control within the Valkey Managed Database
type DatabaseTopic ¶
type DatabaseTopic struct {
Name string `json:"name"`
Partitions int `json:"partitions"`
Replication int `json:"replication"`
RetentionHours int `json:"retention_hours"`
RetentionBytes int `json:"retention_bytes"`
}
DatabaseTopic represents a Kafka topic within a Managed Database cluster
type DatabaseTopicCreateReq ¶
type DatabaseTopicCreateReq struct {
Name string `json:"name"`
Partitions int `json:"partitions"`
Replication int `json:"replication"`
RetentionHours int `json:"retention_hours"`
RetentionBytes int `json:"retention_bytes"`
}
DatabaseTopicCreateReq struct used to create a Kafka topic within a Managed Database
type DatabaseTopicUpdateReq ¶
type DatabaseTopicUpdateReq struct {
Partitions int `json:"partitions"`
Replication int `json:"replication"`
RetentionHours int `json:"retention_hours"`
RetentionBytes int `json:"retention_bytes"`
}
DatabaseTopicUpdateReq struct used to update a Kafka topic within a Managed Database
type DatabaseUpdateReq ¶
type DatabaseUpdateReq struct {
Region string `json:"region,omitempty"`
Plan string `json:"plan,omitempty"`
Label string `json:"label,omitempty"`
Tag string `json:"tag,omitempty"`
VPCID *string `json:"vpc_id,omitempty"`
MaintenanceDOW string `json:"maintenance_dow,omitempty"`
MaintenanceTime string `json:"maintenance_time,omitempty"`
BackupHour *string `json:"backup_hour,omitempty"`
BackupMinute *string `json:"backup_minute,omitempty"`
ClusterTimeZone string `json:"cluster_time_zone,omitempty"`
TrustedIPs []string `json:"trusted_ips,omitempty"`
MySQLSQLModes []string `json:"mysql_sql_modes,omitempty"`
MySQLRequirePrimaryKey *bool `json:"mysql_require_primary_key,omitempty"`
MySQLSlowQueryLog *bool `json:"mysql_slow_query_log,omitempty"`
MySQLLongQueryTime int `json:"mysql_long_query_time,omitempty"`
EvictionPolicy string `json:"eviction_policy,omitempty"`
EnableKafkaREST *bool `json:"enable_kafka_rest,omitempty"`
EnableSchemaRegistry *bool `json:"enable_schema_registry,omitempty"`
EnableKafkaConnect *bool `json:"enable_kafka_connect,omitempty"`
}
DatabaseUpdateReq struct used to update a database
type DatabaseUsage ¶
type DatabaseUsage struct {
Disk DatabaseDiskUsage `json:"disk"`
Memory DatabaseMemoryUsage `json:"memory"`
CPU DatabaseCPUUsage `json:"cpu"`
}
DatabaseUsage represents disk, memory, and CPU usage for a Managed Database
type DatabaseUser ¶
type DatabaseUser struct {
Username string `json:"username"`
Password string `json:"password"`
Encryption string `json:"encryption,omitempty"`
AccessControl *DatabaseUserACL `json:"access_control,omitempty"`
Permission string `json:"permission,omitempty"`
AccessKey string `json:"access_key,omitempty"`
AccessCert string `json:"access_cert,omitempty"`
}
DatabaseUser represents a user within a Managed Database cluster
type DatabaseUserACL ¶
type DatabaseUserACL struct {
ACLCategories []string `json:"acl_categories"`
ACLChannels []string `json:"acl_channels"`
ACLCommands []string `json:"acl_commands"`
ACLKeys []string `json:"acl_keys"`
}
DatabaseUserACL represents an access control configuration for a user within a Valkey Managed Database cluster
type DatabaseUserACLReq ¶
type DatabaseUserACLReq struct {
ACLCategories *[]string `json:"acl_categories,omitempty"`
ACLChannels *[]string `json:"acl_channels,omitempty"`
ACLCommands *[]string `json:"acl_commands,omitempty"`
ACLKeys *[]string `json:"acl_keys,omitempty"`
Permission string `json:"permission,omitempty"`
}
DatabaseUserACLReq represents input for updating a user's access control within a Managed Database cluster
type DatabaseUserCreateReq ¶
type DatabaseUserCreateReq struct {
Username string `json:"username"`
Password string `json:"password,omitempty"`
Encryption string `json:"encryption,omitempty"`
Permission string `json:"permission,omitempty"`
}
DatabaseUserCreateReq struct used to create a user within a Managed Database
type DatabaseUserUpdateReq ¶
type DatabaseUserUpdateReq struct {
Password string `json:"password"`
}
DatabaseUserUpdateReq struct used to update a user within a Managed Database
type DatabaseVersionUpgradeReq ¶
type DatabaseVersionUpgradeReq struct {
Version string `json:"version,omitempty"`
}
DatabaseVersionUpgradeReq struct used to initiate a version upgrade for a PostgreSQL Managed Database
type DockerCredentialsOpt ¶
DockerCredentialsOpt contains the options used to create Docker credentials
type Domain ¶
type Domain struct {
Domain string `json:"domain,omitempty"`
DateCreated string `json:"date_created,omitempty"`
DNSSec string `json:"dns_sec,omitempty"`
}
Domain represents a Domain entry on Vultr
type DomainRecord ¶
type DomainRecord struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Name string `json:"name,omitempty"`
Data string `json:"data,omitempty"`
Priority int `json:"priority,omitempty"`
TTL int `json:"ttl,omitempty"`
}
DomainRecord represents a DNS record on Vultr
type DomainRecordReq ¶
type DomainRecordReq struct {
Name string `json:"name"`
Type string `json:"type,omitempty"`
Data string `json:"data,omitempty"`
TTL int `json:"ttl,omitempty"`
Priority *int `json:"priority,omitempty"`
}
DomainRecordReq struct to use for create/update domain record calls.
type DomainRecordService ¶
type DomainRecordService interface {
Create(ctx context.Context, domain string, domainRecordReq *DomainRecordReq) (*DomainRecord, *http.Response, error)
Get(ctx context.Context, domain, recordID string) (*DomainRecord, *http.Response, error)
Update(ctx context.Context, domain, recordID string, domainRecordReq *DomainRecordReq) error
Delete(ctx context.Context, domain, recordID string) error
List(ctx context.Context, domain string, options *ListOptions) ([]DomainRecord, *Meta, *http.Response, error)
}
DomainRecordService is the interface to interact with the DNS Records endpoints on the Vultr API Link: https://www.vultr.com/api/#tag/dns
type DomainRecordsServiceHandler ¶
type DomainRecordsServiceHandler struct {
// contains filtered or unexported fields
}
DomainRecordsServiceHandler handles interaction with the DNS Records methods for the Vultr API
func (*DomainRecordsServiceHandler) Create ¶
func (d *DomainRecordsServiceHandler) Create(ctx context.Context, domain string, domainRecordReq *DomainRecordReq) (*DomainRecord, *http.Response, error)
Create will add a DNS record.
func (*DomainRecordsServiceHandler) Delete ¶
func (d *DomainRecordsServiceHandler) Delete(ctx context.Context, domain, recordID string) error
Delete will delete a domain name and all associated records.
func (*DomainRecordsServiceHandler) Get ¶
func (d *DomainRecordsServiceHandler) Get(ctx context.Context, domain, recordID string) (*DomainRecord, *http.Response, error)
Get record from a domain
func (*DomainRecordsServiceHandler) List ¶
func (d *DomainRecordsServiceHandler) List(ctx context.Context, domain string, options *ListOptions) ([]DomainRecord, *Meta, *http.Response, error)
List will list all the records associated with a particular domain on Vultr.
func (*DomainRecordsServiceHandler) Update ¶
func (d *DomainRecordsServiceHandler) Update(ctx context.Context, domain, recordID string, domainRecordReq *DomainRecordReq) error
Update will update a Domain record
type DomainReq ¶
type DomainReq struct {
Domain string `json:"domain,omitempty"`
IP string `json:"ip,omitempty"`
DNSSec string `json:"dns_sec,omitempty"`
}
DomainReq is the struct to create a domain If IP is omitted then an empty DNS entry will be created. If supplied the domain will be pre populated with entries
type DomainService ¶
type DomainService interface {
Create(ctx context.Context, domainReq *DomainReq) (*Domain, *http.Response, error)
Get(ctx context.Context, domain string) (*Domain, *http.Response, error)
Update(ctx context.Context, domain, dnsSec string) error
Delete(ctx context.Context, domain string) error
List(ctx context.Context, options *ListOptions) ([]Domain, *Meta, *http.Response, error)
GetSoa(ctx context.Context, domain string) (*Soa, *http.Response, error)
UpdateSoa(ctx context.Context, domain string, soaReq *Soa) error
GetDNSSec(ctx context.Context, domain string) ([]string, *http.Response, error)
}
DomainService is the interface to interact with the DNS endpoints on the Vultr API https://www.vultr.com/api/#tag/dns
type DomainServiceHandler ¶
type DomainServiceHandler struct {
// contains filtered or unexported fields
}
DomainServiceHandler handles interaction with the DNS methods for the Vultr API
func (*DomainServiceHandler) Create ¶
func (d *DomainServiceHandler) Create(ctx context.Context, domainReq *DomainReq) (*Domain, *http.Response, error)
Create a domain entry
func (*DomainServiceHandler) Delete ¶
func (d *DomainServiceHandler) Delete(ctx context.Context, domain string) error
Delete a domain with all associated records.
func (*DomainServiceHandler) Get ¶
func (d *DomainServiceHandler) Get(ctx context.Context, domain string) (*Domain, *http.Response, error)
Get a domain from your Vultr account.
func (*DomainServiceHandler) GetDNSSec ¶
func (d *DomainServiceHandler) GetDNSSec(ctx context.Context, domain string) ([]string, *http.Response, error)
GetDNSSec gets the DNSSec keys for a domain (if enabled)
func (*DomainServiceHandler) GetSoa ¶
func (d *DomainServiceHandler) GetSoa(ctx context.Context, domain string) (*Soa, *http.Response, error)
GetSoa gets the SOA record information for a domain
func (*DomainServiceHandler) List ¶
func (d *DomainServiceHandler) List(ctx context.Context, options *ListOptions) ([]Domain, *Meta, *http.Response, error)
List gets all domains associated with the current Vultr account.
type FerretDBCredentials ¶
type FerretDBCredentials struct {
Host string `json:"host"`
Port int `json:"port"`
User string `json:"user"`
Password string `json:"password"`
PublicIP string `json:"public_ip"`
PrivateIP string `json:"private_ip,omitempty"`
}
FerretDBCredentials represents connection details and IP address information for FerretDB engine type subscriptions
type FireWallGroupServiceHandler ¶
type FireWallGroupServiceHandler struct {
// contains filtered or unexported fields
}
FireWallGroupServiceHandler handles interaction with the firewall group methods for the Vultr API
func (*FireWallGroupServiceHandler) Create ¶
func (f *FireWallGroupServiceHandler) Create(ctx context.Context, fwGroupReq *FirewallGroupReq) (*FirewallGroup, *http.Response, error)
Create will create a new firewall group on your Vultr account
func (*FireWallGroupServiceHandler) Delete ¶
func (f *FireWallGroupServiceHandler) Delete(ctx context.Context, fwGroupID string) error
Delete will delete a firewall group from your Vultr account
func (*FireWallGroupServiceHandler) Get ¶
func (f *FireWallGroupServiceHandler) Get(ctx context.Context, fwGroupID string) (*FirewallGroup, *http.Response, error)
Get will return a firewall group based on provided groupID from your Vultr account
func (*FireWallGroupServiceHandler) List ¶
func (f *FireWallGroupServiceHandler) List(ctx context.Context, options *ListOptions) ([]FirewallGroup, *Meta, *http.Response, error)
List will return a list of all firewall groups on your Vultr account
func (*FireWallGroupServiceHandler) Update ¶
func (f *FireWallGroupServiceHandler) Update(ctx context.Context, fwGroupID string, fwGroupReq *FirewallGroupReq) error
Update will change the description of a firewall group
type FireWallRuleService ¶
type FireWallRuleService interface {
Create(ctx context.Context, fwGroupID string, fwRuleReq *FirewallRuleReq) (*FirewallRule, *http.Response, error)
Get(ctx context.Context, fwGroupID string, fwRuleID int) (*FirewallRule, *http.Response, error)
Delete(ctx context.Context, fwGroupID string, fwRuleID int) error
List(ctx context.Context, fwGroupID string, options *ListOptions) ([]FirewallRule, *Meta, *http.Response, error)
}
FireWallRuleService is the interface to interact with the firewall rule endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/firewall
type FireWallRuleServiceHandler ¶
type FireWallRuleServiceHandler struct {
// contains filtered or unexported fields
}
FireWallRuleServiceHandler handles interaction with the firewall rule methods for the Vultr API
func (*FireWallRuleServiceHandler) Create ¶
func (f *FireWallRuleServiceHandler) Create(ctx context.Context, fwGroupID string, fwRuleReq *FirewallRuleReq) (*FirewallRule, *http.Response, error)
Create will create a rule in a firewall group.
func (*FireWallRuleServiceHandler) Delete ¶
func (f *FireWallRuleServiceHandler) Delete(ctx context.Context, fwGroupID string, fwRuleID int) error
Delete will delete a firewall rule on your Vultr account
func (*FireWallRuleServiceHandler) Get ¶
func (f *FireWallRuleServiceHandler) Get(ctx context.Context, fwGroupID string, fwRuleID int) (*FirewallRule, *http.Response, error)
Get will get a rule in a firewall group.
func (*FireWallRuleServiceHandler) List ¶
func (f *FireWallRuleServiceHandler) List(ctx context.Context, fwGroupID string, options *ListOptions) ([]FirewallRule, *Meta, *http.Response, error)
List will return both ipv4 an ipv6 firewall rules that are defined within a firewall group
type FirewallGroup ¶
type FirewallGroup struct {
ID string `json:"id"`
Description string `json:"description"`
DateCreated string `json:"date_created"`
DateModified string `json:"date_modified"`
InstanceCount int `json:"instance_count"`
RuleCount int `json:"rule_count"`
MaxRuleCount int `json:"max_rule_count"`
}
FirewallGroup represents a Vultr firewall group
type FirewallGroupReq ¶
type FirewallGroupReq struct {
Description string `json:"description"`
}
FirewallGroupReq struct is used to create and update a Firewall Group.
type FirewallGroupService ¶
type FirewallGroupService interface {
Create(ctx context.Context, fwGroupReq *FirewallGroupReq) (*FirewallGroup, *http.Response, error)
Get(ctx context.Context, groupID string) (*FirewallGroup, *http.Response, error)
Update(ctx context.Context, fwGroupID string, fwGroupReq *FirewallGroupReq) error
Delete(ctx context.Context, fwGroupID string) error
List(ctx context.Context, options *ListOptions) ([]FirewallGroup, *Meta, *http.Response, error)
}
FirewallGroupService is the interface to interact with the firewall group endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/firewall
type FirewallRule ¶
type FirewallRule struct {
ID int `json:"id"`
Action string `json:"action"`
IPType string `json:"ip_type"`
Protocol string `json:"protocol"`
Port string `json:"port"`
Subnet string `json:"subnet"`
SubnetSize int `json:"subnet_size"`
Source string `json:"source"`
Notes string `json:"notes"`
}
FirewallRule represents a Vultr firewall rule
type FirewallRuleReq ¶
type FirewallRuleReq struct {
IPType string `json:"ip_type"`
Protocol string `json:"protocol"`
Subnet string `json:"subnet"`
SubnetSize int `json:"subnet_size"`
Port string `json:"port,omitempty"`
Source string `json:"source,omitempty"`
Notes string `json:"notes,omitempty"`
}
FirewallRuleReq struct used to create a FirewallRule.
type ForwardingRule ¶
type ForwardingRule struct {
RuleID string `json:"id,omitempty"`
FrontendProtocol string `json:"frontend_protocol,omitempty"`
FrontendPort int `json:"frontend_port,omitempty"`
BackendProtocol string `json:"backend_protocol,omitempty"`
BackendPort int `json:"backend_port,omitempty"`
}
ForwardingRule represent a single forwarding rule
type ForwardingRules ¶
type ForwardingRules struct {
ForwardRuleList []ForwardingRule `json:"forwarding_rules,omitempty"`
}
ForwardingRules represent a list of forwarding rules
type GenericInfo ¶
type GenericInfo struct {
BalancingAlgorithm string `json:"balancing_algorithm,omitempty"`
Timeout int `json:"timeout,omitempty"`
SSLRedirect *bool `json:"ssl_redirect,omitempty"`
StickySessions *StickySessions `json:"sticky_sessions,omitempty"`
ProxyProtocol *bool `json:"proxy_protocol,omitempty"`
VPC string `json:"vpc,omitempty"`
}
GenericInfo represents generic configuration of your load balancer
type HealthCheck ¶
type HealthCheck struct {
Protocol string `json:"protocol,omitempty"`
Port int `json:"port,omitempty"`
Path string `json:"path,omitempty"`
CheckInterval int `json:"check_interval,omitempty"`
ResponseTimeout int `json:"response_timeout,omitempty"`
UnhealthyThreshold int `json:"unhealthy_threshold,omitempty"`
HealthyThreshold int `json:"healthy_threshold,omitempty"`
}
HealthCheck represents your health check configuration for your load balancer.
type History ¶
type History struct {
ID int `json:"id"`
Date string `json:"date"`
Type string `json:"type"`
Description string `json:"description"`
Amount float32 `json:"amount"`
Balance float32 `json:"balance"`
}
History represents a billing history item on an account
type IPv4 ¶
type IPv4 struct {
IP string `json:"ip,omitempty"`
Netmask string `json:"netmask,omitempty"`
Gateway string `json:"gateway,omitempty"`
Type string `json:"type,omitempty"`
Reverse string `json:"reverse,omitempty"`
}
IPv4 struct
type IPv6 ¶
type IPv6 struct {
IP string `json:"ip,omitempty"`
Network string `json:"network,omitempty"`
NetworkSize int `json:"network_size,omitempty"`
Type string `json:"type,omitempty"`
}
IPv6 struct
type ISO ¶
type ISO struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
FileName string `json:"filename"`
Size int `json:"size,omitempty"`
MD5Sum string `json:"md5sum,omitempty"`
SHA512Sum string `json:"sha512sum,omitempty"`
Status string `json:"status"`
}
ISO represents ISOs currently available on this account.
type ISOService ¶
type ISOService interface {
Create(ctx context.Context, isoReq *ISOReq) (*ISO, *http.Response, error)
Get(ctx context.Context, isoID string) (*ISO, *http.Response, error)
Delete(ctx context.Context, isoID string) error
List(ctx context.Context, options *ListOptions) ([]ISO, *Meta, *http.Response, error)
ListPublic(ctx context.Context, options *ListOptions) ([]PublicISO, *Meta, *http.Response, error)
}
ISOService is the interface to interact with the ISO endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/iso
type ISOServiceHandler ¶
type ISOServiceHandler struct {
// contains filtered or unexported fields
}
ISOServiceHandler handles interaction with the ISO methods for the Vultr API
func (*ISOServiceHandler) Create ¶
func (i *ISOServiceHandler) Create(ctx context.Context, isoReq *ISOReq) (*ISO, *http.Response, error)
Create will create a new ISO image on your account
func (*ISOServiceHandler) Delete ¶
func (i *ISOServiceHandler) Delete(ctx context.Context, isoID string) error
Delete will delete an ISO image from your account
func (*ISOServiceHandler) List ¶
func (i *ISOServiceHandler) List(ctx context.Context, options *ListOptions) ([]ISO, *Meta, *http.Response, error)
List will list all ISOs currently available on your account
func (*ISOServiceHandler) ListPublic ¶
func (i *ISOServiceHandler) ListPublic(ctx context.Context, options *ListOptions) ([]PublicISO, *Meta, *http.Response, error)
ListPublic will list public ISOs offered in the Vultr ISO library.
type Inference ¶
type Inference struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
Label string `json:"label"`
APIKey string `json:"api_key"`
}
Inference represents a Serverless Inference subscription
type InferenceAudioUsage ¶
type InferenceAudioUsage struct {
TTSCharacters int `json:"tts_characters"`
TTSSMCharacters int `json:"tts_sm_characters"`
}
InferenceAudioUsage represents audio generation details for a Serverless Inference subscription
type InferenceChatUsage ¶
type InferenceChatUsage struct {
CurrentTokens int `json:"current_tokens"`
MonthlyAllotment int `json:"monthly_allotment"`
Overage int `json:"overage"`
}
InferenceChatUsage represents chat/embeddings usage details for a Serverless Inference subscription
type InferenceCreateUpdateReq ¶
type InferenceCreateUpdateReq struct {
Label string `json:"label,omitempty"`
}
InferenceCreateUpdateReq struct used to create and update a Serverless Inference subscription
type InferenceService ¶
type InferenceService interface {
List(ctx context.Context) ([]Inference, *http.Response, error)
Create(ctx context.Context, inferenceReq *InferenceCreateUpdateReq) (*Inference, *http.Response, error)
Get(ctx context.Context, inferenceID string) (*Inference, *http.Response, error)
Update(ctx context.Context, inferenceID string, inferenceReq *InferenceCreateUpdateReq) (*Inference, *http.Response, error)
Delete(ctx context.Context, inferenceID string) error
GetUsage(ctx context.Context, inferenceID string) (*InferenceUsage, *http.Response, error)
}
InferenceService is the interface to interact with the Inference endpoints on the Vultr API Link: https://www.vultr.com/api/#tag/serverless-inference
type InferenceServiceHandler ¶
type InferenceServiceHandler struct {
// contains filtered or unexported fields
}
InferenceServiceHandler handles interaction with the server methods for the Vultr API
func (*InferenceServiceHandler) Create ¶
func (d *InferenceServiceHandler) Create(ctx context.Context, inferenceReq *InferenceCreateUpdateReq) (*Inference, *http.Response, error)
Create will create the Serverless Inference subscription with the given parameters
func (*InferenceServiceHandler) Delete ¶
func (d *InferenceServiceHandler) Delete(ctx context.Context, inferenceID string) error
Delete a Serverless Inference subscription. All data will be permanently lost
func (*InferenceServiceHandler) Get ¶
func (d *InferenceServiceHandler) Get(ctx context.Context, inferenceID string) (*Inference, *http.Response, error)
Get will get the Serverless Inference subscription with the given inferenceID
func (*InferenceServiceHandler) GetUsage ¶
func (d *InferenceServiceHandler) GetUsage(ctx context.Context, inferenceID string) (*InferenceUsage, *http.Response, error)
GetUsage retrieves chat/embeddings and audio generation usage information for your Serverless Inference subscription
type InferenceUsage ¶
type InferenceUsage struct {
Chat InferenceChatUsage `json:"chat"`
Audio InferenceAudioUsage `json:"audio"`
}
InferenceUsage represents chat/embeddings and audio usage for a Serverless Inference subscription
type Instance ¶
type Instance struct {
ID string `json:"id"`
Os string `json:"os"`
RAM int `json:"ram"`
Disk int `json:"disk"`
Plan string `json:"plan"`
MainIP string `json:"main_ip"`
VCPUCount int `json:"vcpu_count"`
Region string `json:"region"`
DefaultPassword string `json:"default_password,omitempty"`
DateCreated string `json:"date_created"`
Status string `json:"status"`
AllowedBandwidth int `json:"allowed_bandwidth"`
NetmaskV4 string `json:"netmask_v4"`
GatewayV4 string `json:"gateway_v4"`
PowerStatus string `json:"power_status"`
ServerStatus string `json:"server_status"`
V6Network string `json:"v6_network"`
V6MainIP string `json:"v6_main_ip"`
V6NetworkSize int `json:"v6_network_size"`
Label string `json:"label"`
InternalIP string `json:"internal_ip"`
KVM string `json:"kvm"`
OsID int `json:"os_id"`
AppID int `json:"app_id"`
ImageID string `json:"image_id"`
SnapshotID string `json:"snapshot_id"`
FirewallGroupID string `json:"firewall_group_id"`
Features []string `json:"features"`
Hostname string `json:"hostname"`
Tags []string `json:"tags"`
UserScheme string `json:"user_scheme"`
PendingCharges float64 `json:"pending_charges"`
}
Instance represents a VPS
type InstanceCreateReq ¶
type InstanceCreateReq struct {
Region string `json:"region,omitempty"`
Plan string `json:"plan,omitempty"`
Label string `json:"label,omitempty"`
Tags []string `json:"tags"`
OsID int `json:"os_id,omitempty"`
ISOID string `json:"iso_id,omitempty"`
AppID int `json:"app_id,omitempty"`
ImageID string `json:"image_id,omitempty"`
FirewallGroupID string `json:"firewall_group_id,omitempty"`
Hostname string `json:"hostname,omitempty"`
IPXEChainURL string `json:"ipxe_chain_url,omitempty"`
ScriptID string `json:"script_id,omitempty"`
SnapshotID string `json:"snapshot_id,omitempty"`
EnableIPv6 *bool `json:"enable_ipv6,omitempty"`
DisablePublicIPv4 *bool `json:"disable_public_ipv4,omitempty"`
EnableVPC *bool `json:"enable_vpc,omitempty"`
AttachVPC []string `json:"attach_vpc,omitempty"`
// Deprecated: VPC2 is no longer supported
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
// Deprecated: VPC2 is no longer supported
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
SSHKeys []string `json:"sshkey_id,omitempty"`
Backups string `json:"backups,omitempty"`
DDOSProtection *bool `json:"ddos_protection,omitempty"`
UserData string `json:"user_data,omitempty"`
ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
ActivationEmail *bool `json:"activation_email,omitempty"`
UserScheme string `json:"user_scheme,omitempty"`
AppVariables map[string]string `json:"app_variables,omitempty"`
}
InstanceCreateReq struct used to create an instance.
type InstanceList ¶
type InstanceList struct {
InstanceList []string
}
InstanceList represents instances that are attached to your load balancer
type InstanceService ¶
type InstanceService interface {
Create(ctx context.Context, instanceReq *InstanceCreateReq) (*Instance, *http.Response, error)
Get(ctx context.Context, instanceID string) (*Instance, *http.Response, error)
Update(ctx context.Context, instanceID string, instanceReq *InstanceUpdateReq) (*Instance, *http.Response, error)
Delete(ctx context.Context, instanceID string) error
List(ctx context.Context, options *ListOptions) ([]Instance, *Meta, *http.Response, error)
Start(ctx context.Context, instanceID string) error
Halt(ctx context.Context, instanceID string) error
Reboot(ctx context.Context, instanceID string) error
Reinstall(ctx context.Context, instanceID string, reinstallReq *ReinstallReq) (*Instance, *http.Response, error)
MassStart(ctx context.Context, instanceList []string) error
MassHalt(ctx context.Context, instanceList []string) error
MassReboot(ctx context.Context, instanceList []string) error
Restore(ctx context.Context, instanceID string, restoreReq *RestoreReq) (*http.Response, error)
GetBandwidth(ctx context.Context, instanceID string) (*Bandwidth, *http.Response, error)
GetNeighbors(ctx context.Context, instanceID string) (*Neighbors, *http.Response, error)
ListVPCInfo(ctx context.Context, instanceID string, options *ListOptions) ([]VPCInfo, *Meta, *http.Response, error)
AttachVPC(ctx context.Context, instanceID, vpcID string) error
DetachVPC(ctx context.Context, instanceID, vpcID string) error
// Deprecated: VPC2 is no longer supported
ListVPC2Info(ctx context.Context, instanceID string, options *ListOptions) ([]VPC2Info, *Meta, *http.Response, error)
// Deprecated: VPC2 is no longer supported
AttachVPC2(ctx context.Context, instanceID string, vpc2Req *AttachVPC2Req) error
// Deprecated: VPC2 is no longer supported
DetachVPC2(ctx context.Context, instanceID, vpcID string) error
ISOStatus(ctx context.Context, instanceID string) (*Iso, *http.Response, error)
AttachISO(ctx context.Context, instanceID, isoID string) (*http.Response, error)
DetachISO(ctx context.Context, instanceID string) (*http.Response, error)
GetBackupSchedule(ctx context.Context, instanceID string) (*BackupSchedule, *http.Response, error)
SetBackupSchedule(ctx context.Context, instanceID string, backup *BackupScheduleReq) (*http.Response, error)
CreateIPv4(ctx context.Context, instanceID string, reboot *bool) (*IPv4, *http.Response, error)
ListIPv4(ctx context.Context, instanceID string, option *ListOptions) ([]IPv4, *Meta, *http.Response, error)
DeleteIPv4(ctx context.Context, instanceID, ip string) error
ListIPv6(ctx context.Context, instanceID string, option *ListOptions) ([]IPv6, *Meta, *http.Response, error)
CreateReverseIPv6(ctx context.Context, instanceID string, reverseReq *ReverseIP) error
ListReverseIPv6(ctx context.Context, instanceID string) ([]ReverseIP, *http.Response, error)
DeleteReverseIPv6(ctx context.Context, instanceID, ip string) error
CreateReverseIPv4(ctx context.Context, instanceID string, reverseReq *ReverseIP) error
DefaultReverseIPv4(ctx context.Context, instanceID, ip string) error
GetUserData(ctx context.Context, instanceID string) (*UserData, *http.Response, error)
GetUpgrades(ctx context.Context, instanceID string) (*Upgrades, *http.Response, error)
}
InstanceService is the interface to interact with the instance endpoints on the Vultr API Link: https://www.vultr.com/api/#tag/instances
type InstanceServiceHandler ¶
type InstanceServiceHandler struct {
// contains filtered or unexported fields
}
InstanceServiceHandler handles interaction with the server methods for the Vultr API
func (*InstanceServiceHandler) AttachISO ¶
func (i *InstanceServiceHandler) AttachISO(ctx context.Context, instanceID, isoID string) (*http.Response, error)
AttachISO will attach an ISO to the given instance and reboot it
func (*InstanceServiceHandler) AttachVPC ¶
func (i *InstanceServiceHandler) AttachVPC(ctx context.Context, instanceID, vpcID string) error
AttachVPC to an instance
func (*InstanceServiceHandler) AttachVPC2 ¶
func (i *InstanceServiceHandler) AttachVPC2(ctx context.Context, instanceID string, vpc2Req *AttachVPC2Req) error
AttachVPC2 to an instance Deprecated: VPC2 is no longer supported
func (*InstanceServiceHandler) Create ¶
func (i *InstanceServiceHandler) Create(ctx context.Context, instanceReq *InstanceCreateReq) (*Instance, *http.Response, error)
Create will create the server with the given parameters
func (*InstanceServiceHandler) CreateIPv4 ¶
func (i *InstanceServiceHandler) CreateIPv4(ctx context.Context, instanceID string, reboot *bool) (*IPv4, *http.Response, error)
CreateIPv4 an additional IPv4 address for given instance.
func (*InstanceServiceHandler) CreateReverseIPv4 ¶
func (i *InstanceServiceHandler) CreateReverseIPv4(ctx context.Context, instanceID string, reverseReq *ReverseIP) error
CreateReverseIPv4 for a given IP on a given instance.
func (*InstanceServiceHandler) CreateReverseIPv6 ¶
func (i *InstanceServiceHandler) CreateReverseIPv6(ctx context.Context, instanceID string, reverseReq *ReverseIP) error
CreateReverseIPv6 for a given instance.
func (*InstanceServiceHandler) DefaultReverseIPv4 ¶
func (i *InstanceServiceHandler) DefaultReverseIPv4(ctx context.Context, instanceID, ip string) error
DefaultReverseIPv4 will set the IPs reverse setting back to the original one supplied by Vultr.
func (*InstanceServiceHandler) Delete ¶
func (i *InstanceServiceHandler) Delete(ctx context.Context, instanceID string) error
Delete an instance. All data will be permanently lost, and the IP address will be released
func (*InstanceServiceHandler) DeleteIPv4 ¶
func (i *InstanceServiceHandler) DeleteIPv4(ctx context.Context, instanceID, ip string) error
DeleteIPv4 address from a given instance.
func (*InstanceServiceHandler) DeleteReverseIPv6 ¶
func (i *InstanceServiceHandler) DeleteReverseIPv6(ctx context.Context, instanceID, ip string) error
DeleteReverseIPv6 a given reverse IPv6.
func (*InstanceServiceHandler) DetachISO ¶
func (i *InstanceServiceHandler) DetachISO(ctx context.Context, instanceID string) (*http.Response, error)
DetachISO will detach the currently mounted ISO and reboot the instance.
func (*InstanceServiceHandler) DetachVPC ¶
func (i *InstanceServiceHandler) DetachVPC(ctx context.Context, instanceID, vpcID string) error
DetachVPC from an instance.
func (*InstanceServiceHandler) DetachVPC2 ¶
func (i *InstanceServiceHandler) DetachVPC2(ctx context.Context, instanceID, vpcID string) error
DetachVPC2 from an instance. Deprecated: VPC2 is no longer supported
func (*InstanceServiceHandler) Get ¶
func (i *InstanceServiceHandler) Get(ctx context.Context, instanceID string) (*Instance, *http.Response, error)
Get will get the server with the given instanceID
func (*InstanceServiceHandler) GetBackupSchedule ¶
func (i *InstanceServiceHandler) GetBackupSchedule(ctx context.Context, instanceID string) (*BackupSchedule, *http.Response, error)
GetBackupSchedule retrieves the backup schedule for a given instance - all time values are in UTC
func (*InstanceServiceHandler) GetBandwidth ¶
func (i *InstanceServiceHandler) GetBandwidth(ctx context.Context, instanceID string) (*Bandwidth, *http.Response, error)
GetBandwidth for a given instance.
func (*InstanceServiceHandler) GetNeighbors ¶
func (i *InstanceServiceHandler) GetNeighbors(ctx context.Context, instanceID string) (*Neighbors, *http.Response, error)
GetNeighbors gets a list of other instances in the same location as this Instance.
func (*InstanceServiceHandler) GetUpgrades ¶
func (i *InstanceServiceHandler) GetUpgrades(ctx context.Context, instanceID string) (*Upgrades, *http.Response, error)
GetUpgrades that are available for a given instance.
func (*InstanceServiceHandler) GetUserData ¶
func (i *InstanceServiceHandler) GetUserData(ctx context.Context, instanceID string) (*UserData, *http.Response, error)
GetUserData from given instance. The userdata returned will be in base64 encoding.
func (*InstanceServiceHandler) Halt ¶
func (i *InstanceServiceHandler) Halt(ctx context.Context, instanceID string) error
Halt will pause an instance.
func (*InstanceServiceHandler) ISOStatus ¶
func (i *InstanceServiceHandler) ISOStatus(ctx context.Context, instanceID string) (*Iso, *http.Response, error)
ISOStatus retrieves the current ISO state for a given VPS. The returned state may be one of: ready | isomounting | isomounted.
func (*InstanceServiceHandler) List ¶
func (i *InstanceServiceHandler) List(ctx context.Context, options *ListOptions) ([]Instance, *Meta, *http.Response, error)
List all instances on your account.
func (*InstanceServiceHandler) ListIPv4 ¶
func (i *InstanceServiceHandler) ListIPv4(ctx context.Context, instanceID string, options *ListOptions) ([]IPv4, *Meta, *http.Response, error)
ListIPv4 addresses that are currently assigned to a given instance.
func (*InstanceServiceHandler) ListIPv6 ¶
func (i *InstanceServiceHandler) ListIPv6(ctx context.Context, instanceID string, options *ListOptions) ([]IPv6, *Meta, *http.Response, error)
ListIPv6 addresses that are currently assigned to a given instance.
func (*InstanceServiceHandler) ListReverseIPv6 ¶
func (i *InstanceServiceHandler) ListReverseIPv6(ctx context.Context, instanceID string) ([]ReverseIP, *http.Response, error)
ListReverseIPv6 currently assigned to a given instance.
func (*InstanceServiceHandler) ListVPC2Info ¶
func (i *InstanceServiceHandler) ListVPC2Info(ctx context.Context, instanceID string, options *ListOptions) ([]VPC2Info, *Meta, *http.Response, error)
ListVPC2Info currently attached to an instance. Deprecated: VPC2 is no longer supported
func (*InstanceServiceHandler) ListVPCInfo ¶
func (i *InstanceServiceHandler) ListVPCInfo(ctx context.Context, instanceID string, options *ListOptions) ([]VPCInfo, *Meta, *http.Response, error)
ListVPCInfo currently attached to an instance.
func (*InstanceServiceHandler) MassHalt ¶
func (i *InstanceServiceHandler) MassHalt(ctx context.Context, instanceList []string) error
MassHalt will pause a list of instances.
func (*InstanceServiceHandler) MassReboot ¶
func (i *InstanceServiceHandler) MassReboot(ctx context.Context, instanceList []string) error
MassReboot reboots a list of instances.
func (*InstanceServiceHandler) MassStart ¶
func (i *InstanceServiceHandler) MassStart(ctx context.Context, instanceList []string) error
MassStart will start a list of instances the machine is already running, it will be restarted.
func (*InstanceServiceHandler) Reboot ¶
func (i *InstanceServiceHandler) Reboot(ctx context.Context, instanceID string) error
Reboot an instance.
func (*InstanceServiceHandler) Reinstall ¶
func (i *InstanceServiceHandler) Reinstall(ctx context.Context, instanceID string, reinstallReq *ReinstallReq) (*Instance, *http.Response, error)
Reinstall an instance.
func (*InstanceServiceHandler) Restore ¶
func (i *InstanceServiceHandler) Restore(ctx context.Context, instanceID string, restoreReq *RestoreReq) (*http.Response, error)
Restore an instance.
func (*InstanceServiceHandler) SetBackupSchedule ¶
func (i *InstanceServiceHandler) SetBackupSchedule(ctx context.Context, instanceID string, backup *BackupScheduleReq) (*http.Response, error)
SetBackupSchedule sets the backup schedule for a given instance - all time values are in UTC.
type InstanceUpdateReq ¶
type InstanceUpdateReq struct {
Plan string `json:"plan,omitempty"`
Label string `json:"label,omitempty"`
Tags []string `json:"tags"`
OsID int `json:"os_id,omitempty"`
AppID int `json:"app_id,omitempty"`
ImageID string `json:"image_id,omitempty"`
EnableIPv6 *bool `json:"enable_ipv6,omitempty"`
EnableVPC *bool `json:"enable_vpc,omitempty"`
AttachVPC []string `json:"attach_vpc,omitempty"`
DetachVPC []string `json:"detach_vpc,omitempty"`
// Deprecated: VPC2 is no longer supported
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
// Deprecated: VPC2 is no longer supported
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
// Deprecated: VPC2 is no longer supported
DetachVPC2 []string `json:"detach_vpc2,omitempty"`
Backups string `json:"backups,omitempty"`
DDOSProtection *bool `json:"ddos_protection"`
UserData string `json:"user_data,omitempty"`
FirewallGroupID string `json:"firewall_group_id,omitempty"`
UserScheme string `json:"user_scheme,omitempty"`
}
InstanceUpdateReq struct used to update an instance.
type Invoice ¶
type Invoice struct {
ID int `json:"id"`
Date string `json:"date"`
Description string `json:"description"`
Amount float32 `json:"amount"`
Balance float32 `json:"balance"`
}
Invoice represents an invoice on an account
type InvoiceItem ¶
type InvoiceItem struct {
Description string `json:"description"`
Product string `json:"product"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Units int `json:"units"`
UnitType string `json:"unit_type"`
UnitPrice float32 `json:"unit_price"`
Total float32 `json:"total"`
}
InvoiceItem represents an item on an accounts invoice
type KubeConfig ¶
type KubeConfig struct {
KubeConfig string `json:"kube_config"`
}
KubeConfig will contain the kubeconfig b64 encoded
type KubernetesHandler ¶
type KubernetesHandler struct {
// contains filtered or unexported fields
}
KubernetesHandler handles interaction with the kubernetes methods for the Vultr API
func (*KubernetesHandler) CreateCluster ¶
func (k *KubernetesHandler) CreateCluster(ctx context.Context, createReq *ClusterReq) (*Cluster, *http.Response, error)
CreateCluster will create a Kubernetes cluster.
func (*KubernetesHandler) CreateNodePool ¶
func (k *KubernetesHandler) CreateNodePool(ctx context.Context, vkeID string, nodePoolReq *NodePoolReq) (*NodePool, *http.Response, error)
CreateNodePool creates a nodepool on a VKE cluster
func (*KubernetesHandler) DeleteCluster ¶
func (k *KubernetesHandler) DeleteCluster(ctx context.Context, id string) error
DeleteCluster will delete a Kubernetes cluster.
func (*KubernetesHandler) DeleteClusterWithResources ¶
func (k *KubernetesHandler) DeleteClusterWithResources(ctx context.Context, id string) error
DeleteClusterWithResources will delete a Kubernetes cluster and all related resources.
func (*KubernetesHandler) DeleteNodePool ¶
func (k *KubernetesHandler) DeleteNodePool(ctx context.Context, vkeID, nodePoolID string) error
DeleteNodePool will remove a nodepool from a VKE cluster
func (*KubernetesHandler) DeleteNodePoolInstance ¶
func (k *KubernetesHandler) DeleteNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
DeleteNodePoolInstance will remove a specified node from a nodepool
func (*KubernetesHandler) GetCluster ¶
func (k *KubernetesHandler) GetCluster(ctx context.Context, id string) (*Cluster, *http.Response, error)
GetCluster will return a Kubernetes cluster.
func (*KubernetesHandler) GetKubeConfig ¶
func (k *KubernetesHandler) GetKubeConfig(ctx context.Context, vkeID string) (*KubeConfig, *http.Response, error)
GetKubeConfig returns the kubeconfig for the specified VKE cluster
func (*KubernetesHandler) GetNodePool ¶
func (k *KubernetesHandler) GetNodePool(ctx context.Context, vkeID, nodePoolID string) (*NodePool, *http.Response, error)
GetNodePool will return a single nodepool
func (*KubernetesHandler) GetUpgrades ¶
func (k *KubernetesHandler) GetUpgrades(ctx context.Context, vkeID string) ([]string, *http.Response, error)
GetUpgrades returns all version a VKE cluster can upgrade to
func (*KubernetesHandler) GetVersions ¶
GetVersions returns the supported kubernetes versions
func (*KubernetesHandler) ListClusters ¶
func (k *KubernetesHandler) ListClusters(ctx context.Context, options *ListOptions) ([]Cluster, *Meta, *http.Response, error)
ListClusters will return all kubernetes clusters.
func (*KubernetesHandler) ListNodePools ¶
func (k *KubernetesHandler) ListNodePools(ctx context.Context, vkeID string, options *ListOptions) ([]NodePool, *Meta, *http.Response, error)
ListNodePools will return all nodepools for a given VKE cluster
func (*KubernetesHandler) RecycleNodePoolInstance ¶
func (k *KubernetesHandler) RecycleNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
RecycleNodePoolInstance will recycle (destroy + redeploy) a given node on a nodepool
func (*KubernetesHandler) UpdateCluster ¶
func (k *KubernetesHandler) UpdateCluster(ctx context.Context, vkeID string, updateReq *ClusterReqUpdate) error
UpdateCluster updates label on VKE cluster
func (*KubernetesHandler) UpdateNodePool ¶
func (k *KubernetesHandler) UpdateNodePool(ctx context.Context, vkeID, nodePoolID string, updateReq *NodePoolReqUpdate) (*NodePool, *http.Response, error)
UpdateNodePool will allow you change the quantity of nodes within a nodepool
func (*KubernetesHandler) Upgrade ¶
func (k *KubernetesHandler) Upgrade(ctx context.Context, vkeID string, body *ClusterUpgradeReq) error
Upgrade beings a VKE cluster upgrade
type KubernetesService ¶
type KubernetesService interface {
CreateCluster(ctx context.Context, createReq *ClusterReq) (*Cluster, *http.Response, error)
GetCluster(ctx context.Context, id string) (*Cluster, *http.Response, error)
ListClusters(ctx context.Context, options *ListOptions) ([]Cluster, *Meta, *http.Response, error)
UpdateCluster(ctx context.Context, vkeID string, updateReq *ClusterReqUpdate) error
DeleteCluster(ctx context.Context, id string) error
DeleteClusterWithResources(ctx context.Context, id string) error
CreateNodePool(ctx context.Context, vkeID string, nodePoolReq *NodePoolReq) (*NodePool, *http.Response, error)
ListNodePools(ctx context.Context, vkeID string, options *ListOptions) ([]NodePool, *Meta, *http.Response, error)
GetNodePool(ctx context.Context, vkeID, nodePoolID string) (*NodePool, *http.Response, error)
UpdateNodePool(ctx context.Context, vkeID, nodePoolID string, updateReq *NodePoolReqUpdate) (*NodePool, *http.Response, error)
DeleteNodePool(ctx context.Context, vkeID, nodePoolID string) error
DeleteNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
RecycleNodePoolInstance(ctx context.Context, vkeID, nodePoolID, nodeID string) error
GetKubeConfig(ctx context.Context, vkeID string) (*KubeConfig, *http.Response, error)
GetVersions(ctx context.Context) (*Versions, *http.Response, error)
GetUpgrades(ctx context.Context, vkeID string) ([]string, *http.Response, error)
Upgrade(ctx context.Context, vkeID string, body *ClusterUpgradeReq) error
}
KubernetesService is the interface to interact with kubernetes endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/kubernetes
type LBFirewallRule ¶
type LBFirewallRule struct {
RuleID string `json:"id,omitempty"`
Port int `json:"port,omitempty"`
IPType string `json:"ip_type,omitempty"`
Source string `json:"source,omitempty"`
}
LBFirewallRule represent a single firewall rule
type ListOptions ¶
type ListOptions struct {
// These query params are used for all list calls that support pagination
PerPage int `url:"per_page,omitempty"`
Cursor string `url:"cursor,omitempty"`
// These three query params are currently used for the list instance call
// These may be extended to other list calls
// https://www.vultr.com/api/#operation/list-instances
MainIP string `url:"main_ip,omitempty"`
Label string `url:"label,omitempty"`
Tag string `url:"tag,omitempty"`
Region string `url:"region,omitempty"`
ShowPendingCharges bool `url:"show_pending_charges,omitempty"`
// Query params that can be used on the list snapshots call
// https://www.vultr.com/api/#operation/list-snapshots
Description string `url:"description,omitempty"`
}
ListOptions are the available query params
type LoadBalancer ¶
type LoadBalancer struct {
ID string `json:"id,omitempty"`
DateCreated string `json:"date_created,omitempty"`
Region string `json:"region,omitempty"`
Label string `json:"label,omitempty"`
Status string `json:"status,omitempty"`
IPV4 string `json:"ipv4,omitempty"`
IPV6 string `json:"ipv6,omitempty"`
Instances []string `json:"instances,omitempty"`
Nodes int `json:"nodes,omitempty"`
HealthCheck *HealthCheck `json:"health_check,omitempty"`
GenericInfo *GenericInfo `json:"generic_info,omitempty"`
SSLInfo *bool `json:"has_ssl,omitempty"`
AutoSSL *AutoSSL `json:"auto_ssl,omitempty"`
HTTP2 *bool `json:"http2,omitempty"`
HTTP3 *bool `json:"http3,omitempty"`
ForwardingRules []ForwardingRule `json:"forwarding_rules,omitempty"`
FirewallRules []LBFirewallRule `json:"firewall_rules,omitempty"`
GlobalRegions []string `json:"global_regions,omitempty"`
}
LoadBalancer represent the structure of a load balancer
type LoadBalancerHandler ¶
type LoadBalancerHandler struct {
// contains filtered or unexported fields
}
LoadBalancerHandler handles interaction with the server methods for the Vultr API
func (*LoadBalancerHandler) Create ¶
func (l *LoadBalancerHandler) Create(ctx context.Context, createReq *LoadBalancerReq) (*LoadBalancer, *http.Response, error)
Create a load balancer
func (*LoadBalancerHandler) CreateForwardingRule ¶
func (l *LoadBalancerHandler) CreateForwardingRule(ctx context.Context, lbID string, rule *ForwardingRule) (*ForwardingRule, *http.Response, error)
CreateForwardingRule will create a new forwarding rule for your load balancer subscription. Note the RuleID will be returned in the ForwardingRule struct
func (*LoadBalancerHandler) Delete ¶
func (l *LoadBalancerHandler) Delete(ctx context.Context, lbID string) error
Delete a load balancer subscription.
func (*LoadBalancerHandler) DeleteAutoSSL ¶
func (l *LoadBalancerHandler) DeleteAutoSSL(ctx context.Context, lbID string) error
DeleteAutoSSL removes the AutoSSL configuration from a load balancer subscription.
func (*LoadBalancerHandler) DeleteForwardingRule ¶
func (l *LoadBalancerHandler) DeleteForwardingRule(ctx context.Context, lbID, ruleID string) error
DeleteForwardingRule removes a forwarding rule from a load balancer subscription
func (*LoadBalancerHandler) DeleteSSL ¶
func (l *LoadBalancerHandler) DeleteSSL(ctx context.Context, lbID string) error
DeleteSSL removes the SSL configuration from a load balancer subscription.
func (*LoadBalancerHandler) Get ¶
func (l *LoadBalancerHandler) Get(ctx context.Context, lbID string) (*LoadBalancer, *http.Response, error)
Get a load balancer
func (*LoadBalancerHandler) GetFirewallRule ¶
func (l *LoadBalancerHandler) GetFirewallRule(ctx context.Context, lbID, ruleID string) (*LBFirewallRule, *http.Response, error)
GetFirewallRule will get a firewall rule from your load balancer subscription.
func (*LoadBalancerHandler) GetForwardingRule ¶
func (l *LoadBalancerHandler) GetForwardingRule(ctx context.Context, lbID, ruleID string) (*ForwardingRule, *http.Response, error)
GetForwardingRule will get a forwarding rule from your load balancer subscription.
func (*LoadBalancerHandler) List ¶
func (l *LoadBalancerHandler) List(ctx context.Context, options *ListOptions) ([]LoadBalancer, *Meta, *http.Response, error)
List all load balancer subscriptions on the current account.
func (*LoadBalancerHandler) ListFirewallRules ¶
func (l *LoadBalancerHandler) ListFirewallRules(ctx context.Context, lbID string, options *ListOptions) ([]LBFirewallRule, *Meta, *http.Response, error)
ListFirewallRules lists all firewall rules for a load balancer subscription
func (*LoadBalancerHandler) ListForwardingRules ¶
func (l *LoadBalancerHandler) ListForwardingRules(ctx context.Context, lbID string, options *ListOptions) ([]ForwardingRule, *Meta, *http.Response, error)
ListForwardingRules lists all forwarding rules for a load balancer subscription
func (*LoadBalancerHandler) Update ¶
func (l *LoadBalancerHandler) Update(ctx context.Context, lbID string, updateReq *LoadBalancerReq) error
Update updates your your load balancer
type LoadBalancerReq ¶
type LoadBalancerReq struct {
Region string `json:"region,omitempty"`
Label string `json:"label,omitempty"`
Instances []string `json:"instances,omitempty"`
Nodes int `json:"nodes,omitempty"`
HealthCheck *HealthCheck `json:"health_check,omitempty"`
StickySessions *StickySessions `json:"sticky_session,omitempty"`
ForwardingRules []ForwardingRule `json:"forwarding_rules,omitempty"`
SSL *SSL `json:"ssl,omitempty"`
AutoSSL *AutoSSL `json:"auto_ssl,omitempty"`
SSLRedirect *bool `json:"ssl_redirect,omitempty"`
HTTP2 *bool `json:"http2,omitempty"`
HTTP3 *bool `json:"http3,omitempty"`
ProxyProtocol *bool `json:"proxy_protocol,omitempty"`
BalancingAlgorithm string `json:"balancing_algorithm,omitempty"`
FirewallRules []LBFirewallRule `json:"firewall_rules,omitempty"`
Timeout int `json:"timeout,omitempty"`
VPC *string `json:"vpc,omitempty"`
GlobalRegions []string `json:"global_regions,omitempty"`
}
LoadBalancerReq gives options for creating or updating a load balancer
type LoadBalancerService ¶
type LoadBalancerService interface {
Create(ctx context.Context, createReq *LoadBalancerReq) (*LoadBalancer, *http.Response, error)
Get(ctx context.Context, lbID string) (*LoadBalancer, *http.Response, error)
Update(ctx context.Context, lbID string, updateReq *LoadBalancerReq) error
Delete(ctx context.Context, lbID string) error
DeleteSSL(ctx context.Context, lbID string) error
DeleteAutoSSL(ctx context.Context, lbID string) error
List(ctx context.Context, options *ListOptions) ([]LoadBalancer, *Meta, *http.Response, error)
CreateForwardingRule(ctx context.Context, lbID string, rule *ForwardingRule) (*ForwardingRule, *http.Response, error)
GetForwardingRule(ctx context.Context, lbID string, ruleID string) (*ForwardingRule, *http.Response, error)
DeleteForwardingRule(ctx context.Context, lbID string, RuleID string) error
ListForwardingRules(ctx context.Context, lbID string, options *ListOptions) ([]ForwardingRule, *Meta, *http.Response, error)
ListFirewallRules(ctx context.Context, lbID string, options *ListOptions) ([]LBFirewallRule, *Meta, *http.Response, error)
GetFirewallRule(ctx context.Context, lbID string, ruleID string) (*LBFirewallRule, *http.Response, error)
}
LoadBalancerService is the interface to interact with the server endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/load-balancer
type Log ¶
type Log struct {
ResourceID string `json:"resource_id"`
ResourceType string `json:"resource_type"`
Level string `json:"log_level"`
Message string `json:"message"`
Timestamp string `json:"timestamp"`
Metadata LogMetadata `json:"metadata"`
}
Log represents a log entry
type LogMetadata ¶
type LogMetadata struct {
UserID string `json:"user_id"`
IPAddress string `json:"ip_address"`
UserName string `json:"username"`
HTTPStatusCode int `json:"http_status_code"`
Method string `json:"method"`
RequestPath string `json:"request_path"`
RequestBody string `json:"request_body"`
QueryParameters string `json:"query_parameters"`
}
LogMetadata represents a log entry's metadata
type LogsMeta ¶
type LogsMeta struct {
ContinueTime string `json:"continue_time"`
ReturnedCount int `json:"returned_count"`
UnreturnedCount int `json:"unreturned_count"`
TotalCount int `json:"total_count"`
}
LogsMeta represent pagination data for log entries
type LogsOptions ¶
type LogsOptions struct {
StartTime string `url:"start_time"`
EndTime string `url:"end_time"`
LogLevel string `url:"log_level,omitempty"`
ResourceType string `url:"resource_type,omitempty"`
ResourceID string `url:"resource_id,omitempty"`
}
LogsOptions represents the query params for the logs list
type LogsService ¶
type LogsService interface {
List(ctx context.Context, options LogsOptions) ([]Log, *LogsMeta, *http.Response, error)
}
LogsService is the interface to interact with the Logs endpoint Link: https://www.vultr.com/api/#tag/logs
type LogsServiceHandler ¶
type LogsServiceHandler struct {
// contains filtered or unexported fields
}
LogsServiceHandler handle interaction with the server methods for the Vultr API
type MarketplaceAppVariable ¶
type MarketplaceAppVariable struct {
Name string `json:"name"`
Description string `json:"description"`
Required *bool `json:"required"`
}
MarketplaceAppVariable represents a user-supplied variable for a Marketplace app
type MarketplaceService ¶
type MarketplaceService interface {
ListAppVariables(ctx context.Context, imageID string) ([]MarketplaceAppVariable, *http.Response, error)
}
MarketplaceService is the interface to interact with the Marketplace endpoints on the Vultr API Link: https://www.vultr.com/api/#tag/marketplace
type MarketplaceServiceHandler ¶
type MarketplaceServiceHandler struct {
// contains filtered or unexported fields
}
MarketplaceServiceHandler handles interaction with the server methods for the Vultr API
func (*MarketplaceServiceHandler) ListAppVariables ¶
func (d *MarketplaceServiceHandler) ListAppVariables(ctx context.Context, imageID string) ([]MarketplaceAppVariable, *http.Response, error)
ListAppVariables retrieves all user-supplied variables for a Marketplace app
type MaxConnections ¶
MaxConnections represents an object containing the maximum number of connections by engine type for Managed Database plans
type Neighbors ¶
type Neighbors struct {
Neighbors []string `json:"neighbors"`
}
Neighbors that might exist on the same host.
type Node ¶
type Node struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
Label string `json:"label"`
Status string `json:"status"`
}
Node represents a node that will live within a nodepool
type NodePool ¶
type NodePool struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
DateUpdated string `json:"date_updated"`
Label string `json:"label"`
Plan string `json:"plan"`
Status string `json:"status"`
NodeQuantity int `json:"node_quantity"`
MinNodes int `json:"min_nodes"`
MaxNodes int `json:"max_nodes"`
AutoScaler bool `json:"auto_scaler"`
UserData string `json:"user_data"`
Tag string `json:"tag"`
Labels map[string]string `json:"labels"`
Taints []Taint `json:"taints"`
Nodes []Node `json:"nodes"`
}
NodePool represents a pool of nodes that are grouped by their label and plan type
type NodePoolReq ¶
type NodePoolReq struct {
NodeQuantity int `json:"node_quantity"`
Label string `json:"label"`
Plan string `json:"plan"`
Tag string `json:"tag"`
MinNodes int `json:"min_nodes,omitempty"`
MaxNodes int `json:"max_nodes,omitempty"`
AutoScaler *bool `json:"auto_scaler"`
Labels map[string]string `json:"labels,omitempty"`
Taints []Taint `json:"taints,omitempty"`
UserData string `json:"user_data"`
}
NodePoolReq struct used to create a node pool
type NodePoolReqUpdate ¶
type NodePoolReqUpdate struct {
NodeQuantity int `json:"node_quantity,omitempty"`
Tag *string `json:"tag,omitempty"`
MinNodes int `json:"min_nodes,omitempty"`
MaxNodes int `json:"max_nodes,omitempty"`
AutoScaler *bool `json:"auto_scaler,omitempty"`
Labels map[string]string `json:"labels"`
Taints []Taint `json:"taints"`
UserData *string `json:"user_data,omitempty"`
}
NodePoolReqUpdate struct used to update a node pool
type OS ¶
type OS struct {
ID int `json:"id"`
Name string `json:"name"`
Arch string `json:"arch"`
Family string `json:"family"`
}
OS represents a Vultr operating system
type OSService ¶
type OSService interface {
List(ctx context.Context, options *ListOptions) ([]OS, *Meta, *http.Response, error)
}
OSService is the interface to interact with the operating system endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/os
type OSServiceHandler ¶
type OSServiceHandler struct {
// contains filtered or unexported fields
}
OSServiceHandler handles interaction with the operating system methods for the Vultr API
type ObjectStorage ¶
type ObjectStorage struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
ObjectStoreClusterID int `json:"cluster_id"`
Region string `json:"region"`
Location string `json:"location"`
Label string `json:"label"`
Status string `json:"status"`
S3Keys
}
ObjectStorage represents a Vultr Object Storage subscription.
type ObjectStorageCluster ¶
type ObjectStorageCluster struct {
ID int `json:"id"`
Region string `json:"region"`
Name string `json:"name,omitempty"`
Hostname string `json:"hostname"`
Deploy string `json:"deploy"`
}
ObjectStorageCluster represents a Vultr Object Storage cluster.
type ObjectStorageReq ¶
type ObjectStorageReq struct {
ClusterID int `json:"cluster_id,omitempty"`
TierID int `json:"tier_id,omitempty"`
Label string `json:"label"`
}
ObjectStorageReq represents the parameters for creating and updating object storages
type ObjectStorageService ¶
type ObjectStorageService interface {
Create(ctx context.Context, objReq *ObjectStorageReq) (*ObjectStorage, *http.Response, error)
Get(ctx context.Context, id string) (*ObjectStorage, *http.Response, error)
Update(ctx context.Context, id string, objReq *ObjectStorageReq) error
Delete(ctx context.Context, id string) error
List(ctx context.Context, options *ListOptions) ([]ObjectStorage, *Meta, *http.Response, error)
ListCluster(ctx context.Context, options *ListOptions) ([]ObjectStorageCluster, *Meta, *http.Response, error)
RegenerateKeys(ctx context.Context, id string) (*S3Keys, *http.Response, error)
ListTiers(ctx context.Context) ([]ObjectStorageTier, *http.Response, error)
ListClusterTiers(ctx context.Context, clusterID int) ([]ObjectStorageTier, *http.Response, error)
}
ObjectStorageService is the interface to interact with the object storage endpoints on the Vultr API. Link : https://www.vultr.com/api/#tag/s3
type ObjectStorageServiceHandler ¶
type ObjectStorageServiceHandler struct {
// contains filtered or unexported fields
}
ObjectStorageServiceHandler handles interaction between the object storage service and the Vultr API.
func (*ObjectStorageServiceHandler) Create ¶
func (o *ObjectStorageServiceHandler) Create(ctx context.Context, objReq *ObjectStorageReq) (*ObjectStorage, *http.Response, error)
Create an object storage subscription
func (*ObjectStorageServiceHandler) Delete ¶
func (o *ObjectStorageServiceHandler) Delete(ctx context.Context, id string) error
Delete a object storage subscription.
func (*ObjectStorageServiceHandler) Get ¶
func (o *ObjectStorageServiceHandler) Get(ctx context.Context, id string) (*ObjectStorage, *http.Response, error)
Get returns a specified object storage by the provided ID
func (*ObjectStorageServiceHandler) List ¶
func (o *ObjectStorageServiceHandler) List(ctx context.Context, options *ListOptions) ([]ObjectStorage, *Meta, *http.Response, error)
List all object storage subscriptions on the current account. This includes both pending and active subscriptions.
func (*ObjectStorageServiceHandler) ListCluster ¶
func (o *ObjectStorageServiceHandler) ListCluster(ctx context.Context, options *ListOptions) ([]ObjectStorageCluster, *Meta, *http.Response, error)
ListCluster returns back your object storage clusters. Clusters may be removed over time. The "deploy" field can be used to determine whether or not new deployments are allowed in the cluster.
func (*ObjectStorageServiceHandler) ListClusterTiers ¶
func (o *ObjectStorageServiceHandler) ListClusterTiers(ctx context.Context, clusterID int) ([]ObjectStorageTier, *http.Response, error)
ListClusterTiers retrieves all tiers for object storage deployments on a specific cluster
func (*ObjectStorageServiceHandler) ListTiers ¶
func (o *ObjectStorageServiceHandler) ListTiers(ctx context.Context) ([]ObjectStorageTier, *http.Response, error)
ListTiers retrieves all tiers for object storage deployments
func (*ObjectStorageServiceHandler) RegenerateKeys ¶
func (o *ObjectStorageServiceHandler) RegenerateKeys(ctx context.Context, id string) (*S3Keys, *http.Response, error)
RegenerateKeys of the S3 API Keys for an object storage subscription
func (*ObjectStorageServiceHandler) Update ¶
func (o *ObjectStorageServiceHandler) Update(ctx context.Context, id string, objReq *ObjectStorageReq) error
Update a Object Storage Subscription.
type ObjectStorageTier ¶
type ObjectStorageTier struct {
ID int `json:"id"`
Name string `json:"sales_name"`
Description string `json:"sales_desc"`
Price float32 `json:"price"`
PriceBandwidthGB float32 `json:"bw_gb_price"`
PriceDiskGB float32 `json:"disk_gb_price"`
RateLimitBytesSec int `json:"ratelimit_ops_bytes"`
RateLimitOpsSec int `json:"ratelimit_ops_secs"`
Default string `json:"is_default"`
Locations []ObjectStorageCluster `json:"locations,omitempty"`
Slug string `json:"slug"`
}
ObjectStorageTier represents the object storage tier data
type PGExtension ¶
PGExtension represents an object containing extension name and version information
type Plan ¶
type Plan struct {
ID string `json:"id"`
VCPUCount int `json:"vcpu_count"`
RAM int `json:"ram"`
Disk int `json:"disk"`
DiskCount int `json:"disk_count"`
Bandwidth int `json:"bandwidth"`
MonthlyCost float32 `json:"monthly_cost"`
Type string `json:"type"`
GPUVRAM int `json:"gpu_vram_gb,omitempty"`
GPUType string `json:"gpu_type,omitempty"`
Locations []string `json:"locations"`
}
Plan represents vc2, vdc, or vhf
type PlanAvailability ¶
type PlanAvailability struct {
AvailablePlans []string `json:"available_plans"`
}
PlanAvailability contains all available plans.
type PlanService ¶
type PlanService interface {
List(ctx context.Context, planType string, options *ListOptions) ([]Plan, *Meta, *http.Response, error)
ListBareMetal(ctx context.Context, options *ListOptions) ([]BareMetalPlan, *Meta, *http.Response, error)
}
PlanService is the interface to interact with the Plans endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/plans
type PlanServiceHandler ¶
type PlanServiceHandler struct {
// contains filtered or unexported fields
}
PlanServiceHandler handles interaction with the Plans methods for the Vultr API
func (*PlanServiceHandler) List ¶
func (p *PlanServiceHandler) List(ctx context.Context, planType string, options *ListOptions) ([]Plan, *Meta, *http.Response, error)
List retrieves a list of all active plans. planType is optional - pass an empty string to get all plans
func (*PlanServiceHandler) ListBareMetal ¶
func (p *PlanServiceHandler) ListBareMetal(ctx context.Context, options *ListOptions) ([]BareMetalPlan, *Meta, *http.Response, error)
ListBareMetal all active bare metal plans.
type PublicISO ¶
type PublicISO struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
MD5Sum string `json:"md5sum,omitempty"`
}
PublicISO represents public ISOs offered in the Vultr ISO library.
type Region ¶
type Region struct {
ID string `json:"id"`
City string `json:"city"`
Country string `json:"country"`
Continent string `json:"continent,omitempty"`
Options []string `json:"options"`
}
Region represents a Vultr region
type RegionService ¶
type RegionService interface {
Availability(ctx context.Context, regionID string, planType string) (*PlanAvailability, *http.Response, error)
List(ctx context.Context, options *ListOptions) ([]Region, *Meta, *http.Response, error)
}
RegionService is the interface to interact with Region endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/region
type RegionServiceHandler ¶
type RegionServiceHandler struct {
// contains filtered or unexported fields
}
RegionServiceHandler handles interaction with the region methods for the Vultr API
func (*RegionServiceHandler) Availability ¶
func (r *RegionServiceHandler) Availability(ctx context.Context, regionID, planType string) (*PlanAvailability, *http.Response, error)
Availability retrieves a list of the plan IDs currently available for a given location.
type ReinstallReq ¶
type ReinstallReq struct {
Hostname string `json:"hostname,omitempty"`
}
ReinstallReq struct used to allow changes during a reinstall
type RequestBody ¶
type RequestBody map[string]interface{}
RequestBody is used to create JSON bodies for one off calls
type RequestCompletionCallback ¶
RequestCompletionCallback defines the type of the request callback function
type ReservedIP ¶
type ReservedIP struct {
ID string `json:"id"`
Region string `json:"region"`
IPType string `json:"ip_type"`
Subnet string `json:"subnet"`
SubnetSize int `json:"subnet_size"`
Label string `json:"label"`
InstanceID string `json:"instance_id"`
}
ReservedIP represents an reserved IP on Vultr
type ReservedIPConvertReq ¶
type ReservedIPConvertReq struct {
IPAddress string `json:"ip_address,omitempty"`
Label string `json:"label,omitempty"`
}
ReservedIPConvertReq is the struct used for create and update calls.
type ReservedIPReq ¶
type ReservedIPReq struct {
Region string `json:"region,omitempty"`
IPType string `json:"ip_type,omitempty"`
IPAddress string `json:"ip_address,omitempty"`
Label string `json:"label,omitempty"`
InstanceID string `json:"instance_id,omitempty"`
}
ReservedIPReq represents the parameters for creating a new Reserved IP on Vultr
type ReservedIPService ¶
type ReservedIPService interface {
Create(ctx context.Context, ripCreate *ReservedIPReq) (*ReservedIP, *http.Response, error)
Update(ctx context.Context, id string, ripUpdate *ReservedIPUpdateReq) (*ReservedIP, *http.Response, error)
Get(ctx context.Context, id string) (*ReservedIP, *http.Response, error)
Delete(ctx context.Context, id string) error
List(ctx context.Context, options *ListOptions) ([]ReservedIP, *Meta, *http.Response, error)
Convert(ctx context.Context, ripConvert *ReservedIPConvertReq) (*ReservedIP, *http.Response, error)
Attach(ctx context.Context, id, instance string) error
Detach(ctx context.Context, id string) error
}
ReservedIPService is the interface to interact with the reserved IP endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/reserved-ip
type ReservedIPServiceHandler ¶
type ReservedIPServiceHandler struct {
// contains filtered or unexported fields
}
ReservedIPServiceHandler handles interaction with the reserved IP methods for the Vultr API
func (*ReservedIPServiceHandler) Attach ¶
func (r *ReservedIPServiceHandler) Attach(ctx context.Context, id, instance string) error
Attach a reserved IP to an existing subscription
func (*ReservedIPServiceHandler) Convert ¶
func (r *ReservedIPServiceHandler) Convert(ctx context.Context, ripConvert *ReservedIPConvertReq) (*ReservedIP, *http.Response, error)
Convert an existing IP on a subscription to a reserved IP.
func (*ReservedIPServiceHandler) Create ¶
func (r *ReservedIPServiceHandler) Create(ctx context.Context, ripCreate *ReservedIPReq) (*ReservedIP, *http.Response, error)
Create adds the specified reserved IP to your Vultr account
func (*ReservedIPServiceHandler) Delete ¶
func (r *ReservedIPServiceHandler) Delete(ctx context.Context, id string) error
Delete removes the specified reserved IP from your Vultr account
func (*ReservedIPServiceHandler) Detach ¶
func (r *ReservedIPServiceHandler) Detach(ctx context.Context, id string) error
Detach a reserved IP from an existing subscription.
func (*ReservedIPServiceHandler) Get ¶
func (r *ReservedIPServiceHandler) Get(ctx context.Context, id string) (*ReservedIP, *http.Response, error)
Get gets the reserved IP associated with provided ID
func (*ReservedIPServiceHandler) List ¶
func (r *ReservedIPServiceHandler) List(ctx context.Context, options *ListOptions) ([]ReservedIP, *Meta, *http.Response, error)
List lists all the reserved IPs associated with your Vultr account
func (*ReservedIPServiceHandler) Update ¶
func (r *ReservedIPServiceHandler) Update(ctx context.Context, id string, ripUpdate *ReservedIPUpdateReq) (*ReservedIP, *http.Response, error)
Update updates label on the Reserved IP
type ReservedIPUpdateReq ¶
type ReservedIPUpdateReq struct {
Label *string `json:"label"`
}
ReservedIPUpdateReq represents the parameters for updating a Reserved IP on Vultr
type RestoreReq ¶
type RestoreReq struct {
BackupID string `json:"backup_id,omitempty"`
SnapshotID string `json:"snapshot_id,omitempty"`
}
RestoreReq struct used to supply whether a restore should be from a backup or snapshot.
type S3Keys ¶
type S3Keys struct {
S3Hostname string `json:"s3_hostname"`
S3AccessKey string `json:"s3_access_key"`
S3SecretKey string `json:"s3_secret_key"`
}
S3Keys define your api access to your cluster
type SSHKey ¶
type SSHKey struct {
ID string `json:"id"`
Name string `json:"name"`
SSHKey string `json:"ssh_key"`
DateCreated string `json:"date_created"`
}
SSHKey represents an SSH Key on Vultr
type SSHKeyReq ¶
type SSHKeyReq struct {
Name string `json:"name,omitempty"`
SSHKey string `json:"ssh_key,omitempty"`
}
SSHKeyReq is the ssh key struct for create and update calls
type SSHKeyService ¶
type SSHKeyService interface {
Create(ctx context.Context, sshKeyReq *SSHKeyReq) (*SSHKey, *http.Response, error)
Get(ctx context.Context, sshKeyID string) (*SSHKey, *http.Response, error)
Update(ctx context.Context, sshKeyID string, sshKeyReq *SSHKeyReq) error
Delete(ctx context.Context, sshKeyID string) error
List(ctx context.Context, options *ListOptions) ([]SSHKey, *Meta, *http.Response, error)
}
SSHKeyService is the interface to interact with the SSH Key endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/ssh
type SSHKeyServiceHandler ¶
type SSHKeyServiceHandler struct {
// contains filtered or unexported fields
}
SSHKeyServiceHandler handles interaction with the SSH Key methods for the Vultr API
func (*SSHKeyServiceHandler) Create ¶
func (s *SSHKeyServiceHandler) Create(ctx context.Context, sshKeyReq *SSHKeyReq) (*SSHKey, *http.Response, error)
Create a ssh key
func (*SSHKeyServiceHandler) Delete ¶
func (s *SSHKeyServiceHandler) Delete(ctx context.Context, sshKeyID string) error
Delete a specific ssh-key.
func (*SSHKeyServiceHandler) Get ¶
func (s *SSHKeyServiceHandler) Get(ctx context.Context, sshKeyID string) (*SSHKey, *http.Response, error)
Get a specific ssh key.
type SSL ¶
type SSL struct {
PrivateKey string `json:"private_key,omitempty"`
Certificate string `json:"certificate,omitempty"`
Chain string `json:"chain,omitempty"`
PrivateKeyB64 string `json:"private_key_b64,omitempty"`
CertificateB64 string `json:"certificate_b64,omitempty"`
ChainB64 string `json:"chain_b64,omitempty"`
}
SSL represents valid SSL config
type Snapshot ¶
type Snapshot struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
Description string `json:"description"`
Size int `json:"size"`
CompressedSize int `json:"compressed_size"`
Status string `json:"status"`
OsID int `json:"os_id"`
AppID int `json:"app_id"`
}
Snapshot represents a Vultr snapshot
type SnapshotReq ¶
type SnapshotReq struct {
InstanceID string `json:"instance_id,omitempty"`
Description string `json:"description,omitempty"`
}
SnapshotReq struct is used to create snapshots.
type SnapshotService ¶
type SnapshotService interface {
Create(ctx context.Context, snapshotReq *SnapshotReq) (*Snapshot, *http.Response, error)
CreateFromURL(ctx context.Context, snapshotURLReq *SnapshotURLReq) (*Snapshot, *http.Response, error)
Get(ctx context.Context, snapshotID string) (*Snapshot, *http.Response, error)
Delete(ctx context.Context, snapshotID string) error
List(ctx context.Context, options *ListOptions) ([]Snapshot, *Meta, *http.Response, error)
}
SnapshotService is the interface to interact with Snapshot endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/snapshot
type SnapshotServiceHandler ¶
type SnapshotServiceHandler struct {
// contains filtered or unexported fields
}
SnapshotServiceHandler handles interaction with the snapshot methods for the Vultr API
func (*SnapshotServiceHandler) Create ¶
func (s *SnapshotServiceHandler) Create(ctx context.Context, snapshotReq *SnapshotReq) (*Snapshot, *http.Response, error)
Create makes a snapshot of a provided server
func (*SnapshotServiceHandler) CreateFromURL ¶
func (s *SnapshotServiceHandler) CreateFromURL(ctx context.Context, snapshotURLReq *SnapshotURLReq) (*Snapshot, *http.Response, error)
CreateFromURL will create a snapshot based on an image iso from a URL you provide
func (*SnapshotServiceHandler) Delete ¶
func (s *SnapshotServiceHandler) Delete(ctx context.Context, snapshotID string) error
Delete a snapshot.
type SnapshotURLReq ¶
type SnapshotURLReq struct {
URL string `json:"url"`
Description string `json:"description,omitempty"`
UEFI *bool `json:"uefi"`
}
SnapshotURLReq struct is used to create snapshots from a URL.
type Soa ¶
type Soa struct {
NSPrimary string `json:"nsprimary,omitempty"`
Email string `json:"email,omitempty"`
}
Soa information for the Domain
type StartupScript ¶
type StartupScript struct {
ID string `json:"id"`
DateCreated string `json:"date_created"`
DateModified string `json:"date_modified"`
Name string `json:"name"`
Type string `json:"type"`
Script string `json:"script"`
}
StartupScript represents an startup script on Vultr
type StartupScriptReq ¶
type StartupScriptReq struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Script string `json:"script,omitempty"`
}
StartupScriptReq is the user struct for create and update calls
type StartupScriptService ¶
type StartupScriptService interface {
Create(ctx context.Context, req *StartupScriptReq) (*StartupScript, *http.Response, error)
Get(ctx context.Context, scriptID string) (*StartupScript, *http.Response, error)
Update(ctx context.Context, scriptID string, scriptReq *StartupScriptReq) error
Delete(ctx context.Context, scriptID string) error
List(ctx context.Context, options *ListOptions) ([]StartupScript, *Meta, *http.Response, error)
}
StartupScriptService is the interface to interact with the startup script endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/startup
type StartupScriptServiceHandler ¶
type StartupScriptServiceHandler struct {
// contains filtered or unexported fields
}
StartupScriptServiceHandler handles interaction with the startup script methods for the Vultr API
func (*StartupScriptServiceHandler) Create ¶
func (s *StartupScriptServiceHandler) Create(ctx context.Context, scriptReq *StartupScriptReq) (*StartupScript, *http.Response, error)
Create a startup script
func (*StartupScriptServiceHandler) Delete ¶
func (s *StartupScriptServiceHandler) Delete(ctx context.Context, scriptID string) error
Delete the specified startup script from your account.
func (*StartupScriptServiceHandler) Get ¶
func (s *StartupScriptServiceHandler) Get(ctx context.Context, scriptID string) (*StartupScript, *http.Response, error)
Get a single startup script
func (*StartupScriptServiceHandler) List ¶
func (s *StartupScriptServiceHandler) List(ctx context.Context, options *ListOptions) ([]StartupScript, *Meta, *http.Response, error)
List all the startup scripts associated with your Vultr account
func (*StartupScriptServiceHandler) Update ¶
func (s *StartupScriptServiceHandler) Update(ctx context.Context, scriptID string, scriptReq *StartupScriptReq) error
Update will update the given startup script. Empty strings will be ignored.
type StickySessions ¶
type StickySessions struct {
CookieName string `json:"cookie_name,omitempty"`
}
StickySessions represents cookie for your load balancer
type SubAccount ¶
type SubAccount struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"subaccount_name"`
OtherID string `json:"subaccount_id"`
Activated bool `json:"activated"`
Balance int `json:"balance"`
PendingCharges int `json:"pending_charges"`
}
SubAccount represents a Vultr sub-account
type SubAccountReq ¶
type SubAccountReq struct {
Email string `json:"email"`
Name string `json:"subaccount_name,omitempty"`
OtherID string `json:"subaccount_id,omitempty"`
}
SubAccountReq is the sub-account struct for create calls
type SubAccountService ¶
type SubAccountService interface {
List(ctx context.Context, options *ListOptions) ([]SubAccount, *Meta, *http.Response, error)
Create(ctx context.Context, saReq *SubAccountReq) (*SubAccount, *http.Response, error)
}
SubAccountService is the interface to interact with sub-accounts endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/subaccount
type SubAccountServiceHandler ¶
type SubAccountServiceHandler struct {
// contains filtered or unexported fields
}
SubAccountServiceHandler handles interaction with the account methods for the Vultr API
func (*SubAccountServiceHandler) Create ¶
func (s *SubAccountServiceHandler) Create(ctx context.Context, saReq *SubAccountReq) (*SubAccount, *http.Response, error)
Create a sub-account
func (*SubAccountServiceHandler) List ¶
func (s *SubAccountServiceHandler) List(ctx context.Context, options *ListOptions) ([]SubAccount, *Meta, *http.Response, error)
List all sub-accounts
type SupportedEngines ¶
type SupportedEngines struct {
MySQL *bool `json:"mysql"`
PG *bool `json:"pg"`
Valkey *bool `json:"valkey"`
Kafka *bool `json:"kafka"`
}
SupportedEngines represents an object containing supported database engine types for Managed Database plans
type Taint ¶
type Taint struct {
Key string `json:"key"`
Value string `json:"value"`
Effect string `json:"effect"`
}
Taint represents a Kubernetes taint that can be applied to nodes in a node pool
type Upgrades ¶
type Upgrades struct {
Applications []Application `json:"applications,omitempty"`
OS []OS `json:"os,omitempty"`
Plans []string `json:"plans,omitempty"`
}
Upgrades that are available for a given Instance.
type User ¶
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
APIEnabled *bool `json:"api_enabled"`
APIKey string `json:"api_key,omitempty"`
ACL []string `json:"acls,omitempty"`
}
User represents an user on Vultr
type UserData ¶
type UserData struct {
Data string `json:"data"`
}
UserData information for a given struct.
type UserReq ¶
type UserReq struct {
Email string `json:"email,omitempty"`
Name string `json:"name,omitempty"`
APIEnabled *bool `json:"api_enabled,omitempty"`
ACL []string `json:"acls,omitempty"`
Password string `json:"password,omitempty"`
}
UserReq is the user struct for create and update calls
type UserService ¶
type UserService interface {
Create(ctx context.Context, userCreate *UserReq) (*User, *http.Response, error)
Get(ctx context.Context, userID string) (*User, *http.Response, error)
Update(ctx context.Context, userID string, userReq *UserReq) error
Delete(ctx context.Context, userID string) error
List(ctx context.Context, options *ListOptions) ([]User, *Meta, *http.Response, error)
}
UserService is the interface to interact with the user management endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/users
type UserServiceHandler ¶
type UserServiceHandler struct {
// contains filtered or unexported fields
}
UserServiceHandler handles interaction with the user methods for the Vultr API
func (*UserServiceHandler) Create ¶
func (u *UserServiceHandler) Create(ctx context.Context, userCreate *UserReq) (*User, *http.Response, error)
Create will add the specified user to your Vultr account
func (*UserServiceHandler) Delete ¶
func (u *UserServiceHandler) Delete(ctx context.Context, userID string) error
Delete will remove the specified user from your Vultr account
type VNCUrl ¶
type VNCUrl struct {
URL string `json:"url"`
}
VNCUrl contains the URL for a given Bare Metals VNC
type VPC ¶
type VPC struct {
ID string `json:"id"`
Region string `json:"region"`
Description string `json:"description"`
V4Subnet string `json:"v4_subnet"`
V4SubnetMask int `json:"v4_subnet_mask"`
DateCreated string `json:"date_created"`
}
VPC represents a Vultr VPC
type VPC2 ¶
type VPC2 struct {
ID string `json:"id"`
Region string `json:"region"`
Description string `json:"description"`
IPBlock string `json:"ip_block"`
PrefixLength int `json:"prefix_length"`
DateCreated string `json:"date_created"`
}
VPC2 represents a Vultr VPC 2.0 Deprecated: VPC2 is no longer supported and functionality will cease in a future release
type VPC2AttachDetachReq ¶
type VPC2AttachDetachReq struct {
Nodes []string `json:"nodes"`
}
VPC2AttachDetachReq represents parameters to mass attach or detach nodes from VPC 2.0 networks
type VPC2Info ¶
type VPC2Info struct {
ID string `json:"id"`
MacAddress string `json:"mac_address"`
IPAddress string `json:"ip_address"`
}
VPC2Info information for a given instance. Deprecated: VPC2 is no longer supported
type VPC2Node ¶
type VPC2Node struct {
ID string `json:"id"`
IPAddress string `json:"ip_address"`
MACAddress int `json:"mac_address"`
Description string `json:"description"`
Type string `json:"type"`
NodeStatus string `json:"node_status"`
}
VPC2Node represents a node attached to a VPC 2.0 network
type VPC2Req ¶
type VPC2Req struct {
Region string `json:"region"`
Description string `json:"description"`
IPType string `json:"ip_type"`
IPBlock string `json:"ip_block"`
PrefixLength int `json:"prefix_length"`
}
VPC2Req represents parameters to create or update a VPC 2.0 resource
type VPC2Service ¶
type VPC2Service interface {
// Deprecated: VPC2 is no longer supported
Create(ctx context.Context, createReq *VPC2Req) (*VPC2, *http.Response, error)
// Deprecated: VPC2 is no longer supported
Get(ctx context.Context, vpcID string) (*VPC2, *http.Response, error)
// Deprecated: VPC2 is no longer supported
Update(ctx context.Context, vpcID string, description string) error
// Deprecated: VPC2 is no longer supported
Delete(ctx context.Context, vpcID string) error
// Deprecated: VPC2 is no longer supported
List(ctx context.Context, options *ListOptions) ([]VPC2, *Meta, *http.Response, error)
// Deprecated: VPC2 is no longer supported
ListNodes(ctx context.Context, vpc2ID string, options *ListOptions) ([]VPC2Node, *Meta, *http.Response, error)
// Deprecated: VPC2 is no longer supported
Attach(ctx context.Context, vpcID string, attachReq *VPC2AttachDetachReq) error
// Deprecated: VPC2 is no longer supported
Detach(ctx context.Context, vpcID string, detachReq *VPC2AttachDetachReq) error
}
VPC2Service is the interface to interact with the VPC 2.0 endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/vpc2 Deprecated: VPC2 is no longer supported and functionality will cease in a future release
type VPC2ServiceHandler ¶
type VPC2ServiceHandler struct {
// contains filtered or unexported fields
}
VPC2ServiceHandler handles interaction with the VPC 2.0 methods for the Vultr API
func (*VPC2ServiceHandler) Attach ¶
func (n *VPC2ServiceHandler) Attach(ctx context.Context, vpcID string, attachReq *VPC2AttachDetachReq) error
Attach attaches nodes to a VPC 2.0 network Deprecated: VPC2 is no longer supported and functionality will cease in a future release
func (*VPC2ServiceHandler) Create ¶
func (n *VPC2ServiceHandler) Create(ctx context.Context, createReq *VPC2Req) (*VPC2, *http.Response, error)
Create creates a new VPC 2.0. A VPC 2.0 can only be used at the location for which it was created. Deprecated: VPC2 is no longer supported and functionality will cease in a future release
func (*VPC2ServiceHandler) Delete ¶
func (n *VPC2ServiceHandler) Delete(ctx context.Context, vpcID string) error
Delete deletes a VPC 2.0. Before deleting, a VPC 2.0 must be disabled from all instances Deprecated: VPC2 is no longer supported and functionality will cease in a future release
func (*VPC2ServiceHandler) Detach ¶
func (n *VPC2ServiceHandler) Detach(ctx context.Context, vpcID string, detachReq *VPC2AttachDetachReq) error
Detach detaches nodes from a VPC 2.0 network Deprecated: VPC2 is no longer supported and functionality will cease in a future release
func (*VPC2ServiceHandler) Get ¶
Get gets the VPC 2.0 of the requested ID Deprecated: VPC2 is no longer supported and functionality will cease in a future release
func (*VPC2ServiceHandler) List ¶
func (n *VPC2ServiceHandler) List(ctx context.Context, options *ListOptions) ([]VPC2, *Meta, *http.Response, error)
List lists all VPCs 2.0 on the current account Deprecated: VPC2 is no longer supported and functionality will cease in a future release
func (*VPC2ServiceHandler) ListNodes ¶
func (n *VPC2ServiceHandler) ListNodes(ctx context.Context, vpc2ID string, options *ListOptions) ([]VPC2Node, *Meta, *http.Response, error)
ListNodes lists all nodes attached to a VPC 2.0 network Deprecated: VPC2 is no longer supported and functionality will cease in a future release
type VPCInfo ¶
type VPCInfo struct {
ID string `json:"id"`
MacAddress string `json:"mac_address"`
IPAddress string `json:"ip_address"`
}
VPCInfo information for a given instance.
type VPCReq ¶
type VPCReq struct {
Region string `json:"region"`
Description string `json:"description"`
V4Subnet string `json:"v4_subnet"`
V4SubnetMask int `json:"v4_subnet_mask"`
}
VPCReq represents parameters to create or update a VPC resource
type VPCService ¶
type VPCService interface {
Create(ctx context.Context, createReq *VPCReq) (*VPC, *http.Response, error)
Get(ctx context.Context, vpcID string) (*VPC, *http.Response, error)
Update(ctx context.Context, vpcID string, description string) error
Delete(ctx context.Context, vpcID string) error
List(ctx context.Context, options *ListOptions) ([]VPC, *Meta, *http.Response, error)
}
VPCService is the interface to interact with the VPC endpoints on the Vultr API Link : https://www.vultr.com/api/#tag/vpcs
type VPCServiceHandler ¶
type VPCServiceHandler struct {
// contains filtered or unexported fields
}
VPCServiceHandler handles interaction with the VPC methods for the Vultr API
func (*VPCServiceHandler) Create ¶
func (n *VPCServiceHandler) Create(ctx context.Context, createReq *VPCReq) (*VPC, *http.Response, error)
Create creates a new VPC. A VPC can only be used at the location for which it was created.
func (*VPCServiceHandler) Delete ¶
func (n *VPCServiceHandler) Delete(ctx context.Context, vpcID string) error
Delete deletes a VPC. Before deleting, a VPC must be disabled from all instances
type Versions ¶
type Versions struct {
Versions []string `json:"versions"`
}
Versions that are supported for VKE
type VirtualFileSystemStorage ¶
type VirtualFileSystemStorage struct {
ID string `json:"id"`
Region string `json:"region"`
DateCreated string `json:"date_created"`
Status string `json:"status"`
Label string `json:"label"`
Tags []string `json:"tags"`
DiskType string `json:"disk_type"`
StorageSize VirtualFileSystemStorageSize `json:"storage_size"`
StorageUsed VirtualFileSystemStorageSize `json:"storage_used"`
Billing VirtualFileSystemStorageBilling `json:"billing"`
}
VirtualFileSystemStorage represents a virtual file system storage.
type VirtualFileSystemStorageAttachment ¶
type VirtualFileSystemStorageAttachment struct {
ID string `json:"vfs_id"`
State string `json:"state"`
TargetID string `json:"target_id"`
MountTag int `json:"mount_tag"`
}
VirtualFileSystemStorageAttachment represents an attachment for a virtual file system.
type VirtualFileSystemStorageBilling ¶
type VirtualFileSystemStorageBilling struct {
Charges float32 `json:"charges"`
Monthly float32 `json:"monthly"`
}
VirtualFileSystemStorageBilling represents the billing data of a virtual file system storage.
type VirtualFileSystemStorageReq ¶
type VirtualFileSystemStorageReq struct {
Region string `json:"region"`
Label string `json:"label"`
StorageSize VirtualFileSystemStorageSize `json:"storage_size"`
DiskType string `json:"disk_type,omitempty"`
Tags []string `json:"tags,omitempty"`
}
VirtualFileSystemStorageReq struct represents the request used when creating a virtual file system storage.
type VirtualFileSystemStorageService ¶
type VirtualFileSystemStorageService interface {
Create(ctx context.Context, vfsReq *VirtualFileSystemStorageReq) (*VirtualFileSystemStorage, *http.Response, error)
Get(ctx context.Context, vfsID string) (*VirtualFileSystemStorage, *http.Response, error)
Update(ctx context.Context, vfsID string, vfsUpdateReq *VirtualFileSystemStorageUpdateReq) (*VirtualFileSystemStorage, *http.Response, error) //nolint:lll
Delete(ctx context.Context, vfsID string) error
List(ctx context.Context, options *ListOptions) ([]VirtualFileSystemStorage, *Meta, *http.Response, error)
AttachmentList(ctx context.Context, vfsID string) ([]VirtualFileSystemStorageAttachment, *http.Response, error)
AttachmentGet(ctx context.Context, vfsID, targetID string) (*VirtualFileSystemStorageAttachment, *http.Response, error)
Attach(ctx context.Context, vfsID, targetID string) (*VirtualFileSystemStorageAttachment, *http.Response, error)
Detach(ctx context.Context, vfsID, targetID string) error
}
VirtualFileSystemStorageService is the interface to interact with virtual file system endpoint on the Vultr API Link : https://www.vultr.com/api/#tag/vfs
type VirtualFileSystemStorageServiceHandler ¶
type VirtualFileSystemStorageServiceHandler struct {
// contains filtered or unexported fields
}
VirtualFileSystemStorageServiceHandler handles interaction with the virtual file system methods for the Vultr API.
func (*VirtualFileSystemStorageServiceHandler) Attach ¶
func (f *VirtualFileSystemStorageServiceHandler) Attach(ctx context.Context, vfsID, targetID string) (*VirtualFileSystemStorageAttachment, *http.Response, error)
Attach attaches a virtual file system storage to another instance.
func (*VirtualFileSystemStorageServiceHandler) AttachmentGet ¶
func (f *VirtualFileSystemStorageServiceHandler) AttachmentGet(ctx context.Context, vfsID, targetID string) (*VirtualFileSystemStorageAttachment, *http.Response, error)
AttachmentGet retrieves the attachment of a virtual file system storage and its attached instance.
func (*VirtualFileSystemStorageServiceHandler) AttachmentList ¶
func (f *VirtualFileSystemStorageServiceHandler) AttachmentList(ctx context.Context, vfsID string) ([]VirtualFileSystemStorageAttachment, *http.Response, error)
AttachmentList retrieves a list the active attachments on a virtual file system storage.
func (*VirtualFileSystemStorageServiceHandler) Create ¶
func (f *VirtualFileSystemStorageServiceHandler) Create(ctx context.Context, vfsReq *VirtualFileSystemStorageReq) (*VirtualFileSystemStorage, *http.Response, error)
Create sends a create request for a virtual file system storage.
func (*VirtualFileSystemStorageServiceHandler) Delete ¶
func (f *VirtualFileSystemStorageServiceHandler) Delete(ctx context.Context, vfsID string) error
Delete sends a delete request for a virtual file system storage.
func (*VirtualFileSystemStorageServiceHandler) Detach ¶
func (f *VirtualFileSystemStorageServiceHandler) Detach(ctx context.Context, vfsID, targetID string) error
Detach sends a delete request for an attachment of a virtual file system storage, detaching it from its instance.
func (*VirtualFileSystemStorageServiceHandler) Get ¶
func (f *VirtualFileSystemStorageServiceHandler) Get(ctx context.Context, vfsID string) (*VirtualFileSystemStorage, *http.Response, error)
Get retrieves a single virtual file system storage.
func (*VirtualFileSystemStorageServiceHandler) List ¶
func (f *VirtualFileSystemStorageServiceHandler) List(ctx context.Context, options *ListOptions) ([]VirtualFileSystemStorage, *Meta, *http.Response, error)
List retrieves a list of all virtual file system storages.
func (*VirtualFileSystemStorageServiceHandler) Update ¶
func (f *VirtualFileSystemStorageServiceHandler) Update(ctx context.Context, vfsID string, vfsUpdateReq *VirtualFileSystemStorageUpdateReq) (*VirtualFileSystemStorage, *http.Response, error)
Update sends a update request for a virtual file system storage.
type VirtualFileSystemStorageSize ¶
type VirtualFileSystemStorageSize struct {
SizeBytes int `json:"bytes,omitempty"`
SizeGB int `json:"gb"`
}
VirtualFileSystemStorageSize represents the on disk size of a virtual file system storage.
type VirtualFileSystemStorageUpdateReq ¶
type VirtualFileSystemStorageUpdateReq struct {
Label string `json:"label,omitempty"`
StorageSize VirtualFileSystemStorageSize `json:"storage_size"`
}
VirtualFileSystemStorageUpdateReq struct represents the request used when updating virtual file system storage.
Source Files
¶
- account.go
- application.go
- backup.go
- bare_metal_server.go
- billing.go
- block_storage.go
- cdn.go
- container_registry.go
- database.go
- domain_records.go
- domains.go
- firewall_group.go
- firewall_rule.go
- govultr.go
- inference.go
- instance.go
- ip.go
- iso.go
- kubernetes.go
- listOptions.go
- load_balancer.go
- logs.go
- marketplace.go
- meta.go
- object_storage.go
- os.go
- plans.go
- regions.go
- reserved_ip.go
- snapshot.go
- ssh_key.go
- startup_script.go
- subaccount.go
- user.go
- virtual_file_system_storage.go
- vpc.go
- vpc2.go