ecloud

package
v1.3.18 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Code generated by github.com/ukfast/sdk-go/pkg/gen/model_paginated. DO NOT EDIT.

Code generated by github.com/ukfast/sdk-go/pkg/gen/response. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ActiveDirectoryDomain added in v1.2.1

type ActiveDirectoryDomain struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

ActiveDirectoryDomain represents an eCloud active directory domain

type ActiveDirectoryDomainNotFoundError added in v1.2.1

type ActiveDirectoryDomainNotFoundError struct {
	ID int
}

ActiveDirectoryDomainNotFoundError indicates an Active Directory Domain was not found

func (*ActiveDirectoryDomainNotFoundError) Error added in v1.2.1

type Appliance added in v1.0.23

type Appliance struct {
	ID               string              `json:"id"`
	Name             string              `json:"name"`
	LogoURI          string              `json:"logo_uri"`
	Description      string              `json:"description"`
	DocumentationURI string              `json:"documentation_uri"`
	Publisher        string              `json:"publisher"`
	CreatedAt        connection.DateTime `json:"created_at"`
}

Appliance represents an eCloud appliance

type ApplianceNotFoundError added in v1.0.23

type ApplianceNotFoundError struct {
	ID string
}

ApplianceNotFoundError indicates an appliance was not found within eCloud

func (*ApplianceNotFoundError) Error added in v1.0.23

func (e *ApplianceNotFoundError) Error() string

type ApplianceParameter added in v1.0.23

type ApplianceParameter struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	Key            string `json:"key"`
	Type           string `json:"type"`
	Description    string `json:"description"`
	Required       bool   `json:"required"`
	ValidationRule string `json:"validation_rule"`
}

ApplianceParameter represents an eCloud appliance parameter

type CloneVirtualMachineRequest

type CloneVirtualMachineRequest struct {
	connection.APIRequestBodyDefaultValidator

	Name string `json:"name" validate:"required"`
}

CloneVirtualMachineRequest represents a request to clone an eCloud virtual machine

func (*CloneVirtualMachineRequest) Validate

Validate returns an error if struct properties are missing/invalid

type ConsoleSession added in v1.3.6

type ConsoleSession struct {
	URL string `json:"url"`
}

ConsoleSession represents an eCloud Virtual Machine console session

type CreateTagRequest

type CreateTagRequest struct {
	connection.APIRequestBodyDefaultValidator

	Key   string `json:"key" validate:"required"`
	Value string `json:"value" validate:"required"`
}

CreateTagRequest represents a request to create an eCloud tag

