core

package
v0.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 11 Imported by: 2

Documentation

Overview

Package katapult is a client for katapult.io's API.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAddressListEntryNotFound                   = fmt.Errorf("%w: address_list_entry_not_found", katapult.ErrResourceNotFound)
	ErrAddressListNotFound                        = fmt.Errorf("%w: address_list_not_found", katapult.ErrResourceNotFound)
	ErrCertificateNotFound                        = fmt.Errorf("%w: certificate_not_found", katapult.ErrResourceNotFound)
	ErrCountryNotFound                            = fmt.Errorf("%w: country_not_found", katapult.ErrResourceNotFound)
	ErrCountryStateNotFound                       = fmt.Errorf("%w: country_state_not_found", katapult.ErrResourceNotFound)
	ErrCurrencyNotFound                           = fmt.Errorf("%w: currency_not_found", katapult.ErrResourceNotFound)
	ErrDNSRecordNotFound                          = fmt.Errorf("%w: dns_record_not_found", katapult.ErrResourceNotFound)
	ErrDNSZoneNotFound                            = fmt.Errorf("%w: dns_zone_not_found", katapult.ErrResourceNotFound)
	ErrDNSZoneNotVerified                         = fmt.Errorf("%w: dns_zone_not_verified", katapult.ErrUnprocessableEntity)
	ErrDataCenterNotFound                         = fmt.Errorf("%w: data_center_not_found", katapult.ErrResourceNotFound)
	ErrDeletionRestricted                         = fmt.Errorf("%w: deletion_restricted", katapult.ErrConflict)
	ErrDiskBackupPolicyNotFound                   = fmt.Errorf("%w: disk_backup_policy_not_found", katapult.ErrResourceNotFound)
	ErrDiskNotFound                               = fmt.Errorf("%w: disk_not_found", katapult.ErrResourceNotFound)
	ErrDiskTemplateNotFound                       = fmt.Errorf("%w: disk_template_not_found", katapult.ErrResourceNotFound)
	ErrDiskTemplateVersionNotFound                = fmt.Errorf("%w: disk_template_version_not_found", katapult.ErrResourceNotFound)
	ErrFileStorageVolumeNotFound                  = fmt.Errorf("%w: file_storage_volume_not_found", katapult.ErrResourceNotFound)
	ErrFlexibleResourcesUnavailableToOrganization = fmt.Errorf("%w: flexible_resources_unavailable_to_organization", katapult.ErrForbidden)
	ErrGPUTypeNotFound                            = fmt.Errorf("%w: gpu_type_not_found", katapult.ErrResourceNotFound)
	ErrIPAddressNotFound                          = fmt.Errorf("%w: ip_address_not_found", katapult.ErrResourceNotFound)
	ErrIPAlreadyAllocated                         = fmt.Errorf("%w: ip_already_allocated", katapult.ErrUnprocessableEntity)
	ErrIdentityNotLinkedToWebSession              = fmt.Errorf("%w: identity_not_linked_to_web_session", katapult.ErrBadRequest)
	ErrInterfaceNotFound                          = fmt.Errorf("%w: interface_not_found", katapult.ErrResourceNotFound)
	ErrInvalidAPIToken                            = fmt.Errorf("%w: invalid_api_token", katapult.ErrForbidden)
	ErrInvalidIP                                  = fmt.Errorf("%w: invalid_ip", katapult.ErrUnprocessableEntity)
	ErrInvalidSpecXML                             = fmt.Errorf("%w: invalid_spec_xml", katapult.ErrBadRequest)
	ErrInvalidTimestamp                           = fmt.Errorf("%w: invalid_timestamp", katapult.ErrBadRequest)
	ErrLoadBalancerNotFound                       = fmt.Errorf("%w: load_balancer_not_found", katapult.ErrResourceNotFound)
	ErrLoadBalancerRuleNotFound                   = fmt.Errorf("%w: load_balancer_rule_not_found", katapult.ErrResourceNotFound)
	ErrLocationRequired                           = fmt.Errorf("%w: location_required", katapult.ErrUnprocessableEntity)
	ErrMissingAPIToken                            = fmt.Errorf("%w: missing_api_token", katapult.ErrBadRequest)
	ErrNetworkNotFound                            = fmt.Errorf("%w: network_not_found", katapult.ErrResourceNotFound)
	ErrNetworkSpeedProfileNotFound                = fmt.Errorf("%w: network_speed_profile_not_found", katapult.ErrResourceNotFound)
	ErrNoAllocation                               = fmt.Errorf("%w: no_allocation", katapult.ErrUnprocessableEntity)
	ErrNoAvailableAddresses                       = fmt.Errorf("%w: no_available_addresses", katapult.ErrServiceUnavailable)
	ErrNoInterfaceAvailable                       = fmt.Errorf("%w: no_interface_available", katapult.ErrUnprocessableEntity)
	ErrNoUserAssociatedWithIdentity               = fmt.Errorf("%w: no_user_associated_with_identity", katapult.ErrResourceNotFound)
	ErrNoVirtualMachineForAPIToken                = fmt.Errorf("%w: no_virtual_machine_for_api_token", katapult.ErrResourceNotFound)
	ErrObjectInTrash                              = fmt.Errorf("%w: object_in_trash", katapult.ErrNotAcceptable)
	ErrOperatingSystemNotFound                    = fmt.Errorf("%w: operating_system_not_found", katapult.ErrResourceNotFound)
	ErrOrganizationLimitReached                   = fmt.Errorf("%w: organization_limit_reached", katapult.ErrUnprocessableEntity)
	ErrOrganizationNotActivated                   = fmt.Errorf("%w: organization_not_activated", katapult.ErrForbidden)
	ErrOrganizationNotFound                       = fmt.Errorf("%w: organization_not_found", katapult.ErrResourceNotFound)
	ErrOrganizationSuspended                      = fmt.Errorf("%w: organization_suspended", katapult.ErrForbidden)
	ErrPermissionDenied                           = fmt.Errorf("%w: permission_denied", katapult.ErrForbidden)
	ErrRateLimitReached                           = fmt.Errorf("%w: rate_limit_reached", katapult.ErrTooManyRequests)
	ErrResourceCreationRestricted                 = fmt.Errorf("%w: resource_creation_restricted", katapult.ErrForbidden)
	ErrResourceDoesNotSupportUnallocation         = fmt.Errorf("%w: resource_does_not_support_unallocation", katapult.ErrConflict)
	ErrSSHKeyNotFound                             = fmt.Errorf("%w: ssh_key_not_found", katapult.ErrResourceNotFound)
	ErrSecurityGroupNotFound                      = fmt.Errorf("%w: security_group_not_found", katapult.ErrResourceNotFound)
	ErrSecurityGroupRuleNotFound                  = fmt.Errorf("%w: security_group_rule_not_found", katapult.ErrResourceNotFound)
	ErrSpeedProfileAlreadyAssigned                = fmt.Errorf("%w: speed_profile_already_assigned", katapult.ErrUnprocessableEntity)
	ErrTagNotFound                                = fmt.Errorf("%w: tag_not_found", katapult.ErrResourceNotFound)
	ErrTaskNotFound                               = fmt.Errorf("%w: task_not_found", katapult.ErrResourceNotFound)
	ErrTaskQueueingError                          = fmt.Errorf("%w: task_queueing_error", katapult.ErrNotAcceptable)
	ErrTrashObjectNotFound                        = fmt.Errorf("%w: trash_object_not_found", katapult.ErrResourceNotFound)
	ErrUnauthorizedNetworkForAPIToken             = fmt.Errorf("%w: unauthorized_network_for_api_token", katapult.ErrForbidden)
	ErrValidationError                            = fmt.Errorf("%w: validation_error", katapult.ErrUnprocessableEntity)
	ErrVirtualMachineBuildNotFound                = fmt.Errorf("%w: build_not_found", katapult.ErrResourceNotFound)
	ErrVirtualMachineGroupNotFound                = fmt.Errorf("%w: virtual_machine_group_not_found", katapult.ErrResourceNotFound)
	ErrVirtualMachineMustBeStarted                = fmt.Errorf("%w: virtual_machine_must_be_started", katapult.ErrNotAcceptable)
	ErrVirtualMachineNetworkInterfaceNotFound     = fmt.Errorf("%w: virtual_machine_network_interface_not_found", katapult.ErrResourceNotFound)
	ErrVirtualMachineNotFound                     = fmt.Errorf("%w: virtual_machine_not_found", katapult.ErrResourceNotFound)
	ErrVirtualMachinePackageNotFound              = fmt.Errorf("%w: package_not_found", katapult.ErrResourceNotFound)
	ErrZoneNotFound                               = fmt.Errorf("%w: zone_not_found", katapult.ErrResourceNotFound)
)
View Source
var Err = fmt.Errorf("%w: core", katapult.Err)
View Source
var (
	NullVirtualMachineGroupRef = &VirtualMachineGroupRef{null: true}
)

Functions

This section is empty.

Types

type AddressListEntryNotFoundError added in v0.2.8

type AddressListEntryNotFoundError struct {
	katapult.CommonError
}

AddressListEntryNotFoundError: No address list entry was found matching any of the criteria provided in the arguments.

func NewAddressListEntryNotFoundError added in v0.2.8

func NewAddressListEntryNotFoundError(theError *katapult.ResponseError) *AddressListEntryNotFoundError

type AddressListNotFoundError added in v0.2.8

type AddressListNotFoundError struct {
	katapult.CommonError
}

AddressListNotFoundError: No address list was found matching any of the criteria provided in the arguments.

func NewAddressListNotFoundError added in v0.2.8

func NewAddressListNotFoundError(theError *katapult.ResponseError) *AddressListNotFoundError

type Attachment

type Attachment struct {
	URL      string `json:"url,omitempty"`
	FileName string `json:"file_name,omitempty"`
	FileType string `json:"file_type,omitempty"`
	FileSize int64  `json:"file_size,omitempty"`
	Digest   string `json:"digest,omitempty"`
	Token    string `json:"token,omitempty"`
}

type AuthSSHKey added in v0.1.6

type AuthSSHKey struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Fingerprint string `json:"fingerprint,omitempty"`
}

type AuthSSHKeyProperties added in v0.1.6

type AuthSSHKeyProperties struct {
	// Name is the SSH keys name.
	Name string `json:"name"`

	// Key is the SSH public key.
	Key string `json:"key"`
}

type Certificate

type Certificate struct {
	ID                  string               `json:"id,omitempty"`
	Name                string               `json:"name,omitempty"`
	AdditionalNames     []string             `json:"additional_names,omitempty"`
	Issuer              string               `json:"issuer,omitempty"`
	State               string               `json:"state,omitempty"`
	CreatedAt           *timestamp.Timestamp `json:"created_at,omitempty"`
	ExpiresAt           *timestamp.Timestamp `json:"expires_at,omitempty"`
	LastIssuedAt        *timestamp.Timestamp `json:"last_issued_at,omitempty"`
	IssueError          string               `json:"issue_error,omitempty"`
	AuthorizationMethod string               `json:"authorization_method,omitempty"`
	CertificateAPIURL   string               `json:"certificate_api_url,omitempty"`
	Certificate         string               `json:"certificate,omitempty"`
	Chain               string               `json:"chain,omitempty"`
	PrivateKey          string               `json:"private_key,omitempty"`
}

func (*Certificate) Ref added in v0.1.3

func (c *Certificate) Ref() CertificateRef

type CertificateNotFoundError added in v0.1.5

type CertificateNotFoundError struct {
	katapult.CommonError
}

CertificateNotFoundError: No certificate was found matching any of the criteria provided in the arguments.

func NewCertificateNotFoundError added in v0.1.5

func NewCertificateNotFoundError(theError *katapult.ResponseError) *CertificateNotFoundError

type CertificateRef added in v0.1.3

type CertificateRef struct {
	ID string `json:"id,omitempty"`
}

type CertificatesClient

type CertificatesClient struct {
	// contains filtered or unexported fields
}

func NewCertificatesClient

func NewCertificatesClient(rm RequestMaker) *CertificatesClient

func (*CertificatesClient) Get

func (s *CertificatesClient) Get(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*Certificate, *katapult.Response, error)

func (*CertificatesClient) GetByID

func (s *CertificatesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*Certificate, *katapult.Response, error)

