Documentation
¶
Index ¶
- Variables
- type Config
- type ConfigBackend
- type ConfigClient
- type ConfigList
- type ConfigListParams
- type ConfigParams
- type Server
- type ServerBackend
- type ServerClient
- func (c *ServerClient) Create(params ServerParams) (*Server, error)
- func (c *ServerClient) Destroy(id string) (*ServerDeletion, error)
- func (c *ServerClient) Details(id string) (*Server, error)
- func (c *ServerClient) List(params ServerListParams) (*ServerList, error)
- func (c *ServerClient) Status(id string) (*ServerStatus, error)
- func (c *ServerClient) Update(params ServerParams) (*Server, error)
- type ServerDeletion
- type ServerList
- type ServerListParams
- type ServerParams
- type ServerRunningStatus
- type ServerStatus
- type ServerZone
Constants ¶
This section is empty.
Variables ¶
var ServerStates = []string{
"Building",
"Cloning",
"Resizing",
"Moving",
"Booting",
"Stopping",
"Restarting",
"Rebooting",
"Shutting Down",
"Restoring Backup",
"Creating Image",
"Deleting Image",
"Restoring Image",
"Re-Imaging",
"Updating Firewall",
"Updating Network",
"Adding IPs",
"Removing IP",
"Destroying",
"Shutdown",
"Provisioning",
}
ServerStates represents the various states the server can be in.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ID types.FlexInt `json:"id"`
Active types.NumericalBoolean `json:"active,omitempty"`
Available types.NumericalBoolean `json:"available,omitempty"`
Category string `json:"category,omitempty"`
Description string `json:"description,omitempty"`
Disk types.FlexInt `json:"disk,omitempty"`
Featured types.NumericalBoolean `json:"featured,omitempty"`
Memory types.FlexInt `json:"memory,omitempty"`
VCPU types.FlexInt `json:"vcpu,omitempty"`
ZoneAvailability map[string]types.NumericalBoolean `json:"zone_availability,omitempty"`
}
Config represents the configuration of the server.
type ConfigBackend ¶
type ConfigBackend interface {
Details(string) (*Config, error)
List(ConfigListParams) (*ConfigList, error)
}
ConfigBackend is the interface for storm configs.
type ConfigClient ¶
ConfigClient is the API client for storm configs.
func (*ConfigClient) Details ¶
func (c *ConfigClient) Details(id string) (*Config, error)
Details fetches the details for a storm config.
func (*ConfigClient) List ¶
func (c *ConfigClient) List(params ConfigListParams) (*ConfigList, error)
List fetches a list of storm configs.
type ConfigList ¶
ConfigList is an envelope for the API result containing either a list of storm configs or an error.
type ConfigListParams ¶
type ConfigListParams struct {
Available bool `json:"available,omitempty"`
Category string `json:"category,omitempty"`
PageNum int `json:"page_num,omitempty"`
PageSize int `json:"page_size,omitempty"`
}
ConfigListParams are the set of parameters you can pass to the API for listing storm configs.
type ConfigParams ¶
type ConfigParams struct {
ID string `json:"id,omitempty"`
}
ConfigParams is the set of parameters used when fetching storm configuration details
type Server ¶
type Server struct {
ACCNT types.FlexInt `json:"accnt,omitempty"`
Active types.FlexInt `json:"active,omitempty"`
BackupEnabled types.FlexInt `json:"backup_enabled,omitempty"`
BackupPlan string `json:"backup_plan,omitempty"`
BackupQuota types.FlexInt `json:"backup_quota,omitempty"`
BackupSize string `json:"backup_size,omitempty"`
BandwidthQuota string `json:"bandwidth_quota,omitempty"`
ConfigDescription string `json:"config_description,omitempty"`
ConfigID types.FlexInt `json:"config_id,omitempty"`
CreateDate types.Timestamp `json:"create_date,omitempty"`
DiskSpace types.FlexInt `json:"disk_space,omitempty"`
Domain string `json:"domain,omitempty"`
IP net.IP `json:"ip,omitempty"`
IPCount types.FlexInt `json:"ip_count,omitempty"`
ManageLevel string `json:"manage_level,omitempty"`
Memory types.FlexInt `json:"memory,omitempty"`
Template string `json:"template,omitempty"`
TemplateDescription string `json:"template_description,omitempty"`
Type string `json:"type,omitempty"`
UniqID string `json:"uniq_id,omitempty"`
VCPU types.FlexInt `json:"vcpu,omitempty"`
Zone ServerZone `json:"zone,omitempty"`
}
Server represents the underlying Storm VPS.
type ServerBackend ¶
type ServerBackend interface {
Create(ServerParams) (*Server, error)
List(ServerListParams) (*ServerList, error)
Details(string) (*Server, error)
Update(ServerParams) (*Server, error)
Destroy(string) (*ServerDeletion, error)
Status(string) (*ServerStatus, error)
}
ServerBackend is the interface for storm servers.
type ServerClient ¶
ServerClient is the API client for storm servers.
func (*ServerClient) Create ¶
func (c *ServerClient) Create(params ServerParams) (*Server, error)
Create a new storm server.
func (*ServerClient) Destroy ¶
func (c *ServerClient) Destroy(id string) (*ServerDeletion, error)
Destroy a storm server.
func (*ServerClient) Details ¶
func (c *ServerClient) Details(id string) (*Server, error)
Details fetches the details for a storm server.
func (*ServerClient) List ¶
func (c *ServerClient) List(params ServerListParams) (*ServerList, error)
List will fetch a list of storm servers.
func (*ServerClient) Status ¶
func (c *ServerClient) Status(id string) (*ServerStatus, error)
Status returns the current status of a storm server.
func (*ServerClient) Update ¶
func (c *ServerClient) Update(params ServerParams) (*Server, error)
Update a storm server.
type ServerDeletion ¶
type ServerDeletion struct {
Destroyed string `json:"destroyed"`
}
ServerDeletion represents the API result when deleting a Storm Server.
type ServerList ¶
ServerList is an envelope for the API result containing either a list of storm configs or an error.
type ServerListParams ¶
type ServerListParams struct {
liquidweb.PageParams
Parent string `json:"parent,omitempty"`
}
ServerListParams is the set parameters used when listing Storm Servers.
type ServerParams ¶
type ServerParams struct {
UniqID string `json:"uniq_id,omitempty"`
BackupEnabled int `json:"backup_enabled,omitempty"`
BackupID int `json:"backup_id,omitempty"`
BackupPlan string `json:"backup_plan,omitempty"`
BackupQuota int `json:"backup_quota,omitempty"`
BandwidthQuota string `json:"bandwidth_quota,omitempty"`
ConfigID int `json:"config_id,omitempty"`
Domain string `json:"domain,omitempty"`
ImageID int `json:"image_id,omitempty"`
IPCount int `json:"ip_count,omitempty"`
MSSQL string `json:"ms_sql,omitempty"`
Password string `json:"password,omitempty"`
PublicSSHKey string `json:"public_ssh_key,omitempty"`
Template string `json:"template,omitempty"`
Zone int `json:"zone,omitempty"`
}
ServerParams is the set of parameters used when creating or updating a Storm Server.
type ServerRunningStatus ¶
type ServerRunningStatus struct {
CurrentStep string `json:"current_step,omitempty"`
DetailedStatus string `json:"detailed_status,omitempty"`
Name string `json:"name,omitempty"`
Status string `json:"status,omitempty"`
}
ServerRunningStatus represents a detailed status step of a Storm Server.
type ServerStatus ¶
type ServerStatus struct {
DetailedStatus string `json:"detailed_status,omitempty"`
Progress types.FlexInt `json:"progress,omitempty"`
Running []ServerRunningStatus `json:"running,omitempty"`
Status string `json:"status,omitempty"`
}
ServerStatus represents status of a Storm Server.
type ServerZone ¶
ServerZone represents a numerical representation of the zone data. Normally, it is nested object like network.Zone
func (*ServerZone) MarshalJSON ¶
func (sz *ServerZone) MarshalJSON() ([]byte, error)
MarshalJSON marshalls the ServerZone type.
func (*ServerZone) String ¶
func (sz *ServerZone) String() string
func (*ServerZone) UnmarshalJSON ¶
func (sz *ServerZone) UnmarshalJSON(b []byte) error
UnmarshalJSON parses Liquid Web's structured zone data.