func (*CreateTagRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateVirtualMachineRequest

type CreateVirtualMachineRequest struct {
	connection.APIRequestBodyDefaultValidator

	Environment      string `json:"environment" validate:"required"`
	Template         string `json:"template,omitempty"`
	ApplianceID      string `json:"appliance_id,omitempty"`
	TemplatePassword string `json:"template_password,omitempty"`
	// Count in Cores
	CPU int `json:"cpu" validate:"required"`
	// Size in GB
	RAM int `json:"ram" validate:"required"`
	// Size in GB
	HDD                     int                                    `json:"hdd,omitempty"`
	Disks                   []CreateVirtualMachineRequestDisk      `json:"hdd_disks,omitempty"`
	Name                    string                                 `json:"name,omitempty"`
	ComputerName            string                                 `json:"computername,omitempty"`
	Tags                    []CreateTagRequest                     `json:"tags,omitempty"`
	Backup                  bool                                   `json:"backup"`
	Support                 bool                                   `json:"support"`
	Monitoring              bool                                   `json:"monitoring"`
	MonitoringContacts      []int                                  `json:"monitoring_contacts"`
	SolutionID              int                                    `json:"solution_id,omitempty"`
	DatastoreID             int                                    `json:"datastore_id,omitempty"`
	SiteID                  int                                    `json:"site_id,omitempty"`
	NetworkID               int                                    `json:"network_id,omitempty"`
	ExternalIPRequired      bool                                   `json:"external_ip_required"`
	SSHKeys                 []string                               `json:"ssh_keys,omitempty"`
	Parameters              []CreateVirtualMachineRequestParameter `json:"parameters,omitempty"`
	Encrypt                 *bool                                  `json:"encrypt,omitempty"`
	Role                    string                                 `json:"role,omitempty"`
	BootstrapScript         string                                 `json:"bootstrap_script,omitempty"`
	ActiveDirectoryDomainID int                                    `json:"ad_domain_id,omitempty"`
	PodID                   int                                    `json:"pod_id,omitempty"`
}

CreateVirtualMachineRequest represents a request to create an eCloud virtual machine

func (*CreateVirtualMachineRequest) Validate

Validate returns an error if struct properties are missing/invalid

type CreateVirtualMachineRequestDisk

type CreateVirtualMachineRequestDisk struct {
	Name string `json:"name,omitempty"`
	// Size in GB
	Capacity int `json:"capacity" validate:"required"`
}

CreateVirtualMachineRequestDisk represents a request to create an eCloud virtual machine disk

type CreateVirtualMachineRequestParameter added in v1.0.23

type CreateVirtualMachineRequestParameter struct {
	connection.APIRequestBodyDefaultValidator

	Key   string `json:"key" validate:"required"`
	Value string `json:"value" validate:"required"`
}

CreateVirtualMachineRequestParameter represents an eCloud virtual machine parameter

type CreateVirtualMachineTemplateRequest added in v1.0.7

type CreateVirtualMachineTemplateRequest struct {
	connection.APIRequestBodyDefaultValidator

	TemplateName string       `json:"template_name" validate:"required"`
	TemplateType TemplateType `json:"template_type"`
}

CreateVirtualMachineTemplateRequest represents a request to clone an eCloud virtual machine template

func (*CreateVirtualMachineTemplateRequest) Validate added in v1.0.7

Validate returns an error if struct properties are missing/invalid

type Datastore

type Datastore struct {
	ID         int             `json:"id"`
	SolutionID int             `json:"solution_id"`
	SiteID     int             `json:"site_id"`
	Name       string          `json:"name"`
	Status     DatastoreStatus `json:"status"`
	// Size in GB
	Capacity int `json:"capacity"`
	// Size in GB
	Allocated int `json:"allocated"`
	// Size in GB
	Available int `json:"available"`
}

Datastore represents an eCloud datastore

type DatastoreNotFoundError

type DatastoreNotFoundError struct {
	ID int
}

DatastoreNotFoundError indicates a datastore was not found within eCloud

func (*DatastoreNotFoundError) Error

func (e *DatastoreNotFoundError) Error() string

type DatastoreStatus

type DatastoreStatus string
const (
	DatastoreStatusCompleted DatastoreStatus = "Completed"
	DatastoreStatusFailed    DatastoreStatus = "Failed"
	DatastoreStatusExpanding DatastoreStatus = "Expanding"
	DatastoreStatusQueued    DatastoreStatus = "Queued"
)

func (DatastoreStatus) String

func (s DatastoreStatus) String() string

type ECloudService

type ECloudService interface {
	// Virtual Machine
	GetVirtualMachines(parameters connection.APIRequestParameters) ([]VirtualMachine, error)
	GetVirtualMachinesPaginated(parameters connection.APIRequestParameters) (*PaginatedVirtualMachine, error)
	GetVirtualMachine(vmID int) (VirtualMachine, error)
	CreateVirtualMachine(req CreateVirtualMachineRequest) (int, error)
	PatchVirtualMachine(vmID int, patch PatchVirtualMachineRequest) error
	CloneVirtualMachine(vmID int, req CloneVirtualMachineRequest) (int, error)
	DeleteVirtualMachine(vmID int) error
	PowerOnVirtualMachine(vmID int) error
	PowerOffVirtualMachine(vmID int) error
	PowerResetVirtualMachine(vmID int) error
	PowerShutdownVirtualMachine(vmID int) error
	PowerRestartVirtualMachine(vmID int) error
	CreateVirtualMachineTemplate(vmID int, req CreateVirtualMachineTemplateRequest) error
	GetVirtualMachineTags(vmID int, parameters connection.APIRequestParameters) ([]Tag, error)
	GetVirtualMachineTagsPaginated(vmID int, parameters connection.APIRequestParameters) (*PaginatedTag, error)
	GetVirtualMachineTag(vmID int, tagKey string) (Tag, error)
	CreateVirtualMachineTag(vmID int, req CreateTagRequest) error
	PatchVirtualMachineTag(vmID int, tagKey string, patch PatchTagRequest) error
	DeleteVirtualMachineTag(vmID int, tagKey string) error
	CreateVirtualMachineConsoleSession(vmID int) (ConsoleSession, error)

	// Solution
	GetSolutions(parameters connection.APIRequestParameters) ([]Solution, error)
	GetSolutionsPaginated(parameters connection.APIRequestParameters) (*PaginatedSolution, error)
	GetSolution(solutionID int) (Solution, error)
	PatchSolution(solutionID int, patch PatchSolutionRequest) (int, error)
	GetSolutionVirtualMachines(solutionID int, parameters connection.APIRequestParameters) ([]VirtualMachine, error)
	GetSolutionVirtualMachinesPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedVirtualMachine, error)
	GetSolutionSites(solutionID int, parameters connection.APIRequestParameters) ([]Site, error)
	GetSolutionSitesPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedSite, error)
	GetSolutionDatastores(solutionID int, parameters connection.APIRequestParameters) ([]Datastore, error)
	GetSolutionDatastoresPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedDatastore, error)
	GetSolutionHosts(solutionID int, parameters connection.APIRequestParameters) ([]Host, error)
	GetSolutionHostsPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedHost, error)
	GetSolutionNetworks(solutionID int, parameters connection.APIRequestParameters) ([]Network, error)
	GetSolutionNetworksPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedNetwork, error)
	GetSolutionFirewalls(solutionID int, parameters connection.APIRequestParameters) ([]Firewall, error)
	GetSolutionFirewallsPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedFirewall, error)
	GetSolutionTemplates(solutionID int, parameters connection.APIRequestParameters) ([]Template, error)
	GetSolutionTemplatesPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedTemplate, error)
	GetSolutionTemplate(solutionID int, templateName string) (Template, error)
	DeleteSolutionTemplate(solutionID int, templateName string) error
	RenameSolutionTemplate(solutionID int, templateName string, req RenameTemplateRequest) error
	GetSolutionTags(solutionID int, parameters connection.APIRequestParameters) ([]Tag, error)
	GetSolutionTagsPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedTag, error)
	GetSolutionTag(solutionID int, tagKey string) (Tag, error)
	CreateSolutionTag(solutionID int, req CreateTagRequest) error
	PatchSolutionTag(solutionID int, tagKey string, patch PatchTagRequest) error
	DeleteSolutionTag(solutionID int, tagKey string) error

	// Site
	GetSites(parameters connection.APIRequestParameters) ([]Site, error)
	GetSitesPaginated(parameters connection.APIRequestParameters) (*PaginatedSite, error)
	GetSite(siteID int) (Site, error)

	// Host
	GetHosts(parameters connection.APIRequestParameters) ([]Host, error)
	GetHostsPaginated(parameters connection.APIRequestParameters) (*PaginatedHost, error)
	GetHost(hostID int) (Host, error)

	// Datastore
	GetDatastores(parameters connection.APIRequestParameters) ([]Datastore, error)
	GetDatastoresPaginated(parameters connection.APIRequestParameters) (*PaginatedDatastore, error)
	GetDatastore(datastoreID int) (Datastore, error)

	// Firewall
	GetFirewalls(parameters connection.APIRequestParameters) ([]Firewall, error)
	GetFirewallsPaginated(parameters connection.APIRequestParameters) (*PaginatedFirewall, error)
	GetFirewall(firewallID int) (Firewall, error)
	GetFirewallConfig(firewallID int) (FirewallConfig, error)

	// Pod
	GetPods(parameters connection.APIRequestParameters) ([]Pod, error)
	GetPodsPaginated(parameters connection.APIRequestParameters) (*PaginatedPod, error)
	GetPod(podID int) (Pod, error)
	GetPodTemplates(podID int, parameters connection.APIRequestParameters) ([]Template, error)
	GetPodTemplatesPaginated(podID int, parameters connection.APIRequestParameters) (*PaginatedTemplate, error)
	GetPodTemplate(podID int, templateName string) (Template, error)
	RenamePodTemplate(podID int, templateName string, req RenameTemplateRequest) error
	DeletePodTemplate(podID int, templateName string) error
	GetPodAppliances(podID int, parameters connection.APIRequestParameters) ([]Appliance, error)
	GetPodAppliancesPaginated(podID int, parameters connection.APIRequestParameters) (*PaginatedAppliance, error)
	PodConsoleAvailable(podID int) (bool, error)

	// Appliance
	GetAppliances(parameters connection.APIRequestParameters) ([]Appliance, error)
	GetAppliancesPaginated(parameters connection.APIRequestParameters) (*PaginatedAppliance, error)
	GetAppliance(applianceID string) (Appliance, error)
	GetApplianceParameters(applianceID string, reqParameters connection.APIRequestParameters) ([]ApplianceParameter, error)
	GetApplianceParametersPaginated(applianceID string, parameters connection.APIRequestParameters) (*PaginatedApplianceParameter, error)

	// Credit
	GetCredits(parameters connection.APIRequestParameters) ([]account.Credit, error)

	GetActiveDirectoryDomains(parameters connection.APIRequestParameters) ([]ActiveDirectoryDomain, error)
	GetActiveDirectoryDomainsPaginated(parameters connection.APIRequestParameters) (*PaginatedActiveDirectoryDomain, error)
	GetActiveDirectoryDomain(domainID int) (ActiveDirectoryDomain, error)
}