func (*CertificatesClient) List

func (s *CertificatesClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*Certificate, *katapult.Response, error)

type Client

type Client struct {
	Certificates                    *CertificatesClient
	DNSZones                        *DNSZonesClient
	DataCenters                     *DataCentersClient
	DiskTemplates                   *DiskTemplatesClient
	FileStorageVolumes              *FileStorageVolumesClient
	IPAddresses                     *IPAddressesClient
	LoadBalancers                   *LoadBalancersClient
	LoadBalancerRules               *LoadBalancerRulesClient
	NetworkSpeedProfiles            *NetworkSpeedProfilesClient
	Networks                        *NetworksClient
	Organizations                   *OrganizationsClient
	SecurityGroups                  *SecurityGroupsClient
	SecurityGroupRules              *SecurityGroupRulesClient
	Tags                            *TagsClient
	SSHKeys                         *SSHKeysClient
	Tasks                           *TasksClient
	TrashObjects                    *TrashObjectsClient
	VirtualMachineBuilds            *VirtualMachineBuildsClient
	VirtualMachineGroups            *VirtualMachineGroupsClient
	VirtualMachineNetworkInterfaces *VirtualMachineNetworkInterfacesClient
	VirtualMachinePackages          *VirtualMachinePackagesClient
	VirtualMachines                 *VirtualMachinesClient
}

func New

func New(rm RequestMaker) *Client

type Country

type Country struct {
	ID       string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	ISOCode2 string `json:"iso_code2,omitempty"`
	ISOCode3 string `json:"iso_code3,omitempty"`
	TimeZone string `json:"time_zone,omitempty"`
	EU       bool   `json:"eu,omitempty"`
}

type CountryNotFoundError added in v0.1.5

type CountryNotFoundError struct {
	katapult.CommonError
}

CountryNotFoundError: No country was found matching any of the criteria provided in the arguments.

func NewCountryNotFoundError added in v0.1.5

func NewCountryNotFoundError(theError *katapult.ResponseError) *CountryNotFoundError

type CountryState

type CountryState struct {
	ID      string   `json:"id,omitempty"`
	Name    string   `json:"name,omitempty"`
	Code    string   `json:"code,omitempty"`
	Country *Country `json:"country,omitempty"`
}

type CountryStateNotFoundError added in v0.1.5

type CountryStateNotFoundError struct {
	katapult.CommonError
}

CountryStateNotFoundError: No country state was found matching any of the criteria provided in the arguments.

func NewCountryStateNotFoundError added in v0.1.5

func NewCountryStateNotFoundError(theError *katapult.ResponseError) *CountryStateNotFoundError

type Currency

type Currency struct {
	ID      string `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	ISOCode string `json:"iso_code,omitempty"`
	Symbol  string `json:"symbol,omitempty"`
}

type CurrencyNotFoundError added in v0.1.5

type CurrencyNotFoundError struct {
	katapult.CommonError
}

CurrencyNotFoundError: No currency was found matching any of the criteria provided in the arguments.

func NewCurrencyNotFoundError added in v0.1.5

func NewCurrencyNotFoundError(theError *katapult.ResponseError) *CurrencyNotFoundError

type DNSRecordNotFoundError added in v0.1.5

type DNSRecordNotFoundError struct {
	katapult.CommonError
}

DNSRecordNotFoundError: No DNS record was found matching any of the criteria provided in the arguments.

func NewDNSRecordNotFoundError added in v0.1.5

func NewDNSRecordNotFoundError(theError *katapult.ResponseError) *DNSRecordNotFoundError

type DNSZone

type DNSZone struct {
	ID         string `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	DefaultTTL int    `json:"default_ttl,omitempty"`
	Verified   bool   `json:"verified,omitempty"`
}

func (*DNSZone) Ref added in v0.1.0

func (s *DNSZone) Ref() DNSZoneRef

type DNSZoneCreateArguments added in v0.2.0

type DNSZoneCreateArguments struct {
	Name       string `json:"name"`
	DefaultTTL int    `json:"default_ttl,omitempty"`
}

type DNSZoneNotFoundError added in v0.1.5

type DNSZoneNotFoundError struct {
	katapult.CommonError
}

DNSZoneNotFoundError: No DNS zone was found matching any of the criteria provided in the arguments.

func NewDNSZoneNotFoundError added in v0.1.5

func NewDNSZoneNotFoundError(theError *katapult.ResponseError) *DNSZoneNotFoundError

type DNSZoneNotVerifiedError added in v0.1.5

type DNSZoneNotVerifiedError struct {
	katapult.CommonError
}

DNSZoneNotVerifiedError: The DNS zone could not be verified, check the nameservers are set correctly.

func NewDNSZoneNotVerifiedError added in v0.1.5

func NewDNSZoneNotVerifiedError(theError *katapult.ResponseError) *DNSZoneNotVerifiedError

type DNSZoneRef added in v0.1.0

type DNSZoneRef struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type DNSZoneUpdateArguments added in v0.2.0

type DNSZoneUpdateArguments struct {
	Name       string `json:"name"`
	DefaultTTL int    `json:"default_ttl,omitempty"`
}

type DNSZonesClient

type DNSZonesClient struct {
	// contains filtered or unexported fields
}

func NewDNSZonesClient

func NewDNSZonesClient(rm RequestMaker) *DNSZonesClient

func (*DNSZonesClient) Create

func (s *DNSZonesClient) Create(
	ctx context.Context,
	org OrganizationRef,
	args *DNSZoneCreateArguments,
	reqOpts ...katapult.RequestOption,
) (*DNSZone, *katapult.Response, error)

func (*DNSZonesClient) Delete

func (s *DNSZonesClient) Delete(
	ctx context.Context,
	zone DNSZoneRef,
	reqOpts ...katapult.RequestOption,
) (*bool, *katapult.Response, error)

func (*DNSZonesClient) Get

func (s *DNSZonesClient) Get(
	ctx context.Context,
	ref DNSZoneRef,
	reqOpts ...katapult.RequestOption,
) (*DNSZone, *katapult.Response, error)

func (*DNSZonesClient) GetByID

func (s *DNSZonesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*DNSZone, *katapult.Response, error)

func (*DNSZonesClient) GetByName

func (s *DNSZonesClient) GetByName(
	ctx context.Context,
	name string,
	reqOpts ...katapult.RequestOption,
) (*DNSZone, *katapult.Response, error)

func (*DNSZonesClient) List

func (s *DNSZonesClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*DNSZone, *katapult.Response, error)

func (*DNSZonesClient) Nameservers added in v0.2.0

func (s *DNSZonesClient) Nameservers(
	ctx context.Context,
	org OrganizationRef,
	reqOpts ...katapult.RequestOption,
) ([]string, *katapult.Response, error)

func (*DNSZonesClient) Update added in v0.2.0

func (s *DNSZonesClient) Update(
	ctx context.Context,
	zone DNSZoneRef,
	args *DNSZoneUpdateArguments,
	reqOpts ...katapult.RequestOption,
) (*DNSZone, *katapult.Response, error)

func (*DNSZonesClient) Verify

func (s *DNSZonesClient) Verify(
	ctx context.Context,
	ref DNSZoneRef,
	reqOpts ...katapult.RequestOption,
) (*DNSZone, *katapult.Response, error)

type DataCenter

type DataCenter struct {
	ID        string   `json:"id,omitempty"`
	Name      string   `json:"name,omitempty"`
	Permalink string   `json:"permalink,omitempty"`
	Country   *Country `json:"country,omitempty"`
}

func (*DataCenter) Ref added in v0.1.0

func (dc *DataCenter) Ref() DataCenterRef

type DataCenterNotFoundError added in v0.1.5

type DataCenterNotFoundError struct {
	katapult.CommonError
}

DataCenterNotFoundError: No data center was found matching any of the criteria provided in the arguments.

func NewDataCenterNotFoundError added in v0.1.5

func NewDataCenterNotFoundError(theError *katapult.ResponseError) *DataCenterNotFoundError

type DataCenterRef added in v0.1.0

type DataCenterRef struct {
	ID        string `json:"id,omitempty"`
	Permalink string `json:"permalink,omitempty"`
}

DataCenterRef refers to a single data center. Only one field should be set.

type DataCentersClient

type DataCentersClient struct {
	// contains filtered or unexported fields
}

func NewDataCentersClient

func NewDataCentersClient(rm RequestMaker) *DataCentersClient

func (*DataCentersClient) DefaultNetwork added in v0.1.1

func (s *DataCentersClient) DefaultNetwork(
	ctx context.Context,
	ref DataCenterRef,
	reqOpts ...katapult.RequestOption,
) (*Network, *katapult.Response, error)

func (*DataCentersClient) Get

func (s *DataCentersClient) Get(
	ctx context.Context,
	ref DataCenterRef,
	reqOpts ...katapult.RequestOption,
) (*DataCenter, *katapult.Response, error)

func (*DataCentersClient) GetByID

func (s *DataCentersClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*DataCenter, *katapult.Response, error)
func (s *DataCentersClient) GetByPermalink(
	ctx context.Context,
	permalink string,
	reqOpts ...katapult.RequestOption,
) (*DataCenter, *katapult.Response, error)

func (*DataCentersClient) List

func (s *DataCentersClient) List(
	ctx context.Context,
	reqOpts ...katapult.RequestOption,
) ([]*DataCenter, *katapult.Response, error)

type DeletionRestrictedError added in v0.1.6

type DeletionRestrictedError struct {
	katapult.CommonError
	Detail *DeletionRestrictedErrorDetail `json:"detail,omitempty"`
}

DeletionRestrictedError: Object cannot be deleted.

func NewDeletionRestrictedError added in v0.1.6

func NewDeletionRestrictedError(theError *katapult.ResponseError) *DeletionRestrictedError

type DeletionRestrictedErrorDetail added in v0.1.6

type DeletionRestrictedErrorDetail struct {
	Errors []string `json:"errors,omitempty"`
}

type DiskBackupPolicyNotFoundError added in v0.1.5

type DiskBackupPolicyNotFoundError struct {
	katapult.CommonError
}

DiskBackupPolicyNotFoundError: No disk backup policy was found matching any of the criteria provided in the arguments.

func NewDiskBackupPolicyNotFoundError added in v0.1.5

func NewDiskBackupPolicyNotFoundError(theError *katapult.ResponseError) *DiskBackupPolicyNotFoundError

type DiskNotFoundError added in v0.1.5

type DiskNotFoundError struct {
	katapult.CommonError
}

DiskNotFoundError: No disk was found matching any of the criteria provided in the arguments.

func NewDiskNotFoundError added in v0.1.5

func NewDiskNotFoundError(theError *katapult.ResponseError) *DiskNotFoundError

type DiskTemplate

type DiskTemplate struct {
	ID              string               `json:"id,omitempty"`
	Name            string               `json:"name,omitempty"`
	Description     string               `json:"description,omitempty"`
	Permalink       string               `json:"permalink,omitempty"`
	Universal       bool                 `json:"universal,omitempty"`
	LatestVersion   *DiskTemplateVersion `json:"latest_version,omitempty"`
	OperatingSystem *OperatingSystem     `json:"operating_system,omitempty"`
}

func (*DiskTemplate) Ref added in v0.1.0

func (dt *DiskTemplate) Ref() DiskTemplateRef

type DiskTemplateListOptions

type DiskTemplateListOptions struct {
	IncludeUniversal bool
	Page             int
	PerPage          int
}

type DiskTemplateNotFoundError added in v0.1.5

type DiskTemplateNotFoundError struct {
	katapult.CommonError
}

DiskTemplateNotFoundError: No disk template was found matching any of the criteria provided in the arguments.

func NewDiskTemplateNotFoundError added in v0.1.5

func NewDiskTemplateNotFoundError(theError *katapult.ResponseError) *DiskTemplateNotFoundError

type DiskTemplateOption

type DiskTemplateOption struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type DiskTemplateRef added in v0.1.0

type DiskTemplateRef struct {
	ID        string `json:"id,omitempty"`
	Permalink string `json:"permalink,omitempty"`
}

type DiskTemplateVersion

type DiskTemplateVersion struct {
	ID       string `json:"id,omitempty"`
	Number   int    `json:"number,omitempty"`
	Stable   bool   `json:"stable,omitempty"`
	SizeInGB int    `json:"size_in_gb,omitempty"`
}

