Documentation
¶
Index ¶
- Constants
- func BackupNodeHetznerStorageBoxCredentials(host string, login string, key string) map[string]interface{}
- func BackupNodeSSHRsyncCredentials(host string, port int, login string, key string, storagePath string) map[string]interface{}
- func IsNotFound(err error) bool
- func IsValidCloudInitVersion(v string) bool
- func IsValidVirtualizationType(v string) bool
- type APIToken
- type APITokenAuthenticator
- type APITokenCreateRequest
- type APITokenPatchRequest
- type APITokensResponse
- type APITokensService
- func (s *APITokensService) Create(ctx context.Context, data APITokenCreateRequest) (AccessToken, error)
- func (s *APITokensService) Delete(ctx context.Context, id string) error
- func (s *APITokensService) Get(ctx context.Context, id string) (APIToken, error)
- func (s *APITokensService) List(ctx context.Context, filter *FilterAPITokens) (APITokensResponse, error)
- func (s *APITokensService) Patch(ctx context.Context, id string, data APITokenPatchRequest) (APIToken, error)
- type AccessToken
- type AccountService
- type ActivityLogs
- type ActivityLogsEvent
- type ActivityLogsResponse
- type ActivityLogsService
- type AdditionalDiskCreateRequest
- type Application
- type ApplicationCreateRequest
- type ApplicationsResponse
- type ApplicationsService
- func (s *ApplicationsService) Create(ctx context.Context, data ApplicationCreateRequest) (Application, error)
- func (s *ApplicationsService) List(ctx context.Context) (ApplicationsResponse, error)
- func (s *ApplicationsService) Update(ctx context.Context, id int, data ApplicationCreateRequest) (Application, error)
- type AuthLoginRequest
- type AuthLoginResponse
- type Authenticator
- type Backup
- type BackupCreationMethod
- type BackupNode
- type BackupNodeRequest
- type BackupNodeType
- type BackupNodesService
- type BackupStatus
- type BackupType
- type BackupsService
- type BandwidthPlanLimit
- type BandwidthPlanLimitUnit
- type BootMode
- type Client
- type ClientOption
- type CloudInitVersion
- type ComputeResource
- type ComputeResourceAuthType
- type ComputeResourceBalanceStrategy
- type ComputeResourceInstallStep
- type ComputeResourceInstallStepStatus
- type ComputeResourceMetrics
- type ComputeResourceMetricsNetwork
- type ComputeResourceNetwork
- type ComputeResourcePhysicalVolume
- type ComputeResourceServerCreateRequest
- type ComputeResourceSettings
- type ComputeResourceSettingsLimit
- type ComputeResourceSettingsLimits
- type ComputeResourceSettingsNetwork
- type ComputeResourceSettingsNetworkBridge
- type ComputeResourceSettingsNetworkType
- type ComputeResourceStorageCreateRequest
- type ComputeResourceThinPool
- type ComputeResourcesResponse
- type ComputeResourcesService
- func (s *ComputeResourcesService) Create(ctx context.Context, data ComputerResourceCreateRequest) (ComputeResource, error)
- func (s *ComputeResourcesService) Delete(ctx context.Context, id int, force bool) error
- func (s *ComputeResourcesService) Get(ctx context.Context, id int) (ComputeResource, error)
- func (s *ComputeResourcesService) InstallSteps(ctx context.Context, id int) ([]ComputeResourceInstallStep, error)
- func (s *ComputeResourcesService) List(ctx context.Context, filter *FilterComputeResources) (ComputeResourcesResponse, error)
- func (s *ComputeResourcesService) Networks(ctx context.Context, id int) ([]ComputeResourceNetwork, error)
- func (s *ComputeResourcesService) Patch(ctx context.Context, id int, data ComputerResourceUpdateRequest) (ComputeResource, error)
- func (s *ComputeResourcesService) PhysicalVolumes(ctx context.Context, id int) ([]ComputeResourcePhysicalVolume, error)
- func (s *ComputeResourcesService) ServersCreate(ctx context.Context, id int, data ComputeResourceServerCreateRequest) (VirtualServer, error)
- func (s *ComputeResourcesService) SetUpNetwork(ctx context.Context, id int, data SetupNetworkRequest) error
- func (s *ComputeResourcesService) SettingsUpdate(ctx context.Context, id int, data ComputeResourceSettings) (ComputeResourceSettings, error)
- func (s *ComputeResourcesService) StorageCreate(ctx context.Context, id int, data ComputeResourceStorageCreateRequest) (Storage, error)
- func (s *ComputeResourcesService) StorageList(ctx context.Context, id int) ([]Storage, error)
- func (s *ComputeResourcesService) ThinPools(ctx context.Context, id int) ([]ComputeResourceThinPool, error)
- type ComputerResourceCreateRequest
- type ComputerResourceStatus
- type ComputerResourceUpdateRequest
- type Credentials
- type Disk
- type DiskBandwidthPlanLimit
- type DiskBandwidthPlanLimitUnit
- type DiskCacheMode
- type DiskDriver
- type DiskIOPSPlanLimit
- type DiskIOPSPlanLimitUnit
- type EmailAndPasswordAuthenticator
- type FilterAPITokens
- type FilterActivityLogs
- type FilterComputeResources
- type FilterIPBlocks
- type FilterISOImages
- type FilterIcons
- type FilterLanguages
- type FilterLocations
- type FilterOsImages
- type FilterPlans
- type FilterProjects
- type FilterSSHKeys
- type FilterTasks
- type FilterUsage
- type FilterUsers
- type FilterVPCNetworks
- type FilterVirtualServers
- func (f *FilterVirtualServers) ByComputeResourceID(id int) *FilterVirtualServers
- func (f *FilterVirtualServers) ByStatus(status string) *FilterVirtualServers
- func (f *FilterVirtualServers) ByUserID(id int) *FilterVirtualServers
- func (f *FilterVirtualServers) ByVirtualizationType(virtualizationType VirtualizationType) *FilterVirtualServers
- type Firmware
- type HTTPError
- type IPBlock
- type IPBlockIPAddress
- type IPBlockRequest
- type IPBlockReverseDNS
- type IPBlocksResponse
- type IPBlocksService
- func (s *IPBlocksService) Create(ctx context.Context, data IPBlockRequest) (IPBlock, error)
- func (s *IPBlocksService) Delete(ctx context.Context, id int) error
- func (s *IPBlocksService) Get(ctx context.Context, id int) (IPBlock, error)
- func (s *IPBlocksService) IPAddressCreate(ctx context.Context, ipBlockID int) (IPBlockIPAddress, error)
- func (s *IPBlocksService) IPAddressDelete(ctx context.Context, id int) error
- func (s *IPBlocksService) List(ctx context.Context, filter *FilterIPBlocks) (IPBlocksResponse, error)
- func (s *IPBlocksService) Update(ctx context.Context, id int, data IPBlockRequest) (IPBlock, error)
- type IPVersion
- type ISOImage
- type ISOImageChecksumMethod
- type ISOImageOSType
- type ISOImageVisibility
- type ISOImagesResponse
- type ISOImagesService
- type Icon
- type IconType
- type IconsResponse
- type IconsService
- type ImageFormat
- type Language
- type LanguagesResponse
- type LanguagesService
- type License
- type LicenseActivateRequest
- type LicenseService
- type LicenseType
- type LimitGroup
- type LimitGroupLimit
- type ListType
- type Location
- type LocationCreateRequest
- type LocationPatchRequest
- type LocationsResponse
- type LocationsService
- func (s *LocationsService) Create(ctx context.Context, data LocationCreateRequest) (Location, error)
- func (s *LocationsService) Delete(ctx context.Context, id int) error
- func (s *LocationsService) Get(ctx context.Context, id int) (Location, error)
- func (s *LocationsService) List(ctx context.Context, filter *FilterLocations) (LocationsResponse, error)
- func (s *LocationsService) Patch(ctx context.Context, id int, data LocationPatchRequest) (Location, error)
- func (s *LocationsService) Update(ctx context.Context, id int, data LocationCreateRequest) (Location, error)
- type Logger
- type LoginLink
- type LoginLinkType
- type Netfilter
- type NetfilterStatus
- type NullLogger
- type Offer
- type OfferType
- type OsImage
- type OsImageRequest
- type OsImageVersion
- type OsImageVersionRequest
- type OsImageVersionsService
- type OsImagesResponse
- type OsImagesService
- func (s *OsImagesService) Create(ctx context.Context, data OsImageRequest) (OsImage, error)
- func (s *OsImagesService) CreateVersion(ctx context.Context, osImageID int, data OsImageVersionRequest) (OsImageVersion, error)
- func (s *OsImagesService) Delete(ctx context.Context, id int) error
- func (s *OsImagesService) Get(ctx context.Context, id int) (OsImage, error)
- func (s *OsImagesService) List(ctx context.Context, filter *FilterOsImages) (OsImagesResponse, error)
- func (s *OsImagesService) ListVersion(ctx context.Context, osImageID int) ([]OsImageVersion, error)
- func (s *OsImagesService) Update(ctx context.Context, id int, data OsImageRequest) (OsImage, error)
- type PPP
- type Permission
- type PermissionResponse
- type PermissionsService
- type Plan
- type PlanBackupSettings
- type PlanCreateRequest
- type PlanLimitUnit
- type PlanLimits
- type PlanNetworkTotalTrafficType
- type PlanParams
- type PlanPrice
- type PlanResetLimitPolicy
- type PlanUpdateLimits
- type PlanUpdateRequest
- type PlansResponse
- type PlansService
- func (s *PlansService) Create(ctx context.Context, data PlanCreateRequest) (Plan, error)
- func (s *PlansService) Delete(ctx context.Context, id int) error
- func (s *PlansService) Get(ctx context.Context, id int) (Plan, error)
- func (s *PlansService) List(ctx context.Context, filter *FilterPlans) (PlansResponse, error)
- func (s *PlansService) Update(ctx context.Context, id int, data PlanUpdateRequest) (Plan, error)
- type Project
- type ProjectRequest
- type ProjectServersCreateRequest
- type ProjectServersResponse
- type ProjectsResponse
- type ProjectsService
- func (s *ProjectsService) Create(ctx context.Context, data ProjectRequest) (Project, error)
- func (s *ProjectsService) Delete(ctx context.Context, id int) error
- func (s *ProjectsService) Get(ctx context.Context, id int) (Project, error)
- func (s *ProjectsService) List(ctx context.Context, filter *FilterProjects) (ProjectsResponse, error)
- func (s *ProjectsService) Servers(ctx context.Context, id int) (ProjectServersResponse, error)
- func (s *ProjectsService) ServersCreate(ctx context.Context, projectID int, data ProjectServersCreateRequest) (VirtualServer, error)
- func (s *ProjectsService) ServersListAll(ctx context.Context, id int) ([]VirtualServer, error)
- func (s *ProjectsService) Update(ctx context.Context, id int, data ProjectRequest) (Project, error)
- type ResponseLinks
- type ResponseMeta
- type Role
- type RoleCreateRequest
- type RolesResponse
- type RolesService
- func (s *RolesService) Create(ctx context.Context, data RoleCreateRequest) (Role, error)
- func (s *RolesService) Get(ctx context.Context, id int) (Role, error)
- func (s *RolesService) GetByName(ctx context.Context, name string) (Role, error)
- func (s *RolesService) List(ctx context.Context) (RolesResponse, error)
- type SSHKey
- type SSHKeyCreateRequest
- type SSHKeysResponse
- type SSHKeysService
- func (s *SSHKeysService) Create(ctx context.Context, data SSHKeyCreateRequest) (SSHKey, error)
- func (s *SSHKeysService) Delete(ctx context.Context, id int) error
- func (s *SSHKeysService) Get(ctx context.Context, id int) (SSHKey, error)
- func (s *SSHKeysService) List(ctx context.Context, filter *FilterSSHKeys) (SSHKeysResponse, error)
- type ServerUsageResource
- type ServersMigration
- type ServersMigrationRequest
- type ServersMigrationsService
- type Settings
- type SettingsBillingIntegration
- type SettingsBillingIntegrationDrivers
- type SettingsBillingIntegrationDriversWHMCS
- type SettingsComputeResource
- type SettingsDNS
- type SettingsDNSDrivers
- type SettingsDNSDriversPowerDNS
- type SettingsFeatures
- type SettingsMail
- type SettingsNetworkRules
- type SettingsNonExistentVMSRemover
- type SettingsNotifications
- type SettingsNotificationsTemplate
- type SettingsRegistration
- type SettingsService
- type SettingsTheme
- type SettingsUpdate
- type SettingsUpdateRequest
- type SetupNetworkRequest
- type ShortApplication
- type ShortComputeResource
- type ShortLocation
- type ShortOsImageVersion
- type ShortPlan
- type ShortStorage
- type ShortVPCNetwork
- type Snapshot
- type SnapshotRequest
- type SnapshotStatus
- type SnapshotsService
- type Storage
- type StorageService
- type StorageTagsService
- type StorageType
- type StorageTypeName
- type StorageTypesService
- type TUNTAP
- type Task
- type TaskAction
- type TaskStatus
- type TasksResponse
- type TasksService
- type TrafficPlanLimit
- type TrafficPlanLimitUnit
- type UnitPlanLimit
- type UsageResource
- type UsageResourceCollection
- type UsageResponse
- type UsageService
- type User
- type UserCreateRequest
- type UserStatus
- type UserUpdateRequest
- type UsersResponse
- type UsersService
- func (s *UsersService) Create(ctx context.Context, data UserCreateRequest) (User, error)
- func (s *UsersService) Delete(ctx context.Context, id int) error
- func (s *UsersService) List(ctx context.Context, filter *FilterUsers) (UsersResponse, error)
- func (s *UsersService) Update(ctx context.Context, id int, data UserUpdateRequest) (User, error)
- type VPCNetwork
- type VPCNetworkAttachRequest
- type VPCNetworkCreateRequest
- type VPCNetworkDetachRequest
- type VPCNetworkIP
- type VPCNetworkIPAddRequest
- type VPCNetworkIPsAddRequest
- type VPCNetworkIPsResponse
- type VPCNetworkListType
- type VPCNetworkUpdateRequest
- type VPCNetworksResponse
- type VPCNetworksService
- func (s *VPCNetworksService) AddIP(ctx context.Context, id int, data VPCNetworkIPAddRequest) (VPCNetworkIP, error)
- func (s *VPCNetworksService) AddIPs(ctx context.Context, id int, data VPCNetworkIPsAddRequest) error
- func (s *VPCNetworksService) Attach(ctx context.Context, id int, data VPCNetworkAttachRequest) error
- func (s *VPCNetworksService) Create(ctx context.Context, data VPCNetworkCreateRequest) (VPCNetwork, error)
- func (s *VPCNetworksService) Delete(ctx context.Context, id int) error
- func (s *VPCNetworksService) DeleteIP(ctx context.Context, vpcNetworkID, ipID int) error
- func (s *VPCNetworksService) Detach(ctx context.Context, id int, data VPCNetworkDetachRequest) error
- func (s *VPCNetworksService) Get(ctx context.Context, id int) (VPCNetwork, error)
- func (s *VPCNetworksService) List(ctx context.Context, filter *FilterVPCNetworks) (VPCNetworksResponse, error)
- func (s *VPCNetworksService) ListIPs(ctx context.Context, id int) (VPCNetworkIPsResponse, error)
- func (s *VPCNetworksService) Update(ctx context.Context, id int, data VPCNetworkUpdateRequest) (VPCNetwork, error)
- type VirtualServer
- type VirtualServerBackupSettings
- type VirtualServerBackupSettingsSchedule
- type VirtualServerBackupSettingsScheduleTime
- type VirtualServerBackupSettingsScheduleType
- type VirtualServerCreateRequest
- type VirtualServerPatchRequest
- type VirtualServerResizeRequest
- type VirtualServerSettings
- type VirtualServerSpecifications
- type VirtualServerStatus
- type VirtualServerStopRequest
- type VirtualServerUpdateRequest
- type VirtualServerUpdateSettingsRequest
- type VirtualServerUsage
- type VirtualServersResponse
- type VirtualServersService
- func (s *VirtualServersService) Backup(ctx context.Context, id int) (Backup, error)
- func (s *VirtualServersService) Create(ctx context.Context, data VirtualServerCreateRequest) (VirtualServer, error)
- func (s *VirtualServersService) Delete(ctx context.Context, id int) (Task, error)
- func (s *VirtualServersService) Disks(ctx context.Context, id int) ([]Disk, error)
- func (s *VirtualServersService) Get(ctx context.Context, id int) (VirtualServer, error)
- func (s *VirtualServersService) List(ctx context.Context, filter *FilterVirtualServers) (VirtualServersResponse, error)
- func (s *VirtualServersService) Patch(ctx context.Context, id int, data VirtualServerUpdateRequest) (VirtualServer, error)
- func (s *VirtualServersService) PatchFields(ctx context.Context, id int, data VirtualServerPatchRequest) (VirtualServer, error)
- func (s *VirtualServersService) Resize(ctx context.Context, id int, data VirtualServerResizeRequest) (Task, error)
- func (s *VirtualServersService) Restart(ctx context.Context, id int) (Task, error)
- func (s *VirtualServersService) SnapshotsCreate(ctx context.Context, vmID int, data SnapshotRequest) (Snapshot, error)
- func (s *VirtualServersService) Start(ctx context.Context, id int) (Task, error)
- func (s *VirtualServersService) Stop(ctx context.Context, id int) (Task, error)
- func (s *VirtualServersService) StopWithRequest(ctx context.Context, id int, req VirtualServerStopRequest) (Task, error)
- func (s *VirtualServersService) UpdateSettings(ctx context.Context, id int, data VirtualServerUpdateSettingsRequest) (VirtualServer, error)deprecated
- func (s *VirtualServersService) UpdateSettingsTask(ctx context.Context, id int, data VirtualServerUpdateSettingsRequest) (Task, error)
- type VirtualizationType
Constants ¶
const ( // BootModeDisk indicates booting from original disk. BootModeDisk BootMode = "disk" // BootModeRescue indicates booting from rescue ISO image. BootModeRescue BootMode = "rescue" // DiskCacheModeNone indicates no disk cache. DiskCacheModeNone DiskCacheMode = "none" // DiskCacheModeDefault indicates default disk cache. DiskCacheModeDefault DiskCacheMode = "default" // DiskCacheModeDirectSync indicates direct sync disk cache. DiskCacheModeDirectSync DiskCacheMode = "directsync" // DiskCacheModeWriteback indicates writeback disk cache. DiskCacheModeWriteback DiskCacheMode = "writeback" // DiskCacheModeWritethrough indicates writethrough disk cache. DiskCacheModeWritethrough DiskCacheMode = "writethrough" // DiskCacheModeUnsafe indicates unsafe disk cache. DiskCacheModeUnsafe DiskCacheMode = "unsafe" // DiskDriverSATA indicates SATA disk driver. DiskDriverSATA DiskDriver = "sata" // DiskDriverSCSI indicates SCSI disk driver. DiskDriverSCSI DiskDriver = "scsi" // DiskDriverIDE is IDE disk driver. DiskDriverIDE DiskDriver = "ide" // DiskDriverVirtIO indicates virtio disk driver. DiskDriverVirtIO DiskDriver = "virtio" // FirmwareBios indicates BIOS firmware. FirmwareBios string = "bios" // FirmwareEFI indicates EFI firmware. FirmwareEFI string = "efi" )
Variables ¶
This section is empty.
Functions ¶
func BackupNodeHetznerStorageBoxCredentials ¶
func BackupNodeHetznerStorageBoxCredentials( host string, login string, key string, ) map[string]interface{}
BackupNodeHetznerStorageBoxCredentials creates Hetzner Storage Box specific connection credentials.
func BackupNodeSSHRsyncCredentials ¶
func BackupNodeSSHRsyncCredentials( host string, port int, login string, key string, storagePath string, ) map[string]interface{}
BackupNodeSSHRsyncCredentials creates SSH+Rsync specific connection credentials.
func IsNotFound ¶
IsNotFound returns true if specified error is produced 'cause requested resource is not found.
func IsValidCloudInitVersion ¶
IsValidCloudInitVersion returns true if specified cloud-init version is valid.
func IsValidVirtualizationType ¶
IsValidVirtualizationType returns true if specified virtualization type is valid.
Types ¶
type APIToken ¶
type APIToken struct {
ID string `json:"id"`
Name string `json:"name"`
User User `json:"user"`
CreatedAt string `json:"created_at"`
}
APIToken represents an API token.
type APITokenAuthenticator ¶
type APITokenAuthenticator struct {
Token string
}
APITokenAuthenticator authenticate by provided API token.
func (APITokenAuthenticator) Authenticate ¶
func (a APITokenAuthenticator) Authenticate(*Client) (Credentials, error)
Authenticate authenticates by API token.
type APITokenCreateRequest ¶
APITokenCreateRequest represents available properties for creating a new API token.
type APITokenPatchRequest ¶
type APITokenPatchRequest struct {
Name string `json:"name"`
}
APITokenPatchRequest represents available properties for patching an existing API token.
type APITokensResponse ¶
type APITokensResponse struct {
Data []APIToken `json:"data"`
// contains filtered or unexported fields
}
APITokensResponse represents paginated list of API tokens. This cursor can be used for iterating over all available API tokens.
func (*APITokensResponse) Err ¶
func (r *APITokensResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*APITokensResponse) Next ¶
func (r *APITokensResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type APITokensService ¶
type APITokensService service
APITokensService handles all available methods with API tokens.
func (*APITokensService) Create ¶
func (s *APITokensService) Create(ctx context.Context, data APITokenCreateRequest) (AccessToken, error)
Create creates new API token.
func (*APITokensService) Delete ¶
func (s *APITokensService) Delete(ctx context.Context, id string) error
Delete deletes specified API token.
func (*APITokensService) List ¶
func (s *APITokensService) List(ctx context.Context, filter *FilterAPITokens) (APITokensResponse, error)
List lists API tokens.
func (*APITokensService) Patch ¶
func (s *APITokensService) Patch(ctx context.Context, id string, data APITokenPatchRequest) (APIToken, error)
Patch patches specified API token.
type AccessToken ¶
type AccessToken struct {
Token APIToken `json:"token"`
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
}
AccessToken represents an access token with credentials.
type AccountService ¶
type AccountService service
AccountService handles all available methods with a current user account.
type ActivityLogs ¶
type ActivityLogs struct {
ID int `json:"id"`
Event ActivityLogsEvent `json:"event"`
UserEmail string `json:"user_email"`
CreatedAt string `json:"created_at"`
Data json.RawMessage `json:"data,omitempty"`
}
ActivityLogs represents an Activity Logs.
type ActivityLogsEvent ¶
type ActivityLogsEvent string
ActivityLogsEvent represents an Activity Logs event.
const ( ActivityLogsEventAdditionalIPCreateRequested ActivityLogsEvent = "additional_ip_create_requested" ActivityLogsEventAdditionalIPCreateFailed ActivityLogsEvent = "additional_ip_create_failed" ActivityLogsEventAdditionalIPCreated ActivityLogsEvent = "additional_ip_created" ActivityLogsEventAdditionalIPDeleteRequested ActivityLogsEvent = "additional_ip_delete_requested" ActivityLogsEventAdditionalIPDeleteFailed ActivityLogsEvent = "additional_ip_delete_failed" ActivityLogsEventAdditionalIPDeleted ActivityLogsEvent = "additional_ip_deleted" ActivityLogsEventBackupsDeleted ActivityLogsEvent = "backups_deleted" ActivityLogsEventComputeResourceCreateRequested ActivityLogsEvent = "compute_resource_create_requested" ActivityLogsEventComputeResourceDeleteRequested ActivityLogsEvent = "compute_resource_delete_requested" ActivityLogsEventComputeResourceVMCreateRequested ActivityLogsEvent = "compute_resource_vm_create_requested" ActivityLogsEventComputeResourceVMCreateFailed ActivityLogsEvent = "compute_resource_vm_create_failed" ActivityLogsEventComputeResourceVMCreated ActivityLogsEvent = "compute_resource_vm_created" ActivityLogsEventComputeResourceVMDeleteRequested ActivityLogsEvent = "compute_resource_vm_delete_requested" ActivityLogsEventComputeResourceVMBatchDeleted ActivityLogsEvent = "compute_resource_vm_batch_deleted" ActivityLogsEventExternalIntegrationRequested ActivityLogsEvent = "external_integration_requested" ActivityLogsEventFailedToSendEmailNotification ActivityLogsEvent = "failed_to_send_email_notification" ActivityLogsEventIPBlockChanged ActivityLogsEvent = "ip_block_changed" ActivityLogsEventLocationCreated ActivityLogsEvent = "location_created" ActivityLogsEventLocationDeleted ActivityLogsEvent = "location_deleted" ActivityLogsEventLocationChanged ActivityLogsEvent = "location_changed" ActivityLogsEventUserCreateRequested ActivityLogsEvent = "user_create_requested" ActivityLogsEventUserCreateFailed ActivityLogsEvent = "user_create_failed" ActivityLogsEventUserCreated ActivityLogsEvent = "user_created" ActivityLogsEventUserDeleteRequested ActivityLogsEvent = "user_delete_requested" ActivityLogsEventUserDeleteFailed ActivityLogsEvent = "user_delete_failed" ActivityLogsEventUserDeleted ActivityLogsEvent = "user_deleted" )
type ActivityLogsResponse ¶
type ActivityLogsResponse struct {
Data []ActivityLogs `json:"data"`
// contains filtered or unexported fields
}
ActivityLogsResponse represents an Activity Logs response.
func (*ActivityLogsResponse) Err ¶
func (r *ActivityLogsResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*ActivityLogsResponse) Next ¶
func (r *ActivityLogsResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type ActivityLogsService ¶
type ActivityLogsService service
ActivityLogsService provides access to Activity Logs.
func (*ActivityLogsService) List ¶
func (s *ActivityLogsService) List(ctx context.Context, filter *FilterActivityLogs) (ActivityLogsResponse, error)
List return list of activity logs, filter can be nil.
type Application ¶
type Application struct {
ID int `json:"id"`
Name string `json:"name"`
Icon Icon `json:"icon"`
URL string `json:"url"`
CloudInitVersion string `json:"cloud_init_version"`
UserData string `json:"user_data_template"`
LoginLink LoginLink `json:"login_link"`
JSONSchema string `json:"json_schema"`
IsDefault bool `json:"is_default"`
IsVisible bool `json:"is_visible"`
IsBuiltin bool `json:"is_buildin"`
AvailablePlans []ShortPlan `json:"available_plans"`
}
Application represents an application.
type ApplicationCreateRequest ¶
type ApplicationCreateRequest struct {
Name string `json:"name"`
URL string `json:"url"`
IconID int `json:"icon_id"`
CloudInitVersion string `json:"cloud_init_version"`
UserDataTemplate string `json:"user_data_template"`
JSONSchema string `json:"json_schema"`
IsVisible bool `json:"is_visible"`
LoginLink LoginLink `json:"login_link"`
AvailablePlans []int `json:"available_plans,omitempty"`
}
ApplicationCreateRequest represents available properties for creating a new application.
type ApplicationsResponse ¶
type ApplicationsResponse struct {
Data []Application `json:"data"`
// contains filtered or unexported fields
}
ApplicationsResponse represents paginated list of applications. This cursor can be used for iterating over all available applications.
func (*ApplicationsResponse) Err ¶
func (r *ApplicationsResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*ApplicationsResponse) Next ¶
func (r *ApplicationsResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type ApplicationsService ¶
type ApplicationsService service
ApplicationsService handles all available methods with applications.
func (*ApplicationsService) Create ¶
func (s *ApplicationsService) Create(ctx context.Context, data ApplicationCreateRequest) (Application, error)
Create creates new application.
func (*ApplicationsService) List ¶
func (s *ApplicationsService) List(ctx context.Context) (ApplicationsResponse, error)
List lists all applications.
func (*ApplicationsService) Update ¶
func (s *ApplicationsService) Update(ctx context.Context, id int, data ApplicationCreateRequest) (Application, error)
Update updates an existing application.
type AuthLoginRequest ¶
AuthLoginRequest represents all required properties for authentication.
type AuthLoginResponse ¶
type AuthLoginResponse struct {
Credentials Credentials `json:"credentials"`
}
AuthLoginResponse represents an authentication response.
type Authenticator ¶
type Authenticator interface {
// Authenticate authenticates client and return credentials
// which should be used for making further API calls.
// The Client is fully initialized. Any endpoints which is not requires
// authentication may be called.
Authenticate(c *Client) (Credentials, error)
}
Authenticator interface for client authentication.
type Backup ¶
type Backup struct {
ID int `json:"id"`
Type BackupType `json:"type"`
CreationMethod BackupCreationMethod `json:"creation_method"`
Status BackupStatus `json:"status"`
Size float32 `json:"size"`
ComputeResourceVM VirtualServer `json:"compute_resource_vm"`
BackupNode BackupNode `json:"backup_node"`
Creator User `json:"creator"`
CreatedAt string `json:"created_at"`
BackupProgress float32 `json:"backup_progress"`
BackupFailReason string `json:"backup_fail_reason"`
Disk int `json:"disk"`
}
Backup represent a backup.
func (Backup) IsFinished ¶
IsFinished returns true if the backup is finished, successfully or not.
type BackupCreationMethod ¶
type BackupCreationMethod string
BackupCreationMethod represents a way how a backup was created.
const ( // BackupCreationMethodAuto backup was created automatically by scheduler. BackupCreationMethodAuto BackupCreationMethod = "auto" // BackupCreationMethodManual backup was created manually by user request. BackupCreationMethodManual BackupCreationMethod = "manual" )
type BackupNode ¶
type BackupNode struct {
ID int `json:"id"`
Name string `json:"name"`
Type BackupNodeType `json:"type"`
Credentials map[string]interface{} `json:"credentials"`
ComputeResourcesCount int `json:"compute_resources_count"`
BackupsCount int `json:"backups_count"`
TotalBackupsSize int `json:"total_backups_size"`
ComputeResources []ComputeResource `json:"compute_resources"`
}
BackupNode represents a backup node. The backup node is a server or a service where backup can be stored.
type BackupNodeRequest ¶
type BackupNodeRequest struct {
Name string `json:"name"`
Type BackupNodeType `json:"type"`
ComputeResources []int `json:"compute_resources,omitempty"`
Credentials map[string]interface{} `json:"credentials,omitempty"`
}
BackupNodeRequest represents available properties for creating new or updating existing backup nodes.
type BackupNodeType ¶
type BackupNodeType string
BackupNodeType a backup node type.
const ( // BackupNodeTypeSSHRsync uses SSH with rsync to manipulate backups. BackupNodeTypeSSHRsync BackupNodeType = "ssh_rsync" // BackupNodeTypeHetznerStorageBox Hetzner Storage Box specific backup node // type. // https://docs.hetzner.com/robot/storage-box/general BackupNodeTypeHetznerStorageBox BackupNodeType = "hetzner_storage_box" )
type BackupNodesService ¶
type BackupNodesService service
BackupNodesService handles all available methods with backup nodes.
func (*BackupNodesService) Create ¶
func (s *BackupNodesService) Create(ctx context.Context, data BackupNodeRequest) (BackupNode, error)
Create creates new backup node.
func (*BackupNodesService) Delete ¶
func (s *BackupNodesService) Delete(ctx context.Context, id int) error
Delete deletes specified backup node.
func (*BackupNodesService) Update ¶
func (s *BackupNodesService) Update(ctx context.Context, id int, data BackupNodeRequest) (BackupNode, error)
Update updates specified backup node.
type BackupStatus ¶
type BackupStatus string
BackupStatus represents available backup's statuses.
const ( // BackupStatusCreating indicates backup is being created. // Some API versions may return this status instead of in_progress. BackupStatusCreating BackupStatus = "creating" // BackupStatusPending indicates backup is still not processing and waits until // it will be dispatched. BackupStatusPending BackupStatus = "pending" // BackupStatusInProgress indicates backup is processing right now. BackupStatusInProgress BackupStatus = "in_progress" // BackupStatusCreated indicates backup was successfully created. BackupStatusCreated BackupStatus = "created" // BackupStatusFailed indicates backup wasn't created due to some reason. BackupStatusFailed BackupStatus = "failed" )
type BackupType ¶
type BackupType string
BackupType a backup type.
const ( // BackupTypeFull a full server backup. // Include all disk's data. BackupTypeFull BackupType = "full" // BackupTypeIncremental an incremental server backup. // Include only changed disk's data since last backup. BackupTypeIncremental BackupType = "incremental" )
type BackupsService ¶
type BackupsService service
BackupsService handles all available methods with backups.
func (*BackupsService) Delete ¶
func (s *BackupsService) Delete(ctx context.Context, id int) error
Delete deletes specified backup.
type BandwidthPlanLimit ¶
type BandwidthPlanLimit struct {
IsEnabled bool `json:"is_enabled"`
Limit int `json:"limit"`
Unit BandwidthPlanLimitUnit `json:"unit"`
}
BandwidthPlanLimit represents network bandwidth specific limit.
type BandwidthPlanLimitUnit ¶
type BandwidthPlanLimitUnit string
BandwidthPlanLimitUnit represents available units for network bandwidth limit.
const ( // BandwidthPlanLimitUnitKbps indicates kilobits per second unit. BandwidthPlanLimitUnitKbps BandwidthPlanLimitUnit = "Kbps" // BandwidthPlanLimitUnitMbps indicates megabits per second unit. BandwidthPlanLimitUnitMbps BandwidthPlanLimitUnit = "Mbps" // BandwidthPlanLimitUnitGbps indicates gigabits per second unit. BandwidthPlanLimitUnitGbps BandwidthPlanLimitUnit = "Gbps" )
type Client ¶
type Client struct {
BaseURL *url.URL
UserAgent string
Credentials Credentials
Headers http.Header
HTTPClient *http.Client
Logger Logger
Retries int
RetryAfter time.Duration
Account *AccountService
ActivityLogs *ActivityLogsService
APITokens *APITokensService
Applications *ApplicationsService
BackupNodes *BackupNodesService
Backups *BackupsService
ComputeResources *ComputeResourcesService
IPBlocks *IPBlocksService
Icons *IconsService
ISOImages *ISOImagesService
Languages *LanguagesService
License *LicenseService
Locations *LocationsService
OsImageVersions *OsImageVersionsService
OsImages *OsImagesService
Permission *PermissionsService
Plans *PlansService
Projects *ProjectsService
Roles *RolesService
SSHKeys *SSHKeysService
ServersMigrations *ServersMigrationsService
Settings *SettingsService
Snapshots *SnapshotsService
Storage *StorageService
StorageTags *StorageTagsService
StorageTypes *StorageTypesService
Tasks *TasksService
Usage *UsageService
Users *UsersService
VirtualServers *VirtualServersService
VPCNetworks *VPCNetworksService
// contains filtered or unexported fields
}
Client a Solus API client.
func NewClient ¶
func NewClient( baseURL *url.URL, a Authenticator, opts ...ClientOption, ) (*Client, error)
NewClient create and initialize Client instance.
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption represent client initialization options.
func AllowInsecure ¶
func AllowInsecure() ClientOption
AllowInsecure allows skipping certificate verify.
func SetRetryPolicy ¶
func SetRetryPolicy(retries int, retryAfter time.Duration) ClientOption
SetRetryPolicy sets number of retries and timeout between them.
func WithLogger ¶
func WithLogger(logger Logger) ClientOption
WithLogger inject specific logger into client.
type CloudInitVersion ¶
type CloudInitVersion string
CloudInitVersion represents available cloud-init config versions.
const ( // CloudInitVersionV0 indicates v0 cloud-init config version. CloudInitVersionV0 CloudInitVersion = "v0" // CloudInitVersionCentOS6 indicates CentOS 6 specific v0 cloud-init config // version. CloudInitVersionCentOS6 CloudInitVersion = "v0-centos6" // CloudInitVersionDebian9 indicates Debian 9 specific v0 cloud-init config // version. CloudInitVersionDebian9 CloudInitVersion = "v0-debian9" // CloudInitVersionV2 indicates v2 cloud-init config version. CloudInitVersionV2 CloudInitVersion = "v2" // CloudInitVersionV2Alpine indicates Alpine specific v2 cloud-init config // version. CloudInitVersionV2Alpine CloudInitVersion = "v2-alpine" // CloudInitVersionV2Centos indicates CentOS 7 & 8 specific v2 cloud-init config // version. CloudInitVersionV2Centos CloudInitVersion = "v2-centos" // CloudInitVersionV2Debian10 indicates Debian 10 specific v2 cloud-init config // version. CloudInitVersionV2Debian10 CloudInitVersion = "v2-debian10" // CloudInitVersionCloudBase indicates cloudbase config version. CloudInitVersionCloudBase CloudInitVersion = "cloudbase" )
type ComputeResource ¶
type ComputeResource struct {
ID int `json:"id"`
Name string `json:"name"`
Host string `json:"host"`
AgentPort int `json:"agent_port"`
Settings ComputeResourceSettings `json:"settings"`
Status ComputerResourceStatus `json:"status"`
Locations []Location `json:"locations"`
IPBlocks []IPBlock `json:"ip_blocks"`
Metrics ComputeResourceMetrics `json:"metrics"`
VMsCount int `json:"vms_count"`
Version string `json:"version"`
IsLocked bool `json:"is_locked"`
}
ComputeResource represents a compute resource. The compute resource is a server where virtual machines will be running.
type ComputeResourceAuthType ¶
type ComputeResourceAuthType string
ComputeResourceAuthType represents available authentication methods for the agent installation during compute resource creating.
const ( // ComputeResourceAuthTypePassword indicates connect by password. ComputeResourceAuthTypePassword ComputeResourceAuthType = "lpass" // ComputeResourceAuthTypeKey indicates connect by SSH key. ComputeResourceAuthTypeKey ComputeResourceAuthType = "lkey" )
type ComputeResourceBalanceStrategy ¶
type ComputeResourceBalanceStrategy string
ComputeResourceBalanceStrategy represents available balancing strategies for compute resource. These strategies will be used during a server creation for choosing which compute resource should be used.
const ( // ComputeResourceBalanceStrategyRoundRobin indicates compute resource will // be choosing by round-robin algorithm. ComputeResourceBalanceStrategyRoundRobin ComputeResourceBalanceStrategy = "round-robin" // ComputeResourceBalanceStrategyRandom indicates compute resource will be // chosen randomly. ComputeResourceBalanceStrategyRandom ComputeResourceBalanceStrategy = "random" // ComputeResourceBalanceStrategyMostStorageAvailable indicates compute resource // with most available storage space will be chosen. ComputeResourceBalanceStrategyMostStorageAvailable ComputeResourceBalanceStrategy = "most-storage-available" )
type ComputeResourceInstallStep ¶
type ComputeResourceInstallStep struct {
ID int `json:"id"`
ComputeResourceID int `json:"compute_resource_id"`
Title string `json:"title"`
Status ComputeResourceInstallStepStatus `json:"status"`
StatusText string `json:"status_text"`
Progress float32 `json:"progress"`
}
ComputeResourceInstallStep represents a compute resource install step.
type ComputeResourceInstallStepStatus ¶
type ComputeResourceInstallStepStatus string
ComputeResourceInstallStepStatus represents available compute resource's install step statuses.
const ( // ComputeResourceInstallStepStatusRunning indicates install step is running. ComputeResourceInstallStepStatusRunning ComputeResourceInstallStepStatus = "running" // ComputeResourceInstallStepStatusDone indicates install step is successfully // done. ComputeResourceInstallStepStatusDone ComputeResourceInstallStepStatus = "done" // ComputeResourceInstallStepStatusError indicates install step is failed. ComputeResourceInstallStepStatusError ComputeResourceInstallStepStatus = "error" )
type ComputeResourceMetrics ¶
type ComputeResourceMetrics struct {
Network ComputeResourceMetricsNetwork `json:"network"`
}
ComputeResourceMetrics represents compute resource's metrics.
type ComputeResourceMetricsNetwork ¶
type ComputeResourceMetricsNetwork struct {
IPv6Enabled bool `json:"ipv6_enabled"`
}
ComputeResourceMetricsNetwork represents compute resource's network metrics.
type ComputeResourceNetwork ¶
type ComputeResourceNetwork struct {
ID string `json:"id"`
Name string `json:"name"`
// AddrConfType for 'static' or 'dhcp'
AddrConfType string `json:"addr_conf_type"`
IPVersion int `json:"ip_version"`
IP string `json:"ip"`
Mask string `json:"mask"`
MaskSize int `json:"mask_size"`
}
ComputeResourceNetwork represents compute resource's network.
type ComputeResourcePhysicalVolume ¶
type ComputeResourcePhysicalVolume struct {
VGFree string `json:"vg_free"`
VGName string `json:"vg_name"`
VGSize string `json:"vg_size"`
PVUsed string `json:"pv_used"`
}
ComputeResourcePhysicalVolume represents a compute resource's physical volume.
type ComputeResourceServerCreateRequest ¶
type ComputeResourceServerCreateRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Password string `json:"password"`
PlanID int `json:"plan_id"`
OSImageVersionID int `json:"os_image_version_id,omitempty"`
ApplicationID int `json:"application_id,omitempty"`
ApplicationData map[string]string `json:"application_data,omitempty"`
SSHKeys []int `json:"ssh_keys,omitempty"`
UserData string `json:"user_data,omitempty"`
FQDNs []string `json:"fqdns,omitempty"`
UserID int `json:"user_id"`
ProjectID int `json:"project_id"`
BackupSettings *VirtualServerBackupSettings `json:"backup_settings,omitempty"`
}
ComputeResourceServerCreateRequest represents available properties for creating a new servers on a compute resource.
type ComputeResourceSettings ¶
type ComputeResourceSettings struct {
CachePath string `json:"cache_path"`
ISOPath string `json:"iso_path"`
BackupTmpPath string `json:"backup_tmp_path"`
VNCProxyPort int `json:"vnc_proxy_port"`
Limits ComputeResourceSettingsLimits `json:"limits"`
Network ComputeResourceSettingsNetwork `json:"network"`
BalanceStrategy ComputeResourceBalanceStrategy `json:"balance_strategy"`
VirtualizationTypes []VirtualizationType `json:"virtualization_types"`
}
ComputeResourceSettings represents available compute resource's settings.
type ComputeResourceSettingsLimit ¶
type ComputeResourceSettingsLimit struct {
Unlimited bool `json:"unlimited"`
Total float32 `json:"total"`
Used float32 `json:"used,omitempty"`
}
ComputeResourceSettingsLimit represents single compute resources limit.
type ComputeResourceSettingsLimits ¶
type ComputeResourceSettingsLimits struct {
VM ComputeResourceSettingsLimit `json:"vm"`
HDD ComputeResourceSettingsLimit `json:"hdd"`
RAM ComputeResourceSettingsLimit `json:"ram"`
VCPU ComputeResourceSettingsLimit `json:"vcpu"`
}
ComputeResourceSettingsLimits represents available compute resources limits for virtual machines.
type ComputeResourceSettingsNetwork ¶
type ComputeResourceSettingsNetwork struct {
Type ComputeResourceSettingsNetworkType `json:"type"`
Bridges []ComputeResourceSettingsNetworkBridge `json:"bridges"`
}
ComputeResourceSettingsNetwork represents compute resource's network.
type ComputeResourceSettingsNetworkBridge ¶
type ComputeResourceSettingsNetworkBridge struct {
Type ComputeResourceSettingsNetworkType `json:"type"`
Name string `json:"name"`
}
ComputeResourceSettingsNetworkBridge represents one of compute resource's network bridge.
type ComputeResourceSettingsNetworkType ¶
type ComputeResourceSettingsNetworkType string
ComputeResourceSettingsNetworkType represents available network types on a compute resource.
const ( // ComputeResourceSettingsNetworkTypeRouted indicates virtual servers don't // connect directly to the physical network. The compute resource's operating // system routes the servers' traffic to the physical network (the compute // resource works as the gateway). // The server's MAC address isn’t exposed to the physical network. ComputeResourceSettingsNetworkTypeRouted ComputeResourceSettingsNetworkType = "routed" // ComputeResourceSettingsNetworkTypeBridged indicates virtual servers get // direct access to the physical network. In the bridged network, the IP addresses // of a server and the gateway must be within the same IP network. For example, // if the gateway's IP address 192.168.1.1 is within the IP network 192.168.1.0/24, // then the server's IP address must be also within the 192.168.1.0/24 network // (for example, 192.168.1.2). // The server's MAC address is exposed to the physical network. // Use a bridged network if you have the large network of IP addresses with // the gateway. ComputeResourceSettingsNetworkTypeBridged ComputeResourceSettingsNetworkType = "bridged" )
type ComputeResourceStorageCreateRequest ¶
type ComputeResourceStorageCreateRequest struct {
Type StorageTypeName `json:"type"`
Path string `json:"path"`
ThinPool string `json:"thin_pool,omitempty"`
IsAvailableForBalancing bool `json:"is_available_for_balancing"`
}
ComputeResourceStorageCreateRequest represents available properties for creating a new storage on a compute resource.
type ComputeResourceThinPool ¶
type ComputeResourceThinPool struct {
ConvertLV string `json:"convert_lv"`
CopyPercent string `json:"copy_percent"`
DataPercent string `json:"data_percent"`
LVAttr string `json:"lv_attr"`
LVLayout string `json:"lv_layout"`
LVMetadataSize string `json:"lv_metadata_size"`
LVName string `json:"lv_name"`
LVSize string `json:"lv_size"`
MetadataPrecent string `json:"metadata_percent"`
MirrorLog string `json:"mirror_log"`
MovePV string `json:"move_pv"`
Origin string `json:"origin"`
PoolLV string `json:"pool_lv"`
VGName string `json:"vg_name"`
}
ComputeResourceThinPool represents a compute resource's ThinLVM pool.
type ComputeResourcesResponse ¶
type ComputeResourcesResponse struct {
Data []ComputeResource `json:"data"`
// contains filtered or unexported fields
}
ComputeResourcesResponse represents paginated list of compute resources. This cursor can be used for iterating over all available compute resources.
func (*ComputeResourcesResponse) Err ¶
func (r *ComputeResourcesResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*ComputeResourcesResponse) Next ¶
func (r *ComputeResourcesResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type ComputeResourcesService ¶
type ComputeResourcesService service
ComputeResourcesService handles all available methods with compute resources.
func (*ComputeResourcesService) Create ¶
func (s *ComputeResourcesService) Create( ctx context.Context, data ComputerResourceCreateRequest, ) (ComputeResource, error)
Create creates new compute resource.
func (*ComputeResourcesService) Get ¶
func (s *ComputeResourcesService) Get(ctx context.Context, id int) (ComputeResource, error)
Get gets specified compute resource.
func (*ComputeResourcesService) InstallSteps ¶
func (s *ComputeResourcesService) InstallSteps(ctx context.Context, id int) ([]ComputeResourceInstallStep, error)
InstallSteps lists specified compute resource's install steps.
func (*ComputeResourcesService) List ¶
func (s *ComputeResourcesService) List( ctx context.Context, filter *FilterComputeResources, ) (ComputeResourcesResponse, error)
List lists compute resource.
func (*ComputeResourcesService) Networks ¶
func (s *ComputeResourcesService) Networks(ctx context.Context, id int) ([]ComputeResourceNetwork, error)
Networks lists specified compute resource's networks.
func (*ComputeResourcesService) Patch ¶
func (s *ComputeResourcesService) Patch( ctx context.Context, id int, data ComputerResourceUpdateRequest, ) (ComputeResource, error)
Patch patches specified compute resource.
func (*ComputeResourcesService) PhysicalVolumes ¶
func (s *ComputeResourcesService) PhysicalVolumes( ctx context.Context, id int, ) ([]ComputeResourcePhysicalVolume, error)
PhysicalVolumes lists physical volume on the specified compute resource. Return available LVM volume groups.
func (*ComputeResourcesService) ServersCreate ¶
func (s *ComputeResourcesService) ServersCreate( ctx context.Context, id int, data ComputeResourceServerCreateRequest, ) (VirtualServer, error)
ServersCreate creates a new server on the specified compute resource.
func (*ComputeResourcesService) SetUpNetwork ¶
func (s *ComputeResourcesService) SetUpNetwork(ctx context.Context, id int, data SetupNetworkRequest) error
SetUpNetwork setups a network on the specified compute resource.
func (*ComputeResourcesService) SettingsUpdate ¶
func (s *ComputeResourcesService) SettingsUpdate( ctx context.Context, id int, data ComputeResourceSettings, ) (ComputeResourceSettings, error)
SettingsUpdate updates compute resource's settings.
func (*ComputeResourcesService) StorageCreate ¶
func (s *ComputeResourcesService) StorageCreate( ctx context.Context, id int, data ComputeResourceStorageCreateRequest, ) (Storage, error)
StorageCreate creates a new storage for the specified compute resource.
func (*ComputeResourcesService) StorageList ¶
StorageList lists storages for the specified compute resource.
func (*ComputeResourcesService) ThinPools ¶
func (s *ComputeResourcesService) ThinPools(ctx context.Context, id int) ([]ComputeResourceThinPool, error)
ThinPools lists ThinLVM pools on the specified compute resource.
type ComputerResourceCreateRequest ¶
type ComputerResourceCreateRequest struct {
Name string `json:"name,omitempty"`
Host string `json:"host,omitempty"`
Login string `json:"login,omitempty"`
// SSH port number
Port int `json:"port,omitempty"`
Type ComputeResourceAuthType `json:"type,omitempty"`
Password string `json:"password,omitempty"`
// SSH private key
Key string `json:"key,omitempty"`
AgentPort int `json:"agent_port,omitempty"`
IPBlocks []int `json:"ip_blocks,omitempty"`
Locations []int `json:"locations,omitempty"`
LicenseType LicenseType `json:"license_type,omitempty"`
}
ComputerResourceCreateRequest represents available properties for creating a new compute resource.
type ComputerResourceStatus ¶
type ComputerResourceStatus string
ComputerResourceStatus represents available compute resource's statuses.
const ( // ComputeResourceStatusActive indicates compute resource is active and ready // to handle requests. ComputeResourceStatusActive ComputerResourceStatus = "active" // ComputeResourceStatusCommissioning indicates compute resource is still // commissioning. ComputeResourceStatusCommissioning ComputerResourceStatus = "commissioning" // ComputeResourceStatusConfigureNetwork indicates compute resource is ready // for setting up a network. ComputeResourceStatusConfigureNetwork ComputerResourceStatus = "configure_network" // ComputeResourceStatusFailed indicates compute resource commissioning // was failed. ComputeResourceStatusFailed ComputerResourceStatus = "failed" // due to some reason. ComputeResourceStatusUnavailable ComputerResourceStatus = "unavailable" )
type ComputerResourceUpdateRequest ¶
type ComputerResourceUpdateRequest struct {
Name string `json:"name,omitempty"`
Host string `json:"host,omitempty"`
Login string `json:"login,omitempty"`
// SSH port number
Port int `json:"port,omitempty"`
Type ComputeResourceAuthType `json:"type,omitempty"`
Password string `json:"password,omitempty"`
// SSH private key
Key string `json:"key,omitempty"`
AgentPort int `json:"agent_port,omitempty"`
IPBlocks []int `json:"ip_blocks,omitempty"`
Locations []int `json:"locations,omitempty"`
IsLocked bool `json:"is_locked,omitempty"`
}
ComputerResourceUpdateRequest represents available properties for updating a compute resource.
type Credentials ¶
type Credentials struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresAt string `json:"expires_at"`
}
Credentials represents obtained credentials.
type DiskBandwidthPlanLimit ¶
type DiskBandwidthPlanLimit struct {
IsEnabled bool `json:"is_enabled"`
Limit int `json:"limit"`
Unit DiskBandwidthPlanLimitUnit `json:"unit"`
}
DiskBandwidthPlanLimit represents disk bandwidth specific limit.
type DiskBandwidthPlanLimitUnit ¶
type DiskBandwidthPlanLimitUnit string
DiskBandwidthPlanLimitUnit represents available units for disk bandwidth limit.
const ( // DiskBandwidthPlanLimitUnitBps indicates bytes per second unit. DiskBandwidthPlanLimitUnitBps DiskBandwidthPlanLimitUnit = "Bps" )
type DiskIOPSPlanLimit ¶
type DiskIOPSPlanLimit struct {
IsEnabled bool `json:"is_enabled"`
Limit int `json:"limit"`
Unit DiskIOPSPlanLimitUnit `json:"unit"`
}
DiskIOPSPlanLimit represents disk IOPS specific limit.
type DiskIOPSPlanLimitUnit ¶
type DiskIOPSPlanLimitUnit string
DiskIOPSPlanLimitUnit represents available units for disk IOPS limit.
const ( // DiskIOPSPlanLimitUnitIOPS indicates input/output operations per second unit. DiskIOPSPlanLimitUnitIOPS DiskIOPSPlanLimitUnit = "iops" )
type EmailAndPasswordAuthenticator ¶
EmailAndPasswordAuthenticator authenticate with specified email and password.
func (EmailAndPasswordAuthenticator) Authenticate ¶
func (a EmailAndPasswordAuthenticator) Authenticate(c *Client) (Credentials, error)
Authenticate authenticates by email and password.
type FilterAPITokens ¶
type FilterAPITokens struct {
// contains filtered or unexported fields
}
FilterAPITokens represents available filters for fetching list of API tokens.
func (*FilterAPITokens) ByName ¶
func (f *FilterAPITokens) ByName(name string) *FilterAPITokens
ByName filter API tokens by specified name.
func (*FilterAPITokens) ByUserID ¶
func (f *FilterAPITokens) ByUserID(userID int) *FilterAPITokens
ByUserID filter API tokens by specified user ID.
type FilterActivityLogs ¶
type FilterActivityLogs struct {
// contains filtered or unexported fields
}
FilterActivityLogs represent available filters for fetching list of Activity Logs.
func (*FilterActivityLogs) ByEvent ¶
func (f *FilterActivityLogs) ByEvent(event ActivityLogsEvent) *FilterActivityLogs
ByEvent filter Activity Logs by event type.
func (*FilterActivityLogs) ByUserID ¶
func (f *FilterActivityLogs) ByUserID(id int) *FilterActivityLogs
ByUserID filter Activity Logs by specified User ID.
type FilterComputeResources ¶
type FilterComputeResources struct {
// contains filtered or unexported fields
}
FilterComputeResources represent available filters for fetching list of compute resources.
func (*FilterComputeResources) ByName ¶
func (f *FilterComputeResources) ByName(name string) *FilterComputeResources
ByName filter compute resources by specified name.
type FilterIPBlocks ¶
type FilterIPBlocks struct {
// contains filtered or unexported fields
}
FilterIPBlocks represent available filters for fetching list of ip blocks.
func (*FilterIPBlocks) ByName ¶
func (f *FilterIPBlocks) ByName(name string) *FilterIPBlocks
ByName filter ip blocks by specified name.
type FilterISOImages ¶
type FilterISOImages struct {
// contains filtered or unexported fields
}
FilterISOImages represents available filters for fetching list of ISO images.
func (*FilterISOImages) ByName ¶
func (f *FilterISOImages) ByName(name string) *FilterISOImages
ByName filter ISO images by specified name.
type FilterIcons ¶
type FilterIcons struct {
// contains filtered or unexported fields
}
FilterIcons represent available filters for fetching list of icons.
func (*FilterIcons) ByName ¶
func (f *FilterIcons) ByName(name string) *FilterIcons
ByName filter icons by specified name.
func (*FilterIcons) ByType ¶
func (f *FilterIcons) ByType(t IconType) *FilterIcons
ByType filter icons by specified type.
type FilterLanguages ¶
type FilterLanguages struct {
// contains filtered or unexported fields
}
FilterLanguages represents available filters for fetching list of languages.
func (*FilterLanguages) ByName ¶
func (f *FilterLanguages) ByName(name string) *FilterLanguages
ByName filter languages by specified name.
type FilterLocations ¶
type FilterLocations struct {
// contains filtered or unexported fields
}
FilterLocations represent available filters for fetching list of Locations.
func (*FilterLocations) ByName ¶
func (f *FilterLocations) ByName(name string) *FilterLocations
ByName filter Locations by specified name.
type FilterOsImages ¶
type FilterOsImages struct {
// contains filtered or unexported fields
}
FilterOsImages represent available filters for fetching list of os images.
func (*FilterOsImages) ByName ¶
func (f *FilterOsImages) ByName(name string) *FilterOsImages
ByName filter os images by specified name.
type FilterPlans ¶
type FilterPlans struct {
// contains filtered or unexported fields
}
FilterPlans represent available filters for fetching list of plans.
func (*FilterPlans) ByDiskSize ¶
func (f *FilterPlans) ByDiskSize(v int) *FilterPlans
ByDiskSize filter plans by specified disk size.
func (*FilterPlans) ByImageFormat ¶
func (f *FilterPlans) ByImageFormat(v ImageFormat) *FilterPlans
ByImageFormat filter plans by specified image format.
func (*FilterPlans) ByName ¶
func (f *FilterPlans) ByName(name string) *FilterPlans
ByName filter plans by specified name.
func (*FilterPlans) ByStorageType ¶
func (f *FilterPlans) ByStorageType(t StorageTypeName) *FilterPlans
ByStorageType filter plans by specified storage type.
type FilterProjects ¶
type FilterProjects struct {
// contains filtered or unexported fields
}
FilterProjects represent available filters for fetching list of Projects.
func (*FilterProjects) ByName ¶
func (f *FilterProjects) ByName(name string) *FilterProjects
ByName baseFilter Projects by specified name.
type FilterSSHKeys ¶
type FilterSSHKeys struct {
// contains filtered or unexported fields
}
FilterSSHKeys represent available filters for fetching list of SSH keys.
func (*FilterSSHKeys) ByName ¶
func (f *FilterSSHKeys) ByName(name string) *FilterSSHKeys
ByName filter SSH keys by specified name.
type FilterTasks ¶
type FilterTasks struct {
// contains filtered or unexported fields
}
FilterTasks represent available filters for fetching list of tasks.
func (*FilterTasks) ByAction ¶
func (f *FilterTasks) ByAction(action string) *FilterTasks
ByAction filter Tasks by specified action.
func (*FilterTasks) ByComputeResourceID ¶
func (f *FilterTasks) ByComputeResourceID(id int) *FilterTasks
ByComputeResourceID filter Tasks by specified Compute Resource ID.
func (*FilterTasks) ByComputeResourceVMID ¶
func (f *FilterTasks) ByComputeResourceVMID(id int) *FilterTasks
ByComputeResourceVMID filter Tasks by specified Compute Resource VM ID.
func (*FilterTasks) ByStatus ¶
func (f *FilterTasks) ByStatus(status string) *FilterTasks
ByStatus filter Tasks by specified status.
type FilterUsage ¶
type FilterUsage struct {
// contains filtered or unexported fields
}
FilterUsage represents available filters for fetching usage statistics.
func (*FilterUsage) ByBillingUserID ¶
func (f *FilterUsage) ByBillingUserID(billingUserID int) *FilterUsage
ByBillingUserID filter usage by specified billing user ID.
func (*FilterUsage) ByPeriod ¶
func (f *FilterUsage) ByPeriod(period string) *FilterUsage
ByPeriod filter usage by specified period (e.g., "2020-07").
func (*FilterUsage) ByUserID ¶
func (f *FilterUsage) ByUserID(userID int) *FilterUsage
ByUserID filter usage by specified user ID.
func (*FilterUsage) WithTimezone ¶
func (f *FilterUsage) WithTimezone(timezone string) *FilterUsage
WithTimezone sets timezone for usage statistics.
type FilterUsers ¶
type FilterUsers struct {
// contains filtered or unexported fields
}
FilterUsers represent available filters for fetching list of users.
func (*FilterUsers) ByStatus ¶
func (f *FilterUsers) ByStatus(status string) *FilterUsers
ByStatus filter Users by specified status.
type FilterVPCNetworks ¶
type FilterVPCNetworks struct {
// contains filtered or unexported fields
}
FilterVPCNetworks represents available filters for fetching list of VPC networks.
func (*FilterVPCNetworks) ByName ¶
func (f *FilterVPCNetworks) ByName(name string) *FilterVPCNetworks
ByName filter VPC networks by specified name.
type FilterVirtualServers ¶
type FilterVirtualServers struct {
// contains filtered or unexported fields
}
FilterVirtualServers represent available filters for fetching list of virtual servers.
func (*FilterVirtualServers) ByComputeResourceID ¶
func (f *FilterVirtualServers) ByComputeResourceID(id int) *FilterVirtualServers
ByComputeResourceID filter virtual servers by specified Compute Resource ID.
func (*FilterVirtualServers) ByStatus ¶
func (f *FilterVirtualServers) ByStatus(status string) *FilterVirtualServers
ByStatus filter virtual servers by specified status.
func (*FilterVirtualServers) ByUserID ¶
func (f *FilterVirtualServers) ByUserID(id int) *FilterVirtualServers
ByUserID filter virtual servers by specified User ID.
func (*FilterVirtualServers) ByVirtualizationType ¶
func (f *FilterVirtualServers) ByVirtualizationType(virtualizationType VirtualizationType) *FilterVirtualServers
ByVirtualizationType filter virtual servers by virtualization type.
type HTTPError ¶
type HTTPError struct {
Method string
Path string
HTTPCode int `json:"http_code"`
Message string `json:"message"`
Errors map[string][]string `json:"errors"`
}
HTTPError represents errors occurred when some action failed due to some problem with request.
type IPBlock ¶
type IPBlock struct {
ID int `json:"id"`
Name string `json:"name"`
Type IPVersion `json:"type"`
ListType ListType `json:"list_type"`
Gateway string `json:"gateway"`
Netmask string `json:"netmask"`
Ns1 string `json:"ns_1"`
Ns2 string `json:"ns_2"`
From string `json:"from"`
To string `json:"to"`
Subnet int `json:"subnet"`
Range string `json:"range"`
ComputeResources []ComputeResource `json:"compute_resources[]"`
IPs []IPBlockIPAddress `json:"ips[]"`
ReverseDNS IPBlockReverseDNS `json:"reverse_dns"`
}
IPBlock represents an IP block.
type IPBlockIPAddress ¶
type IPBlockIPAddress struct {
ID int `json:"id"`
IP string `json:"ip"`
IPBlock IPBlock `json:"ip_block"`
}
IPBlockIPAddress represents an IP block's IP address.
type IPBlockRequest ¶
type IPBlockRequest struct {
ComputeResources []int `json:"compute_resources,omitempty"`
Name string `json:"name"`
Type IPVersion `json:"type"`
ListType ListType `json:"list_type"`
Gateway string `json:"gateway"`
Ns1 string `json:"ns_1"`
Ns2 string `json:"ns_2"`
ReverseDNS IPBlockReverseDNS `json:"reverse_dns"`
// IPv4 related fields
Netmask string `json:"netmask,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
// IPv6 related fields
Range string `json:"range,omitempty"`
Subnet int `json:"subnet,omitempty"`
}
IPBlockRequest represents available properties for creating new or updating existing IP block.
type IPBlockReverseDNS ¶
IPBlockReverseDNS represents an IP block's reverse DNS settings.
type IPBlocksResponse ¶
type IPBlocksResponse struct {
Data []IPBlock `json:"data"`
// contains filtered or unexported fields
}
IPBlocksResponse represents paginated list of IP blocks. This cursor can be used for iterating over all available IP blocks.
func (*IPBlocksResponse) Err ¶
func (r *IPBlocksResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*IPBlocksResponse) Next ¶
func (r *IPBlocksResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type IPBlocksService ¶
type IPBlocksService service
IPBlocksService handles all available methods with IP blocks.
func (*IPBlocksService) Create ¶
func (s *IPBlocksService) Create(ctx context.Context, data IPBlockRequest) (IPBlock, error)
Create creates new IP block.
func (*IPBlocksService) Delete ¶
func (s *IPBlocksService) Delete(ctx context.Context, id int) error
Delete deletes specified IP block.
func (*IPBlocksService) IPAddressCreate ¶
func (s *IPBlocksService) IPAddressCreate(ctx context.Context, ipBlockID int) (IPBlockIPAddress, error)
IPAddressCreate creates a new IP address in the specified IP block.
func (*IPBlocksService) IPAddressDelete ¶
func (s *IPBlocksService) IPAddressDelete(ctx context.Context, id int) error
IPAddressDelete deletes a provided IP address in the specified IP block.
func (*IPBlocksService) List ¶
func (s *IPBlocksService) List(ctx context.Context, filter *FilterIPBlocks) (IPBlocksResponse, error)
List lists IP blocks.
func (*IPBlocksService) Update ¶
func (s *IPBlocksService) Update(ctx context.Context, id int, data IPBlockRequest) (IPBlock, error)
Update updates specified IP block.
type ISOImage ¶
type ISOImage struct {
ID int `json:"id"`
Name string `json:"name"`
Icon Icon `json:"icon"`
User User `json:"user"`
Visibility ISOImageVisibility `json:"visibility"`
OSType ISOImageOSType `json:"os_type"`
ISOURL string `json:"iso_url"`
UseTLS bool `json:"use_tls"`
ISOChecksumMethod ISOImageChecksumMethod `json:"iso_checksum_method"`
ISOChecksum string `json:"iso_checksum"`
Size int `json:"size"`
ShowURLAndChecksum bool `json:"show_url_and_checksum"`
ShowTLS bool `json:"show_tls"`
}
ISOImage represents an ISO image.
type ISOImageChecksumMethod ¶
type ISOImageChecksumMethod string
ISOImageChecksumMethod represents available checksum methods for ISO images.
const ( // ISOImageChecksumMethodMD5 indicates MD5 checksum. ISOImageChecksumMethodMD5 ISOImageChecksumMethod = "md5" // ISOImageChecksumMethodSHA1 indicates SHA1 checksum. ISOImageChecksumMethodSHA1 ISOImageChecksumMethod = "sha1" // ISOImageChecksumMethodSHA256 indicates SHA256 checksum. ISOImageChecksumMethodSHA256 ISOImageChecksumMethod = "sha256" )
type ISOImageOSType ¶
type ISOImageOSType string
ISOImageOSType represents available OS types for ISO images.
const ( // ISOImageOSTypeLinux indicates a Linux ISO image. ISOImageOSTypeLinux ISOImageOSType = "Linux" // ISOImageOSTypeWindows indicates a Windows ISO image. ISOImageOSTypeWindows ISOImageOSType = "Windows" )
type ISOImageVisibility ¶
type ISOImageVisibility string
ISOImageVisibility represents available visibility types for ISO images.
const ( // ISOImageVisibilityPublic indicates a public ISO image. ISOImageVisibilityPublic ISOImageVisibility = "public" // ISOImageVisibilityPrivate indicates a private ISO image. ISOImageVisibilityPrivate ISOImageVisibility = "private" )
type ISOImagesResponse ¶
type ISOImagesResponse struct {
Data []ISOImage `json:"data"`
// contains filtered or unexported fields
}
ISOImagesResponse represents paginated list of ISO images. This cursor can be used for iterating over all available ISO images.
func (*ISOImagesResponse) Err ¶
func (r *ISOImagesResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*ISOImagesResponse) Next ¶
func (r *ISOImagesResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type ISOImagesService ¶
type ISOImagesService service
ISOImagesService handles all available methods with ISO images.
func (*ISOImagesService) List ¶
func (s *ISOImagesService) List(ctx context.Context, filter *FilterISOImages) (ISOImagesResponse, error)
List lists ISO images.
type Icon ¶
type Icon struct {
ID int `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Type IconType `json:"type"`
}
Icon represents an icon.
type IconType ¶
type IconType string
IconType represents available icon types.
const ( // IconTypeOS indicated OS specific icon. // OSes like AlmaLinux, Ubuntu, and etc. IconTypeOS IconType = "os" // IconTypeApplication indicates application specific icon. // Applications likes Plesk, Nginx, and etc. IconTypeApplication IconType = "application" // IconTypeFlags indicates countries flags. IconTypeFlags IconType = "flags" )
type IconsResponse ¶
type IconsResponse struct {
Data []Icon `json:"data"`
// contains filtered or unexported fields
}
IconsResponse represents paginated list of icons. This cursor can be used for iterating over all available icons.
func (*IconsResponse) Err ¶
func (r *IconsResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*IconsResponse) Next ¶
func (r *IconsResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type IconsService ¶
type IconsService service
IconsService handles all available methods with icons.
func (*IconsService) List ¶
func (s *IconsService) List(ctx context.Context, filter *FilterIcons) (IconsResponse, error)
List lists icons.
type ImageFormat ¶
type ImageFormat string
ImageFormat represents available image formats. Image formats is format of VM's disk.
const ( // ImageFormatQCOW2 indicates QCOW2 disk image. ImageFormatQCOW2 ImageFormat = "qcow2" // ImageFormatRaw indicates RAW disk image. ImageFormatRaw ImageFormat = "raw" // ImageFormatPLOOP indicates PLOOP disk image. ImageFormatPLOOP ImageFormat = "ploop" )
type Language ¶
type Language struct {
ID int `json:"id"`
Name string `json:"name"`
Locale string `json:"locale"`
Country string `json:"country"`
Icon Icon `json:"icon"`
IsDefault bool `json:"is_default"`
IsVisible bool `json:"is_visible"`
UsersCount int `json:"users_count"`
}
Language represents a language.
type LanguagesResponse ¶
type LanguagesResponse struct {
Data []Language `json:"data"`
// contains filtered or unexported fields
}
LanguagesResponse represents paginated list of languages. This cursor can be used for iterating over all available languages.
func (*LanguagesResponse) Err ¶
func (r *LanguagesResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*LanguagesResponse) Next ¶
func (r *LanguagesResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type LanguagesService ¶
type LanguagesService service
LanguagesService handles all available methods with languages.
func (*LanguagesService) List ¶
func (s *LanguagesService) List(ctx context.Context, filter *FilterLanguages) (LanguagesResponse, error)
List lists languages.
type License ¶
type License struct {
CPUCores int `json:"cpu_cores"`
CPUCoresInUse int `json:"cpu_cores_in_use"`
IsActive bool `json:"is_active"`
Key string `json:"key"`
KeyType string `json:"key_type"`
Product string `json:"product"`
ExpirationDate string `json:"expiration_date"`
UpdateDate string `json:"update_date"`
}
License represent a license.
type LicenseActivateRequest ¶
type LicenseActivateRequest struct {
ActivationCode string `json:"activation_code"`
}
LicenseActivateRequest represents available properties for activating the license.
type LicenseService ¶
type LicenseService service
LicenseService handles all available methods with license.
func (*LicenseService) Activate ¶
func (s *LicenseService) Activate(ctx context.Context, data LicenseActivateRequest) (License, error)
Activate activates the license.
type LicenseType ¶
type LicenseType string
LicenseType represents available compute resource license types.
const ( // LicenseTypeStandard indicates Standard license type. LicenseTypeStandard LicenseType = "standard" // LicenseTypeMini indicates Mini license type. LicenseTypeMini LicenseType = "mini" // LicenseTypeMicro indicates Micro license type. LicenseTypeMicro LicenseType = "micro" )
type LimitGroup ¶
type LimitGroup struct {
ID int `json:"id"`
Name string `json:"name"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
VirtualServers LimitGroupLimit `json:"vms"`
RunningVirtualServers LimitGroupLimit `json:"running_vms"`
AdditionalIPs LimitGroupLimit `json:"additional_ips"`
}
LimitGroup represent limit group.
type LimitGroupLimit ¶
LimitGroupLimit represent limit's group limit.
type Location ¶
type Location struct {
ID int `json:"id"`
Name string `json:"name"`
Icon Icon `json:"icon"`
Description string `json:"description"`
IsDefault bool `json:"is_default"`
IsVisible bool `json:"is_visible"`
ComputeResources []ComputeResource `json:"compute_resources"`
AvailablePlans []ShortPlan `json:"available_plans"`
}
Location represents a location.
type LocationCreateRequest ¶
type LocationCreateRequest struct {
Name string `json:"name"`
Description string `json:"description"`
IconID null.Int `json:"icon_id"`
IsDefault bool `json:"is_default"`
IsVisible bool `json:"is_visible"`
ComputeResources []int `json:"compute_resources,omitempty"`
AvailablePlans []int `json:"available_plans,omitempty"`
}
LocationCreateRequest represents available properties for creating a new location.
type LocationPatchRequest ¶
type LocationPatchRequest struct {
IsDefault bool `json:"is_default"`
IsVisible bool `json:"is_visible"`
}
LocationPatchRequest represents available properties for patching an existing location.
type LocationsResponse ¶
type LocationsResponse struct {
Data []Location `json:"data"`
// contains filtered or unexported fields
}
LocationsResponse represents paginated list of locations. This cursor can be used for iterating over all available location.
func (*LocationsResponse) Err ¶
func (r *LocationsResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*LocationsResponse) Next ¶
func (r *LocationsResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type LocationsService ¶
type LocationsService service
LocationsService handles all available methods with locations.
func (*LocationsService) Create ¶
func (s *LocationsService) Create(ctx context.Context, data LocationCreateRequest) (Location, error)
Create creates new location.
func (*LocationsService) Delete ¶
func (s *LocationsService) Delete(ctx context.Context, id int) error
Delete deletes specified location.
func (*LocationsService) List ¶
func (s *LocationsService) List(ctx context.Context, filter *FilterLocations) (LocationsResponse, error)
List lists locations.
func (*LocationsService) Patch ¶
func (s *LocationsService) Patch(ctx context.Context, id int, data LocationPatchRequest) (Location, error)
Patch specified location.
func (*LocationsService) Update ¶
func (s *LocationsService) Update(ctx context.Context, id int, data LocationCreateRequest) (Location, error)
Update updates specified location.
type Logger ¶
type Logger interface {
Debugf(format string, args ...interface{})
Errorf(format string, args ...interface{})
}
Logger represents a logger for the client.
type LoginLink ¶
type LoginLink struct {
Type LoginLinkType `json:"type"`
Content string `json:"content"`
}
LoginLink represents an application login link.
type LoginLinkType ¶
type LoginLinkType string
LoginLinkType a type of login link to the application.
const ( // LoginLinkTypeNone indicates application without login link. LoginLinkTypeNone LoginLinkType = "none" // LoginLinkTypeURL indicates application with URL pattern login link. LoginLinkTypeURL LoginLinkType = "url" // LoginLinkTypeJSCode indicates application with custom JS code auth code. LoginLinkTypeJSCode LoginLinkType = "js_code" // LoginLinkTypeInfo indicates application with custom information in popup. LoginLinkTypeInfo LoginLinkType = "info" )
type Netfilter ¶
type Netfilter struct {
Value NetfilterStatus `json:"value"`
IsEditable bool `json:"is_editable"`
}
type NetfilterStatus ¶
type NetfilterStatus string
NetfilterStatus represents available netfilter statuses.
const ( NetfilterStatusDisabled NetfilterStatus = "disabled" NetfilterStatusStateless NetfilterStatus = "stateless" NetfilterStatusStateful NetfilterStatus = "stateful" NetfilterStatusFull NetfilterStatus = "full" )
type NullLogger ¶
type NullLogger struct{}
NullLogger represents a logger which don't log anything. Useful when you don't want to see any logs from the client or in tests.
func (NullLogger) Debugf ¶
func (NullLogger) Debugf(string, ...interface{})
Debugf logs message with debug level.
func (NullLogger) Errorf ¶
func (NullLogger) Errorf(string, ...interface{})
Errorf logs message with error level.
type OfferType ¶
type OfferType string
const ( // OfferTypeAdditionalDisk is a constant for additional disk offer type. OfferTypeAdditionalDisk OfferType = "additional_disk" )
type OsImage ¶
type OsImage struct {
ID int `json:"id"`
Name string `json:"name"`
Icon Icon `json:"icon"`
Versions []OsImageVersion `json:"versions,omitempty"`
IsDefault bool `json:"is_default,omitempty"`
IsVisible bool `json:"is_visible,omitempty"`
Position float32 `json:"position"`
}
OsImage represent an OS image.
type OsImageRequest ¶
type OsImageRequest struct {
Name string `json:"name"`
IconID null.Int `json:"icon_id"`
IsVisible bool `json:"is_visible"`
}
OsImageRequest represents available properties for creating a new OS image.
type OsImageVersion ¶
type OsImageVersion struct {
ID int `json:"id"`
VirtualizationType VirtualizationType `json:"virtualization_type"`
Position float64 `json:"position"`
Version string `json:"version"`
URL string `json:"url"`
CloudInitVersion CloudInitVersion `json:"cloud_init_version,omitempty"`
OsImageID int `json:"os_image_id"`
IsVisible bool `json:"is_visible"`
IsSSHKeysSupported bool `json:"is_ssh_keys_supported"`
AvailablePlans []ShortPlan `json:"available_plans"`
}
OsImageVersion represents an OS image version.
type OsImageVersionRequest ¶
type OsImageVersionRequest struct {
Position float64 `json:"position,omitempty"`
Version string `json:"version"`
VirtualizationType VirtualizationType `json:"virtualization_type"`
URL string `json:"url"`
CloudInitVersion CloudInitVersion `json:"cloud_init_version,omitempty"`
IsVisible bool `json:"is_visible"`
AvailablePlans []int `json:"available_plans,omitempty"`
}
OsImageVersionRequest represents available properties for creating a new OS image version.
type OsImageVersionsService ¶
type OsImageVersionsService service
OsImageVersionsService handles all available methods with OS image versions.
func (*OsImageVersionsService) Delete ¶
func (s *OsImageVersionsService) Delete(ctx context.Context, id int) error
Delete deletes specified OS image version.
func (*OsImageVersionsService) Get ¶
func (s *OsImageVersionsService) Get(ctx context.Context, id int) (OsImageVersion, error)
Get gets specified OS image version.
func (*OsImageVersionsService) Update ¶
func (s *OsImageVersionsService) Update( ctx context.Context, id int, data OsImageVersionRequest, ) (OsImageVersion, error)
Update updates specified OS image version.
type OsImagesResponse ¶
type OsImagesResponse struct {
Data []OsImage `json:"data"`
// contains filtered or unexported fields
}
OsImagesResponse represents paginated list of OS images. This cursor can be used for iterating over all available OS images.
func (*OsImagesResponse) Err ¶
func (r *OsImagesResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*OsImagesResponse) Next ¶
func (r *OsImagesResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type OsImagesService ¶
type OsImagesService service
OsImagesService handles all available methods with OS image.
func (*OsImagesService) Create ¶
func (s *OsImagesService) Create(ctx context.Context, data OsImageRequest) (OsImage, error)
Create creates specified OS image.
func (*OsImagesService) CreateVersion ¶
func (s *OsImagesService) CreateVersion( ctx context.Context, osImageID int, data OsImageVersionRequest, ) (OsImageVersion, error)
CreateVersion creates a new version for the specified OS image.
func (*OsImagesService) Delete ¶
func (s *OsImagesService) Delete(ctx context.Context, id int) error
Delete deletes specified OS image.
func (*OsImagesService) List ¶
func (s *OsImagesService) List(ctx context.Context, filter *FilterOsImages) (OsImagesResponse, error)
List lists OS images.
func (*OsImagesService) ListVersion ¶
func (s *OsImagesService) ListVersion(ctx context.Context, osImageID int) ([]OsImageVersion, error)
ListVersion lists specified OS image versions.
func (*OsImagesService) Update ¶
func (s *OsImagesService) Update(ctx context.Context, id int, data OsImageRequest) (OsImage, error)
Update updates specified OS image.
type Permission ¶
Permission represents a permission.
type PermissionResponse ¶
type PermissionResponse struct {
Data []Permission `json:"data"`
// contains filtered or unexported fields
}
PermissionResponse represents paginated list of permissions. This cursor can be used for iterating over all available permissions.
func (*PermissionResponse) Err ¶
func (r *PermissionResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*PermissionResponse) Next ¶
func (r *PermissionResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type PermissionsService ¶
type PermissionsService service
PermissionsService handles all available methods with permissions.
func (*PermissionsService) List ¶
func (s *PermissionsService) List(ctx context.Context) (PermissionResponse, error)
List lists permissions.
type Plan ¶
type Plan struct {
ID int `json:"id"`
Name string `json:"name"`
VirtualizationType VirtualizationType `json:"virtualization_type"`
Params PlanParams `json:"params"`
StorageType string `json:"storage_type"`
ImageFormat string `json:"image_format"`
IsDefault bool `json:"is_default"`
IsSnapshotAvailable bool `json:"is_snapshot_available"`
IsSnapshotsEnabled bool `json:"is_snapshots_enabled"`
IsBackupAvailable bool `json:"is_backup_available"`
IsAdditionalIPsAvailable bool `json:"is_additional_ips_available"`
BackupSettings PlanBackupSettings `json:"backup_settings"`
BackupPrice float64 `json:"backup_price"`
IsVisible bool `json:"is_visible"`
Limits PlanLimits `json:"limits"`
TokensPerHour int `json:"tokens_per_hour"`
TokensPerMonth int `json:"tokens_per_month"`
IPTokensPerHour int `json:"ip_tokens_per_hour"`
IPTokensPerMonth int `json:"ip_tokens_per_month"`
Position float64 `json:"position"`
Price PlanPrice `json:"price"`
ResetLimitPolicy PlanResetLimitPolicy `json:"reset_limit_policy"`
NetworkTotalTrafficType PlanNetworkTotalTrafficType `json:"network_traffic_limit_type"`
AvailableLocations []ShortLocation `json:"available_locations"`
AvailableOsImageVersions []ShortOsImageVersion `json:"available_os_image_versions"`
AvailableApplications []ShortOsImageVersion `json:"available_applications"`
Netfilter Netfilter `json:"netfilter"`
PPP PPP `json:"ppp"`
TUNTAP TUNTAP `json:"tun_tap"`
}
Plan represents a plan.
type PlanBackupSettings ¶
type PlanBackupSettings struct {
IsIncrementalBackupEnabled bool `json:"is_incremental_backup_enabled"`
IncrementalBackupsLimit int `json:"incremental_backups_limit"`
}
PlanBackupSettings represents a plan's backup settings.
type PlanCreateRequest ¶
type PlanCreateRequest struct {
Name string `json:"name"`
VirtualizationType VirtualizationType `json:"virtualization_type"`
Params PlanParams `json:"params"`
StorageType StorageTypeName `json:"storage_type"`
ImageFormat ImageFormat `json:"image_format"`
Limits PlanLimits `json:"limits"`
TokensPerHour int `json:"tokens_per_hour"`
TokensPerMonth int `json:"tokens_per_month"`
IPTokensPerHour int `json:"ip_tokens_per_hour"`
IPTokensPerMonth int `json:"ip_tokens_per_month"`
IsVisible bool `json:"is_visible"`
IsDefault bool `json:"is_default"`
IsSnapshotsEnabled bool `json:"is_snapshots_enabled"`
IsBackupAvailable bool `json:"is_backup_available"`
IsAdditionalIPsAvailable bool `json:"is_additional_ips_available"`
BackupSettings PlanBackupSettings `json:"backup_settings"`
BackupPrice float64 `json:"backup_price"`
ResetLimitPolicy PlanResetLimitPolicy `json:"reset_limit_policy"`
NetworkTotalTrafficType PlanNetworkTotalTrafficType `json:"network_traffic_limit_type"`
AvailableLocations []int `json:"available_locations,omitempty"`
AvailableOsImageVersions []int `json:"available_os_image_versions,omitempty"`
AvailableApplications []int `json:"available_applications,omitempty"`
Netfilter Netfilter `json:"netfilter,omitempty"`
PPP PPP `json:"ppp,omitempty"`
TUNTAP TUNTAP `json:"tun_tap,omitempty"`
}
PlanCreateRequest represents available properties for creating a new plan.
type PlanLimitUnit ¶
type PlanLimitUnit string
PlanLimitUnit represents available generic units.
const ( // PlanLimitUnits indicates generic unit. PlanLimitUnits PlanLimitUnit = "units" )
type PlanLimits ¶
type PlanLimits struct {
DiskBandwidth DiskBandwidthPlanLimit `json:"disk_bandwidth"`
DiskIOPS DiskIOPSPlanLimit `json:"disk_iops"`
NetworkIncomingBandwidth BandwidthPlanLimit `json:"network_incoming_bandwidth"`
NetworkOutgoingBandwidth BandwidthPlanLimit `json:"network_outgoing_bandwidth"`
NetworkIncomingTraffic TrafficPlanLimit `json:"network_incoming_traffic"`
NetworkOutgoingTraffic TrafficPlanLimit `json:"network_outgoing_traffic"`
NetworkTotalTraffic TrafficPlanLimit `json:"network_total_traffic"`
NetworkReduceBandwidth BandwidthPlanLimit `json:"network_reduce_bandwidth"`
BackupsNumber UnitPlanLimit `json:"backups_number"`
}
PlanLimits represents all available limits for creating a new plan.
type PlanNetworkTotalTrafficType ¶
type PlanNetworkTotalTrafficType string
PlanNetworkTotalTrafficType represent available total traffic types.
const ( // PlanNetworkTotalTrafficTypeSeparate indicates we should count incoming and // outgoing traffic separately. PlanNetworkTotalTrafficTypeSeparate PlanNetworkTotalTrafficType = "separate" // PlanNetworkTotalTrafficTypeTotal indicates we should count incoming and // outgoing traffic together. PlanNetworkTotalTrafficTypeTotal PlanNetworkTotalTrafficType = "total" )
type PlanParams ¶
type PlanParams struct {
Disk int `json:"disk"`
RAM int `json:"ram"`
VCPU int `json:"vcpu"`
VCPUUnits int `json:"vcpu_units"`
VCPULimit int `json:"vcpu_limit"`
IOPriority int `json:"io_priority"`
Swap int `json:"swap"`
}
PlanParams represents a plan's parameters.
type PlanPrice ¶
type PlanPrice struct {
AdditionalIPsPerHour string `json:"additional_ips_per_hour"`
AdditionalIPsPerMonth string `json:"additional_ips_per_month"`
PerHour string `json:"per_hour"`
PerMonth string `json:"per_month"`
CurrencyCode string `json:"currency_code"`
TaxesInclusive bool `json:"taxes_inclusive"`
Taxes []interface{} `json:"taxes"`
TotalPriceWithoutBackups string `json:"total_price_without_backups"`
TotalPrice string `json:"total_price"`
BackupPrice string `json:"backup_price"`
}
PlanPrice represents plan price information.
type PlanResetLimitPolicy ¶
type PlanResetLimitPolicy string
PlanResetLimitPolicy represent available a limit reset policies.
const ( // PlanResetLimitPolicyNever indicates we shouldn't reset a limit at all. PlanResetLimitPolicyNever PlanResetLimitPolicy = "never" // PlanResetLimitPolicyFirstDayOfMonth indicates we should reset a limit at the // first day of month. PlanResetLimitPolicyFirstDayOfMonth PlanResetLimitPolicy = "first_day_of_month" // PlanResetLimitPolicyVMCreatedDay indicates we should reset a limit at the VM's // created day. PlanResetLimitPolicyVMCreatedDay PlanResetLimitPolicy = "vm_created_day" )
type PlanUpdateLimits ¶
type PlanUpdateLimits struct {
NetworkIncomingBandwidth BandwidthPlanLimit `json:"network_incoming_bandwidth"`
NetworkOutgoingBandwidth BandwidthPlanLimit `json:"network_outgoing_bandwidth"`
NetworkIncomingTraffic TrafficPlanLimit `json:"network_incoming_traffic"`
NetworkOutgoingTraffic TrafficPlanLimit `json:"network_outgoing_traffic"`
NetworkTotalTraffic TrafficPlanLimit `json:"network_total_traffic"`
NetworkReduceBandwidth BandwidthPlanLimit `json:"network_reduce_bandwidth"`
BackupsNumber UnitPlanLimit `json:"backups_number"`
}
PlanUpdateLimits represents all available limits for updating a plan.
type PlanUpdateRequest ¶
type PlanUpdateRequest struct {
Name string `json:"name"`
Limits PlanUpdateLimits `json:"limits"`
TokensPerHour int `json:"tokens_per_hour"`
TokensPerMonth int `json:"tokens_per_month"`
IPTokensPerHour int `json:"ip_tokens_per_hour"`
IPTokensPerMonth int `json:"ip_tokens_per_month"`
IsVisible bool `json:"is_visible"`
IsDefault bool `json:"is_default"`
IsSnapshotsEnabled bool `json:"is_snapshots_enabled"`
IsBackupAvailable bool `json:"is_backup_available"`
IsAdditionalIPsAvailable bool `json:"is_additional_ips_available"`
BackupSettings PlanBackupSettings `json:"backup_settings"`
BackupPrice float64 `json:"backup_price"`
ResetLimitPolicy PlanResetLimitPolicy `json:"reset_limit_policy"`
NetworkTotalTrafficType PlanNetworkTotalTrafficType `json:"network_traffic_limit_type"`
AvailableLocations []int `json:"available_locations,omitempty"`
AvailableOsImageVersions []int `json:"available_os_image_versions,omitempty"`
AvailableApplications []int `json:"available_applications,omitempty"`
Netfilter Netfilter `json:"netfilter,omitempty"`
PPP PPP `json:"ppp,omitempty"`
TUNTAP TUNTAP `json:"tun_tap,omitempty"`
}
PlanUpdateRequest represents available properties for updating an existing plan. Updates replace the plan configuration, including availability lists. Callers must include the lists they want to retain; omitted or empty lists clear them.
type PlansResponse ¶
type PlansResponse struct {
Data []Plan `json:"data"`
// contains filtered or unexported fields
}
PlansResponse represents paginated list of plans. This cursor can be used for iterating over all available plans.
func (*PlansResponse) Err ¶
func (r *PlansResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*PlansResponse) Next ¶
func (r *PlansResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type PlansService ¶
type PlansService service
PlansService handles all available methods with plans.
func (*PlansService) Create ¶
func (s *PlansService) Create(ctx context.Context, data PlanCreateRequest) (Plan, error)
Create creates new plan.
func (*PlansService) Delete ¶
func (s *PlansService) Delete(ctx context.Context, id int) error
Delete deletes specified plan.
func (*PlansService) List ¶
func (s *PlansService) List(ctx context.Context, filter *FilterPlans) (PlansResponse, error)
List lists plans.
func (*PlansService) Update ¶
func (s *PlansService) Update(ctx context.Context, id int, data PlanUpdateRequest) (Plan, error)
Update updates specified plan. This is a replacement (PUT), so include all configuration and availability lists that should be retained.
type Project ¶
type Project struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Members int `json:"members"`
IsOwner bool `json:"is_owner"`
IsDefault bool `json:"is_default"`
Owner User `json:"owner"`
Servers int `json:"servers"`
}
Project represents a project.
type ProjectRequest ¶
ProjectRequest represents available properties for creating or updating a project.
type ProjectServersCreateRequest ¶
type ProjectServersCreateRequest struct {
Name string `json:"name"`
PlanID int `json:"plan_id"`
LocationID int `json:"location_id"`
OsImageVersionID int `json:"os_image_version_id,omitempty"`
ApplicationID int `json:"application_id,omitempty"`
ApplicationData string `json:"application_data,omitempty"`
SSHKeys []int `json:"ssh_keys,omitempty"`
UserData string `json:"user_data,omitempty"`
FQDNs []string `json:"fqdns,omitempty"`
BackupSettings *VirtualServerBackupSettings `json:"backup_settings,omitempty"`
}
ProjectServersCreateRequest represents available properties for creating a new server on a project.
type ProjectServersResponse ¶
type ProjectServersResponse struct {
Data []VirtualServer `json:"data"`
// contains filtered or unexported fields
}
ProjectServersResponse represents paginated list of project's servers. This cursor can be used for iterating over all available project's servers.
func (*ProjectServersResponse) Err ¶
func (r *ProjectServersResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*ProjectServersResponse) Next ¶
func (r *ProjectServersResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type ProjectsResponse ¶
type ProjectsResponse struct {
Data []Project `json:"data"`
// contains filtered or unexported fields
}
ProjectsResponse represents paginated list of projects. This cursor can be used for iterating over all available projects.
func (*ProjectsResponse) Err ¶
func (r *ProjectsResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*ProjectsResponse) Next ¶
func (r *ProjectsResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type ProjectsService ¶
type ProjectsService service
ProjectsService handles all available methods with projects.
func (*ProjectsService) Create ¶
func (s *ProjectsService) Create(ctx context.Context, data ProjectRequest) (Project, error)
Create creates new project.
func (*ProjectsService) Delete ¶
func (s *ProjectsService) Delete(ctx context.Context, id int) error
Delete deletes specified project.
func (*ProjectsService) List ¶
func (s *ProjectsService) List(ctx context.Context, filter *FilterProjects) (ProjectsResponse, error)
List lists projects.
func (*ProjectsService) Servers ¶
func (s *ProjectsService) Servers(ctx context.Context, id int) (ProjectServersResponse, error)
Servers lists all servers on the specified project.
func (*ProjectsService) ServersCreate ¶
func (s *ProjectsService) ServersCreate( ctx context.Context, projectID int, data ProjectServersCreateRequest, ) (VirtualServer, error)
ServersCreate creates a server on the specified project.
func (*ProjectsService) ServersListAll ¶
func (s *ProjectsService) ServersListAll(ctx context.Context, id int) ([]VirtualServer, error)
ServersListAll lists all servers on the specified project. Deprecated: use Servers instead.
func (*ProjectsService) Update ¶
func (s *ProjectsService) Update(ctx context.Context, id int, data ProjectRequest) (Project, error)
Update updates specified project.
type ResponseLinks ¶
type ResponseLinks struct {
First string `json:"first"`
Last string `json:"last"`
Prev string `json:"prev"`
Next string `json:"next"`
}
ResponseLinks represent useful links which is returned with paginated response.
type ResponseMeta ¶
type ResponseMeta struct {
CurrentPage int `json:"current_page"`
From int `json:"from"`
LastPage int `json:"last_page"`
Path string `json:"path"`
PerPage int `json:"per_page"`
To int `json:"to"`
Total int `json:"total"`
}
ResponseMeta represent response metadata which is returned with paginated response.
type Role ¶
type Role struct {
ID int `json:"id"`
Name string `json:"name"`
IsDefault bool `json:"is_default"`
UsersCount int `json:"users_count"`
}
Role represents a role.
type RoleCreateRequest ¶
type RoleCreateRequest struct {
Name string `json:"name"`
Permissions []int `json:"permissions,omitempty"`
}
RoleCreateRequest represents available properties for creating a new role.
type RolesResponse ¶
type RolesResponse struct {
Data []Role `json:"data"`
// contains filtered or unexported fields
}
RolesResponse represents paginated list of roles. This cursor can be used for iterating over all available roles.
func (*RolesResponse) Err ¶
func (r *RolesResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*RolesResponse) Next ¶
func (r *RolesResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type RolesService ¶
type RolesService service
RolesService handles all available methods with roles.
func (*RolesService) Create ¶
func (s *RolesService) Create(ctx context.Context, data RoleCreateRequest) (Role, error)
Create creates new role.
func (*RolesService) List ¶
func (s *RolesService) List(ctx context.Context) (RolesResponse, error)
List lists roles.
type SSHKeyCreateRequest ¶
type SSHKeyCreateRequest struct {
Name string `json:"name"`
Body string `json:"body"`
UserID int `json:"user_id"`
}
SSHKeyCreateRequest represents available properties for creating a new SSH key.
type SSHKeysResponse ¶
type SSHKeysResponse struct {
Data []SSHKey `json:"data"`
// contains filtered or unexported fields
}
SSHKeysResponse represents paginated list of SSH keys. This cursor can be used for iterating over all available SSH keys.
func (*SSHKeysResponse) Err ¶
func (r *SSHKeysResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*SSHKeysResponse) Next ¶
func (r *SSHKeysResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type SSHKeysService ¶
type SSHKeysService service
SSHKeysService handles all available methods with SSH keys.
func (*SSHKeysService) Create ¶
func (s *SSHKeysService) Create(ctx context.Context, data SSHKeyCreateRequest) (SSHKey, error)
Create creates new SSH key.
func (*SSHKeysService) Delete ¶
func (s *SSHKeysService) Delete(ctx context.Context, id int) error
Delete deletes specified SSH key.
func (*SSHKeysService) List ¶
func (s *SSHKeysService) List(ctx context.Context, filter *FilterSSHKeys) (SSHKeysResponse, error)
List lists SSH keys.
type ServerUsageResource ¶
type ServerUsageResource struct {
ID int `json:"id"`
Name string `json:"name"`
TotalTokens float64 `json:"total_tokens"`
CreatedAt string `json:"created_at"`
TerminatedAt *string `json:"terminated_at"`
Usage []UsageResource `json:"usage"`
}
ServerUsageResource represents server usage information.
type ServersMigration ¶
type ServersMigration struct {
ID int `json:"id"`
DestinationComputeResource ComputeResource `json:"destination_compute_resource"`
Task Task `json:"task"`
Children []Task `json:"children"`
}
ServersMigration represents a server's migration.
type ServersMigrationRequest ¶
type ServersMigrationRequest struct {
IsLive bool `json:"is_live"`
PreserveIPs bool `json:"preserve_ips"`
DestinationComputeResourceID int `json:"destination_compute_resource_id"`
Servers []int `json:"servers"`
}
ServersMigrationRequest represents available properties for creating a new server's migration.
type ServersMigrationsService ¶
type ServersMigrationsService service
ServersMigrationsService handles all available methods with server's migrations.
func (*ServersMigrationsService) Create ¶
func (s *ServersMigrationsService) Create(ctx context.Context, data ServersMigrationRequest) (ServersMigration, error)
Create creates new server's migration.
type Settings ¶
type Settings struct {
Hostname string `json:"hostname"`
Mail SettingsMail `json:"mail"`
SendStatistics bool `json:"send_statistics"`
LimitGroup LimitGroup `json:"limit_group"`
Registration SettingsRegistration `json:"registration"`
Theme SettingsTheme `json:"theme"`
NetworkRules SettingsNetworkRules `json:"network_rules"`
Notifications SettingsNotifications `json:"notifications"`
ComputeResource SettingsComputeResource `json:"compute_resource"`
NonExistentVMSRemover SettingsNonExistentVMSRemover `json:"non_existent_vms_remover"`
BillingIntegration SettingsBillingIntegration `json:"billing_integration"`
DNS SettingsDNS `json:"dns"`
Update SettingsUpdate `json:"update"`
Features SettingsFeatures `json:"features"`
}
Settings represents application settings.
type SettingsBillingIntegration ¶
type SettingsBillingIntegration struct {
Type string `json:"type,omitempty"`
Drivers SettingsBillingIntegrationDrivers `json:"drivers,omitempty"`
}
SettingsBillingIntegration represents settings for billing.
type SettingsBillingIntegrationDrivers ¶
type SettingsBillingIntegrationDrivers struct {
WHMCS SettingsBillingIntegrationDriversWHMCS `json:"whmcs,omitempty"`
}
SettingsBillingIntegrationDrivers represents billing drivers.
type SettingsBillingIntegrationDriversWHMCS ¶
type SettingsBillingIntegrationDriversWHMCS struct {
URL string `json:"url,omitempty"`
Token string `json:"token,omitempty"`
}
SettingsBillingIntegrationDriversWHMCS represents WHMCS driver.
type SettingsComputeResource ¶
type SettingsComputeResource struct {
RescueISOURL string `json:"rescue_iso_url,omitempty"`
BalanceStrategy string `json:"balance_strategy,omitempty"`
}
SettingsComputeResource represents compute resource settings.
type SettingsDNS ¶
type SettingsDNS struct {
Type string `json:"type,omitempty"`
ServerHostnameTemplate string `json:"server_hostname_template,omitempty"`
RegisterFQDNOnServerCreate bool `json:"register_fqdn_on_server_create,omitempty"`
ReverseDNSDomainTemplate string `json:"reverse_dns_domain_template,omitempty"`
Drivers SettingsDNSDrivers `json:"drivers,omitempty"`
}
SettingsDNS represents DNS settings.
type SettingsDNSDrivers ¶
type SettingsDNSDrivers struct {
PowerDNS SettingsDNSDriversPowerDNS `json:"power_dns,omitempty"`
}
SettingsDNSDrivers represents DNS drivers.
type SettingsDNSDriversPowerDNS ¶
type SettingsDNSDriversPowerDNS struct {
Host string `json:"host,omitempty"`
APIKey string `json:"api_key,omitempty"`
}
SettingsDNSDriversPowerDNS represents PowerDNS driver.
type SettingsFeatures ¶
type SettingsFeatures struct {
HidePlanName bool `json:"hide_plan_name"`
HideUserData bool `json:"hide_user_data"`
HidePlanSection bool `json:"hide_plan_section"`
HideLocationSection bool `json:"hide_location_section"`
AllowRegistration bool `json:"allow_registration"`
AllowPasswordRecovery bool `json:"allow_password_recovery"`
HideApiDocumentationLink bool `json:"hide_api_documentation_link"`
}
SettingsFeatures represents application features settings.
type SettingsMail ¶
type SettingsMail struct {
Host string `json:"host,omitempty"`
// Port string `json:"port,omitempty"` todo uncomment after fix SIO-3682.
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
FromEmail string `json:"from_email,omitempty"`
FromName string `json:"from_name,omitempty"`
Encryption bool `json:"encryption,omitempty"`
}
SettingsMail represents mail settings.
type SettingsNetworkRules ¶
type SettingsNetworkRules struct {
ARP bool `json:"arp,omitempty"`
DHCP bool `json:"dhcp,omitempty"`
CloudInit bool `json:"cloud_init,omitempty"`
SMTP bool `json:"smtp,omitempty"`
ICMP bool `json:"icmp,omitempty"`
ICMPReply bool `json:"icmp_reply"`
IPSpoofing bool `json:"ip_spoofing"`
Portmapper bool `json:"portmapper"`
}
SettingsNetworkRules represents network rules settings.
type SettingsNonExistentVMSRemover ¶
type SettingsNonExistentVMSRemover struct {
Enabled bool `json:"enabled,omitempty"`
Interval int `json:"interval,omitempty"`
}
SettingsNonExistentVMSRemover represents settings for virtual server remover.
type SettingsNotifications ¶
type SettingsNotifications struct {
ServerCreate SettingsNotificationsTemplate `json:"server_create,omitempty"`
ServerResetPassword SettingsNotificationsTemplate `json:"server_reset_password,omitempty"`
UserResetPassword SettingsNotificationsTemplate `json:"user_reset_password,omitempty"`
UserVerifyEmail SettingsNotificationsTemplate `json:"user_verify_email,omitempty"`
ProjectUserInvite SettingsNotificationsTemplate `json:"project_user_invite,omitempty"`
ProjectUserLeft SettingsNotificationsTemplate `json:"project_user_left,omitempty"`
ServerIncomingTrafficExceeded SettingsNotificationsTemplate `json:"server_incoming_traffic_exceeded,omitempty"`
ServerOutgoingTrafficExceeded SettingsNotificationsTemplate `json:"server_outgoing_traffic_exceeded,omitempty"`
}
SettingsNotifications represents notification settings.
type SettingsNotificationsTemplate ¶
type SettingsNotificationsTemplate struct {
Enabled bool `json:"enabled,omitempty"`
SubjectTemplates map[string]string `json:"subject_templates,omitempty"`
BodyTemplated map[string]string `json:"body_templated,omitempty"`
}
SettingsNotificationsTemplate represents notification template.
type SettingsRegistration ¶
type SettingsRegistration struct {
Role string `json:"role,omitempty"`
}
SettingsRegistration represents registration settings.
type SettingsService ¶
type SettingsService service
SettingsService handles all available methods with settings.
func (*SettingsService) Get ¶
func (s *SettingsService) Get(ctx context.Context) (Settings, error)
Get gets settings.
func (*SettingsService) Patch ¶
func (s *SettingsService) Patch(ctx context.Context, data SettingsUpdateRequest) (Settings, error)
Patch patches settings.
type SettingsTheme ¶
type SettingsTheme struct {
PrimaryColor string `json:"primary_color,omitempty"`
SecondaryColor string `json:"secondary_color,omitempty"`
BrandName string `json:"brand_name,omitempty"`
Logo string `json:"logo,omitempty"`
Favicon string `json:"favicon,omitempty"`
TermsAndConditionsURL string `json:"terms_and_conditions_url,omitempty"`
}
SettingsTheme represents application theme setting.
type SettingsUpdate ¶
type SettingsUpdate struct {
Method string `json:"method,omitempty"`
Channel string `json:"channel,omitempty"`
ScheduledDays []int `json:"scheduled_days,omitempty"`
ScheduledTime string `json:"scheduled_time,omitempty"`
}
SettingsUpdate represents application update settings.
type SettingsUpdateRequest ¶
type SettingsUpdateRequest struct {
Hostname *string `json:"hostname,omitempty"`
Mail *SettingsMail `json:"mail,omitempty"`
SendStatistics *bool `json:"send_statistics,omitempty"`
LimitGroup *LimitGroup `json:"limit_group,omitempty"`
Registration *SettingsRegistration `json:"registration,omitempty"`
Theme *SettingsTheme `json:"theme,omitempty"`
NetworkRules *SettingsNetworkRules `json:"network_rules,omitempty"`
Notifications *SettingsNotifications `json:"notifications,omitempty"`
ComputeResource *SettingsComputeResource `json:"compute_resource,omitempty"`
NonExistentVMSRemover *SettingsNonExistentVMSRemover `json:"non_existent_vms_remover,omitempty"`
BillingIntegration *SettingsBillingIntegration `json:"billing_integration,omitempty"`
DNS *SettingsDNS `json:"dns,omitempty"`
Update *SettingsUpdate `json:"update,omitempty"`
Features *SettingsFeatures `json:"features,omitempty"`
}
SettingsUpdateRequest represents available properties for updating settings.
type SetupNetworkRequest ¶
type SetupNetworkRequest struct {
ID string `json:"id"`
Type ComputeResourceSettingsNetworkType `json:"type"`
}
SetupNetworkRequest represents available properties for setting up network for the compute resource.
type ShortApplication ¶
ShortApplication represents only ID and name of application.
type ShortComputeResource ¶
type ShortComputeResource struct {
ID int `json:"id"`
Name string `json:"name"`
Host string `json:"host"`
Capabilities map[string]interface{} `json:"capabilities"`
IsInMaintenance bool `json:"is_in_maintenance"`
Storages []ShortStorage `json:"storages"`
}
ShortComputeResource represents the compute resource embedded in a server response.
type ShortLocation ¶
ShortLocation represents only ID and name of location.
type ShortOsImageVersion ¶
ShortOsImageVersion represents only ID and name of OS image version.
type ShortStorage ¶
type ShortStorage struct {
ID int `json:"id"`
Name string `json:"name"`
Type StorageType `json:"type"`
Status string `json:"status"`
}
ShortStorage represents storage embedded in a compute resource summary. Credentials are intentionally excluded: the API can return an object, an empty array, or null for that field, and server reads do not need credential data.
type ShortVPCNetwork ¶
ShortVPCNetwork represents only ID and name of VPC network.
type Snapshot ¶
type Snapshot struct {
ID int `json:"id"`
Name string `json:"name"`
// Size a size of snapshot in GiB.
Size float64 `json:"size"`
Status SnapshotStatus `json:"status"`
CreatedAt string `json:"created_at"`
}
Snapshot represents a snapshot.
type SnapshotRequest ¶
type SnapshotRequest struct {
Name string `json:"name"`
}
SnapshotRequest represents available properties for creating a new snapshot.
type SnapshotStatus ¶
type SnapshotStatus string
SnapshotStatus represents available snapshot statuses.
const ( // SnapshotStatusAvailable indicates snapshot is available for reverting. SnapshotStatusAvailable SnapshotStatus = "available" // SnapshotStatusProcessing indicates snapshot still creating. SnapshotStatusProcessing SnapshotStatus = "processing" // SnapshotStatusFailed indicates snapshot is failed. SnapshotStatusFailed SnapshotStatus = "failed" )
type SnapshotsService ¶
type SnapshotsService service
SnapshotsService handles all available methods with storages.
type Storage ¶
type Storage struct {
ID int `json:"id"`
Name string `json:"name"`
Type StorageType `json:"type"`
Path string `json:"path"`
Mount string `json:"mount"`
ThinPool string `json:"thin_pool"`
IsAvailableForBalancing bool `json:"is_available_for_balancing"`
ServersCount int `json:"servers_count"`
ComputeResourcesCount int `json:"compute_resources_count"`
FreeSpace float64 `json:"free_space"`
Credentials map[string]interface{} `json:"credentials"`
}
Storage represents a storage.
type StorageService ¶
type StorageService service
SnapshotsService handles all available methods with snapshots.
type StorageTagsService ¶
type StorageTagsService service
StorageTagsService handles all available methods with storage tags.
type StorageType ¶
type StorageType struct {
ID int `json:"id"`
Name StorageTypeName `json:"name"`
Formats []ImageFormat `json:"formats"`
}
StorageType represents a storage type.
type StorageTypeName ¶
type StorageTypeName string
StorageTypeName represents available storage types.
const ( // StorageTypeNameFB indicates File Based storage. StorageTypeNameFB StorageTypeName = "fb" // StorageTypeNameLVM indicates LVM storage. StorageTypeNameLVM StorageTypeName = "lvm" // StorageTypeNameThinLVM indicates ThinLVM storage. StorageTypeNameThinLVM StorageTypeName = "thinlvm" // StorageTypeNameNFS indicates NFS storage. StorageTypeNameNFS StorageTypeName = "nfs" // StorageTypeNameVZ indicates VZ storage. StorageTypeNameVZ StorageTypeName = "vz" )
type StorageTypesService ¶
type StorageTypesService service
StorageTypesService handles all available methods with storage types.
func (*StorageTypesService) List ¶
func (s *StorageTypesService) List(ctx context.Context) ([]StorageType, error)
List lists storage types.
type Task ¶
type Task struct {
ID int `json:"id"`
ComputeResourceID int `json:"compute_resource_id"`
Queue string `json:"queue"`
Action TaskAction `json:"action"`
Status TaskStatus `json:"status"`
Output string `json:"output"`
Progress int `json:"progress"`
Duration int `json:"duration"`
}
Task represents a task.
func (Task) IsFinished ¶
IsFinished returns true if the task is finished, successfully or not.
type TaskAction ¶
type TaskAction string
TaskAction represents available task actions.
const ( // TaskActionServerCreate indicates server create task. TaskActionServerCreate TaskAction = "vm-create" // TaskActionServerReinstall indicates server reinstall task. TaskActionServerReinstall TaskAction = "vm-reinstall" // TaskActionServerDelete indicates server delete task. TaskActionServerDelete TaskAction = "vm-delete" // TaskActionServerUpdate indicates server update task. TaskActionServerUpdate TaskAction = "vm-update" // TaskActionServerPasswordChange indicates server password change task. TaskActionServerPasswordChange TaskAction = "vm-password-change" // TaskActionServerStart indicates server create task. TaskActionServerStart TaskAction = "vm-start" // TaskActionServerStop indicates server stop task. TaskActionServerStop TaskAction = "vm-stop" // TaskActionServerRestart indicates server restart task. TaskActionServerRestart TaskAction = "vm-restart" // TaskActionServerSuspend indicates server suspend task. TaskActionServerSuspend TaskAction = "vm-suspend" // TaskActionServerResume indicates server resume task. TaskActionServerResume TaskAction = "vm-resume" // TaskActionServerResize indicates server resize task. TaskActionServerResize TaskAction = "vm-resize" // TaskActionServersMigrate indicates servers migrate task. // This is the main task which is a group of TaskActionServerMigrate tasks. TaskActionServersMigrate TaskAction = "vms-migrate" // TaskActionServerMigrate indicates server migrate task. TaskActionServerMigrate TaskAction = "vm-migrate" // TaskActionServerUpdateNetwork indicates server update network task. TaskActionServerUpdateNetwork TaskAction = "vm-update-network" // TaskActionServerUpdateLimits indicates server update limits task. TaskActionServerUpdateLimits TaskAction = "vm-update-limits" // TaskActionServersUpdateLimits indicates servers update limits task. // Task for batch limits updates. TaskActionServersUpdateLimits TaskAction = "vms-update-limits" // TaskActionDNSRecordRegister indicates DNS record register task. TaskActionDNSRecordRegister TaskAction = "dns-record-register" // TaskActionDNSRecordsUnregister indicates DNS record unregister task. TaskActionDNSRecordsUnregister TaskAction = "dns-records-unregister" // TaskActionDNSRecordsUpdate indicates DNS record update task. TaskActionDNSRecordsUpdate TaskAction = "dns-record-update" // TaskActionReverseDNSRecordRegister indicates reverse DNS record register // task. TaskActionReverseDNSRecordRegister TaskAction = "reverse-dns-record-register" // TaskActionSnapshotCreate indicates snapshot create task. TaskActionSnapshotCreate TaskAction = "snapshot-create" // TaskActionSnapshotDelete indicates snapshot delete task. TaskActionSnapshotDelete TaskAction = "snapshot-delete" // TaskActionSnapshotRevert indicates snapshot revert task. TaskActionSnapshotRevert TaskAction = "snapshot-revert" // TaskActionPrepareInstallerForUpdate indicates prepare installer before update // task. TaskActionPrepareInstallerForUpdate TaskAction = "prepare installer for version update" // TaskActionRunVersionUpdate indicates application update task. TaskActionRunVersionUpdate TaskAction = "run version update" // TaskActionBackupCreate indicates backup create task. TaskActionBackupCreate TaskAction = "backup-create" // TaskActionBackupRestore indicates restore from backup task. TaskActionBackupRestore TaskAction = "backup-restore" // TaskActionBackupDelete indicates backup delete task. TaskActionBackupDelete TaskAction = "backup-delete" // TaskActionBackupRotate indicates backups rotate task. TaskActionBackupRotate TaskAction = "backup-rotate" // TaskActionPurgeComputeResourceVM indicates purging server backups task. TaskActionPurgeComputeResourceVM TaskAction = "backup-purge-compute-resource-vm" // TaskActionConfigureNetwork indicates compute resource network configuring // task. TaskActionConfigureNetwork TaskAction = "configure network" // TaskActionUpdateNetworkRules indicates compute resource network rules update // task. TaskActionUpdateNetworkRules TaskAction = "update network rules" // TaskActionUpgradeComputeResource indicates compute resource upgrade task. TaskActionUpgradeComputeResource TaskAction = "upgrade compute resource" // TaskActionClearImageCache indicates compute resource OS image cache clear // task. TaskActionClearImageCache TaskAction = "clear image cache" // TaskActionChangeHostname indicates server hostname change task. TaskActionChangeHostname TaskAction = "change hostname" )
type TaskStatus ¶
type TaskStatus string
TaskStatus represents available task's statuses.
const ( // TaskStatusPending indicates task is just created but not dispatched. TaskStatusPending TaskStatus = "pending" // TaskStatusQueued indicates task is already dispatched but didn't started. TaskStatusQueued TaskStatus = "queued" // TaskStatusRunning indicates task is running. TaskStatusRunning TaskStatus = "running" // TaskStatusDone indicates task successfully finished. TaskStatusDone TaskStatus = "done" // TaskStatusDoneWithErrors indicates task group finished but at least one of // children task is failed. TaskStatusDoneWithErrors TaskStatus = "done_with_errors" // TaskStatusFailed indicates task is failed. TaskStatusFailed TaskStatus = "failed" // TaskStatusCanceled indicates task is canceled. TaskStatusCanceled TaskStatus = "canceled" )
type TasksResponse ¶
type TasksResponse struct {
Data []Task `json:"data"`
// contains filtered or unexported fields
}
TasksResponse represents paginated list of tasks. This cursor can be used for iterating over all available users.
func (*TasksResponse) Err ¶
func (r *TasksResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*TasksResponse) Next ¶
func (r *TasksResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type TasksService ¶
type TasksService service
TasksService handles all available methods with tasks.
func (*TasksService) List ¶
func (s *TasksService) List(ctx context.Context, filter *FilterTasks) (TasksResponse, error)
List lists tasks.
type TrafficPlanLimit ¶
type TrafficPlanLimit struct {
IsEnabled bool `json:"is_enabled"`
Limit int `json:"limit"`
Unit TrafficPlanLimitUnit `json:"unit"`
}
TrafficPlanLimit represents network traffic specific limit.
type TrafficPlanLimitUnit ¶
type TrafficPlanLimitUnit string
TrafficPlanLimitUnit represents available units for network traffic specific limit.
const ( // TrafficPlanLimitUnitKiB indicates kibibytes unit. TrafficPlanLimitUnitKiB TrafficPlanLimitUnit = "KiB" // TrafficPlanLimitUnitMiB indicates mebibytes unit. TrafficPlanLimitUnitMiB TrafficPlanLimitUnit = "MiB" // TrafficPlanLimitUnitGiB indicates gibibytes unit. TrafficPlanLimitUnitGiB TrafficPlanLimitUnit = "GiB" // TrafficPlanLimitUnitTiB indicates tebibytes unit. TrafficPlanLimitUnitTiB TrafficPlanLimitUnit = "TiB" // TrafficPlanLimitUnitPiB indicates pebibytes unit. TrafficPlanLimitUnitPiB TrafficPlanLimitUnit = "PiB" )
type UnitPlanLimit ¶
type UnitPlanLimit struct {
IsEnabled bool `json:"is_enabled"`
Limit int `json:"limit"`
Unit PlanLimitUnit `json:"unit"`
}
UnitPlanLimit represents generic units limit.
type UsageResource ¶
type UsageResource struct {
Type string `json:"type"`
Description string `json:"description"`
Quantity float64 `json:"quantity"`
QuantityDescriptor string `json:"quantity_descriptor"`
Tokens int `json:"tokens"`
TokensPerHour int `json:"tokens_per_hour"`
TokensPerMonth int `json:"tokens_per_month"`
}
UsageResource represents detailed usage information.
type UsageResourceCollection ¶
type UsageResourceCollection struct {
UserID int `json:"user_id"`
BillingUserID *int `json:"billing_user_id"`
Resources []ServerUsageResource `json:"resources"`
}
UsageResourceCollection represents usage statistics grouped by user.
type UsageResponse ¶
type UsageResponse struct {
Data []UsageResourceCollection `json:"data"`
// contains filtered or unexported fields
}
UsageResponse represents paginated usage statistics response.
type UsageService ¶
type UsageService service
UsageService handles all available methods with usage statistics.
func (*UsageService) Get ¶
func (s *UsageService) Get(ctx context.Context, filter *FilterUsage) (UsageResponse, error)
Get retrieves usage statistics.
type User ¶
type User struct {
ID int `json:"id"`
Email string `json:"email"`
Password string `json:"password"`
// CreatedAt for date in RFC3339Nano format
CreatedAt string `json:"created_at"`
Status UserStatus `json:"status"`
Roles []Role `json:"roles"`
BillingUserID int `json:"billing_user_id"`
BillingToken string `json:"billing_token"`
}
User represents a user.
type UserCreateRequest ¶
type UserCreateRequest struct {
Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"`
Status string `json:"status,omitempty"`
LanguageID int `json:"language_id,omitempty"`
Roles []int `json:"roles,omitempty"`
LimitGroupID int `json:"limit_group_id,omitempty"`
BillingUserID int `json:"billing_user_id,omitempty"`
BillingToken string `json:"billing_token,omitempty"`
}
UserCreateRequest represents available properties for creating a new user.
type UserStatus ¶
type UserStatus string
UserStatus represents available user's statuses.
const ( // UserStatusActive indicates user is active. UserStatusActive UserStatus = "active" // UserStatusLocked indicates user is locked. UserStatusLocked UserStatus = "locked" // UserStatusSuspended indicates user is suspended. UserStatusSuspended UserStatus = "suspended" )
type UserUpdateRequest ¶
type UserUpdateRequest struct {
Password string `json:"password,omitempty"`
Status string `json:"status,omitempty"`
LanguageID int `json:"language_id,omitempty"`
Roles []int `json:"roles,omitempty"`
}
UserUpdateRequest represents available properties for updating exists user.
type UsersResponse ¶
type UsersResponse struct {
Data []User `json:"data"`
// contains filtered or unexported fields
}
UsersResponse represents paginated list of users. This cursor can be used for iterating over all available users.
func (*UsersResponse) Err ¶
func (r *UsersResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*UsersResponse) Next ¶
func (r *UsersResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type UsersService ¶
type UsersService service
UsersService handles all available methods with users.
func (*UsersService) Create ¶
func (s *UsersService) Create(ctx context.Context, data UserCreateRequest) (User, error)
Create creates new user.
func (*UsersService) Delete ¶
func (s *UsersService) Delete(ctx context.Context, id int) error
Delete deletes specified user.
func (*UsersService) List ¶
func (s *UsersService) List(ctx context.Context, filter *FilterUsers) (UsersResponse, error)
List lists users.
func (*UsersService) Update ¶
func (s *UsersService) Update(ctx context.Context, id int, data UserUpdateRequest) (User, error)
Update updates specified user.
type VPCNetwork ¶
type VPCNetwork struct {
ID int `json:"id"`
Name string `json:"name"`
ListType VPCNetworkListType `json:"list_type"`
From string `json:"from"`
To string `json:"to"`
Netmask string `json:"netmask"`
Location ShortLocation `json:"location"`
User User `json:"user"`
}
VPCNetwork represents a VPC network.
type VPCNetworkAttachRequest ¶
type VPCNetworkAttachRequest struct {
ServerIDs []int `json:"servers_ids"`
}
VPCNetworkAttachRequest represents a request to attach VPC network to servers.
type VPCNetworkCreateRequest ¶
type VPCNetworkCreateRequest struct {
Name string `json:"name"`
ListType VPCNetworkListType `json:"list_type"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
Netmask string `json:"netmask"`
LocationID int `json:"location_id"`
UserID null.Int `json:"user_id,omitempty"`
}
VPCNetworkCreateRequest represents available properties for creating a new VPC network.
type VPCNetworkDetachRequest ¶
type VPCNetworkDetachRequest struct {
ServerIDs []int `json:"servers_ids"`
}
VPCNetworkDetachRequest represents a request to detach VPC network from servers.
type VPCNetworkIP ¶
type VPCNetworkIP struct {
ID int `json:"id"`
IP string `json:"ip"`
Server VirtualServer `json:"server"`
VPCNetwork ShortVPCNetwork `json:"vpc_network"`
}
VPCNetworkIP represents an IP address in a VPC network.
type VPCNetworkIPAddRequest ¶
type VPCNetworkIPAddRequest struct {
IP string `json:"ip"`
}
VPCNetworkIPAddRequest represents a request to add a single IP to VPC network.
type VPCNetworkIPsAddRequest ¶
type VPCNetworkIPsAddRequest struct {
IPs []string `json:"ips"`
}
VPCNetworkIPsAddRequest represents a request to add multiple IPs to VPC network.
type VPCNetworkIPsResponse ¶
type VPCNetworkIPsResponse struct {
Data []VPCNetworkIP `json:"data"`
// contains filtered or unexported fields
}
VPCNetworkIPsResponse represents paginated list of VPC network IPs.
func (*VPCNetworkIPsResponse) Err ¶
func (r *VPCNetworkIPsResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*VPCNetworkIPsResponse) Next ¶
func (r *VPCNetworkIPsResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type VPCNetworkListType ¶
type VPCNetworkListType string
VPCNetworkListType represents available list types for VPC networks.
const ( // VPCNetworkListTypeRange indicates a range-based IP list. VPCNetworkListTypeRange VPCNetworkListType = "range" // VPCNetworkListTypeSet indicates a set-based IP list. VPCNetworkListTypeSet VPCNetworkListType = "set" )
type VPCNetworkUpdateRequest ¶
type VPCNetworkUpdateRequest struct {
Name string `json:"name"`
ListType VPCNetworkListType `json:"list_type"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
Netmask string `json:"netmask"`
UserID null.Int `json:"user_id,omitempty"`
}
VPCNetworkUpdateRequest represents available properties for updating an existing VPC network.
type VPCNetworksResponse ¶
type VPCNetworksResponse struct {
Data []VPCNetwork `json:"data"`
// contains filtered or unexported fields
}
VPCNetworksResponse represents paginated list of VPC networks. This cursor can be used for iterating over all available VPC networks.
func (*VPCNetworksResponse) Err ¶
func (r *VPCNetworksResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*VPCNetworksResponse) Next ¶
func (r *VPCNetworksResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type VPCNetworksService ¶
type VPCNetworksService service
VPCNetworksService handles all available methods with VPC networks.
func (*VPCNetworksService) AddIP ¶
func (s *VPCNetworksService) AddIP(ctx context.Context, id int, data VPCNetworkIPAddRequest) (VPCNetworkIP, error)
AddIP adds a single IP address to VPC network.
func (*VPCNetworksService) AddIPs ¶
func (s *VPCNetworksService) AddIPs(ctx context.Context, id int, data VPCNetworkIPsAddRequest) error
AddIPs adds multiple IP addresses to VPC network.
func (*VPCNetworksService) Attach ¶
func (s *VPCNetworksService) Attach(ctx context.Context, id int, data VPCNetworkAttachRequest) error
Attach attaches VPC network to servers.
func (*VPCNetworksService) Create ¶
func (s *VPCNetworksService) Create(ctx context.Context, data VPCNetworkCreateRequest) (VPCNetwork, error)
Create creates new VPC network.
func (*VPCNetworksService) Delete ¶
func (s *VPCNetworksService) Delete(ctx context.Context, id int) error
Delete deletes specified VPC network.
func (*VPCNetworksService) DeleteIP ¶
func (s *VPCNetworksService) DeleteIP(ctx context.Context, vpcNetworkID, ipID int) error
DeleteIP deletes specified IP address from VPC network.
func (*VPCNetworksService) Detach ¶
func (s *VPCNetworksService) Detach(ctx context.Context, id int, data VPCNetworkDetachRequest) error
Detach detaches VPC network from servers.
func (*VPCNetworksService) Get ¶
func (s *VPCNetworksService) Get(ctx context.Context, id int) (VPCNetwork, error)
Get gets specified VPC network.
func (*VPCNetworksService) List ¶
func (s *VPCNetworksService) List(ctx context.Context, filter *FilterVPCNetworks) (VPCNetworksResponse, error)
List lists VPC networks.
func (*VPCNetworksService) ListIPs ¶
func (s *VPCNetworksService) ListIPs(ctx context.Context, id int) (VPCNetworkIPsResponse, error)
ListIPs lists IP addresses in VPC network.
func (*VPCNetworksService) Update ¶
func (s *VPCNetworksService) Update(ctx context.Context, id int, data VPCNetworkUpdateRequest) (VPCNetwork, error)
Update updates specified VPC network.
type VirtualServer ¶
type VirtualServer struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
VirtualizationType VirtualizationType `json:"virtualization_type"`
UUID string `json:"uuid"`
Specifications VirtualServerSpecifications `json:"specifications"`
Status VirtualServerStatus `json:"status"`
IPs []IPBlockIPAddress `json:"ips"`
Location Location `json:"location"`
Plan Plan `json:"plan"`
FQDNs []string `json:"fqdns"`
BootMode BootMode `json:"boot_mode"`
IsSuspended bool `json:"is_suspended"`
IsProcessing bool `json:"is_processing"`
User User `json:"user"`
Project Project `json:"project"`
Usage VirtualServerUsage `json:"usage"`
BackupSettings VirtualServerBackupSettings `json:"backup_settings"`
NextScheduledBackupAt string `json:"next_scheduled_backup_at"`
SSHKeys []SSHKey `json:"ssh_keys"`
ComputeResource ShortComputeResource `json:"compute_resource"`
Settings VirtualServerSettings `json:"settings"`
CreatedAt string `json:"created_at"`
}
VirtualServer represents a virtual server.
type VirtualServerBackupSettings ¶
type VirtualServerBackupSettings struct {
Enabled bool `json:"enabled,omitempty"`
Schedule VirtualServerBackupSettingsSchedule `json:"schedule,omitempty"`
Limit UnitPlanLimit `json:"limit,omitempty"`
}
VirtualServerBackupSettings represents virtual server backup settings.
type VirtualServerBackupSettingsSchedule ¶
type VirtualServerBackupSettingsSchedule struct {
Type VirtualServerBackupSettingsScheduleType `json:"type"`
Time VirtualServerBackupSettingsScheduleTime `json:"time"`
Days []int `json:"days,omitempty"`
}
VirtualServerBackupSettingsSchedule represents virtual server backup settings schedule.
type VirtualServerBackupSettingsScheduleTime ¶
type VirtualServerBackupSettingsScheduleTime struct {
Hour int `json:"hour"`
Minutes int `json:"minutes"`
}
VirtualServerBackupSettingsScheduleTime represents backup settings schedule time.
type VirtualServerBackupSettingsScheduleType ¶
type VirtualServerBackupSettingsScheduleType string
VirtualServerBackupSettingsScheduleType represents available server backup scheduling types.
const ( // ServerBackupSettingsScheduleTypeMonthly indicates backing up every month. ServerBackupSettingsScheduleTypeMonthly VirtualServerBackupSettingsScheduleType = "monthly" // ServerBackupSettingsScheduleTypeWeekly indicates backing up every week. ServerBackupSettingsScheduleTypeWeekly VirtualServerBackupSettingsScheduleType = "weekly" // ServerBackupSettingsScheduleTypeDaily indicates backing up every day. ServerBackupSettingsScheduleTypeDaily VirtualServerBackupSettingsScheduleType = "daily" )
type VirtualServerCreateRequest ¶
type VirtualServerCreateRequest struct {
Name string `json:"name"`
BootMode BootMode `json:"boot_mode"`
Description string `json:"description,omitempty"`
UserData string `json:"user_data,omitempty"`
FQDNs []string `json:"fqdns,omitempty"`
Password string `json:"password,omitempty"`
SSHKeys []int `json:"ssh_keys"`
PlanID int `json:"plan,omitempty"`
CustomPlan *Plan `json:"custom_plan,omitempty"`
ProjectID int `json:"project"`
LocationID int `json:"location"`
ComputeResourceID int `json:"compute_resource,omitempty"`
OSImageVersionID int `json:"os,omitempty"`
ApplicationID int `json:"application,omitempty"`
ApplicationData map[string]interface{} `json:"applicationData,omitempty"`
AdditionalDisks []AdditionalDiskCreateRequest `json:"additional_disks,omitempty"`
PrimaryIP *string `json:"primary_ip,omitempty"`
IPTypes []IPVersion `json:"ip_types,omitempty"`
AdditionalIPCount *int `json:"additional_ip_count,omitempty"`
AdditionalIPv6Count *int `json:"additional_ipv6_count,omitempty"`
MacAddress *string `json:"mac_address,omitempty"`
Firmware *Firmware `json:"firmware,omitempty"`
}
type VirtualServerPatchRequest ¶
type VirtualServerPatchRequest struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
UserData *string `json:"user_data,omitempty"`
FQDNs *[]string `json:"fqdns,omitempty"`
BootMode *BootMode `json:"boot_mode,omitempty"`
// BackupSettings replaces the entire backup configuration. When non-nil,
// provide a complete block with a valid schedule and limit, even to disable backups.
BackupSettings *VirtualServerBackupSettings `json:"backup_settings,omitempty"`
}
VirtualServerPatchRequest distinguishes omitted fields from explicit empty values. User data changes update stored initialization data; they do not rerun cloud-init. The API rejects empty user data; use nil to leave it unchanged.
func (VirtualServerPatchRequest) MarshalJSON ¶
func (r VirtualServerPatchRequest) MarshalJSON() ([]byte, error)
MarshalJSON includes enabled=false when a complete backup block is provided. The existing VirtualServerUpdateRequest encoding is retained for compatibility.
type VirtualServerResizeRequest ¶
type VirtualServerResizeRequest struct {
PreserveDisk bool `json:"preserve_disk"`
PlanID int `json:"plan_id"`
BackupSettings *VirtualServerBackupSettings `json:"backup_settings,omitempty"`
}
type VirtualServerSettings ¶
type VirtualServerSettings struct {
MacAddress string `json:"mac_address"`
Firmware Firmware `json:"firmware"`
DiskCacheMode DiskCacheMode `json:"disk_cache_mode"`
DiskDriver DiskDriver `json:"disk_driver"`
}
VirtualServerSettings contains the persistent hardware settings returned by GET servers/{id}.
type VirtualServerSpecifications ¶
type VirtualServerSpecifications struct {
Disk int `json:"disk"`
RAM int `json:"ram"`
VCPU int `json:"vcpu"`
}
VirtualServerSpecifications represent virtual server specification.
type VirtualServerStatus ¶
type VirtualServerStatus string
VirtualServerStatus represents available virtual server statuses.
const ( // VirtualServerStatusNotExists indicates virtual server didn't exists. VirtualServerStatusNotExists VirtualServerStatus = "not exists" // VirtualServerStatusProcessing indicates some action is performed right now // on a virtual server. VirtualServerStatusProcessing VirtualServerStatus = "processing" // VirtualServerStatusStarted indicates virtual server is started. VirtualServerStatusStarted VirtualServerStatus = "started" // VirtualServerStatusStopped indicates virtual server is stopped. VirtualServerStatusStopped VirtualServerStatus = "stopped" // VirtualServerStatusPaused indicates virtual server is paused. VirtualServerStatusPaused VirtualServerStatus = "paused" // This may happen due to some problem with a compute resource or a server. VirtualServerStatusUnavailable VirtualServerStatus = "unavailable" )
type VirtualServerStopRequest ¶
type VirtualServerStopRequest struct {
Force bool `json:"force,omitempty"`
}
VirtualServerStopRequest represents the request body for stopping a virtual server.
type VirtualServerUpdateRequest ¶
type VirtualServerUpdateRequest struct {
Name string `json:"name,omitempty"`
BootMode BootMode `json:"boot_mode,omitempty"`
Description string `json:"description,omitempty"`
UserData string `json:"user_data,omitempty"`
FQDNs []string `json:"fqdns,omitempty"`
BackupSettings *VirtualServerBackupSettings `json:"backup_settings,omitempty"`
}
VirtualServerUpdateRequest represents available properties for updating an existing virtual server.
type VirtualServerUpdateSettingsRequest ¶
type VirtualServerUpdateSettingsRequest struct {
DiskCacheMode DiskCacheMode `json:"disk_cache_mode,omitempty"`
DiskDriver DiskDriver `json:"disk_driver,omitempty"`
Firmware Firmware `json:"firmware,omitempty" `
}
VirtualServerUpdateSettingsRequest represents available settings for updating an existing virtual server.
type VirtualServerUsage ¶
type VirtualServerUsage struct {
CPU float64 `json:"cpu"`
}
VirtualServerUsage represent virtual server usage.
type VirtualServersResponse ¶
type VirtualServersResponse struct {
Data []VirtualServer `json:"data"`
// contains filtered or unexported fields
}
VirtualServersResponse represents paginated list of servers. This cursor can be used for iterating over all available server.
func (*VirtualServersResponse) Err ¶
func (r *VirtualServersResponse) Err() error
Err return an error which is occurred during fetching next page data.
func (*VirtualServersResponse) Next ¶
func (r *VirtualServersResponse) Next(ctx context.Context) bool
Next using for iterating through all data entities.
Examples:
ctx, cancelFunc := context.WithTimeout(context.Background(), 30 * time.Second)
defer cancelFunc()
for {
for _, datum := range resp.Data {
doSmthWithDatum(datum)
}
if !resp.Next(ctx) {
break
}
}
if resp.Err() != nil {
handleAnError(resp.Err())
}
type VirtualServersService ¶
type VirtualServersService service
VirtualServersService handles all available methods with virtual servers.
func (*VirtualServersService) Create ¶
func (s *VirtualServersService) Create(ctx context.Context, data VirtualServerCreateRequest) (VirtualServer, error)
Create creates virtual server.
func (*VirtualServersService) Get ¶
func (s *VirtualServersService) Get(ctx context.Context, id int) (VirtualServer, error)
Get gets specified virtual server.
func (*VirtualServersService) List ¶
func (s *VirtualServersService) List( ctx context.Context, filter *FilterVirtualServers, ) (VirtualServersResponse, error)
List lists virtual servers.
func (*VirtualServersService) Patch ¶
func (s *VirtualServersService) Patch( ctx context.Context, id int, data VirtualServerUpdateRequest, ) (VirtualServer, error)
Patch patches specified virtual server.
func (*VirtualServersService) PatchFields ¶
func (s *VirtualServersService) PatchFields(ctx context.Context, id int, data VirtualServerPatchRequest) (VirtualServer, error)
PatchFields updates the specified top-level fields. Description and FQDNs can be cleared with an empty string and an empty slice. UserData cannot be cleared. BackupSettings replaces the entire backup block rather than merging its fields.
func (*VirtualServersService) Resize ¶
func (s *VirtualServersService) Resize(ctx context.Context, id int, data VirtualServerResizeRequest) (Task, error)
Resize resizes specified virtual server.
func (*VirtualServersService) SnapshotsCreate ¶
func (s *VirtualServersService) SnapshotsCreate(ctx context.Context, vmID int, data SnapshotRequest) (Snapshot, error)
SnapshotsCreate creates a snapshot for the specified virtual server.
func (*VirtualServersService) StopWithRequest ¶
func (s *VirtualServersService) StopWithRequest(ctx context.Context, id int, req VirtualServerStopRequest) (Task, error)
StopWithRequest stops specified virtual server with additional options.
func (*VirtualServersService) UpdateSettings
deprecated
func (s *VirtualServersService) UpdateSettings( ctx context.Context, id int, data VirtualServerUpdateSettingsRequest, ) (VirtualServer, error)
UpdateSettings updates specified virtual server settings.
Deprecated: use UpdateSettingsTask. This endpoint returns a task, not a server.
func (*VirtualServersService) UpdateSettingsTask ¶
func (s *VirtualServersService) UpdateSettingsTask(ctx context.Context, id int, data VirtualServerUpdateSettingsRequest) (Task, error)
UpdateSettingsTask updates hardware settings and returns the asynchronous task. UpdateSettings is retained for compatibility with existing callers.
type VirtualizationType ¶
type VirtualizationType string
VirtualizationType represents available virtualization types.
const ( // VirtualizationTypeKVM indicates KVM virtualization type. VirtualizationTypeKVM VirtualizationType = "kvm" // VirtualizationTypeVZ indicates VZ virtualization type. VirtualizationTypeVZ VirtualizationType = "vz" )
Source Files
¶
- account.go
- activityLogs.go
- activityLogs_gen.go
- additionalDisks.go
- apiTokens.go
- apiTokensFilter.go
- apiTokens_gen.go
- applications.go
- applications_gen.go
- authLogin.go
- backupNodes.go
- backups.go
- client.go
- computeResource.go
- computeResource_gen.go
- computeResourcesFilter.go
- computeResourcesInstallSteps.go
- computeResourcesServers.go
- computeResourcesSettings.go
- computeResourcesStorage.go
- errors.go
- filter.go
- icons.go
- iconsFilter.go
- icons_gen.go
- ipBlocks.go
- ipBlocksFilter.go
- ipBlocks_gen.go
- isoImages.go
- isoImagesFilter.go
- isoImages_gen.go
- languages.go
- languagesFilter.go
- languages_gen.go
- license.go
- limitGroup.go
- locations.go
- locationsFilter.go
- locations_gen.go
- logger.go
- offers.go
- osImageVersions.go
- osImages.go
- osImagesFilter.go
- osImages_gen.go
- permissions.go
- permissions_gen.go
- plans.go
- plansFilter.go
- plans_gen.go
- projectServers.go
- projectServers_gen.go
- projects.go
- projectsFilter.go
- projects_gen.go
- request.go
- response.go
- roles.go
- roles_gen.go
- serversMigrations.go
- settings.go
- snapshots.go
- sshKeys.go
- sshKeysFilter.go
- sshKeys_gen.go
- storage.go
- storageTags.go
- storageTypes.go
- tasks.go
- tasksFilter.go
- tasks_gen.go
- usage.go
- usageFilter.go
- users.go
- usersFilter.go
- users_gen.go
- virtual_servers.go
- virtual_serversFilter.go
- virtual_servers_gen.go
- vpcNetworks.go
- vpcNetworksFilter.go
- vpcNetworks_gen.go