ECloudService is an interface for managing eCloud

type Firewall

type Firewall struct {
	ID       int                  `json:"id"`
	Name     string               `json:"name"`
	Hostname string               `json:"hostname"`
	IP       connection.IPAddress `json:"ip"`
	Role     FirewallRole         `json:"role"`
}

Firewall represents an eCloud firewall

type FirewallConfig

type FirewallConfig struct {
	Config string `json:"config"`
}

FirewallConfig represents an eCloud firewall config

type FirewallNotFoundError

type FirewallNotFoundError struct {
	ID int
}

FirewallNotFoundError indicates a firewall was not found within eCloud

func (*FirewallNotFoundError) Error

func (e *FirewallNotFoundError) Error() string

type FirewallRole

type FirewallRole string
const (
	FirewallRoleNA     FirewallRole = "N/A"
	FirewallRoleMaster FirewallRole = "Master"
	FirewallRoleSlave  FirewallRole = "Slave"
)

func (FirewallRole) String

func (r FirewallRole) String() string

type GetActiveDirectoryDomainResponseBody added in v1.2.1

type GetActiveDirectoryDomainResponseBody struct {
	connection.APIResponseBody

	Data ActiveDirectoryDomain `json:"data"`
}

GetActiveDirectoryDomainResponseBody represents an API response body containing ActiveDirectoryDomain data

type GetActiveDirectoryDomainSliceResponseBody added in v1.3.17

type GetActiveDirectoryDomainSliceResponseBody struct {
	connection.APIResponseBody

	Data []ActiveDirectoryDomain `json:"data"`
}

GetActiveDirectoryDomainSliceResponseBody represents an API response body containing []ActiveDirectoryDomain data

type GetApplianceParameterResponseBody added in v1.3.17

type GetApplianceParameterResponseBody struct {
	connection.APIResponseBody

	Data ApplianceParameter `json:"data"`
}

GetApplianceParameterResponseBody represents an API response body containing ApplianceParameter data

type GetApplianceParameterSliceResponseBody added in v1.3.17

type GetApplianceParameterSliceResponseBody struct {
	connection.APIResponseBody

	Data []ApplianceParameter `json:"data"`
}

GetApplianceParameterSliceResponseBody represents an API response body containing []ApplianceParameter data

type GetApplianceResponseBody added in v1.0.23

type GetApplianceResponseBody struct {
	connection.APIResponseBody

	Data Appliance `json:"data"`
}

GetApplianceResponseBody represents an API response body containing Appliance data

type GetApplianceSliceResponseBody added in v1.3.17

type GetApplianceSliceResponseBody struct {
	connection.APIResponseBody

	Data []Appliance `json:"data"`
}

GetApplianceSliceResponseBody represents an API response body containing []Appliance data

type GetConsoleSessionResponseBody added in v1.3.6

type GetConsoleSessionResponseBody struct {
	connection.APIResponseBody

	Data ConsoleSession `json:"data"`
}

GetConsoleSessionResponseBody represents an API response body containing ConsoleSession data

type GetConsoleSessionSliceResponseBody added in v1.3.17

type GetConsoleSessionSliceResponseBody struct {
	connection.APIResponseBody

	Data []ConsoleSession `json:"data"`
}

GetConsoleSessionSliceResponseBody represents an API response body containing []ConsoleSession data

type GetDatastoreResponseBody

type GetDatastoreResponseBody struct {
	connection.APIResponseBody

	Data Datastore `json:"data"`
}

GetDatastoreResponseBody represents an API response body containing Datastore data

type GetDatastoreSliceResponseBody added in v1.3.17

type GetDatastoreSliceResponseBody struct {
	connection.APIResponseBody

	Data []Datastore `json:"data"`
}

GetDatastoreSliceResponseBody represents an API response body containing []Datastore data

type GetFirewallConfigResponseBody

type GetFirewallConfigResponseBody struct {
	connection.APIResponseBody

	Data FirewallConfig `json:"data"`
}

GetFirewallConfigResponseBody represents an API response body containing FirewallConfig data

type GetFirewallConfigSliceResponseBody added in v1.3.17

type GetFirewallConfigSliceResponseBody struct {
	connection.APIResponseBody

	Data []FirewallConfig `json:"data"`
}

GetFirewallConfigSliceResponseBody represents an API response body containing []FirewallConfig data

type GetFirewallResponseBody

type GetFirewallResponseBody struct {
	connection.APIResponseBody

	Data Firewall `json:"data"`
}

GetFirewallResponseBody represents an API response body containing Firewall data

type GetFirewallSliceResponseBody added in v1.3.17

type GetFirewallSliceResponseBody struct {
	connection.APIResponseBody

	Data []Firewall `json:"data"`
}

GetFirewallSliceResponseBody represents an API response body containing []Firewall data

type GetHostResponseBody

type GetHostResponseBody struct {
	connection.APIResponseBody

	Data Host `json:"data"`
}

GetHostResponseBody represents an API response body containing Host data

type GetHostSliceResponseBody added in v1.3.17

type GetHostSliceResponseBody struct {
	connection.APIResponseBody

	Data []Host `json:"data"`
}

GetHostSliceResponseBody represents an API response body containing []Host data

type GetNetworkResponseBody

type GetNetworkResponseBody struct {
	connection.APIResponseBody

	Data Network `json:"data"`
}

GetNetworkResponseBody represents an API response body containing Network data

type GetNetworkSliceResponseBody added in v1.3.17

type GetNetworkSliceResponseBody struct {
	connection.APIResponseBody

	Data []Network `json:"data"`
}

GetNetworkSliceResponseBody represents an API response body containing []Network data

type GetPodResponseBody

type GetPodResponseBody struct {
	connection.APIResponseBody

	Data Pod `json:"data"`
}

GetPodResponseBody represents an API response body containing Pod data

type GetPodSliceResponseBody added in v1.3.17

type GetPodSliceResponseBody struct {
	connection.APIResponseBody

	Data []Pod `json:"data"`
}