type DiskTemplateVersionNotFoundError added in v0.1.5

type DiskTemplateVersionNotFoundError struct {
	katapult.CommonError
}

DiskTemplateVersionNotFoundError: No disk template version was found matching any of the criteria provided in the arguments.

func NewDiskTemplateVersionNotFoundError added in v0.1.5

func NewDiskTemplateVersionNotFoundError(theError *katapult.ResponseError) *DiskTemplateVersionNotFoundError

type DiskTemplatesClient

type DiskTemplatesClient struct {
	// contains filtered or unexported fields
}

func NewDiskTemplatesClient

func NewDiskTemplatesClient(rm RequestMaker) *DiskTemplatesClient

func (*DiskTemplatesClient) Get

func (s *DiskTemplatesClient) Get(
	ctx context.Context,
	ref DiskTemplateRef,
	reqOpts ...katapult.RequestOption,
) (*DiskTemplate, *katapult.Response, error)

func (*DiskTemplatesClient) GetByID

func (s *DiskTemplatesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*DiskTemplate, *katapult.Response, error)
func (s *DiskTemplatesClient) GetByPermalink(
	ctx context.Context,
	permalink string,
	reqOpts ...katapult.RequestOption,
) (*DiskTemplate, *katapult.Response, error)

func (*DiskTemplatesClient) List

func (s *DiskTemplatesClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *DiskTemplateListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*DiskTemplate, *katapult.Response, error)

type FieldName

type FieldName int
const (
	AddressField FieldName = iota
	FQDNField
	IDField
	NameField
	ObjectIDField
	PermalinkField
	SubDomainField
)

type FileStorageVolume added in v0.2.1

type FileStorageVolume struct {
	ID           string                 `json:"id,omitempty"`
	Name         string                 `json:"name,omitempty"`
	DataCenter   *DataCenter            `json:"data_center,omitempty"`
	Associations []string               `json:"associations,omitempty"`
	State        FileStorageVolumeState `json:"state,omitempty"`
	NFSLocation  string                 `json:"nfs_location,omitempty"`
	Size         int64                  `json:"size,omitempty"`
}

func (*FileStorageVolume) Ref added in v0.2.1

type FileStorageVolumeCreateArguments added in v0.2.1

type FileStorageVolumeCreateArguments struct {
	Name         string        `json:"name,omitempty"`
	DataCenter   DataCenterRef `json:"data_center,omitempty"`
	Associations []string      `json:"associations,omitempty"`
}

type FileStorageVolumeNotFoundError added in v0.2.1

type FileStorageVolumeNotFoundError struct {
	katapult.CommonError
}

FileStorageVolumeNotFoundError: No file storage volume was found matching any of the criteria provided in the arguments.

func NewFileStorageVolumeNotFoundError added in v0.2.1

func NewFileStorageVolumeNotFoundError(theError *katapult.ResponseError) *FileStorageVolumeNotFoundError

type FileStorageVolumeRef added in v0.2.1

type FileStorageVolumeRef struct {
	ID string `json:"id"`
}

type FileStorageVolumeState added in v0.2.1

type FileStorageVolumeState string
const (
	FileStorageVolumePending     FileStorageVolumeState = "pending"
	FileStorageVolumeFailed      FileStorageVolumeState = "failed"
	FileStorageVolumeReady       FileStorageVolumeState = "ready"
	FileStorageVolumeConfiguring FileStorageVolumeState = "configuring"
)

type FileStorageVolumeUpdateArguments added in v0.2.1

type FileStorageVolumeUpdateArguments struct {
	Name         string    `json:"name,omitempty"`
	Associations *[]string `json:"associations,omitempty"`
}

type FileStorageVolumesClient added in v0.2.1

type FileStorageVolumesClient struct {
	// contains filtered or unexported fields
}

func NewFileStorageVolumesClient added in v0.2.1

func NewFileStorageVolumesClient(rm RequestMaker) *FileStorageVolumesClient

func (*FileStorageVolumesClient) Create added in v0.2.1

func (fsvc *FileStorageVolumesClient) Create(
	ctx context.Context,
	org OrganizationRef,
	args *FileStorageVolumeCreateArguments,
	reqOpts ...katapult.RequestOption,
) (*FileStorageVolume, *katapult.Response, error)

func (*FileStorageVolumesClient) Delete added in v0.2.1

func (fsvc *FileStorageVolumesClient) Delete(
	ctx context.Context,
	ref FileStorageVolumeRef,
	reqOpts ...katapult.RequestOption,
) (*FileStorageVolume, *TrashObject, *katapult.Response, error)

func (*FileStorageVolumesClient) Get added in v0.2.1

func (fsvc *FileStorageVolumesClient) Get(
	ctx context.Context,
	ref FileStorageVolumeRef,
	reqOpts ...katapult.RequestOption,
) (*FileStorageVolume, *katapult.Response, error)

func (*FileStorageVolumesClient) GetByID added in v0.2.1

func (fsvc *FileStorageVolumesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*FileStorageVolume, *katapult.Response, error)

func (*FileStorageVolumesClient) List added in v0.2.1

func (fsvc *FileStorageVolumesClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*FileStorageVolume, *katapult.Response, error)

func (*FileStorageVolumesClient) Update added in v0.2.1

func (fsvc *FileStorageVolumesClient) Update(
	ctx context.Context,
	ref FileStorageVolumeRef,
	args *FileStorageVolumeUpdateArguments,
	reqOpts ...katapult.RequestOption,
) (*FileStorageVolume, *katapult.Response, error)

type FlexibleResourcesUnavailableToOrganizationError added in v0.1.5

type FlexibleResourcesUnavailableToOrganizationError struct {
	katapult.CommonError
}

FlexibleResourcesUnavailableToOrganizationError: The organization is not permitted to use flexible resources.

func NewFlexibleResourcesUnavailableToOrganizationError added in v0.1.5

func NewFlexibleResourcesUnavailableToOrganizationError(theError *katapult.ResponseError) *FlexibleResourcesUnavailableToOrganizationError

type GPUTypeNotFoundError added in v0.2.6

type GPUTypeNotFoundError struct {
	katapult.CommonError
}

GPUTypeNotFoundError: No GPU type was found matching any of the criteria provided in the arguments.

func NewGPUTypeNotFoundError added in v0.2.6

func NewGPUTypeNotFoundError(theError *katapult.ResponseError) *GPUTypeNotFoundError

type HTTPStatuses added in v0.2.2

type HTTPStatuses string
const (
	HTTPStatusesAll2xx             HTTPStatuses = "2"
	HTTPStatusesAll2xxAnd3xx       HTTPStatuses = "23"
	HTTPStatusesAll2xxAnd3xxAnd4xx HTTPStatuses = "234"
)

type IPAddress

type IPAddress struct {
	ID              string   `json:"id,omitempty"`
	Address         string   `json:"address,omitempty"`
	ReverseDNS      string   `json:"reverse_dns,omitempty"`
	VIP             bool     `json:"vip,omitempty"`
	Label           string   `json:"label,omitempty"`
	AddressWithMask string   `json:"address_with_mask,omitempty"`
	Network         *Network `json:"network,omitempty"`
	AllocationID    string   `json:"allocation_id,omitempty"`
	AllocationType  string   `json:"allocation_type,omitempty"`
}

func (*IPAddress) Ref added in v0.1.0

func (s *IPAddress) Ref() IPAddressRef

func (*IPAddress) Version

func (s *IPAddress) Version() IPVersion

type IPAddressCreateArguments

type IPAddressCreateArguments struct {
	Network NetworkRef
	Version IPVersion
	VIP     *bool
	Label   string
}

type IPAddressNotFoundError added in v0.1.5

type IPAddressNotFoundError struct {
	katapult.CommonError
}

IPAddressNotFoundError: No IP addresses were found matching any of the criteria provided in the arguments.

func NewIPAddressNotFoundError added in v0.1.5

func NewIPAddressNotFoundError(theError *katapult.ResponseError) *IPAddressNotFoundError

type IPAddressRef added in v0.1.0

type IPAddressRef struct {
	ID      string `json:"id,omitempty"`
	Address string `json:"address,omitempty"`
}

type IPAddressUpdateArguments

type IPAddressUpdateArguments struct {
	VIP        *bool
	Label      string
	ReverseDNS string
}

type IPAddressesClient

type IPAddressesClient struct {
	// contains filtered or unexported fields
}

func NewIPAddressesClient

func NewIPAddressesClient(rm RequestMaker) *IPAddressesClient

func (*IPAddressesClient) Create

func (s *IPAddressesClient) Create(
	ctx context.Context,
	org OrganizationRef,
	args *IPAddressCreateArguments,
	reqOpts ...katapult.RequestOption,
) (*IPAddress, *katapult.Response, error)

func (*IPAddressesClient) Delete

func (s *IPAddressesClient) Delete(
	ctx context.Context,
	ip IPAddressRef,
	reqOpts ...katapult.RequestOption,
) (*katapult.Response, error)

func (*IPAddressesClient) Get

func (s *IPAddressesClient) Get(
	ctx context.Context,
	ref IPAddressRef,
	reqOpts ...katapult.RequestOption,
) (*IPAddress, *katapult.Response, error)

func (*IPAddressesClient) GetByAddress

func (s *IPAddressesClient) GetByAddress(
	ctx context.Context,
	address string,
	reqOpts ...katapult.RequestOption,
) (*IPAddress, *katapult.Response, error)

func (*IPAddressesClient) GetByID

func (s *IPAddressesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*IPAddress, *katapult.Response, error)

func (*IPAddressesClient) List

func (s *IPAddressesClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*IPAddress, *katapult.Response, error)

func (*IPAddressesClient) Unallocate

func (s *IPAddressesClient) Unallocate(
	ctx context.Context,
	ip IPAddressRef,
	reqOpts ...katapult.RequestOption,
) (*katapult.Response, error)

func (*IPAddressesClient) Update

func (s *IPAddressesClient) Update(
	ctx context.Context,
	ip IPAddressRef,
	args *IPAddressUpdateArguments,
	reqOpts ...katapult.RequestOption,
) (*IPAddress, *katapult.Response, error)

type IPAlreadyAllocatedError added in v0.1.5

type IPAlreadyAllocatedError struct {
	katapult.CommonError
}

IPAlreadyAllocatedError: This IP address has already been allocated to another resource.

func NewIPAlreadyAllocatedError added in v0.1.5

func NewIPAlreadyAllocatedError(theError *katapult.ResponseError) *IPAlreadyAllocatedError

type IPVersion

type IPVersion string
const (
	IPv4 IPVersion = "ipv4"
	IPv6 IPVersion = "ipv6"
)

type ISO

type ISO struct {
	ID              string           `json:"id,omitempty"`
	Name            string           `json:"name,omitempty"`
	OperatingSystem *OperatingSystem `json:"operating_system,omitempty"`
}

type IdentityNotLinkedToWebSessionError added in v0.1.5

type IdentityNotLinkedToWebSessionError struct {
	katapult.CommonError
}

IdentityNotLinkedToWebSessionError: The authenticated identity is not linked to a web session.

func NewIdentityNotLinkedToWebSessionError added in v0.1.5

func NewIdentityNotLinkedToWebSessionError(theError *katapult.ResponseError) *IdentityNotLinkedToWebSessionError

type InterfaceNotFoundError added in v0.1.5

type InterfaceNotFoundError struct {
	katapult.CommonError
}

InterfaceNotFoundError: An interface could not be found for the specified network.

func NewInterfaceNotFoundError added in v0.1.5

func NewInterfaceNotFoundError(theError *katapult.ResponseError) *InterfaceNotFoundError

type InvalidAPITokenError added in v0.2.1

type InvalidAPITokenError struct {
	katapult.CommonError
	Detail *InvalidAPITokenErrorDetail `json:"detail,omitempty"`
}

InvalidAPITokenError: The API token provided was not valid (it may not exist or have expired).

func NewInvalidAPITokenError added in v0.2.1

func NewInvalidAPITokenError(theError *katapult.ResponseError) *InvalidAPITokenError

type InvalidAPITokenErrorDetail added in v0.2.1

type InvalidAPITokenErrorDetail struct {
	Details *string `json:"details,omitempty"`
}

type InvalidIPError added in v0.1.5

