models

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

View Source
const ResetTypeHardware = "hw"
View Source
const ResetTypeManual = "man"
View Source
const ResetTypePower = "power"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizedKey

type AuthorizedKey struct {
	Key Key `json:"key"`
}

type Cancellation

type Cancellation struct {
	ServerIP                 string      `json:"server_ip"`
	ServerNumber             int         `json:"server_number"`
	ServerName               string      `json:"server_name"`
	EarliestCancellationDate string      `json:"earliest_cancellation_date"`
	Cancelled                bool        `json:"cancelled"`
	CancellationDate         string      `json:"cancellation_date"`
	CancellationReason       interface{} `json:"cancellation_reason"`
}

type CancellationResponse

type CancellationResponse struct {
	Cancellation Cancellation `json:"cancellation"`
}

type Failover added in v0.1.3

type Failover struct {
	IP             string `json:"ip"`
	Netmask        string `json:"netmask"`
	ServerIP       string `json:"server_ip"`
	ServerNumber   int    `json:"server_number"`
	ActiveServerIP string `json:"active_server_ip"`
}

type FailoverResponse added in v0.1.3

type FailoverResponse struct {
	Failover Failover `json:"failover"`
}

type IP

type IP struct {
	IP              string `json:"ip"`
	ServerIP        string `json:"server_ip"`
	ServerNumber    int    `json:"server_number"`
	Locked          bool   `json:"locked"`
	SeparateMac     string `json:"separate_mac"`
	TrafficWarnings bool   `json:"traffic_warnings"`
	TrafficHourly   int    `json:"traffic_hourly"`
	TrafficDaily    int    `json:"traffic_daily"`
	TrafficMonthly  int    `json:"traffic_monthly"`
}

type IPResponse

type IPResponse struct {
	IP IP `json:"ip"`
}

type Key

type Key struct {
	Name        string `json:"name"`
	Fingerprint string `json:"fingerprint"`
	Type        string `json:"type"`
	Size        int    `json:"size"`
	Data        string `json:"data"`
}

type KeyResponse

type KeyResponse struct {
	Key Key `json:"key"`
}

type Rdns

type Rdns struct {
	IP  string `json:"ip"`
	Ptr string `json:"ptr"`
}

type RdnsResponse

type RdnsResponse struct {
	Rdns Rdns `json:"rdns"`
}

type Rescue

type Rescue struct {
	ServerIP      string          `json:"server_ip"`
	ServerNumber  int             `json:"server_number"`
	Os            interface{}     `json:"os"`   // unfortunately the API returns an array vs. a single value based on state (active/inactive)
	Arch          interface{}     `json:"arch"` // unfortunately the API returns an array vs. a single value based on state (active/inactive)
	Active        bool            `json:"active"`
	Password      string          `json:"password"`
	AuthorizedKey []AuthorizedKey `json:"authorized_key"`
	HostKey       []interface{}   `json:"host_key"`
}

type RescueGetResponse

type RescueGetResponse struct {
	Rescue Rescue `json:"rescue"`
}

type RescueSetInput

type RescueSetInput struct {
	OS            string
	Arch          int
	AuthorizedKey string
}

type Reset

type Reset struct {
	OperatingStatus string   `json:"operating_status"`
	ServerIP        string   `json:"server_ip"`
	ServerNumber    int      `json:"server_number"`
	Type            []string `json:"type"`
}

type ResetPost

type ResetPost struct {
	ServerIP string `json:"server_ip"`
	Type     string `json:"type"`
}

type ResetPostResponse

type ResetPostResponse struct {
	Reset ResetPost `json:"reset"`
}

type ResetResponse

type ResetResponse struct {
	Reset Reset `json:"reset"`
}

type ResetSetInput

type ResetSetInput struct {
	Type string
}

type Server

type Server struct {
	ServerIP      string   `json:"server_ip"`
	ServerIPv6Net string   `json:"server_ipv6_net"`
	ServerNumber  int      `json:"server_number"`
	ServerName    string   `json:"server_name"`
	Product       string   `json:"product"`
	Dc            string   `json:"dc"`
	Traffic       string   `json:"traffic"`
	Flatrate      bool     `json:"flatrate"`
	Status        string   `json:"status"`
	Throttled     bool     `json:"throttled"`
	Cancelled     bool     `json:"cancelled"`
	PaidUntil     string   `json:"paid_until"`
	IP            []string `json:"ip"`
	Subnet        []Subnet `json:"subnet"`
	Reset         bool     `json:"reset"`
	Rescue        bool     `json:"rescue"`
	Vnc           bool     `json:"vnc"`
	Windows       bool     `json:"windows"`
	Plesk         bool     `json:"plesk"`
	Cpanel        bool     `json:"cpanel"`
	Wol           bool     `json:"wol"`
	HotSwap       bool     `json:"hot_swap"`
}

type ServerResponse

type ServerResponse struct {
	Server Server `json:"server"`
}

type ServerSetNameInput

type ServerSetNameInput struct {
	Name string
}

type Subnet

type Subnet struct {
	IP   string `json:"ip"`
	Mask string `json:"mask"`
}

Jump to

Keyboard shortcuts

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