GetPodSliceResponseBody represents an API response body containing []Pod data

type GetSiteResponseBody

type GetSiteResponseBody struct {
	connection.APIResponseBody

	Data Site `json:"data"`
}

GetSiteResponseBody represents an API response body containing Site data

type GetSiteSliceResponseBody added in v1.3.17

type GetSiteSliceResponseBody struct {
	connection.APIResponseBody

	Data []Site `json:"data"`
}

GetSiteSliceResponseBody represents an API response body containing []Site data

type GetSolutionResponseBody

type GetSolutionResponseBody struct {
	connection.APIResponseBody

	Data Solution `json:"data"`
}

GetSolutionResponseBody represents an API response body containing Solution data

type GetSolutionSliceResponseBody added in v1.3.17

type GetSolutionSliceResponseBody struct {
	connection.APIResponseBody

	Data []Solution `json:"data"`
}

GetSolutionSliceResponseBody represents an API response body containing []Solution data

type GetTagResponseBody

type GetTagResponseBody struct {
	connection.APIResponseBody

	Data Tag `json:"data"`
}

GetTagResponseBody represents an API response body containing Tag data

type GetTagSliceResponseBody added in v1.3.17

type GetTagSliceResponseBody struct {
	connection.APIResponseBody

	Data []Tag `json:"data"`
}

GetTagSliceResponseBody represents an API response body containing []Tag data

type GetTemplateResponseBody

type GetTemplateResponseBody struct {
	connection.APIResponseBody

	Data Template `json:"data"`
}

GetTemplateResponseBody represents an API response body containing Template data

type GetTemplateSliceResponseBody added in v1.3.17

type GetTemplateSliceResponseBody struct {
	connection.APIResponseBody

	Data []Template `json:"data"`
}

GetTemplateSliceResponseBody represents an API response body containing []Template data

type GetVirtualMachineResponseBody

type GetVirtualMachineResponseBody struct {
	connection.APIResponseBody

	Data VirtualMachine `json:"data"`
}

GetVirtualMachineResponseBody represents an API response body containing VirtualMachine data

type GetVirtualMachineSliceResponseBody added in v1.3.17

type GetVirtualMachineSliceResponseBody struct {
	connection.APIResponseBody

	Data []VirtualMachine `json:"data"`
}

GetVirtualMachineSliceResponseBody represents an API response body containing []VirtualMachine data

type Host

type Host struct {
	ID         int     `json:"id"`
	SolutionID int     `json:"solution_id"`
	PodID      int     `json:"pod_id"`
	Name       string  `json:"name"`
	CPU        HostCPU `json:"cpu"`
	RAM        HostRAM `json:"ram"`
}

Host represents an eCloud host

type HostCPU

type HostCPU struct {
	Quantity int    `json:"qty"`
	Cores    int    `json:"cores"`
	Speed    string `json:"speed"`
}

HostCPU represents an eCloud host's CPU resources

type HostNotFoundError

type HostNotFoundError struct {
	ID int
}

HostNotFoundError indicates a host was not found within eCloud

func (*HostNotFoundError) Error

func (e *HostNotFoundError) Error() string

type HostRAM

type HostRAM struct {
	// Size in GB
	Capacity int `json:"capacity"`
	// Size in GB
	Reserved int `json:"reserved"`
	// Size in GB
	Allocated int `json:"allocated"`
	// Size in GB
	Available int `json:"available"`
}

HostRAM represents an eCloud host's RAM resources

type Network

type Network struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Network represents an eCloud network

type PaginatedActiveDirectoryDomain added in v1.2.1

type PaginatedActiveDirectoryDomain struct {
	*connection.PaginatedBase

	Items []ActiveDirectoryDomain
}

PaginatedActiveDirectoryDomain represents a paginated collection of ActiveDirectoryDomain

func NewPaginatedActiveDirectoryDomain added in v1.2.1

NewPaginatedActiveDirectoryDomain returns a pointer to an initialized PaginatedActiveDirectoryDomain struct

type PaginatedAppliance added in v1.1.0

type PaginatedAppliance struct {
	*connection.PaginatedBase

	Items []Appliance
}

PaginatedAppliance represents a paginated collection of Appliance

func NewPaginatedAppliance added in v1.1.0

NewPaginatedAppliance returns a pointer to an initialized PaginatedAppliance struct

type PaginatedApplianceParameter added in v1.1.0

type PaginatedApplianceParameter struct {
	*connection.PaginatedBase

	Items []ApplianceParameter
}

PaginatedApplianceParameter represents a paginated collection of ApplianceParameter

func NewPaginatedApplianceParameter added in v1.1.0

NewPaginatedApplianceParameter returns a pointer to an initialized PaginatedApplianceParameter struct

type PaginatedDatastore added in v1.1.0

type PaginatedDatastore struct {
	*connection.PaginatedBase

	Items []Datastore
}

PaginatedDatastore represents a paginated collection of Datastore

func NewPaginatedDatastore added in v1.1.0

NewPaginatedDatastore returns a pointer to an initialized PaginatedDatastore struct

type PaginatedFirewall added in v1.1.0

type PaginatedFirewall struct {
	*connection.PaginatedBase

	Items []Firewall
}

PaginatedFirewall represents a paginated collection of Firewall

func NewPaginatedFirewall added in v1.1.0

NewPaginatedFirewall returns a pointer to an initialized PaginatedFirewall struct

type PaginatedHost added in v1.1.0

type PaginatedHost struct {
	*connection.PaginatedBase

	Items []Host
}

PaginatedHost represents a paginated collection of Host

func NewPaginatedHost added in v1.1.0

NewPaginatedHost returns a pointer to an initialized PaginatedHost struct

type PaginatedNetwork added in v1.1.0

type PaginatedNetwork struct {
	*connection.PaginatedBase

	Items []Network
}

PaginatedNetwork represents a paginated collection of Network

func NewPaginatedNetwork added in v1.1.0

NewPaginatedNetwork returns a pointer to an initialized PaginatedNetwork struct

type PaginatedPod added in v1.1.0

type PaginatedPod struct {
	*connection.PaginatedBase

	Items []Pod
}

PaginatedPod represents a paginated collection of Pod

func NewPaginatedPod added in v1.1.0

NewPaginatedPod returns a pointer to an initialized PaginatedPod struct

type PaginatedSite added in v1.1.0

type PaginatedSite struct {
	*connection.PaginatedBase

	Items []Site
}

PaginatedSite represents a paginated collection of Site

func NewPaginatedSite added in v1.1.0

NewPaginatedSite returns a pointer to an initialized PaginatedSite struct

