bandwagon

package module
v0.0.0-...-d472bcf Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

README

bandwagon

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(req *http.Request, count int) ([]byte, error)

Types

type Client

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

func NewClient

func NewClient(cred Credentials) *Client

func (*Client) Command

func (this *Client) Command(command string) (res *Response, err error)

func (*Client) Get

func (this *Client) Get(req string) (res *Response, err error)

func (*Client) Info

func (this *Client) Info() (info *InfoVPS, err error)

func (*Client) Kill

func (this *Client) Kill() (res *Response, err error)

func (*Client) Reboot

func (this *Client) Reboot() (res *Response, err error)

func (*Client) Start

func (this *Client) Start() (res *Response, err error)

func (*Client) Stop

func (this *Client) Stop() (res *Response, err error)

type Credentials

type Credentials struct {
	VeID      string `json:"veid"`
	APIKey    string `json:"api_key"`
	IPAddress string `json:"ip_address"`
	Created   string `json:"created"`
}

func (*Credentials) Values

func (this *Credentials) Values() string

type InfoVPS

type InfoVPS struct {
	VMType                          string            `json:"vm_type"`
	Hostname                        string            `json:"hostname"`
	NodeIP                          string            `json:"node_ip"`
	NodeAlias                       string            `json:"node_alias"`
	NodeLocation                    string            `json:"node_location"`
	NodeLocationID                  string            `json:"node_location_id"`
	NodeDatacenter                  string            `json:"node_datacenter"`
	LocationIPv6Ready               bool              `json:"location_ipv6_ready"`
	Plan                            string            `json:"plan"`
	PlanMonthlyData                 int64             `json:"plan_monthly_data"`
	MonthlyDataMultiplier           int64             `json:"monthly_data_multiplier"`
	PlanDisk                        int64             `json:"plan_disk"`
	PlanRam                         int               `json:"plan_ram"`
	PlanSwap                        int               `json:"plan_swap"`
	PlanMaxIPv6s                    int               `json:"plan_max_ipv6s"`
	Os                              string            `json:"os"`
	Email                           string            `json:"email"`
	DataCounter                     int64             `json:"data_counter"`
	DataNextReset                   int64             `json:"data_next_reset"`
	IpAddresses                     []string          `json:"ip_addresses"`
	PrivateIPAddresses              []string          `json:"private_ip_addresses"`
	IpNullRoutes                    []string          `json:"ip_nullroutes"`
	Iso1                            []byte            `json:"iso1"`
	Iso2                            []byte            `json:"iso2"`
	AvailableIsos                   []string          `json:"available_isos"`
	PlanPrivateNetworkAvailable     bool              `json:"plan_private_network_available"`
	LocationPrivateNetworkAvailable bool              `json:"location_private_network_available"`
	RdnsApiAvailable                bool              `json:"rdns_api_available"`
	Ptr                             map[string]string `json:"ptr"`
	Suspended                       bool              `json:"suspended"`
	PolicyViolation                 bool              `json:"policy_violation"`
	SuspensionCount                 bool              `json:"suspension_count"`
	TotalAbusePoints                int32             `json:"total_abuse_points"`
	MaxAbusePoints                  int32             `json:"max_abuse_points"`
	Error                           int32             `json:"error"`
	Created                         string            `json:"created"`
}

func (*InfoVPS) Ipv4

func (this *InfoVPS) Ipv4() string

func (*InfoVPS) ResetTime

func (this *InfoVPS) ResetTime() string

func (*InfoVPS) String

func (info *InfoVPS) String() string

type Response

type Response struct {
	Error   int    `json:"error"`
	Message string `json:"message,omitempty"`
}

func (*Response) String

func (r *Response) String() string

Jump to

Keyboard shortcuts

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