type InvalidIPError struct {
	katapult.CommonError
}

InvalidIPError: This IP address is not valid for this network interface.

func NewInvalidIPError added in v0.1.5

func NewInvalidIPError(theError *katapult.ResponseError) *InvalidIPError

type InvalidSpecXMLError added in v0.1.5

type InvalidSpecXMLError struct {
	katapult.CommonError
	Detail *InvalidSpecXMLErrorDetail `json:"detail,omitempty"`
}

InvalidSpecXMLError: The spec XML provided is invalid.

func NewInvalidSpecXMLError added in v0.1.5

func NewInvalidSpecXMLError(theError *katapult.ResponseError) *InvalidSpecXMLError

func (*InvalidSpecXMLError) Error added in v0.1.5

func (s *InvalidSpecXMLError) Error() string

type InvalidSpecXMLErrorDetail added in v0.1.5

type InvalidSpecXMLErrorDetail struct {
	Errors string `json:"errors,omitempty"`
}

type InvalidTimestampError added in v0.2.1

type InvalidTimestampError struct {
	katapult.CommonError
}

InvalidTimestampError: Timestamp must be at least 5 minutes in the future. If you want to delete something immediately, you use can use the delete endpoint.

func NewInvalidTimestampError added in v0.2.1

func NewInvalidTimestampError(theError *katapult.ResponseError) *InvalidTimestampError

type ListOptions

type ListOptions struct {
	Page    int
	PerPage int
}

type LoadBalancer

type LoadBalancer struct {
	ID                    string       `json:"id,omitempty"`
	Name                  string       `json:"name,omitempty"`
	ResourceType          ResourceType `json:"resource_type,omitempty"`
	ResourceIDs           []string     `json:"resource_ids,omitempty"`
	IPAddress             *IPAddress   `json:"ip_address,omitempty"`
	HTTPSRedirect         bool         `json:"https_redirect,omitempty"`
	BackendCertificate    string       `json:"backend_certificate,omitempty"`
	BackendCertificateKey string       `json:"backend_certificate_key,omitempty"`
	DataCenter            *DataCenter  `json:"-"`
}

func (*LoadBalancer) Ref added in v0.1.0

func (lb *LoadBalancer) Ref() LoadBalancerRef

type LoadBalancerCreateArguments

type LoadBalancerCreateArguments struct {
	DataCenter    DataCenterRef `json:"data_center"`
	Name          string        `json:"name,omitempty"`
	ResourceType  ResourceType  `json:"resource_type,omitempty"`
	ResourceIDs   *[]string     `json:"resource_ids,omitempty"`
	HTTPSRedirect *bool         `json:"https_redirect,omitempty"`
}

type LoadBalancerNotFoundError added in v0.1.5

type LoadBalancerNotFoundError struct {
	katapult.CommonError
}

LoadBalancerNotFoundError: No load balancer was found matching any of the criteria provided in the arguments.

func NewLoadBalancerNotFoundError added in v0.1.5

func NewLoadBalancerNotFoundError(theError *katapult.ResponseError) *LoadBalancerNotFoundError

type LoadBalancerRef added in v0.1.0

type LoadBalancerRef struct {
	ID string `json:"id,omitempty"`
}

LoadBalancerRef allows a reference to a load balancer.

type LoadBalancerRule

type LoadBalancerRule struct {
	ID                string                    `json:"id,omitempty"`
	Algorithm         LoadBalancerRuleAlgorithm `json:"algorithm,omitempty"`
	DestinationPort   int                       `json:"destination_port,omitempty"`
	ListenPort        int                       `json:"listen_port,omitempty"`
	Protocol          Protocol                  `json:"protocol,omitempty"`
	ProxyProtocol     bool                      `json:"proxy_protocol,omitempty"`
	Certificates      []Certificate             `json:"certificates,omitempty"`
	BackendSSL        bool                      `json:"backend_ssl,omitempty"`
	PassthroughSSL    bool                      `json:"passthrough_ssl,omitempty"`
	CheckEnabled      bool                      `json:"check_enabled,omitempty"`
	CheckFall         int                       `json:"check_fall,omitempty"`
	CheckInterval     int                       `json:"check_interval,omitempty"`
	CheckPath         string                    `json:"check_path,omitempty"`
	CheckProtocol     Protocol                  `json:"check_protocol,omitempty"`
	CheckRise         int                       `json:"check_rise,omitempty"`
	CheckTimeout      int                       `json:"check_timeout,omitempty"`
	CheckHTTPStatuses HTTPStatuses              `json:"check_http_statuses,omitempty"`
	LoadBalancer      *LoadBalancerRef          `json:"load_balancer,omitempty"`
}

func (*LoadBalancerRule) Ref added in v0.1.0

type LoadBalancerRuleAlgorithm

type LoadBalancerRuleAlgorithm string
const (
	RoundRobinRuleAlgorithm       LoadBalancerRuleAlgorithm = "round_robin"
	LeastConnectionsRuleAlgorithm LoadBalancerRuleAlgorithm = "least_connections"
	StickyRuleAlgorithm           LoadBalancerRuleAlgorithm = "sticky"
)

type LoadBalancerRuleArguments

type LoadBalancerRuleArguments struct {
	Algorithm         LoadBalancerRuleAlgorithm `json:"algorithm,omitempty"`
	DestinationPort   int                       `json:"destination_port,omitempty"`
	ListenPort        int                       `json:"listen_port,omitempty"`
	Protocol          Protocol                  `json:"protocol,omitempty"`
	ProxyProtocol     *bool                     `json:"proxy_protocol,omitempty"`
	BackendSSL        *bool                     `json:"backend_ssl,omitempty"`
	PassthroughSSL    *bool                     `json:"passthrough_ssl,omitempty"`
	Certificates      *[]CertificateRef         `json:"certificates,omitempty"`
	CheckEnabled      *bool                     `json:"check_enabled,omitempty"`
	CheckFall         int                       `json:"check_fall,omitempty"`
	CheckInterval     int                       `json:"check_interval,omitempty"`
	CheckPath         string                    `json:"check_path,omitempty"`
	CheckProtocol     Protocol                  `json:"check_protocol,omitempty"`
	CheckRise         int                       `json:"check_rise,omitempty"`
	CheckTimeout      int                       `json:"check_timeout,omitempty"`
	CheckHTTPStatuses HTTPStatuses              `json:"check_http_statuses,omitempty"`
}

type LoadBalancerRuleNotFoundError added in v0.1.5

type LoadBalancerRuleNotFoundError struct {
	katapult.CommonError
}

LoadBalancerRuleNotFoundError: No load balancer rule was found matching any of the criteria provided in the arguments.

func NewLoadBalancerRuleNotFoundError added in v0.1.5

func NewLoadBalancerRuleNotFoundError(theError *katapult.ResponseError) *LoadBalancerRuleNotFoundError

type LoadBalancerRuleRef added in v0.1.0

type LoadBalancerRuleRef struct {
	ID string `json:"id,omitempty"`
}

type LoadBalancerRulesClient

type LoadBalancerRulesClient struct {
	// contains filtered or unexported fields
}

func NewLoadBalancerRulesClient

func NewLoadBalancerRulesClient(rm RequestMaker) *LoadBalancerRulesClient

NewLoadBalancerRulesClient returns a new LoadBalancerRulesClient for interacting with LoadBalancer Rules.

func (*LoadBalancerRulesClient) Create

func (s *LoadBalancerRulesClient) Create(
	ctx context.Context,
	lb LoadBalancerRef,
	args *LoadBalancerRuleArguments,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancerRule, *katapult.Response, error)

func (*LoadBalancerRulesClient) Delete

func (s *LoadBalancerRulesClient) Delete(
	ctx context.Context,
	ref LoadBalancerRuleRef,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancerRule, *katapult.Response, error)

func (*LoadBalancerRulesClient) Get added in v0.1.0

func (s *LoadBalancerRulesClient) Get(
	ctx context.Context,
	ref LoadBalancerRuleRef,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancerRule, *katapult.Response, error)

func (*LoadBalancerRulesClient) GetByID added in v0.1.0

func (s *LoadBalancerRulesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancerRule, *katapult.Response, error)

func (*LoadBalancerRulesClient) List

func (s *LoadBalancerRulesClient) List(
	ctx context.Context,
	lb LoadBalancerRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*LoadBalancerRule, *katapult.Response, error)

List returns LoadBalancer Rules for the specified LoadBalancer.

func (*LoadBalancerRulesClient) Update

func (s *LoadBalancerRulesClient) Update(
	ctx context.Context,
	ref LoadBalancerRuleRef,
	args *LoadBalancerRuleArguments,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancerRule, *katapult.Response, error)

type LoadBalancerUpdateArguments

type LoadBalancerUpdateArguments struct {
	Name          string       `json:"name,omitempty"`
	ResourceType  ResourceType `json:"resource_type,omitempty"`
	ResourceIDs   *[]string    `json:"resource_ids,omitempty"`
	HTTPSRedirect *bool        `json:"https_redirect,omitempty"`
}

type LoadBalancersClient

type LoadBalancersClient struct {
	// contains filtered or unexported fields
}

func NewLoadBalancersClient

func NewLoadBalancersClient(rm RequestMaker) *LoadBalancersClient

func (*LoadBalancersClient) Create

func (s *LoadBalancersClient) Create(
	ctx context.Context,
	org OrganizationRef,
	args *LoadBalancerCreateArguments,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancer, *katapult.Response, error)

func (*LoadBalancersClient) Delete

func (s *LoadBalancersClient) Delete(
	ctx context.Context,
	lb LoadBalancerRef,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancer, *katapult.Response, error)

func (*LoadBalancersClient) Get

func (s *LoadBalancersClient) Get(
	ctx context.Context,
	ref LoadBalancerRef,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancer, *katapult.Response, error)

func (*LoadBalancersClient) GetByID

func (s *LoadBalancersClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancer, *katapult.Response, error)

func (*LoadBalancersClient) List

func (s *LoadBalancersClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*LoadBalancer, *katapult.Response, error)

func (*LoadBalancersClient) Update

func (s *LoadBalancersClient) Update(
	ctx context.Context,
	lb LoadBalancerRef,
	args *LoadBalancerUpdateArguments,
	reqOpts ...katapult.RequestOption,
) (*LoadBalancer, *katapult.Response, error)

type LocationRequiredError added in v0.1.5

type LocationRequiredError struct {
	katapult.CommonError
}

LocationRequiredError: A zone or a data_center argument must be provided.

func NewLocationRequiredError added in v0.1.5

func NewLocationRequiredError(theError *katapult.ResponseError) *LocationRequiredError

type MissingAPITokenError added in v0.2.1

type MissingAPITokenError struct {
	katapult.CommonError
}

MissingAPITokenError: No API token was provided in the Authorization header. Ensure a token is provided prefixed with Bearer.

func NewMissingAPITokenError added in v0.2.1

func NewMissingAPITokenError(theError *katapult.ResponseError) *MissingAPITokenError

type Network

type Network struct {
	ID         string      `json:"id,omitempty"`
	Name       string      `json:"name,omitempty"`
	Permalink  string      `json:"permalink,omitempty"`
	DataCenter *DataCenter `json:"data_center,omitempty"`
}

func (*Network) Ref added in v0.1.0

func (s *Network) Ref() NetworkRef

type NetworkNotFoundError added in v0.1.5

type NetworkNotFoundError struct {
	katapult.CommonError
}

NetworkNotFoundError: No network was found matching any of the criteria provided in the arguments.

func NewNetworkNotFoundError added in v0.1.5

func NewNetworkNotFoundError(theError *katapult.ResponseError) *NetworkNotFoundError

type NetworkRef added in v0.1.0

type NetworkRef struct {
	ID        string `json:"id,omitempty"`
	Permalink string `json:"permalink,omitempty"`
}

type NetworkSpeedProfile

type NetworkSpeedProfile struct {
	ID                  string `json:"id,omitempty"`
	Name                string `json:"name,omitempty"`
	UploadSpeedInMbit   int    `json:"upload_speed_in_mbit,omitempty"`
	DownloadSpeedInMbit int    `json:"download_speed_in_mbit,omitempty"`
	Permalink           string `json:"permalink,omitempty"`
}

func (*NetworkSpeedProfile) Ref added in v0.1.0