type PaginatedSolution added in v1.1.0

type PaginatedSolution struct {
	*connection.PaginatedBase

	Items []Solution
}

PaginatedSolution represents a paginated collection of Solution

func NewPaginatedSolution added in v1.1.0

NewPaginatedSolution returns a pointer to an initialized PaginatedSolution struct

type PaginatedTag added in v1.1.0

type PaginatedTag struct {
	*connection.PaginatedBase

	Items []Tag
}

PaginatedTag represents a paginated collection of Tag

func NewPaginatedTag added in v1.1.0

NewPaginatedTag returns a pointer to an initialized PaginatedTag struct

type PaginatedTemplate added in v1.1.0

type PaginatedTemplate struct {
	*connection.PaginatedBase

	Items []Template
}

PaginatedTemplate represents a paginated collection of Template

func NewPaginatedTemplate added in v1.1.0

NewPaginatedTemplate returns a pointer to an initialized PaginatedTemplate struct

type PaginatedVirtualMachine added in v1.1.0

type PaginatedVirtualMachine struct {
	*connection.PaginatedBase

	Items []VirtualMachine
}

PaginatedVirtualMachine represents a paginated collection of VirtualMachine

func NewPaginatedVirtualMachine added in v1.1.0

NewPaginatedVirtualMachine returns a pointer to an initialized PaginatedVirtualMachine struct

type PatchSolutionRequest

type PatchSolutionRequest struct {
	Name              *string `json:"name,omitempty"`
	EncryptionDefault *bool   `json:"encryption_default,omitempty"`
}

PatchSolutionRequest represents an eCloud solution patch request

func (*PatchSolutionRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchTagRequest

type PatchTagRequest struct {
	Value string `json:"value,omitempty"`
}

PatchTagRequest represents an eCloud tag patch request

func (*PatchTagRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchVirtualMachineRequest

type PatchVirtualMachineRequest struct {
	Name *string `json:"name,omitempty"`
	// Count in Cores
	CPU int `json:"cpu,omitempty"`
	// Size in GB
	RAM int `json:"ram,omitempty"`
	// KV map of hard disks, key being hard disk name, value being size in GB
	Disks []PatchVirtualMachineRequestDisk `json:"hdd_disks,omitempty"`
	Role  string                           `json:"role,omitempty"`
}

PatchVirtualMachineRequest represents an eCloud virtual machine patch request

func (*PatchVirtualMachineRequest) Validate

Validate returns an error if struct properties are missing/invalid

type PatchVirtualMachineRequestDisk

type PatchVirtualMachineRequestDisk struct {
	UUID string `json:"uuid,omitempty"`
	// Size in GB
	Capacity int                                 `json:"capacity,omitempty"`
	State    PatchVirtualMachineRequestDiskState `json:"state,omitempty"`
}

PatchVirtualMachineRequestDisk represents an eCloud virtual machine patch request disk

type PatchVirtualMachineRequestDiskState

type PatchVirtualMachineRequestDiskState string
const (
	PatchVirtualMachineRequestDiskStatePresent PatchVirtualMachineRequestDiskState = "present"
	PatchVirtualMachineRequestDiskStateAbsent  PatchVirtualMachineRequestDiskState = "absent"
)

func (PatchVirtualMachineRequestDiskState) String

type Pod

type Pod struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Services struct {
		Public     bool `json:"public"`
		Burst      bool `json:"burst"`
		Appliances bool `json:"appliances"`
	} `json:"services"`
}

Pod represents an eCloud pod

type PodNotFoundError

type PodNotFoundError struct {
	ID int
}

PodNotFoundError indicates a pod was not found within eCloud

func (*PodNotFoundError) Error

func (e *PodNotFoundError) Error() string

type RenameTemplateRequest

type RenameTemplateRequest struct {
	connection.APIRequestBodyDefaultValidator

	Destination string `json:"destination" validate:"required"`
}

RenameTemplateRequest represents an eCloud template rename request

func (*RenameTemplateRequest) Validate

Validate returns an error if struct properties are missing/invalid

type Service

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

Service implements ECloudService for managing eCloud via the UKFast API

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of eCloud Service

func (*Service) CloneVirtualMachine

func (s *Service) CloneVirtualMachine(vmID int, req CloneVirtualMachineRequest) (int, error)

CloneVirtualMachine clones a virtual machine

func (*Service) CreateSolutionTag

func (s *Service) CreateSolutionTag(solutionID int, req CreateTagRequest) error

CreateSolutionTag creates a new solution tag

func (*Service) CreateVirtualMachine

func (s *Service) CreateVirtualMachine(req CreateVirtualMachineRequest) (int, error)

CreateVirtualMachine creates a new virtual machine

func (*Service) CreateVirtualMachineConsoleSession added in v1.3.6

func (s *Service) CreateVirtualMachineConsoleSession(vmID int) (ConsoleSession, error)

CreateVirtualMachineConsoleSession creates a virtual machine console session

func (*Service) CreateVirtualMachineTag

func (s *Service) CreateVirtualMachineTag(vmID int, req CreateTagRequest) error

CreateVirtualMachineTag creates a new virtual machine tag

func (*Service) CreateVirtualMachineTemplate added in v1.0.7

func (s *Service) CreateVirtualMachineTemplate(vmID int, req CreateVirtualMachineTemplateRequest) error

CreateVirtualMachineTemplate creates a virtual machine template

func (*Service) DeletePodTemplate added in v1.0.9

func (s *Service) DeletePodTemplate(podID int, templateName string) error

DeletePodTemplate removes a pod template

func (*Service) DeleteSolutionTag

func (s *Service) DeleteSolutionTag(solutionID int, tagKey string) error

DeleteSolutionTag removes a solution tag

func (*Service) DeleteSolutionTemplate added in v1.0.7

func (s *Service) DeleteSolutionTemplate(solutionID int, templateName string) error

DeleteSolutionTemplate removes a solution template

func (*Service) DeleteVirtualMachine

func (s *Service) DeleteVirtualMachine(vmID int) error

DeleteVirtualMachine removes a virtual machine

func (*Service) DeleteVirtualMachineTag

func (s *Service) DeleteVirtualMachineTag(vmID int, tagKey string) error

DeleteVirtualMachineTag removes a virtual machine tag

func (*Service) GetActiveDirectoryDomain added in v1.2.1

func (s *Service) GetActiveDirectoryDomain(domainID int) (ActiveDirectoryDomain, error)

GetActiveDirectoryDomain retrieves a single domain by ID

func (*Service) GetActiveDirectoryDomains added in v1.2.1

func (s *Service) GetActiveDirectoryDomains(parameters connection.APIRequestParameters) ([]ActiveDirectoryDomain, error)

GetActiveDirectoryDomains retrieves a list of Active Directory Domains

func (*Service) GetActiveDirectoryDomainsPaginated added in v1.2.1

func (s *Service) GetActiveDirectoryDomainsPaginated(parameters connection.APIRequestParameters) (*PaginatedActiveDirectoryDomain, error)

GetActiveDirectoryDomainsPaginated retrieves a paginated list of Active Directory Domains

func (*Service) GetAppliance added in v1.0.23

func (s *Service) GetAppliance(applianceID string) (Appliance, error)

GetAppliance retrieves a single Appliance by ID

func (*Service) GetApplianceParameters added in v1.0.23

func (s *Service) GetApplianceParameters(applianceID string, parameters connection.APIRequestParameters) ([]ApplianceParameter, error)

GetApplianceParameters retrieves a list of parameters

func (*Service) GetApplianceParametersPaginated added in v1.0.23

func (s *Service) GetApplianceParametersPaginated(applianceID string, parameters connection.APIRequestParameters) (*PaginatedApplianceParameter, error)

GetApplianceParametersPaginated retrieves a paginated list of domains

func (*Service) GetAppliances added in v1.0.23

func (s *Service) GetAppliances(parameters connection.APIRequestParameters) ([]Appliance, error)

GetAppliances retrieves a list of appliances

func (*Service) GetAppliancesPaginated added in v1.0.23

func (s *Service) GetAppliancesPaginated(parameters connection.APIRequestParameters) (*PaginatedAppliance, error)

GetAppliancesPaginated retrieves a paginated list of appliances

func (*Service) GetCredits added in v1.0.35

func (s *Service) GetCredits(parameters connection.APIRequestParameters) ([]account.Credit, error)

GetCredits retrieves a list of credits

func (*Service) GetDatastore

func (s *Service) GetDatastore(datastoreID int) (Datastore, error)

GetDatastore retrieves a single datastore by ID

func (*Service) GetDatastores

func (s *Service) GetDatastores(parameters connection.APIRequestParameters) ([]Datastore, error)

GetDatastores retrieves a list of datastores

func (*Service) GetDatastoresPaginated

func (s *Service) GetDatastoresPaginated(parameters connection.APIRequestParameters) (*PaginatedDatastore, error)

GetDatastoresPaginated retrieves a paginated list of datastores

func (*Service) GetFirewall

func (s *Service) GetFirewall(firewallID int) (Firewall, error)

GetFirewall retrieves a single firewall by ID

func (*Service) GetFirewallConfig

func (s *Service) GetFirewallConfig(firewallID int) (FirewallConfig, error)

GetFirewallConfig retrieves a single firewall config by ID

func (*Service) GetFirewalls

func (s *Service) GetFirewalls(parameters connection.APIRequestParameters) ([]Firewall, error)

GetFirewalls retrieves a list of firewalls

func (*Service) GetFirewallsPaginated

func (s *Service) GetFirewallsPaginated(parameters connection.APIRequestParameters) (*PaginatedFirewall, error)

GetFirewallsPaginated retrieves a paginated list of firewalls

func (*Service) GetHost

func (s *Service) GetHost(hostID int) (Host, error)

GetHost retrieves a single host by ID

func (*Service) GetHosts

func (s *Service) GetHosts(parameters connection.APIRequestParameters) ([]Host, error)

GetHosts retrieves a list of hosts

func (*Service) GetHostsPaginated

func (s *Service) GetHostsPaginated(parameters connection.APIRequestParameters) (*PaginatedHost, error)

GetHostsPaginated retrieves a paginated list of hosts

func (*Service) GetPod

func (s *Service) GetPod(podID int) (Pod, error)

GetPod retrieves a single pod by ID

func (*Service) GetPodAppliances added in v1.0.28

func (s *Service) GetPodAppliances(podID int, parameters connection.APIRequestParameters) ([]Appliance, error)

GetPodAppliances retrieves a list of appliances

func (*Service) GetPodAppliancesPaginated added in v1.0.28

func (s *Service) GetPodAppliancesPaginated(podID int, parameters connection.APIRequestParameters) (*PaginatedAppliance, error)

GetPodAppliancesPaginated retrieves a paginated list of domains

func (*Service) GetPodTemplate added in v1.0.9

func (s *Service) GetPodTemplate(podID int, templateName string) (Template, error)

GetPodTemplate retrieves a single pod template by name

func (*Service) GetPodTemplates

func (s *Service) GetPodTemplates(podID int, parameters connection.APIRequestParameters) ([]Template, error)

GetPodTemplates retrieves a list of templates

func (*Service) GetPodTemplatesPaginated

func (s *Service) GetPodTemplatesPaginated(podID int, parameters connection.APIRequestParameters) (*PaginatedTemplate, error)

GetPodTemplatesPaginated retrieves a paginated list of domains

func (*Service) GetPods

func (s *Service) GetPods(parameters connection.APIRequestParameters) ([]Pod, error)

GetPods retrieves a list of pods

func (*Service) GetPodsPaginated

func (s *Service) GetPodsPaginated(parameters connection.APIRequestParameters) (*PaginatedPod, error)

GetPodsPaginated retrieves a paginated list of pods

func (*Service) GetSite

func (s *Service) GetSite(siteID int) (Site, error)

GetSite retrieves a single site by ID

func (*Service) GetSites

func (s *Service) GetSites(parameters connection.APIRequestParameters) ([]Site, error)

GetSites retrieves a list of sites

func (*Service) GetSitesPaginated

func (s *Service) GetSitesPaginated(parameters connection.APIRequestParameters) (*PaginatedSite, error)

GetSitesPaginated retrieves a paginated list of sites

func (*Service) GetSolution

func (s *Service) GetSolution(solutionID int) (Solution, error)

GetSolution retrieves a single Solution by ID

func (*Service) GetSolutionDatastores

func (s *Service) GetSolutionDatastores(solutionID int, parameters connection.APIRequestParameters) ([]Datastore, error)

GetSolutionDatastores retrieves a list of datastores

func (*Service) GetSolutionDatastoresPaginated

func (s *Service) GetSolutionDatastoresPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedDatastore, error)

GetSolutionDatastoresPaginated retrieves a paginated list of domains

func (*Service) GetSolutionFirewalls

func (s *Service) GetSolutionFirewalls(solutionID int, parameters connection.APIRequestParameters) ([]Firewall, error)

GetSolutionFirewalls retrieves a list of firewalls

func (*Service) GetSolutionFirewallsPaginated

func (s *Service) GetSolutionFirewallsPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedFirewall, error)

GetSolutionFirewallsPaginated retrieves a paginated list of domains

func (*Service) GetSolutionHosts

func (s *Service) GetSolutionHosts(solutionID int, parameters connection.APIRequestParameters) ([]Host, error)

GetSolutionHosts retrieves a list of hosts

func (*Service) GetSolutionHostsPaginated

func (s *Service) GetSolutionHostsPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedHost, error)

GetSolutionHostsPaginated retrieves a paginated list of domains

func (*Service) GetSolutionNetworks

func (s *Service) GetSolutionNetworks(solutionID int, parameters connection.APIRequestParameters) ([]Network, error)

GetSolutionNetworks retrieves a list of networks

func (*Service) GetSolutionNetworksPaginated

func (s *Service) GetSolutionNetworksPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedNetwork, error)

GetSolutionNetworksPaginated retrieves a paginated list of domains

func (*Service) GetSolutionSites

func (s *Service) GetSolutionSites(solutionID int, parameters connection.APIRequestParameters) ([]Site, error)

GetSolutionSites retrieves a list of sites

func (*Service) GetSolutionSitesPaginated

func (s *Service) GetSolutionSitesPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedSite, error)

GetSolutionSitesPaginated retrieves a paginated list of domains

func (*Service) GetSolutionTag

func (s *Service) GetSolutionTag(solutionID int, tagKey string) (Tag, error)

GetSolutionTag retrieves a single solution tag by key

func (*Service) GetSolutionTags

func (s *Service) GetSolutionTags(solutionID int, parameters connection.APIRequestParameters) ([]Tag, error)

GetSolutionTags retrieves a list of tags

func (*Service) GetSolutionTagsPaginated

func (s *Service) GetSolutionTagsPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedTag, error)

GetSolutionTagsPaginated retrieves a paginated list of domains

func (*Service) GetSolutionTemplate added in v1.0.7

func (s *Service) GetSolutionTemplate(solutionID int, templateName string) (Template, error)

GetSolutionTemplate retrieves a single solution template by name

func (*Service) GetSolutionTemplates

func (s *Service) GetSolutionTemplates(solutionID int, parameters connection.APIRequestParameters) ([]Template, error)

GetSolutionTemplates retrieves a list of templates

func (*Service) GetSolutionTemplatesPaginated

func (s *Service) GetSolutionTemplatesPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedTemplate, error)

GetSolutionTemplatesPaginated retrieves a paginated list of domains

func (*Service) GetSolutionVirtualMachines

func (s *Service) GetSolutionVirtualMachines(solutionID int, parameters connection.APIRequestParameters) ([]VirtualMachine, error)

GetSolutionVirtualMachines retrieves a list of vms

func (*Service) GetSolutionVirtualMachinesPaginated

func (s *Service) GetSolutionVirtualMachinesPaginated(solutionID int, parameters connection.APIRequestParameters) (*PaginatedVirtualMachine, error)

GetSolutionVirtualMachinesPaginated retrieves a paginated list of domains

func (*Service) GetSolutions

func (s *Service) GetSolutions(parameters connection.APIRequestParameters) ([]Solution, error)

GetSolutions retrieves a list of solutions

func (*Service) GetSolutionsPaginated

func (s *Service) GetSolutionsPaginated(parameters connection.APIRequestParameters) (*PaginatedSolution, error)

GetSolutionsPaginated retrieves a paginated list of solutions

func (*Service) GetVirtualMachine

func (s *Service) GetVirtualMachine(vmID int) (VirtualMachine, error)

GetVirtualMachine retrieves a single virtual machine by ID

func (*Service) GetVirtualMachineTag

func (s *Service) GetVirtualMachineTag(vmID int, tagKey string) (Tag, error)

GetVirtualMachineTag retrieves a single virtual machine tag by key

func (*Service) GetVirtualMachineTags

func (s *Service) GetVirtualMachineTags(vmID int, parameters connection.APIRequestParameters) ([]Tag, error)

GetVirtualMachineTags retrieves a list of tags

func (*Service) GetVirtualMachineTagsPaginated

func (s *Service) GetVirtualMachineTagsPaginated(vmID int, parameters connection.APIRequestParameters) (*PaginatedTag, error)

GetVirtualMachineTagsPaginated retrieves a paginated list of domains

func (*Service) GetVirtualMachines

func (s *Service) GetVirtualMachines(parameters connection.APIRequestParameters) ([]VirtualMachine, error)

GetVirtualMachines retrieves a list of vms

func (*Service) GetVirtualMachinesPaginated

func (s *Service) GetVirtualMachinesPaginated(parameters connection.APIRequestParameters) (*PaginatedVirtualMachine, error)

GetVirtualMachinesPaginated retrieves a paginated list of vms

func (*Service) PatchSolution

func (s *Service) PatchSolution(solutionID int, patch PatchSolutionRequest) (int, error)

PatchSolution patches an eCloud solution

func (*Service) PatchSolutionTag

func (s *Service) PatchSolutionTag(solutionID int, tagKey string, patch PatchTagRequest) error

PatchSolutionTag patches an eCloud solution tag

func (*Service) PatchVirtualMachine

func (s *Service) PatchVirtualMachine(vmID int, patch PatchVirtualMachineRequest) error

PatchVirtualMachine patches an eCloud virtual machine

func (*Service) PatchVirtualMachineTag

func (s *Service) PatchVirtualMachineTag(vmID int, tagKey string, patch PatchTagRequest) error

PatchVirtualMachineTag patches an eCloud virtual machine tag

func (*Service) PodConsoleAvailable added in v1.3.6

func (s *Service) PodConsoleAvailable(podID int) (bool, error)

PodConsoleAvailable removes a pod template

func (*Service) PowerOffVirtualMachine

func (s *Service) PowerOffVirtualMachine(vmID int) error

PowerOffVirtualMachine powers off a virtual machine

func (*Service) PowerOnVirtualMachine

func (s *Service) PowerOnVirtualMachine(vmID int) error

PowerOnVirtualMachine powers on a virtual machine

func (*Service) PowerResetVirtualMachine

func (s *Service) PowerResetVirtualMachine(vmID int) error

PowerResetVirtualMachine resets a virtual machine (hard power off)

func (*Service) PowerRestartVirtualMachine

func (s *Service) PowerRestartVirtualMachine(vmID int) error

PowerRestartVirtualMachine resets a virtual machine (graceful power off)

func (*Service) PowerShutdownVirtualMachine

func (s *Service) PowerShutdownVirtualMachine(vmID int) error

PowerShutdownVirtualMachine shuts down a virtual machine

func (*Service) RenamePodTemplate added in v1.0.9

func (s *Service) RenamePodTemplate(podID int, templateName string, req RenameTemplateRequest) error

RenamePodTemplate renames a pod template

func (*Service) RenameSolutionTemplate added in v1.0.7

func (s *Service) RenameSolutionTemplate(solutionID int, templateName string, req RenameTemplateRequest) error

RenameSolutionTemplate renames a solution template

type Site

type Site struct {
	ID         int    `json:"id"`
	State      string `json:"state"`
	SolutionID int    `json:"solution_id"`
	PodID      int    `json:"pod_id"`
}

Site represents an eCloud site

type SiteNotFoundError

type SiteNotFoundError struct {
	ID int
}

SiteNotFoundError indicates a site was not found within eCloud

func (*SiteNotFoundError) Error

func (e *SiteNotFoundError) Error() string

type Solution

type Solution struct {
	ID                int                 `json:"id"`
	Name              string              `json:"name"`
	Environment       SolutionEnvironment `json:"environment"`
	PodID             int                 `json:"pod_id"`
	EncryptionEnabled bool                `json:"encryption_enabled"`
	EncryptionDefault bool                `json:"encryption_default"`
}

Solution represents an eCloud solution

type SolutionEnvironment

type SolutionEnvironment string
const (
	SolutionEnvironmentHybrid  SolutionEnvironment = "Hybrid"
	SolutionEnvironmentPrivate SolutionEnvironment = "Private"
)

func (SolutionEnvironment) String

func (s SolutionEnvironment) String() string

type SolutionNotFoundError

type SolutionNotFoundError struct {
	ID int
}

SolutionNotFoundError indicates a solution was not found within eCloud

func (*SolutionNotFoundError) Error

func (e *SolutionNotFoundError) Error() string

type Tag

type Tag struct {
	Key       string              `json:"key"`
	Value     string              `json:"value"`
	CreatedAt connection.DateTime `json:"created_at"`
}

Tag represents an eCloud tag

type TagNotFoundError

type TagNotFoundError struct {
	Key string
}

TagNotFoundError indicates a tag was not found within eCloud

func (*TagNotFoundError) Error

func (e *TagNotFoundError) Error() string

type Template

type Template struct {
	Name string `json:"name"`
	// Count in Cores
	CPU int `json:"cpu"`
	// Size in GB
	RAM int `json:"ram"`
	// Size in GB
	HDD             int                  `json:"hdd"`
	Disks           []VirtualMachineDisk `json:"hdd_disks"`
	Platform        string               `json:"platform"`
	OperatingSystem string               `json:"operating_system"`
	SolutionID      int                  `json:"solution_id"`
}

Template represents an eCloud template

type TemplateNotFoundError

type TemplateNotFoundError struct {
	Name string
}

TemplateNotFoundError indicates a template was not found within eCloud

func (*TemplateNotFoundError) Error

func (e *TemplateNotFoundError) Error() string

type TemplateType added in v1.0.10

type TemplateType string
const (
	TemplateTypeSolution TemplateType = "solution"
	TemplateTypePod      TemplateType = "pod"
)

func ParseTemplateType added in v1.0.10

func ParseTemplateType(s string) (TemplateType, error)

ParseTemplateType attempts to parse a TemplateType from string

func (TemplateType) String added in v1.0.10

func (s TemplateType) String() string

type VirtualMachine

type VirtualMachine struct {
	ID           int    `json:"id"`
	Name         string `json:"name"`
	Hostname     string `json:"hostname"`
	ComputerName string `json:"computername"`
	// Count in Cores
	CPU int `json:"cpu"`
	// Size in GB
	RAM int `json:"ram"`
	// Size in GB
	HDD         int                  `json:"hdd"`
	IPInternal  connection.IPAddress `json:"ip_internal"`
	IPExternal  connection.IPAddress `json:"ip_external"`
	Platform    string               `json:"platform"`
	Template    string               `json:"template"`
	Backup      bool                 `json:"backup"`
	Support     bool                 `json:"support"`
	Environment string               `json:"environment"`
	SolutionID  int                  `json:"solution_id"`
	Status      VirtualMachineStatus `json:"status"`
	PowerStatus string               `json:"power_status"`
	ToolsStatus string               `json:"tools_status"`
	Disks       []VirtualMachineDisk `json:"hdd_disks"`
	Encrypted   bool                 `json:"encrypted"`
	Role        string               `json:"role"`
	GPUProfile  string               `json:"gpu_profile"`
}

VirtualMachine represents an eCloud Virtual Machine

type VirtualMachineDisk

type VirtualMachineDisk struct {
	UUID string                 `json:"uuid"`
	Name string                 `json:"name"`
	Type VirtualMachineDiskType `json:"type"`
	Key  int                    `json:"key"`

	// Size in GB
	Capacity int `json:"capacity"`
}

VirtualMachineDisk represents an eCloud Virtual Machine disk

type VirtualMachineDiskType added in v1.0.36

type VirtualMachineDiskType string
const (
	VirtualMachineDiskTypeStandard VirtualMachineDiskType = "Standard"
	VirtualMachineDiskTypeCluster  VirtualMachineDiskType = "Cluster"
)

func (VirtualMachineDiskType) String added in v1.0.36

func (e VirtualMachineDiskType) String() string

type VirtualMachineNotFoundError

type VirtualMachineNotFoundError struct {
	ID int
}

VirtualMachineNotFoundError indicates a virtual machine was not found within eCloud

func (*VirtualMachineNotFoundError) Error

type VirtualMachinePowerStatus

type VirtualMachinePowerStatus string
const (
	VirtualMachinePowerStatusOnline  VirtualMachinePowerStatus = "Online"
	VirtualMachinePowerStatusOffline VirtualMachinePowerStatus = "Offline"
)

func ParseVirtualMachinePowerStatus

func ParseVirtualMachinePowerStatus(s string) (VirtualMachinePowerStatus, error)

ParseVirtualMachinePowerStatus attempts to parse a VirtualMachinePowerStatus from string

func (VirtualMachinePowerStatus) String

func (s VirtualMachinePowerStatus) String() string

type VirtualMachineStatus

type VirtualMachineStatus string
const (
	VirtualMachineStatusComplete   VirtualMachineStatus = "Complete"
	VirtualMachineStatusFailed     VirtualMachineStatus = "Failed"
	VirtualMachineStatusBeingBuilt VirtualMachineStatus = "Being Built"
)

func (VirtualMachineStatus) String

func (s VirtualMachineStatus) String() string

Jump to

Keyboard shortcuts

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