Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateOpts() CreateServer
- func (c *Client) CreateServer(opts *CreateServer) (string, error)
- func (c *Client) CreateSnapshot(serverId string, description string) (string, error)
- func (c *Client) DeleteServer(id string) error
- func (c *Client) DeleteSnapshot(snapshotId string) error
- func (c *Client) GetServer(search_id string) (*Server, error)
- func (c *Client) GetServerIpV4Reverse(id string) (map[string]string, error)
- func (c *Client) GetServerIpV6Reverse(id string) (map[string]string, error)
- func (c *Client) GetServers() (map[string]Server, error)
- func (c *Client) GetSnapshot(snapshotId string) (*Snapshot, error)
- func (c *Client) GetSnapshotByLabel(snapshotLabel string) (*Snapshot, error)
- func (c *Client) GetSnapshots() (map[string]Snapshot, error)
- func (c *Client) HaltServer(id string) error
- func (c *Client) RequestArr(params map[string]string, action string, method string) ([]interface{}, error)
- func (c *Client) RequestByte(params map[string]string, action string, method string) ([]byte, error)
- func (c *Client) RequestInterface(params map[string]string, action string, method string, out interface{}) error
- func (c *Client) RequestMap(params map[string]string, action string, method string) (map[string]interface{}, error)
- func (c *Client) RequestStr(params map[string]string, action string, method string) (string, error)
- func (c *Client) SetServerIpV4Reverse(id string, ip string, dns string) error
- func (c *Client) SetServerIpV6Reverse(id string, ip string, dns string) error
- func (c *Client) SetServerLabel(id string, label string) error
- func (c *Client) TestRegionPlan(region_id string, plan_id string) bool
- func (c *Client) WaitForServer(id string) (*Server, error)
- type CreateServer
- type Parameter
- type Parameters
- type ReverseList
- type Server
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
APIKey string
URL string
Http *http.Client
Params Parameters
}
func MakeClient ¶
func (*Client) CreateOpts ¶
func (c *Client) CreateOpts() CreateServer
func (*Client) CreateServer ¶
func (c *Client) CreateServer(opts *CreateServer) (string, error)
func (*Client) CreateSnapshot ¶
func (*Client) DeleteServer ¶
func (*Client) DeleteSnapshot ¶
func (*Client) GetServerIpV4Reverse ¶
func (*Client) GetServerIpV6Reverse ¶
func (*Client) GetSnapshotByLabel ¶
func (*Client) HaltServer ¶
func (*Client) RequestArr ¶
func (c *Client) RequestArr(params map[string]string, action string, method string) ([]interface{}, error)
Create a new request and decodes to Jaons
func (*Client) RequestByte ¶
func (c *Client) RequestByte(params map[string]string, action string, method string) ([]byte, error)
send a request including api key
func (*Client) RequestInterface ¶
func (*Client) RequestMap ¶
func (c *Client) RequestMap(params map[string]string, action string, method string) (map[string]interface{}, error)
Create a new request and decodes to Jaons
func (*Client) RequestStr ¶
create a new request and returns body as string
func (*Client) SetServerIpV4Reverse ¶
func (*Client) SetServerIpV6Reverse ¶
func (*Client) TestRegionPlan ¶
type CreateServer ¶
type Parameters ¶
func NewParameters ¶
func NewParameters(client *Client) (Parameters, error)
type ReverseList ¶
type Server ¶
type Server struct {
Id string `json:"SUBID"`
Os string `json:"os"`
Ram string `json:"ram"`
Disk string `json:"disk"`
Ip string `json:"main_ip"`
Cpu string `json:"vcpu_count"`
Location string `json:"location"`
DCID string `json:"dcid"`
Password string `json:"default_password"`
Created string `json:"date_created"`
Status string `json:"status"`
Netmaskv4 string `json:"netmask_v4"`
Gatewayv4 string `json:"gateway_v4"`
PlanID string `json:"VPSPLANID"`
IpV6 string `json:"v6_main_ip"`
NetmaskV6 string `json:"v6_network"`
SizeV6 string `json:"v6_network_size"`
PrivateIP string `json:"internal_ip"`
Label string `json:"label"`
// Charges string `json:"pending_charges"`
// Cost float64 `json:"cost_per_month"`
// CurrentBW float64 `json:"current_bandwidth_gb"`
// AllowedVW float64 `json:"alllowed_bandwidth_gb"`
Power string `json:"power_status"`
KVMurl string `json:"kvm_url"`
}
Click to show internal directories.
Click to hide internal directories.