type NetworkSpeedProfileNotFoundError added in v0.1.5

type NetworkSpeedProfileNotFoundError struct {
	katapult.CommonError
}

NetworkSpeedProfileNotFoundError: No network speed profile was found matching any of the criteria provided in the arguments.

func NewNetworkSpeedProfileNotFoundError added in v0.1.5

func NewNetworkSpeedProfileNotFoundError(theError *katapult.ResponseError) *NetworkSpeedProfileNotFoundError

type NetworkSpeedProfileRef added in v0.1.0

type NetworkSpeedProfileRef struct {
	ID        string `json:"id,omitempty"`
	Permalink string `json:"permalink,omitempty"`
}

type NetworkSpeedProfilesClient

type NetworkSpeedProfilesClient struct {
	// contains filtered or unexported fields
}

func NewNetworkSpeedProfilesClient

func NewNetworkSpeedProfilesClient(
	rm RequestMaker,
) *NetworkSpeedProfilesClient

func (*NetworkSpeedProfilesClient) List

func (s *NetworkSpeedProfilesClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*NetworkSpeedProfile, *katapult.Response, error)

type NetworksClient

type NetworksClient struct {
	// contains filtered or unexported fields
}

func NewNetworksClient

func NewNetworksClient(rm RequestMaker) *NetworksClient

func (*NetworksClient) Get

func (s *NetworksClient) Get(
	ctx context.Context,
	ref NetworkRef,
	reqOpts ...katapult.RequestOption,
) (*Network, *katapult.Response, error)

func (*NetworksClient) GetByID

func (s *NetworksClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*Network, *katapult.Response, error)
func (s *NetworksClient) GetByPermalink(
	ctx context.Context,
	permalink string,
	reqOpts ...katapult.RequestOption,
) (*Network, *katapult.Response, error)

func (*NetworksClient) List

func (s *NetworksClient) List(
	ctx context.Context,
	org OrganizationRef,
	reqOpts ...katapult.RequestOption,
) ([]*Network, []*VirtualNetwork, *katapult.Response, error)

type NoAllocationError added in v0.1.5

type NoAllocationError struct {
	katapult.CommonError
}

NoAllocationError: This IP address is not currently allocated to any object, and cannot be unallocated.

func NewNoAllocationError added in v0.1.5

func NewNoAllocationError(theError *katapult.ResponseError) *NoAllocationError

type NoAvailableAddressesError added in v0.1.5

type NoAvailableAddressesError struct {
	katapult.CommonError
}

NoAvailableAddressesError: Our pool of addresses for that version seems to have run dry. If this issue continues, please contact support.

func NewNoAvailableAddressesError added in v0.1.5

func NewNoAvailableAddressesError(theError *katapult.ResponseError) *NoAvailableAddressesError

type NoInterfaceAvailableError added in v0.1.5

type NoInterfaceAvailableError struct {
	katapult.CommonError
}

NoInterfaceAvailableError: This virtual machine does not have a network interface that is compatible with the provided IP address.

func NewNoInterfaceAvailableError added in v0.1.5

func NewNoInterfaceAvailableError(theError *katapult.ResponseError) *NoInterfaceAvailableError

type NoUserAssociatedWithIdentityError added in v0.1.5

type NoUserAssociatedWithIdentityError struct {
	katapult.CommonError
}

NoUserAssociatedWithIdentityError: There is no user associated with this API token.

func NewNoUserAssociatedWithIdentityError added in v0.1.5

func NewNoUserAssociatedWithIdentityError(theError *katapult.ResponseError) *NoUserAssociatedWithIdentityError

type NoVirtualMachineForAPITokenError added in v0.2.6

type NoVirtualMachineForAPITokenError struct {
	katapult.CommonError
}

NoVirtualMachineForAPITokenError: No virtual machine was found for the provided API token.

func NewNoVirtualMachineForAPITokenError added in v0.2.6

func NewNoVirtualMachineForAPITokenError(theError *katapult.ResponseError) *NoVirtualMachineForAPITokenError

type ObjectInTrashError added in v0.1.5

type ObjectInTrashError struct {
	katapult.CommonError
	Detail *ObjectInTrashErrorDetail `json:"detail,omitempty"`
}

ObjectInTrashError: The object found is in the trash and therefore cannot be manipulated through the API. It should be restored in order to run this operation.

func NewObjectInTrashError added in v0.1.5

func NewObjectInTrashError(theError *katapult.ResponseError) *ObjectInTrashError

func (*ObjectInTrashError) Error added in v0.1.5

func (s *ObjectInTrashError) Error() string

type ObjectInTrashErrorDetail added in v0.1.5

type ObjectInTrashErrorDetail struct {
	TrashObject *TrashObject `json:"trash_object,omitempty"`
}

type OperatingSystem

type OperatingSystem struct {
	ID    string      `json:"id,omitempty"`
	Name  string      `json:"name,omitempty"`
	Badge *Attachment `json:"badge,omitempty"`
}

type OperatingSystemNotFoundError added in v0.1.5

type OperatingSystemNotFoundError struct {
	katapult.CommonError
}

OperatingSystemNotFoundError: No operating system was found matching any of the criteria provided in the arguments.

func NewOperatingSystemNotFoundError added in v0.1.5

func NewOperatingSystemNotFoundError(theError *katapult.ResponseError) *OperatingSystemNotFoundError

type Organization

type Organization struct {
	ID                   string               `json:"id,omitempty"`
	Name                 string               `json:"name,omitempty"`
	SubDomain            string               `json:"sub_domain,omitempty"`
	InfrastructureDomain string               `json:"infrastructure_domain,omitempty"`
	Personal             bool                 `json:"personal,omitempty"`
	CreatedAt            *timestamp.Timestamp `json:"created_at,omitempty"`
	Suspended            bool                 `json:"suspended,omitempty"`
	Managed              bool                 `json:"managed,omitempty"`
	BillingName          string               `json:"billing_name,omitempty"`
	Address1             string               `json:"address1,omitempty"`
	Address2             string               `json:"address2,omitempty"`
	Address3             string               `json:"address3,omitempty"`
	Address4             string               `json:"address4,omitempty"`
	Postcode             string               `json:"postcode,omitempty"`
	VatNumber            string               `json:"vat_number,omitempty"`
	Currency             *Currency            `json:"currency,omitempty"`
	Country              *Country             `json:"country,omitempty"`
	CountryState         *CountryState        `json:"country_state,omitempty"`
}

func (*Organization) Ref added in v0.1.0

func (o *Organization) Ref() OrganizationRef

type OrganizationLimitReachedError added in v0.1.5

type OrganizationLimitReachedError struct {
	katapult.CommonError
}

OrganizationLimitReachedError: The maxmium number of organizations that can be created has been reached.

func NewOrganizationLimitReachedError added in v0.1.5

func NewOrganizationLimitReachedError(theError *katapult.ResponseError) *OrganizationLimitReachedError

type OrganizationManagedArguments

type OrganizationManagedArguments struct {
	Name      string
	SubDomain string
}

type OrganizationNotActivatedError added in v0.1.5

type OrganizationNotActivatedError struct {
	katapult.CommonError
}

OrganizationNotActivatedError: An organization was found from the arguments provided but it wasn't activated yet.

func NewOrganizationNotActivatedError added in v0.1.5

func NewOrganizationNotActivatedError(theError *katapult.ResponseError) *OrganizationNotActivatedError

type OrganizationNotFoundError added in v0.1.5

type OrganizationNotFoundError struct {
	katapult.CommonError
}

OrganizationNotFoundError: No organization was found matching any of the criteria provided in the arguments.

func NewOrganizationNotFoundError added in v0.1.5

func NewOrganizationNotFoundError(theError *katapult.ResponseError) *OrganizationNotFoundError

type OrganizationRef added in v0.1.0

type OrganizationRef struct {
	ID        string `json:"id,omitempty"`
	SubDomain string `json:"sub_domain,omitempty"`
}

type OrganizationSuspendedError added in v0.1.5

type OrganizationSuspendedError struct {
	katapult.CommonError
}

OrganizationSuspendedError: An organization was found from the arguments provided but it was suspended.

func NewOrganizationSuspendedError added in v0.1.5

func NewOrganizationSuspendedError(theError *katapult.ResponseError) *OrganizationSuspendedError

type OrganizationsClient

type OrganizationsClient struct {
	// contains filtered or unexported fields
}

func NewOrganizationsClient

func NewOrganizationsClient(rm RequestMaker) *OrganizationsClient

func (*OrganizationsClient) CreateManaged

func (s *OrganizationsClient) CreateManaged(
	ctx context.Context,
	parent OrganizationRef,
	args *OrganizationManagedArguments,
	reqOpts ...katapult.RequestOption,
) (*Organization, *katapult.Response, error)

func (*OrganizationsClient) Get

func (s *OrganizationsClient) Get(
	ctx context.Context,
	ref OrganizationRef,
	reqOpts ...katapult.RequestOption,
) (*Organization, *katapult.Response, error)

func (*OrganizationsClient) GetByID

func (s *OrganizationsClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*Organization, *katapult.Response, error)

func (*OrganizationsClient) GetBySubDomain

func (s *OrganizationsClient) GetBySubDomain(
	ctx context.Context,
	subDomain string,
	reqOpts ...katapult.RequestOption,
) (*Organization, *katapult.Response, error)

func (*OrganizationsClient) List

func (s *OrganizationsClient) List(
	ctx context.Context,
	reqOpts ...katapult.RequestOption,
) ([]*Organization, *katapult.Response, error)

type PermissionDeniedError added in v0.1.5

type PermissionDeniedError struct {
	katapult.CommonError
	Detail *PermissionDeniedErrorDetail `json:"detail,omitempty"`
}

PermissionDeniedError: The authenticated identity is not permitted to perform this action.

func NewPermissionDeniedError added in v0.1.5

func NewPermissionDeniedError(theError *katapult.ResponseError) *PermissionDeniedError

func (*PermissionDeniedError) Error added in v0.1.5

func (s *PermissionDeniedError) Error() string

type PermissionDeniedErrorDetail added in v0.1.5

type PermissionDeniedErrorDetail struct {
	Details *string `json:"details,omitempty"`
}

type Protocol

type Protocol string
const (
	HTTPSProtocol Protocol = "HTTPS"
	TCPProtocol   Protocol = "TCP"
	HTTPProtocol  Protocol = "HTTP"
)

type RateLimitReachedError added in v0.1.5

type RateLimitReachedError struct {
	katapult.CommonError
	Detail *RateLimitReachedErrorDetail `json:"detail,omitempty"`
}

RateLimitReachedError: You have reached the rate limit for this type of request.

func NewRateLimitReachedError added in v0.1.5

func NewRateLimitReachedError(theError *katapult.ResponseError) *RateLimitReachedError

func (*RateLimitReachedError) Error added in v0.1.5

func (s *RateLimitReachedError) Error() string

type RateLimitReachedErrorDetail added in v0.1.5

type RateLimitReachedErrorDetail struct {
	TotalPermitted int `json:"total_permitted,omitempty"`
}

type RequestMaker

type RequestMaker interface {
	Do(
		ctx context.Context,
		req *katapult.Request,
		v interface{},
	) (*katapult.Response, error)
}

RequestMaker represents something that the API Clients can use to create and submit a request.

type ResourceCreationRestrictedError added in v0.1.5

type ResourceCreationRestrictedError struct {
	katapult.CommonError
	Detail *ResourceCreationRestrictedErrorDetail `json:"detail,omitempty"`
}

ResourceCreationRestrictedError: The organization chosen is not permitted to create resources.

func NewResourceCreationRestrictedError added in v0.1.5

func NewResourceCreationRestrictedError(theError *katapult.ResponseError) *ResourceCreationRestrictedError

func (*ResourceCreationRestrictedError) Error added in v0.1.5

type ResourceCreationRestrictedErrorDetail added in v0.1.5

type ResourceCreationRestrictedErrorDetail struct {
	Errors []string `json:"errors,omitempty"`
}

type ResourceDoesNotSupportUnallocationError added in v0.1.5

type ResourceDoesNotSupportUnallocationError struct {
	katapult.CommonError
}

ResourceDoesNotSupportUnallocationError: The resource this IP address belongs to does not allow you to unallocate it.

