Documentation ¶
Index ¶
- type Account
- type CreateIPNetwork
- type CreateNetworkRequest
- type CreateServerIPAddress
- type CreateServerIPAddresses
- type CreateServerInterface
- type CreateServerInterfaces
- type CreateServerInterfacesInner
- type CreateServerRequest
- type CreateServerStorageDevice
- type CreateServerStorageDevices
- type DeleteNetworkRequest
- type DeleteServerRequest
- type GetAccountRequest
- type GetNetworkDetailsRequest
- type GetServerDetailsRequest
- type IPNetwork
- type IPNetworks
- type ListNetworksInZoneRequest
- type Network
- type Server
- type Service
- func (s *Service) CreateNetwork(req CreateNetworkRequest) (*Network, error)
- func (s *Service) CreateServer(req CreateServerRequest) (*Server, error)
- func (s *Service) DeleteNetwork(req DeleteNetworkRequest) error
- func (s *Service) DeleteServer(req DeleteServerRequest) error
- func (s *Service) GetAccount() (*Account, error)
- func (s *Service) GetNetworkDetails(req GetNetworkDetailsRequest) (*Network, error)
- func (s *Service) GetServerDetails(req GetServerDetailsRequest) (*Server, error)
- func (s *Service) ListNetworksInZone(req ListNetworksInZoneRequest) ([]Network, error)
- func (s *Service) StopServer(req StopServerRequest) error
- func (s *Service) WaitForServerState(req WaitForServerStateRequest) (*Server, error)
- type StopServerRequest
- type WaitForServerStateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateIPNetwork ¶
func (CreateIPNetwork) MarshalJSON ¶
func (r CreateIPNetwork) MarshalJSON() ([]byte, error)
type CreateNetworkRequest ¶
type CreateNetworkRequest struct { Name string Zone string IPNetworks []CreateIPNetwork }
func (CreateNetworkRequest) MarshalJSON ¶
func (r CreateNetworkRequest) MarshalJSON() ([]byte, error)
func (CreateNetworkRequest) Path ¶
func (r CreateNetworkRequest) Path() string
func (CreateNetworkRequest) Validate ¶
func (r CreateNetworkRequest) Validate() []client.FieldError
type CreateServerIPAddress ¶
type CreateServerIPAddress struct {
Family string `json:"family"`
}
type CreateServerIPAddresses ¶
type CreateServerIPAddresses struct {
IPAddress []CreateServerIPAddress `json:"ip_address"`
}
type CreateServerInterface ¶
type CreateServerInterface struct { IPAddresses CreateServerIPAddresses `json:"ip_addresses"` Type string `json:"type"` Network string `json:"network,omitempty"` }
type CreateServerInterfaces ¶
type CreateServerInterfaces struct {
Interfaces CreateServerInterfacesInner `json:"interfaces"`
}
type CreateServerInterfacesInner ¶
type CreateServerInterfacesInner struct {
Interfaces []CreateServerInterface `json:"interface"`
}
type CreateServerRequest ¶
type CreateServerRequest struct { // The zone in which the server will be hosted, e.g. fi-hel1. See Zones. // // A valid zone identifierA valid zone identifier. Zone string `json:"zone"` // A short, informational description. // // 0-64 characters Title string `json:"title"` // A valid domain name, e.g. host.example.com. The maximum length is 128 characters. Hostname string `json:"hostname"` // The storage_devices block contains storage_device blocks that define the // attached storages. // // 1-8 storage_device blocks StorageDevices CreateServerStorageDevices `json:"storage_devices"` // All interfaces wanted for the server. // // An array of 1-10 interface objects. Interfaces CreateServerInterfaces `json:"networking"` }
func (CreateServerRequest) MarshalJSON ¶
func (r CreateServerRequest) MarshalJSON() ([]byte, error)
func (CreateServerRequest) Path ¶
func (r CreateServerRequest) Path() string
func (CreateServerRequest) Validate ¶
func (r CreateServerRequest) Validate() []client.FieldError
type CreateServerStorageDevice ¶
type CreateServerStorageDevice struct { // The method used to create or attach the specified storage. // // create / clone / attach Action string `json:"action"` // if action is create The size of the storage device in gigabytes. This attribute is applicable only if action is create or clone. // // 10-1024 Size int `json:"size"` // if action is clone or attach The UUID of the storage device to be attached or cloned. Applicable only if action is attach or clone. // // A valid storage UUID Storage string `json:"storage,omitempty"` // A short, informational description for the storage. // // 0-64 characters Title string `json:"title"` }
type CreateServerStorageDevices ¶
type CreateServerStorageDevices struct {
Devices []CreateServerStorageDevice `json:"storage_device"`
}
type DeleteNetworkRequest ¶
type DeleteNetworkRequest struct {
UUID string
}
func (DeleteNetworkRequest) Path ¶
func (r DeleteNetworkRequest) Path() string
type DeleteServerRequest ¶
type DeleteServerRequest struct {
UUID string
}
func (DeleteServerRequest) Path ¶
func (r DeleteServerRequest) Path() string
type GetAccountRequest ¶
type GetAccountRequest struct{}
func (GetAccountRequest) Path ¶
func (r GetAccountRequest) Path() string
type GetNetworkDetailsRequest ¶
type GetNetworkDetailsRequest struct {
UUID string
}
func (GetNetworkDetailsRequest) Path ¶
func (r GetNetworkDetailsRequest) Path() string
type GetServerDetailsRequest ¶
type GetServerDetailsRequest struct {
UUID string
}
func (GetServerDetailsRequest) Path ¶
func (r GetServerDetailsRequest) Path() string
type IPNetworks ¶
type IPNetworks struct {
Networks []IPNetwork `json:"ip_network"`
}
type ListNetworksInZoneRequest ¶
type ListNetworksInZoneRequest struct {
Zone string
}
func (ListNetworksInZoneRequest) Path ¶
func (r ListNetworksInZoneRequest) Path() string
type Network ¶
type Network struct { IPNetworks IPNetworks `json:"ip_networks"` Name string `json:"name"` Type string `json:"type"` UUID string `json:"uuid"` Zone string `json:"zone"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateNetwork ¶
func (s *Service) CreateNetwork(req CreateNetworkRequest) (*Network, error)
func (*Service) CreateServer ¶
func (s *Service) CreateServer(req CreateServerRequest) (*Server, error)
func (*Service) DeleteNetwork ¶
func (s *Service) DeleteNetwork(req DeleteNetworkRequest) error
func (*Service) DeleteServer ¶
func (s *Service) DeleteServer(req DeleteServerRequest) error
func (*Service) GetAccount ¶
func (*Service) GetNetworkDetails ¶
func (s *Service) GetNetworkDetails(req GetNetworkDetailsRequest) (*Network, error)
func (*Service) GetServerDetails ¶
func (s *Service) GetServerDetails(req GetServerDetailsRequest) (*Server, error)
func (*Service) ListNetworksInZone ¶
func (s *Service) ListNetworksInZone(req ListNetworksInZoneRequest) ([]Network, error)
func (*Service) StopServer ¶
func (s *Service) StopServer(req StopServerRequest) error
func (*Service) WaitForServerState ¶
func (s *Service) WaitForServerState(req WaitForServerStateRequest) (*Server, error)
type StopServerRequest ¶
func (StopServerRequest) MarshalJSON ¶
func (r StopServerRequest) MarshalJSON() ([]byte, error)
func (StopServerRequest) Path ¶
func (r StopServerRequest) Path() string
func (StopServerRequest) Validate ¶
func (r StopServerRequest) Validate() []client.FieldError
Click to show internal directories.
Click to hide internal directories.