func NewResourceDoesNotSupportUnallocationError added in v0.1.5

func NewResourceDoesNotSupportUnallocationError(theError *katapult.ResponseError) *ResourceDoesNotSupportUnallocationError

type ResourceType

type ResourceType string
const (
	TagsResourceType                 ResourceType = "tags"
	VirtualMachineGroupsResourceType ResourceType = "virtual_machine_groups"
	VirtualMachinesResourceType      ResourceType = "virtual_machines"
)

type SSHKeyNotFoundError added in v0.1.5

type SSHKeyNotFoundError struct {
	katapult.CommonError
}

SSHKeyNotFoundError: No SSH key was found matching any of the criteria provided in the arguments.

func NewSSHKeyNotFoundError added in v0.1.5

func NewSSHKeyNotFoundError(theError *katapult.ResponseError) *SSHKeyNotFoundError

type SSHKeyRef added in v0.1.6

type SSHKeyRef struct {
	ID string `json:"id"`
}

type SSHKeysClient added in v0.1.6

type SSHKeysClient struct {
	// contains filtered or unexported fields
}

func NewSSHKeysClient added in v0.1.6

func NewSSHKeysClient(rm RequestMaker) *SSHKeysClient

func (*SSHKeysClient) Add added in v0.1.6

func (s *SSHKeysClient) Add(
	ctx context.Context,
	ref OrganizationRef,
	properties AuthSSHKeyProperties,
	reqOpts ...katapult.RequestOption,
) (*AuthSSHKey, *katapult.Response, error)

func (*SSHKeysClient) Delete added in v0.1.6

func (s *SSHKeysClient) Delete(
	ctx context.Context,
	ref SSHKeyRef,
	reqOpts ...katapult.RequestOption,
) (*AuthSSHKey, *katapult.Response, error)

func (*SSHKeysClient) List added in v0.1.6

func (s *SSHKeysClient) List(
	ctx context.Context,
	ref OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*AuthSSHKey, *katapult.Response, error)

type SecurityGroup added in v0.1.5

type SecurityGroup struct {
	ID               string   `json:"id,omitempty"`
	Name             string   `json:"name,omitempty"`
	AllowAllInbound  bool     `json:"allow_all_inbound,omitempty"`
	AllowAllOutbound bool     `json:"allow_all_outbound,omitempty"`
	Associations     []string `json:"associations,omitempty"`
}

func (*SecurityGroup) Ref added in v0.1.5

func (sg *SecurityGroup) Ref() SecurityGroupRef

type SecurityGroupCreateArguments added in v0.1.5

type SecurityGroupCreateArguments struct {
	Name             string    `json:"name,omitempty"`
	Associations     *[]string `json:"associations,omitempty"`
	AllowAllInbound  *bool     `json:"allow_all_inbound,omitempty"`
	AllowAllOutbound *bool     `json:"allow_all_outbound,omitempty"`
}

type SecurityGroupNotFoundError added in v0.1.5

type SecurityGroupNotFoundError struct {
	katapult.CommonError
}

SecurityGroupNotFoundError: No security group was found matching any of the criteria provided in the arguments.

func NewSecurityGroupNotFoundError added in v0.1.5

func NewSecurityGroupNotFoundError(theError *katapult.ResponseError) *SecurityGroupNotFoundError

type SecurityGroupRef added in v0.1.5

type SecurityGroupRef struct {
	ID string `json:"id,omitempty"`
}

allows a reference to a security group.

type SecurityGroupRule added in v0.1.5

type SecurityGroupRule struct {
	ID            string            `json:"id,omitempty"`
	SecurityGroup *SecurityGroupRef `json:"security_group,omitempty"`
	Direction     string            `json:"direction,omitempty"`
	Protocol      string            `json:"protocol,omitempty"`
	Ports         string            `json:"ports,omitempty"`
	Targets       []string          `json:"targets,omitempty"`
	Notes         string            `json:"notes,omitempty"`
}

func (*SecurityGroupRule) Ref added in v0.1.5

type SecurityGroupRuleArguments added in v0.1.5

type SecurityGroupRuleArguments struct {
	Direction string    `json:"direction,omitempty"`
	Protocol  string    `json:"protocol,omitempty"`
	Ports     *string   `json:"ports,omitempty"`
	Targets   *[]string `json:"targets,omitempty"`
	Notes     *string   `json:"notes,omitempty"`
}

type SecurityGroupRuleNotFoundError added in v0.1.5

type SecurityGroupRuleNotFoundError struct {
	katapult.CommonError
}

SecurityGroupRuleNotFoundError: No security group rule was found matching any of the criteria provided in the arguments.

func NewSecurityGroupRuleNotFoundError added in v0.1.5

func NewSecurityGroupRuleNotFoundError(theError *katapult.ResponseError) *SecurityGroupRuleNotFoundError

type SecurityGroupRuleRef added in v0.1.5

type SecurityGroupRuleRef struct {
	ID string `json:"id,omitempty"`
}

type SecurityGroupRulesClient added in v0.1.5

type SecurityGroupRulesClient struct {
	// contains filtered or unexported fields
}

func NewSecurityGroupRulesClient added in v0.1.5

func NewSecurityGroupRulesClient(rm RequestMaker) *SecurityGroupRulesClient

NewSecurityGroupRulesClient returns a new SecurityGroupRulesClient for interacting with SecurityGroup Rules.

func (*SecurityGroupRulesClient) Create added in v0.1.5

func (s *SecurityGroupRulesClient) Create(
	ctx context.Context,
	sg SecurityGroupRef,
	args *SecurityGroupRuleArguments,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroupRule, *katapult.Response, error)

func (*SecurityGroupRulesClient) Delete added in v0.1.5

func (s *SecurityGroupRulesClient) Delete(
	ctx context.Context,
	ref SecurityGroupRuleRef,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroupRule, *katapult.Response, error)

func (*SecurityGroupRulesClient) Get added in v0.1.5

func (s *SecurityGroupRulesClient) Get(
	ctx context.Context,
	ref SecurityGroupRuleRef,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroupRule, *katapult.Response, error)

func (*SecurityGroupRulesClient) GetByID added in v0.1.5

func (s *SecurityGroupRulesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroupRule, *katapult.Response, error)

func (*SecurityGroupRulesClient) List added in v0.1.5

func (s *SecurityGroupRulesClient) List(
	ctx context.Context,
	sg SecurityGroupRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*SecurityGroupRule, *katapult.Response, error)

List returns SecurityGroup Rules for the specified SecurityGroup.

func (*SecurityGroupRulesClient) Update added in v0.1.5

func (s *SecurityGroupRulesClient) Update(
	ctx context.Context,
	ref SecurityGroupRuleRef,
	args *SecurityGroupRuleArguments,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroupRule, *katapult.Response, error)

type SecurityGroupUpdateArguments added in v0.1.5

type SecurityGroupUpdateArguments struct {
	Name             string    `json:"name,omitempty"`
	Associations     *[]string `json:"associations,omitempty"`
	AllowAllInbound  *bool     `json:"allow_all_inbound,omitempty"`
	AllowAllOutbound *bool     `json:"allow_all_outbound,omitempty"`
}

type SecurityGroupsClient added in v0.1.5

type SecurityGroupsClient struct {
	// contains filtered or unexported fields
}

func NewSecurityGroupsClient added in v0.1.5

func NewSecurityGroupsClient(rm RequestMaker) *SecurityGroupsClient

func (*SecurityGroupsClient) Create added in v0.1.5

func (sgc *SecurityGroupsClient) Create(
	ctx context.Context,
	org OrganizationRef,
	args *SecurityGroupCreateArguments,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroup, *katapult.Response, error)

func (*SecurityGroupsClient) Delete added in v0.1.5

func (sgc *SecurityGroupsClient) Delete(
	ctx context.Context,
	sg SecurityGroupRef,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroup, *katapult.Response, error)

func (*SecurityGroupsClient) Get added in v0.1.5

func (sgc *SecurityGroupsClient) Get(
	ctx context.Context,
	ref SecurityGroupRef,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroup, *katapult.Response, error)

func (*SecurityGroupsClient) GetByID added in v0.1.5

func (sgc *SecurityGroupsClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroup, *katapult.Response, error)

func (*SecurityGroupsClient) List added in v0.1.5

func (sgc *SecurityGroupsClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*SecurityGroup, *katapult.Response, error)

func (*SecurityGroupsClient) Update added in v0.1.5

func (sgc *SecurityGroupsClient) Update(
	ctx context.Context,
	sg SecurityGroupRef,
	args *SecurityGroupUpdateArguments,
	reqOpts ...katapult.RequestOption,
) (*SecurityGroup, *katapult.Response, error)

type SpeedProfileAlreadyAssignedError added in v0.1.5

type SpeedProfileAlreadyAssignedError struct {
	katapult.CommonError
}

SpeedProfileAlreadyAssignedError: This network speed profile is already assigned to this virtual machine network interface.

func NewSpeedProfileAlreadyAssignedError added in v0.1.5

func NewSpeedProfileAlreadyAssignedError(theError *katapult.ResponseError) *SpeedProfileAlreadyAssignedError

type Tag

type Tag struct {
	ID        string               `json:"id,omitempty"`
	Name      string               `json:"name,omitempty"`
	Color     string               `json:"color,omitempty"`
	CreatedAt *timestamp.Timestamp `json:"created_at,omitempty"`
}

type TagArguments added in v0.1.6

type TagArguments struct {
	Name  string `json:"name,omitempty"`
	Color string `json:"color,omitempty"`
}

type TagNotFoundError added in v0.1.5

type TagNotFoundError struct {
	katapult.CommonError
}

TagNotFoundError: No tag was found matching any of the criteria provided in the arguments.

func NewTagNotFoundError added in v0.1.5

func NewTagNotFoundError(theError *katapult.ResponseError) *TagNotFoundError

type TagRef added in v0.1.6

type TagRef struct {
	ID string `json:"id"`
}

type TagsClient added in v0.1.6

type TagsClient struct {
	// contains filtered or unexported fields
}

func NewTagsClient added in v0.1.6

func NewTagsClient(rm RequestMaker) *TagsClient

func (*TagsClient) Create added in v0.1.6

func (s *TagsClient) Create(
	ctx context.Context,
	ref OrganizationRef,
	args TagArguments,
	reqOpts ...katapult.RequestOption,
) (*Tag, *katapult.Response, error)

func (*TagsClient) Delete added in v0.1.6

func (s *TagsClient) Delete(
	ctx context.Context,
	ref TagRef,
	reqOpts ...katapult.RequestOption,
) (*Tag, *katapult.Response, error)

func (*TagsClient) Get added in v0.1.6

func (s *TagsClient) Get(
	ctx context.Context,
	ref TagRef,
	reqOpts ...katapult.RequestOption,
) (*Tag, *katapult.Response, error)

func (*TagsClient) List added in v0.1.6

func (s *TagsClient) List(
	ctx context.Context,
	ref OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*Tag, *katapult.Response, error)

func (*TagsClient) Update added in v0.1.6

func (s *TagsClient) Update(
	ctx context.Context,
	ref TagRef,
	args TagArguments,
	reqOpts ...katapult.RequestOption,
) (*Tag, *katapult.Response, error)

type Task

type Task struct {
	ID         string               `json:"id,omitempty"`
	Name       string               `json:"name,omitempty"`
	Status     TaskStatus           `json:"status,omitempty"`
	CreatedAt  *timestamp.Timestamp `json:"created_at,omitempty"`
	StartedAt  *timestamp.Timestamp `json:"started_at,omitempty"`
	FinishedAt *timestamp.Timestamp `json:"finished_at,omitempty"`
	Progress   int                  `json:"progress,omitempty"`
}

type TaskNotFoundError added in v0.1.5

type TaskNotFoundError struct {
	katapult.CommonError
}

TaskNotFoundError: No task was found matching any of the criteria provided in the arguments.

func NewTaskNotFoundError added in v0.1.5

func NewTaskNotFoundError(theError *katapult.ResponseError) *TaskNotFoundError

type TaskQueueingError added in v0.1.5

type TaskQueueingError struct {
	katapult.CommonError
	Detail *TaskQueueingErrorDetail `json:"detail,omitempty"`
}

TaskQueueingError: This error means that a background task that was needed to complete your request could not be queued.

func NewTaskQueueingError added in v0.1.5

func NewTaskQueueingError(theError *katapult.ResponseError) *TaskQueueingError

func (*TaskQueueingError) Error added in v0.1.5

func (s *TaskQueueingError) Error() string

type TaskQueueingErrorDetail added in v0.1.5

type TaskQueueingErrorDetail struct {
	Details string `json:"details,omitempty"`
}

type TaskStatus

type TaskStatus string
const (
	TaskPending   TaskStatus = "pending"
	TaskRunning   TaskStatus = "running"
	TaskCompleted TaskStatus = "completed"
	TaskFailed    TaskStatus = "failed"
)

type TasksClient

type TasksClient struct {
	// contains filtered or unexported fields
}

func NewTasksClient

func NewTasksClient(rm RequestMaker) *TasksClient

func (*TasksClient) Get

func (s *TasksClient) Get(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

type TrashObject

type TrashObject struct {
	ID         string               `json:"id,omitempty"`
	KeepUntil  *timestamp.Timestamp `json:"keep_until,omitempty"`
	ObjectID   string               `json:"object_id,omitempty"`
	ObjectType string               `json:"object_type,omitempty"`
}

func (*TrashObject) Ref added in v0.1.0

func (s *TrashObject) Ref() TrashObjectRef

type TrashObjectNotFoundError added in v0.1.5

type TrashObjectNotFoundError struct {
	katapult.CommonError
}

TrashObjectNotFoundError: No trash object was found matching any of the criteria provided in the arguments.

func NewTrashObjectNotFoundError added in v0.1.5

func NewTrashObjectNotFoundError(theError *katapult.ResponseError) *TrashObjectNotFoundError

type TrashObjectRef added in v0.1.0

type TrashObjectRef struct {
	ID       string `json:"id,omitempty"`
	ObjectID string `json:"object_id,omitempty"`
}

type TrashObjectsClient

type TrashObjectsClient struct {
	// contains filtered or unexported fields
}

func NewTrashObjectsClient

func NewTrashObjectsClient(rm RequestMaker) *TrashObjectsClient

func (*TrashObjectsClient) Get

func (s *TrashObjectsClient) Get(
	ctx context.Context,
	ref TrashObjectRef,
	reqOpts ...katapult.RequestOption,
) (*TrashObject, *katapult.Response, error)

func (*TrashObjectsClient) GetByID

func (s *TrashObjectsClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*TrashObject, *katapult.Response, error)

func (*TrashObjectsClient) GetByObjectID

func (s *TrashObjectsClient) GetByObjectID(
	ctx context.Context,
	objectID string,
	reqOpts ...katapult.RequestOption,
) (*TrashObject, *katapult.Response, error)

func (*TrashObjectsClient) List

func (s *TrashObjectsClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*TrashObject, *katapult.Response, error)

func (*TrashObjectsClient) Purge

func (s *TrashObjectsClient) Purge(
	ctx context.Context,
	ref TrashObjectRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

func (*TrashObjectsClient) PurgeAll

func (s *TrashObjectsClient) PurgeAll(
	ctx context.Context,
	org OrganizationRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

func (*TrashObjectsClient) Restore

func (s *TrashObjectsClient) Restore(
	ctx context.Context,
	ref TrashObjectRef,
	reqOpts ...katapult.RequestOption,
) (*TrashObject, *katapult.Response, error)

type UnauthorizedNetworkForAPITokenError added in v0.2.1

type UnauthorizedNetworkForAPITokenError struct {
	katapult.CommonError
	Detail *UnauthorizedNetworkForAPITokenErrorDetail `json:"detail,omitempty"`
}

UnauthorizedNetworkForAPITokenError: Network is not allowed to access the API with this API token.

func NewUnauthorizedNetworkForAPITokenError added in v0.2.1

func NewUnauthorizedNetworkForAPITokenError(theError *katapult.ResponseError) *UnauthorizedNetworkForAPITokenError

type UnauthorizedNetworkForAPITokenErrorDetail added in v0.2.1

type UnauthorizedNetworkForAPITokenErrorDetail struct {
	IpAddress string `json:"ip_address,omitempty"`
}

type ValidationError added in v0.1.5

type ValidationError struct {
	katapult.CommonError
	Detail *ValidationErrorDetail `json:"detail,omitempty"`
}

ValidationError: A validation error occurred with the object that was being created/updated/deleted.

func NewValidationError added in v0.1.5

func NewValidationError(theError *katapult.ResponseError) *ValidationError

func (*ValidationError) Error added in v0.1.5

func (s *ValidationError) Error() string

type ValidationErrorDetail added in v0.1.5

type ValidationErrorDetail struct {
	Errors []string `json:"errors,omitempty"`
}

type VirtualMachine

type VirtualMachine struct {
	ID                  string                 `json:"id,omitempty"`
	Name                string                 `json:"name,omitempty"`
	Hostname            string                 `json:"hostname,omitempty"`
	FQDN                string                 `json:"fqdn,omitempty"`
	Description         string                 `json:"description,omitempty"`
	CreatedAt           *timestamp.Timestamp   `json:"created_at,omitempty"`
	InitialRootPassword string                 `json:"initial_root_password,omitempty"`
	State               VirtualMachineState    `json:"state,omitempty"`
	Zone                *Zone                  `json:"zone,omitempty"`
	Organization        *Organization          `json:"organization,omitempty"`
	Group               *VirtualMachineGroup   `json:"group,omitempty"`
	Package             *VirtualMachinePackage `json:"package,omitempty"`
	AttachedISO         *ISO                   `json:"attached_iso,omitempty"`
	Tags                []*Tag                 `json:"tags,omitempty"`
	TagNames            []string               `json:"tag_names,omitempty"`
	IPAddresses         []*IPAddress           `json:"ip_addresses,omitempty"`
}

func (*VirtualMachine) Ref added in v0.1.0

type VirtualMachineBuild

type VirtualMachineBuild struct {
	ID             string                   `json:"id,omitempty"`
	SpecXML        string                   `json:"spec_xml,omitempty"`
	State          VirtualMachineBuildState `json:"state,omitempty"`
	VirtualMachine *VirtualMachine          `json:"virtual_machine,omitempty"`
	CreatedAt      *timestamp.Timestamp     `json:"created_at,omitempty"`
}

func (*VirtualMachineBuild) Ref added in v0.1.0

type VirtualMachineBuildArguments

type VirtualMachineBuildArguments struct {
	Zone                *ZoneRef
	DataCenter          *DataCenterRef
	Package             VirtualMachinePackageRef
	DiskTemplate        *DiskTemplateRef
	DiskTemplateOptions []*DiskTemplateOption
	Network             *NetworkRef
	Hostname            string
}

type VirtualMachineBuildNotFoundError added in v0.1.5

type VirtualMachineBuildNotFoundError struct {
	katapult.CommonError
}

VirtualMachineBuildNotFoundError: No build was found matching any of the criteria provided in the arguments.

func NewVirtualMachineBuildNotFoundError added in v0.1.5

func NewVirtualMachineBuildNotFoundError(theError *katapult.ResponseError) *VirtualMachineBuildNotFoundError

type VirtualMachineBuildRef added in v0.1.0

type VirtualMachineBuildRef struct {
	ID string `json:"id,omitempty"`
}

type VirtualMachineBuildState

type VirtualMachineBuildState string
const (
	VirtualMachineBuildDraft    VirtualMachineBuildState = "draft"
	VirtualMachineBuildFailed   VirtualMachineBuildState = "failed"
	VirtualMachineBuildPending  VirtualMachineBuildState = "pending"
	VirtualMachineBuildComplete VirtualMachineBuildState = "complete"
	VirtualMachineBuildBuilding VirtualMachineBuildState = "building"
)

type VirtualMachineBuildsClient

type VirtualMachineBuildsClient struct {
	// contains filtered or unexported fields
}

func NewVirtualMachineBuildsClient

func NewVirtualMachineBuildsClient(
	rm RequestMaker,
) *VirtualMachineBuildsClient

func (*VirtualMachineBuildsClient) Create

func (s *VirtualMachineBuildsClient) Create(
	ctx context.Context,
	org OrganizationRef,
	args *VirtualMachineBuildArguments,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineBuild, *katapult.Response, error)

func (*VirtualMachineBuildsClient) CreateFromSpec

func (s *VirtualMachineBuildsClient) CreateFromSpec(
	ctx context.Context,
	org OrganizationRef,
	spec *buildspec.VirtualMachineSpec,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineBuild, *katapult.Response, error)

func (*VirtualMachineBuildsClient) CreateFromSpecXML

func (s *VirtualMachineBuildsClient) CreateFromSpecXML(
	ctx context.Context,
	org OrganizationRef,
	specXML string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineBuild, *katapult.Response, error)

func (*VirtualMachineBuildsClient) Get

func (s *VirtualMachineBuildsClient) Get(
	ctx context.Context,
	ref VirtualMachineBuildRef,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineBuild, *katapult.Response, error)

func (*VirtualMachineBuildsClient) GetByID

func (s *VirtualMachineBuildsClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineBuild, *katapult.Response, error)

type VirtualMachineGroup

type VirtualMachineGroup struct {
	ID        string               `json:"id,omitempty"`
	Name      string               `json:"name,omitempty"`
	Segregate bool                 `json:"segregate,omitempty"`
	CreatedAt *timestamp.Timestamp `json:"created_at,omitempty"`
}

func (*VirtualMachineGroup) Ref added in v0.1.0

type VirtualMachineGroupCreateArguments

type VirtualMachineGroupCreateArguments struct {
	Name      string `json:"name,omitempty"`
	Segregate *bool  `json:"segregate,omitempty"`
}

type VirtualMachineGroupNotFoundError added in v0.1.5

type VirtualMachineGroupNotFoundError struct {
	katapult.CommonError
}

VirtualMachineGroupNotFoundError: No virtual machine group was found matching any of the criteria provided in the arguments.

func NewVirtualMachineGroupNotFoundError added in v0.1.5

func NewVirtualMachineGroupNotFoundError(theError *katapult.ResponseError) *VirtualMachineGroupNotFoundError

type VirtualMachineGroupRef added in v0.1.0

type VirtualMachineGroupRef struct {
	ID string `json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*VirtualMachineGroupRef) MarshalJSON added in v0.1.0

func (s *VirtualMachineGroupRef) MarshalJSON() ([]byte, error)

func (*VirtualMachineGroupRef) UnmarshalJSON added in v0.1.0

func (s *VirtualMachineGroupRef) UnmarshalJSON(b []byte) error

type VirtualMachineGroupUpdateArguments

type VirtualMachineGroupUpdateArguments struct {
	Name      string `json:"name,omitempty"`
	Segregate *bool  `json:"segregate,omitempty"`
}

type VirtualMachineGroupsClient

type VirtualMachineGroupsClient struct {
	// contains filtered or unexported fields
}

func NewVirtualMachineGroupsClient

func NewVirtualMachineGroupsClient(
	rm RequestMaker,
) *VirtualMachineGroupsClient

func (*VirtualMachineGroupsClient) Create

func (s *VirtualMachineGroupsClient) Create(
	ctx context.Context,
	org OrganizationRef,
	args *VirtualMachineGroupCreateArguments,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineGroup, *katapult.Response, error)

func (*VirtualMachineGroupsClient) Delete

func (s *VirtualMachineGroupsClient) Delete(
	ctx context.Context,
	group VirtualMachineGroupRef,
	reqOpts ...katapult.RequestOption,
) (*katapult.Response, error)

func (*VirtualMachineGroupsClient) Get

func (s *VirtualMachineGroupsClient) Get(
	ctx context.Context,
	ref VirtualMachineGroupRef,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineGroup, *katapult.Response, error)

func (*VirtualMachineGroupsClient) GetByID

func (s *VirtualMachineGroupsClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineGroup, *katapult.Response, error)

func (*VirtualMachineGroupsClient) List

func (s *VirtualMachineGroupsClient) List(
	ctx context.Context,
	org OrganizationRef,
	reqOpts ...katapult.RequestOption,
) ([]*VirtualMachineGroup, *katapult.Response, error)

func (*VirtualMachineGroupsClient) Update

func (s *VirtualMachineGroupsClient) Update(
	ctx context.Context,
	ref VirtualMachineGroupRef,
	args *VirtualMachineGroupUpdateArguments,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineGroup, *katapult.Response, error)

type VirtualMachineMustBeStartedError added in v0.1.5

type VirtualMachineMustBeStartedError struct {
	katapult.CommonError
	Detail *VirtualMachineMustBeStartedErrorDetail `json:"detail,omitempty"`
}

VirtualMachineMustBeStartedError: Virtual machines must be in a started state to create console sessions.

func NewVirtualMachineMustBeStartedError added in v0.1.5

func NewVirtualMachineMustBeStartedError(theError *katapult.ResponseError) *VirtualMachineMustBeStartedError

func (*VirtualMachineMustBeStartedError) Error added in v0.1.5

type VirtualMachineMustBeStartedErrorDetail added in v0.1.5

type VirtualMachineMustBeStartedErrorDetail struct {
	CurrentState string `json:"current_state,omitempty"`
}

type VirtualMachineNetworkInterface

type VirtualMachineNetworkInterface struct {
	ID             string               `json:"id,omitempty"`
	VirtualMachine *VirtualMachine      `json:"virtual_machine,omitempty"`
	Name           string               `json:"name,omitempty"`
	Network        *Network             `json:"network,omitempty"`
	MACAddress     string               `json:"mac_address,omitempty"`
	State          string               `json:"state,omitempty"`
	IPAddresses    []*IPAddress         `json:"ip_addresses,omitempty"`
	SpeedProfile   *NetworkSpeedProfile `json:"speed_profile,omitempty"`
}

func (*VirtualMachineNetworkInterface) Ref added in v0.1.0

type VirtualMachineNetworkInterfaceNotFoundError added in v0.1.5

type VirtualMachineNetworkInterfaceNotFoundError struct {
	katapult.CommonError
}

VirtualMachineNetworkInterfaceNotFoundError: No network interface was found matching any of the criteria provided in the arguments.

func NewVirtualMachineNetworkInterfaceNotFoundError added in v0.1.5

func NewVirtualMachineNetworkInterfaceNotFoundError(theError *katapult.ResponseError) *VirtualMachineNetworkInterfaceNotFoundError

type VirtualMachineNetworkInterfaceRef added in v0.1.0

type VirtualMachineNetworkInterfaceRef struct {
	ID string `json:"id,omitempty"`
}

type VirtualMachineNetworkInterfacesClient

type VirtualMachineNetworkInterfacesClient struct {
	// contains filtered or unexported fields
}

func NewVirtualMachineNetworkInterfacesClient

func NewVirtualMachineNetworkInterfacesClient(
	rm RequestMaker,
) *VirtualMachineNetworkInterfacesClient

func (*VirtualMachineNetworkInterfacesClient) AllocateIP

func (s *VirtualMachineNetworkInterfacesClient) AllocateIP(
	ctx context.Context,
	vmnet VirtualMachineNetworkInterfaceRef,
	ip IPAddressRef,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineNetworkInterface, *katapult.Response, error)

func (*VirtualMachineNetworkInterfacesClient) AllocateNewIP

func (s *VirtualMachineNetworkInterfacesClient) AllocateNewIP(
	ctx context.Context,
	vmnet VirtualMachineNetworkInterfaceRef,
	ipVer IPVersion,
	reqOpts ...katapult.RequestOption,
) (*IPAddress, *katapult.Response, error)

func (*VirtualMachineNetworkInterfacesClient) AvailableIPs

func (s *VirtualMachineNetworkInterfacesClient) AvailableIPs(
	ctx context.Context,
	vmnet *VirtualMachineNetworkInterface,
	ipVer IPVersion,
	reqOpts ...katapult.RequestOption,
) ([]*IPAddress, *katapult.Response, error)

func (*VirtualMachineNetworkInterfacesClient) Get

func (s *VirtualMachineNetworkInterfacesClient) Get(
	ctx context.Context,
	ref VirtualMachineNetworkInterfaceRef,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineNetworkInterface, *katapult.Response, error)

func (*VirtualMachineNetworkInterfacesClient) GetByID added in v0.1.0

func (s *VirtualMachineNetworkInterfacesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachineNetworkInterface, *katapult.Response, error)

func (*VirtualMachineNetworkInterfacesClient) List

func (s *VirtualMachineNetworkInterfacesClient) List(
	ctx context.Context,
	vm VirtualMachineRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*VirtualMachineNetworkInterface, *katapult.Response, error)

func (*VirtualMachineNetworkInterfacesClient) UpdateSpeedProfile

func (s *VirtualMachineNetworkInterfacesClient) UpdateSpeedProfile(
	ctx context.Context,
	vmnet VirtualMachineNetworkInterfaceRef,
	speedProfile NetworkSpeedProfileRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

type VirtualMachineNotFoundError added in v0.1.5

type VirtualMachineNotFoundError struct {
	katapult.CommonError
}

VirtualMachineNotFoundError: No virtual machine was found matching any of the criteria provided in the arguments.

func NewVirtualMachineNotFoundError added in v0.1.5

func NewVirtualMachineNotFoundError(theError *katapult.ResponseError) *VirtualMachineNotFoundError

type VirtualMachinePackage

type VirtualMachinePackage struct {
	ID            string      `json:"id,omitempty"`
	Name          string      `json:"name,omitempty"`
	Permalink     string      `json:"permalink,omitempty"`
	CPUCores      int         `json:"cpu_cores,omitempty"`
	IPv4Addresses int         `json:"ipv4_addresses,omitempty"`
	MemoryInGB    int         `json:"memory_in_gb,omitempty"`
	StorageInGB   int         `json:"storage_in_gb,omitempty"`
	Privacy       string      `json:"privacy,omitempty"`
	Icon          *Attachment `json:"icon,omitempty"`
}

func (*VirtualMachinePackage) Ref added in v0.1.0

type VirtualMachinePackageNotFoundError added in v0.1.5

type VirtualMachinePackageNotFoundError struct {
	katapult.CommonError
}

VirtualMachinePackageNotFoundError: No package was found matching any of the criteria provided in the arguments.

func NewVirtualMachinePackageNotFoundError added in v0.1.5

func NewVirtualMachinePackageNotFoundError(theError *katapult.ResponseError) *VirtualMachinePackageNotFoundError

type VirtualMachinePackageRef added in v0.1.0

type VirtualMachinePackageRef struct {
	ID        string `json:"id,omitempty"`
	Permalink string `json:"permalink,omitempty"`
}

type VirtualMachinePackagesClient

type VirtualMachinePackagesClient struct {
	// contains filtered or unexported fields
}

func NewVirtualMachinePackagesClient

func NewVirtualMachinePackagesClient(
	rm RequestMaker,
) *VirtualMachinePackagesClient

func (*VirtualMachinePackagesClient) Get

func (s *VirtualMachinePackagesClient) Get(
	ctx context.Context,
	ref VirtualMachinePackageRef,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachinePackage, *katapult.Response, error)

func (*VirtualMachinePackagesClient) GetByID

func (s *VirtualMachinePackagesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachinePackage, *katapult.Response, error)
func (s *VirtualMachinePackagesClient) GetByPermalink(
	ctx context.Context,
	permalink string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachinePackage, *katapult.Response, error)

func (*VirtualMachinePackagesClient) List

func (s *VirtualMachinePackagesClient) List(
	ctx context.Context,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*VirtualMachinePackage, *katapult.Response, error)

type VirtualMachineRef added in v0.1.0

type VirtualMachineRef struct {
	ID   string `json:"id,omitempty"`
	FQDN string `json:"fqdn,omitempty"`
}

type VirtualMachineState

type VirtualMachineState string
const (
	VirtualMachineStopped      VirtualMachineState = "stopped"
	VirtualMachineFailed       VirtualMachineState = "failed"
	VirtualMachineAllocating   VirtualMachineState = "allocating"
	VirtualMachineAllocated    VirtualMachineState = "allocated"
	VirtualMachineStarted      VirtualMachineState = "started"
	VirtualMachineStarting     VirtualMachineState = "starting"
	VirtualMachineResetting    VirtualMachineState = "resetting"
	VirtualMachineMigrating    VirtualMachineState = "migrating"
	VirtualMachineStopping     VirtualMachineState = "stopping"
	VirtualMachineShuttingDown VirtualMachineState = "shutting_down"
	VirtualMachineOrphaned     VirtualMachineState = "orphaned"
)

type VirtualMachineUpdateArguments

type VirtualMachineUpdateArguments struct {
	Name        string                  `json:"name,omitempty"`
	Hostname    string                  `json:"hostname,omitempty"`
	Description string                  `json:"description,omitempty"`
	TagNames    *[]string               `json:"tag_names,omitempty"`
	Group       *VirtualMachineGroupRef `json:"group,omitempty"`
}

type VirtualMachinesClient

type VirtualMachinesClient struct {
	// contains filtered or unexported fields
}

func NewVirtualMachinesClient

func NewVirtualMachinesClient(
	rm RequestMaker,
) *VirtualMachinesClient

func (*VirtualMachinesClient) ChangePackage

func (s *VirtualMachinesClient) ChangePackage(
	ctx context.Context,
	ref VirtualMachineRef,
	pkg VirtualMachinePackageRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

func (*VirtualMachinesClient) Delete

func (s *VirtualMachinesClient) Delete(
	ctx context.Context,
	ref VirtualMachineRef,
	reqOpts ...katapult.RequestOption,
) (*TrashObject, *katapult.Response, error)

func (*VirtualMachinesClient) Get

func (s *VirtualMachinesClient) Get(
	ctx context.Context,
	ref VirtualMachineRef,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachine, *katapult.Response, error)

func (*VirtualMachinesClient) GetByFQDN

func (s *VirtualMachinesClient) GetByFQDN(
	ctx context.Context,
	fqdn string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachine, *katapult.Response, error)

func (*VirtualMachinesClient) GetByID

func (s *VirtualMachinesClient) GetByID(
	ctx context.Context,
	id string,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachine, *katapult.Response, error)

func (*VirtualMachinesClient) List

func (s *VirtualMachinesClient) List(
	ctx context.Context,
	org OrganizationRef,
	opts *ListOptions,
	reqOpts ...katapult.RequestOption,
) ([]*VirtualMachine, *katapult.Response, error)

func (*VirtualMachinesClient) Reset

func (s *VirtualMachinesClient) Reset(
	ctx context.Context,
	ref VirtualMachineRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

func (*VirtualMachinesClient) Shutdown

func (s *VirtualMachinesClient) Shutdown(
	ctx context.Context,
	ref VirtualMachineRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

func (*VirtualMachinesClient) Start

func (s *VirtualMachinesClient) Start(
	ctx context.Context,
	ref VirtualMachineRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

func (*VirtualMachinesClient) Stop

func (s *VirtualMachinesClient) Stop(
	ctx context.Context,
	ref VirtualMachineRef,
	reqOpts ...katapult.RequestOption,
) (*Task, *katapult.Response, error)

func (*VirtualMachinesClient) Update

func (s *VirtualMachinesClient) Update(
	ctx context.Context,
	ref VirtualMachineRef,
	args *VirtualMachineUpdateArguments,
	reqOpts ...katapult.RequestOption,
) (*VirtualMachine, *katapult.Response, error)

type VirtualNetwork

type VirtualNetwork struct {
	ID         string      `json:"id,omitempty"`
	Name       string      `json:"name,omitempty"`
	DataCenter *DataCenter `json:"data_center,omitempty"`
}

type Zone

type Zone struct {
	ID         string      `json:"id,omitempty"`
	Name       string      `json:"name,omitempty"`
	Permalink  string      `json:"permalink,omitempty"`
	DataCenter *DataCenter `json:"data_center,omitempty"`
}

func (*Zone) Ref added in v0.1.0

func (z *Zone) Ref() ZoneRef

type ZoneNotFoundError added in v0.1.5

type ZoneNotFoundError struct {
	katapult.CommonError
}

ZoneNotFoundError: No zone was found matching any of the criteria provided in the arguments.

func NewZoneNotFoundError added in v0.1.5

func NewZoneNotFoundError(theError *katapult.ResponseError) *ZoneNotFoundError

type ZoneRef added in v0.1.0

type ZoneRef struct {
	ID        string `json:"id,omitempty"`
	Permalink string `json:"permalink,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL