Documentation ¶
Index ¶
- Constants
- type APIError
- type ActivateCPanelRequest
- type ActivateLinuxRequest
- type ActivatePleskRequest
- type ActivateRescueRequest
- type ActivateVncRequest
- type ActivateWindowsRequest
- type ActiveMeta
- type AuthorizedKey
- type Boot
- type BootService
- type BootServiceImpl
- func (s *BootServiceImpl) ActivateCPanel(req *ActivateCPanelRequest) (*Cpanel, *http.Response, error)
- func (s *BootServiceImpl) ActivateLinux(req *ActivateLinuxRequest) (*Linux, *http.Response, error)
- func (s *BootServiceImpl) ActivatePlesk(req *ActivateWindowsRequest) (*Plesk, *http.Response, error)
- func (s *BootServiceImpl) ActivateRescue(req ActivateRescueRequest) (*Rescue, *http.Response, error)
- func (s *BootServiceImpl) ActivateVnc(req *ActivateLinuxRequest) (*Vnc, *http.Response, error)
- func (s *BootServiceImpl) ActivateWindows(req *ActivateWindowsRequest) (*Windows, *http.Response, error)
- func (s *BootServiceImpl) DeactivateCPanel(ServerNumber string) (*Cpanel, *http.Response, error)
- func (s *BootServiceImpl) DeactivateLinux(ServerNumber string) (*Linux, *http.Response, error)
- func (s *BootServiceImpl) DeactivatePlesk(ServerNumber string) (*Plesk, *http.Response, error)
- func (s *BootServiceImpl) DeactivateRescue(ServerNumber string) (*Rescue, *http.Response, error)
- func (s *BootServiceImpl) DeactivateVnc(ServerNumber string) (*Vnc, *http.Response, error)
- func (s *BootServiceImpl) DeactivateWindows(ServerNumber string) (*Windows, *http.Response, error)
- func (s *BootServiceImpl) GetBoot(ServerNumber string) (*Boot, *http.Response, error)
- func (s *BootServiceImpl) GetCPanel(ServerNumber string) (*Cpanel, *http.Response, error)
- func (s *BootServiceImpl) GetLinux(ServerNumber string) (*Linux, *http.Response, error)
- func (s *BootServiceImpl) GetLinuxLast(ServerNumber string) (*Linux, *http.Response, error)
- func (s *BootServiceImpl) GetPlesk(ServerNumber string) (*Plesk, *http.Response, error)
- func (s *BootServiceImpl) GetRescue(ServerNumber string) (*Rescue, *http.Response, error)
- func (s *BootServiceImpl) GetRescueLast(ServerNumber string) (*Rescue, *http.Response, error)
- func (s *BootServiceImpl) GetVnc(ServerNumber string) (*Vnc, *http.Response, error)
- func (s *BootServiceImpl) GetWindows(ServerNumber string) (*Windows, *http.Response, error)
- type CancelServerRequest
- type Cancellation
- type Client
- func (c *Client) Call(method, path string, reqBody, resType interface{}) (*http.Response, error)
- func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error)
- func (c *Client) NewRequest(method, path string, request interface{}) (*http.Request, error)
- func (c *Client) WithTimeout(timeout time.Duration) *Client
- func (c *Client) WithUserAgent(ua string) *Client
- type Cpanel
- type CreateTransactionRequest
- type ErrorResponse
- type Failover
- type FailoverService
- type FailoverServiceImpl
- func (s *FailoverServiceImpl) Delete(failoverIP string) (*Failover, *http.Response, error)
- func (s *FailoverServiceImpl) Get(failoverIP string) (*Failover, *http.Response, error)
- func (s *FailoverServiceImpl) List() ([]*Failover, *http.Response, error)
- func (s *FailoverServiceImpl) Switch(req FailoverSwitchRequest) (*Failover, *http.Response, error)
- type FailoverSwitchRequest
- type HostKey
- type IP
- type IpService
- type IpServiceImpl
- func (s *IpServiceImpl) CreateMac(ip string) (*Mac, *http.Response, error)
- func (s *IpServiceImpl) DeleteMac(ip string) (*Mac, *http.Response, error)
- func (s *IpServiceImpl) Get(ip string) (*IpSummary, *http.Response, error)
- func (s *IpServiceImpl) GetMac(ip string) (*Mac, *http.Response, error)
- func (s *IpServiceImpl) List() ([]*IP, *http.Response, error)
- func (s *IpServiceImpl) UpdateWarring(req *IpUpdateRequest) (*IpSummary, *http.Response, error)
- type IpSummary
- type IpUpdateRequest
- type JSONTime
- type Linux
- type Mac
- type MarketProduct
- type OrderingService
- type OrderingServiceImpl
- func (s *OrderingServiceImpl) CreateMarketTransaction(req *CreateTransactionRequest) (*Transaction, *http.Response, error)
- func (s *OrderingServiceImpl) CreateTransaction(req *CreateTransactionRequest) (*Transaction, *http.Response, error)
- func (s *OrderingServiceImpl) GetMarketProduct(id string) (*Product, *http.Response, error)
- func (s *OrderingServiceImpl) GetMarketTransaction(id string) (*Transaction, *http.Response, error)
- func (s *OrderingServiceImpl) GetProduct(id string) (*Product, *http.Response, error)
- func (s *OrderingServiceImpl) GetTransaction(id string) (*Transaction, *http.Response, error)
- func (s *OrderingServiceImpl) ListMarketProducts() ([]*MarketProduct, *http.Response, error)
- func (s *OrderingServiceImpl) ListMarketTransactions() ([]*Transaction, *http.Response, error)
- func (s *OrderingServiceImpl) ListProducts() ([]*Product, *http.Response, error)
- func (s *OrderingServiceImpl) ListTransactions() ([]*Transaction, *http.Response, error)
- type Plesk
- type Product
- type RDNS
- type RDNSService
- type RDNSServiceImpl
- func (s *RDNSServiceImpl) Create(req *RDNSUpdateRequest) (*RDNS, *http.Response, error)
- func (s *RDNSServiceImpl) Delete(ip string) (*RDNS, *http.Response, error)
- func (s *RDNSServiceImpl) Get(ip string) (*RDNS, *http.Response, error)
- func (s *RDNSServiceImpl) List() ([]*RDNS, *http.Response, error)
- func (s *RDNSServiceImpl) Update(req *RDNSUpdateRequest) (*RDNS, *http.Response, error)
- type RDNSUpdateRequest
- type Rescue
- type Reset
- type ResetCreateRequest
- type ResetCreateResponse
- type ResetService
- type ResetServiceImpl
- type SSHKey
- type SSHKeyCreateRequest
- type SSHKeyService
- type SSHKeyServiceImpl
- func (s *SSHKeyServiceImpl) Create(req *SSHKeyCreateRequest) (*SSHKey, *http.Response, error)
- func (s *SSHKeyServiceImpl) Delete(fingerprint string) (*http.Response, error)
- func (s *SSHKeyServiceImpl) Get(fingerprint string) (*SSHKey, *http.Response, error)
- func (s *SSHKeyServiceImpl) List() ([]*SSHKey, *http.Response, error)
- func (s *SSHKeyServiceImpl) Update(req *SSHKeyUpdateRequest) (*SSHKey, *http.Response, error)
- type SSHKeyUpdateRequest
- type Server
- type ServerService
- type ServerServiceImpl
- func (s *ServerServiceImpl) CancelServer(req *CancelServerRequest) (*Cancellation, *http.Response, error)
- func (s *ServerServiceImpl) Get(ServerNumber string) (*Server, *http.Response, error)
- func (s *ServerServiceImpl) GetCancellation(ServerNumber string) (*Cancellation, *http.Response, error)
- func (s *ServerServiceImpl) List() ([]*ServerSummary, *http.Response, error)
- func (s *ServerServiceImpl) Update(req *UpdateServerRequest) (*Server, *http.Response, error)
- func (s *ServerServiceImpl) WithdrawCancellation(ServerNumber string) (*http.Response, error)
- func (s *ServerServiceImpl) WithdrawOrder(req *WithdrawOrderRequest) (*Cancellation, *http.Response, error)
- type ServerSummary
- type Subnet
- type SubnetMac
- type SubnetService
- type SubnetServiceImpl
- func (s *SubnetServiceImpl) CreateMac(netIP string) (*SubnetMac, *http.Response, error)
- func (s *SubnetServiceImpl) DeleteMac(netIP string) (*SubnetMac, *http.Response, error)
- func (s *SubnetServiceImpl) Get(netIP string) (*Subnet, *http.Response, error)
- func (s *SubnetServiceImpl) GetMac(netIP string) (*SubnetMac, *http.Response, error)
- func (s *SubnetServiceImpl) List() ([]*Subnet, *http.Response, error)
- func (s *SubnetServiceImpl) UpdateWarring(req *SubnetUpdateRequest) (*Subnet, *http.Response, error)
- type SubnetUpdateRequest
- type Traffic
- type TrafficDataRow
- type TrafficGroup
- type TrafficRequest
- type TrafficService
- type TrafficServiceImpl
- type Transaction
- type UpdateServerRequest
- type Vnc
- type WOL
- type WOLService
- type WOLServiceImpl
- type Windows
- type WithdrawOrderRequest
Constants ¶
const ( // UserAgent contains user agent identifier UserAgent = "intboat/go-hetzner" // DefaultEndpoint to be used DefaultEndpoint = "https://robot-ws.your-server.de" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct { // HTTP response that caused this error Response *http.Response `json:"-"` Status int `json:"status"` Code string `json:"code"` Message string `json:"message"` // Array of missing input parameters or null Missing []string `json:"missing"` // Array of invalid input parameters or null Invalid []string `json:"invalid"` // Maximum allowed requests MaxRequest int `json:"max_request"` // Time interval in seconds Interval int `json:"interval"` }
APIError An ErrorResponse reports the error caused by an API request
type ActivateCPanelRequest ¶
type ActivateCPanelRequest struct { ActiveMeta // contains filtered or unexported fields }
type ActivateLinuxRequest ¶
type ActivateLinuxRequest struct { ActiveMeta AuthorizedKey *[]string `url:"authorized_key,brackets"` // One or more SSH key fingerprints (optional) }
type ActivatePleskRequest ¶
type ActivatePleskRequest struct { ActiveMeta Hostname *string `url:"hostname"` // Hostname }
type ActivateRescueRequest ¶
type ActivateRescueRequest struct { ActiveMeta AuthorizedKey *[]string `url:"authorized_key,brackets"` // One or more SSH key fingerprints (optional) }
type ActivateVncRequest ¶
type ActivateVncRequest struct {
ActiveMeta
}
type ActivateWindowsRequest ¶
type ActivateWindowsRequest struct {
ActiveMeta
}
type ActiveMeta ¶
type AuthorizedKey ¶
type BootService ¶
type BootService interface { GetBoot(ServerNumber string) (*Boot, *http.Response, error) GetRescue(ServerNumber string) (*Rescue, *http.Response, error) ActivateRescue(req ActivateRescueRequest) (*Rescue, *http.Response, error) DeactivateRescue(ServerNumber string) (*Rescue, *http.Response, error) GetRescueLast(ServerNumber string) (*Rescue, *http.Response, error) GetLinux(ServerNumber string) (*Linux, *http.Response, error) ActivateLinux(req *ActivateLinuxRequest) (*Linux, *http.Response, error) DeactivateLinux(ServerNumber string) (*Linux, *http.Response, error) GetLinuxLast(ServerNumber string) (*Linux, *http.Response, error) GetVnc(ServerNumber string) (*Vnc, *http.Response, error) ActivateVnc(req *ActivateLinuxRequest) (*Vnc, *http.Response, error) DeactivateVnc(ServerNumber string) (*Vnc, *http.Response, error) GetWindows(ServerNumber string) (*Windows, *http.Response, error) ActivateWindows(req *ActivateWindowsRequest) (*Windows, *http.Response, error) DeactivateWindows(ServerNumber string) (*Windows, *http.Response, error) GetPlesk(ServerNumber string) (*Plesk, *http.Response, error) ActivatePlesk(req *ActivateWindowsRequest) (*Plesk, *http.Response, error) DeactivatePlesk(ServerNumber string) (*Plesk, *http.Response, error) GetCPanel(ServerNumber string) (*Cpanel, *http.Response, error) ActivateCPanel(req *ActivateCPanelRequest) (*Cpanel, *http.Response, error) DeactivateCPanel(ServerNumber string) (*Cpanel, *http.Response, error) }
BootService represents a service to work with boot service.
type BootServiceImpl ¶
type BootServiceImpl struct {
// contains filtered or unexported fields
}
func (*BootServiceImpl) ActivateCPanel ¶
func (s *BootServiceImpl) ActivateCPanel(req *ActivateCPanelRequest) (*Cpanel, *http.Response, error)
ActivateCPanel Activate cPanel installation See: https://robot.your-server.de/doc/webservice/en.html#post-boot-server-number-cpanel
func (*BootServiceImpl) ActivateLinux ¶
func (s *BootServiceImpl) ActivateLinux(req *ActivateLinuxRequest) (*Linux, *http.Response, error)
ActivateLinux Activate Linux installation See: https://robot.your-server.de/doc/webservice/en.html#post-boot-server-number-linux
func (*BootServiceImpl) ActivatePlesk ¶
func (s *BootServiceImpl) ActivatePlesk(req *ActivateWindowsRequest) (*Plesk, *http.Response, error)
ActivatePlesk Activate Plesk installation See: https://robot.your-server.de/doc/webservice/en.html#post-boot-server-number-plesk
func (*BootServiceImpl) ActivateRescue ¶
func (s *BootServiceImpl) ActivateRescue(req ActivateRescueRequest) (*Rescue, *http.Response, error)
ActivateRescue Activate Rescue System See: https://robot.your-server.de/doc/webservice/en.html#post-boot-server-number-rescue
func (*BootServiceImpl) ActivateVnc ¶
func (s *BootServiceImpl) ActivateVnc(req *ActivateLinuxRequest) (*Vnc, *http.Response, error)
ActivateVnc Activate VNC installation See: https://robot.your-server.de/doc/webservice/en.html#post-boot-server-number-vnc
func (*BootServiceImpl) ActivateWindows ¶
func (s *BootServiceImpl) ActivateWindows(req *ActivateWindowsRequest) (*Windows, *http.Response, error)
ActivateWindows Activate Windows installation. You need to order the Windows addon for the server via the Robot web panel first. After a reboot, the installation will start, and all data on the server will be deleted. See: https://robot.your-server.de/doc/webservice/en.html#post-boot-server-number-windows
func (*BootServiceImpl) DeactivateCPanel ¶
DeactivateCPanel Deactivate cPanel installation See: https://robot.your-server.de/doc/webservice/en.html#delete-boot-server-number-cpanel
func (*BootServiceImpl) DeactivateLinux ¶
DeactivateLinux Deactivate Linux installation See: https://robot.your-server.de/doc/webservice/en.html#delete-boot-server-number-linux
func (*BootServiceImpl) DeactivatePlesk ¶
DeactivatePlesk Deactivate Plesk installation See: https://robot.your-server.de/doc/webservice/en.html#delete-boot-server-number-plesk
func (*BootServiceImpl) DeactivateRescue ¶
DeactivateRescue Deactivate Rescue System See: https://robot.your-server.de/doc/webservice/en.html#delete-boot-server-number-rescue
func (*BootServiceImpl) DeactivateVnc ¶
DeactivateVnc Deactivate VNC installation See: https://robot.your-server.de/doc/webservice/en.html#delete-boot-server-number-vnc
func (*BootServiceImpl) DeactivateWindows ¶
DeactivateWindows Deactivate Windows installation See: https://robot.your-server.de/doc/webservice/en.html#delete-boot-server-number-vnc
func (*BootServiceImpl) GetBoot ¶
GetBoot Query the current boot configuration status for a server. There can be only one configuration active at any time for one server. See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number
func (*BootServiceImpl) GetCPanel ¶
GetCPanel Query boot options for the cPanel installation See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-ip-cpanel
func (*BootServiceImpl) GetLinux ¶
GetLinux Query boot options for the Linux installation See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number-linux
func (*BootServiceImpl) GetLinuxLast ¶
GetLinuxLast Show data of last Linux installation See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number-linux-last
func (*BootServiceImpl) GetPlesk ¶
GetPlesk Query boot options for the Plesk installation See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number-windows
func (*BootServiceImpl) GetRescue ¶
GetRescue Query boot options for the Rescue System See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number-rescue
func (*BootServiceImpl) GetRescueLast ¶
GetRescueLast Show data of last rescue activation See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number-rescue-last
func (*BootServiceImpl) GetVnc ¶
GetVnc Query boot options for the VNC installation See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number-vnc
func (*BootServiceImpl) GetWindows ¶
GetWindows Query boot options for the windows installation See: https://robot.your-server.de/doc/webservice/en.html#get-boot-server-number-windows
type CancelServerRequest ¶
type CancelServerRequest struct { ServerNumber string // Server ID CancellationDate string `url:"cancellation_date"` // Date to which the server should be cancelled CancellationReason string `url:"cancellation_reason,omitempty"` // Cancellation reason, optional ReserveLocation bool `url:"reserve_location"` // Whether server location shall be reserved ('true' or 'false') }
type Cancellation ¶
type Cancellation struct { ServerIp string `json:"server_ip"` ServerIpv6Net string `json:"server_ipv6_net"` ServerNumber int `json:"server_number"` ServerName string `json:"server_name"` EarliestCancellationDate JSONTime `json:"earliest_cancellation_date"` Cancelled bool `json:"cancelled"` Reserved bool `json:"reserved"` ReservationPossible bool `json:"reservation_possible"` CancellationDate JSONTime `json:"cancellation_date"` CancellationReason []string `json:"cancellation_reason"` }
type Client ¶
type Client struct { // Base URL for API requests. BaseURL string // User agent for client UserAgent string // Debug will dump http request and response Debug bool Boot BootService Ordering OrderingService Reset ResetService Server ServerService SSHKey SSHKeyService Failover FailoverService IP IpService Subnet SubnetService Wol WOLService Traffic TrafficService // contains filtered or unexported fields }
func (*Client) Do ¶
Do send an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. If specified, the value pointed to by request is www-form-urlencoded and included in as the request body.
func (*Client) WithUserAgent ¶
type Cpanel ¶
type Cpanel struct { ServerIp string `json:"server_ip"` ServerIpv6Net string `json:"server_ipv6_net"` ServerNumber int `json:"server_number"` Dist []string `json:"dist"` Arch []int `json:"arch"` Lang []string `json:"lang"` Active bool `json:"active"` Password *string `json:"password"` Hostname *string `json:"hostname"` }
type CreateTransactionRequest ¶
type CreateTransactionRequest struct { ProductID string `url:"product_id"` AuthorizedKey []string `url:"authorized_key,brackets"` Password string `url:"password,omitempty"` Location string `url:"location"` Dist string `url:"dist,omitempty"` Arch int `url:"arch,omitempty"` Lang string `url:"lang,omitempty"` Comment string `url:"comment,omitempty"` Addon []string `url:"addon,brackets"` Test bool `url:"test"` }
type ErrorResponse ¶
type ErrorResponse struct { // HTTP response that caused this error Response *http.Response // Error message Message string `json:"message"` }
An ErrorResponse reports the error caused by an API request
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type Failover ¶
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"` }
FailoverSummary contains information about failover ip
type FailoverService ¶
type FailoverService interface { List() ([]*Failover, *http.Response, error) Get(failoverIP string) (*Failover, *http.Response, error) Switch(req FailoverSwitchRequest) (*Failover, *http.Response, error) Delete(failoverIP string) (*Failover, *http.Response, error) }
FailoverService represents a service to work with failover ips.
type FailoverServiceImpl ¶
type FailoverServiceImpl struct {
// contains filtered or unexported fields
}
func (*FailoverServiceImpl) Delete ¶
Delete the routing of a failover IP When successful, returns updated information about the failover IP See: https://robot.your-server.de/doc/webservice/en.html#delete-failover-failover-ip
func (*FailoverServiceImpl) Get ¶
Get Query specific failover IP address data See: https://robot.your-server.de/doc/webservice/en.html#get-failover-failover-ip
func (*FailoverServiceImpl) List ¶
func (s *FailoverServiceImpl) List() ([]*Failover, *http.Response, error)
List Query failover data for all servers See: https://robot.your-server.de/doc/webservice/en.html#get-failover
func (*FailoverServiceImpl) Switch ¶
func (s *FailoverServiceImpl) Switch(req FailoverSwitchRequest) (*Failover, *http.Response, error)
Switch traffic of failoverIP to the server with ip newActiveIP. When successful, returns updated information about the failover IP See: https://robot.your-server.de/doc/webservice/en.html#post-failover-failover-ip
type FailoverSwitchRequest ¶
type FailoverSwitchRequest struct { FailoverIP string ActiveServerIP string `url:"active_server_ip"` // Main IP address of the server where the failover IP should be routed to. }
FailoverSwitchRequest describes parameters of POST /failover API call
type IP ¶
type IP struct { IP string `json:"ip"` Locked bool `json:"locked"` SeparateMac string `json:"separate_mac"` ServerIp string `json:"server_ip"` ServerNumber int `json:"server_number"` TrafficDaily int `json:"traffic_daily"` TrafficHourly int `json:"traffic_hourly"` TrafficMonthly int `json:"traffic_monthly"` TrafficWarnings bool `json:"traffic_warnings"` }
type IpService ¶
type IpService interface { List() ([]*IP, *http.Response, error) Get(ip string) (*IpSummary, *http.Response, error) UpdateWarring(req *IpUpdateRequest) (*IpSummary, *http.Response, error) GetMac(ip string) (*Mac, *http.Response, error) CreateMac(ip string) (*Mac, *http.Response, error) DeleteMac(ip string) (*Mac, *http.Response, error) }
IpService represents a service to work with IP.
type IpServiceImpl ¶
type IpServiceImpl struct {
// contains filtered or unexported fields
}
func (*IpServiceImpl) CreateMac ¶
CreateMac Generate a separate MAC address See: https://robot.your-server.de/doc/webservice/en.html#put-ip-ip-mac
func (*IpServiceImpl) DeleteMac ¶
DeleteMac Remove a separate MAC address See: https://robot.your-server.de/doc/webservice/en.html#delete-ip-ip-mac
func (*IpServiceImpl) Get ¶
Get Query data for a specific IP address See: https://robot.your-server.de/doc/webservice/en.html#get-ip-ip
func (*IpServiceImpl) GetMac ¶
GetMac Query if it is possible to set a separate MAC address. Returns the MAC address if it is set. See: https://robot.your-server.de/doc/webservice/en.html#get-ip-ip-mac
func (*IpServiceImpl) List ¶
func (s *IpServiceImpl) List() ([]*IP, *http.Response, error)
List Query list of all single IP addresses See: https://robot.your-server.de/doc/webservice/en.html#get-ip
func (*IpServiceImpl) UpdateWarring ¶
func (s *IpServiceImpl) UpdateWarring(req *IpUpdateRequest) (*IpSummary, *http.Response, error)
UpdateWarring update traffic warning options for an IP address See: https://robot.your-server.de/doc/webservice/en.html#post-ip-ip
type IpUpdateRequest ¶
type IpUpdateRequest struct { IP string TrafficWarnings string `url:"traffic_warnings"` // Enable/disable traffic warnings (true, false) TrafficHourly string `url:"traffic_hourly"` // Hourly traffic limit in MB TrafficDaily string `url:"traffic_daily"` // Daily traffic limit in MB TrafficMonthly string `url:"traffic_monthly"` // Monthly traffic limit in GB }
type Linux ¶
type Linux struct { ServerIp string `json:"server_ip"` ServerIpv6Net string `json:"server_ipv6_net"` ServerNumber int `json:"server_number"` Dist []string `json:"dist"` Arch []int `json:"arch"` Lang []string `json:"lang"` Active bool `json:"active"` Password *string `json:"password"` AuthorizedKey []*AuthorizedKey `json:"authorized_key"` HostKey []*HostKey `json:"host_key"` }
type MarketProduct ¶
type MarketProduct struct { Id int `json:"id"` Name string `json:"name"` Description []string `json:"description"` Traffic string `json:"traffic"` Dist []string `json:"dist"` Arch []int `json:"arch"` Lang []string `json:"lang"` Cpu string `json:"cpu"` CpuBenchmark int `json:"cpu_benchmark"` MemorySize int `json:"memory_size"` HddSize int `json:"hdd_size"` HddText string `json:"hdd_text"` HddCount int `json:"hdd_count"` Datacenter string `json:"datacenter"` NetworkSpeed string `json:"network_speed"` Price float64 `json:"price,string"` PriceSetup float64 `json:"price_setup,string"` PriceVat float64 `json:"price_vat,string"` PriceSetupVat float64 `json:"price_setup_vat,string"` FixedPrice bool `json:"fixed_price"` NextReduce int `json:"next_reduce"` NextReduceDate JSONTime `json:"next_reduce_date"` OrderableAddons []struct { Id string `json:"id"` Name string `json:"name"` Min int `json:"min"` Max int `json:"max"` Prices []struct { Location string `json:"location"` Price struct { Net float64 `json:"net,string"` Gross float64 `json:"gross,string"` } `json:"price"` PriceSetup struct { Net float64 `json:"net,string"` Gross float64 `json:"gross,string"` } `json:"price_setup"` } `json:"prices"` } `json:"orderable_addons"` }
type OrderingService ¶
type OrderingService interface { ListProducts() ([]*Product, *http.Response, error) GetProduct(id string) (*Product, *http.Response, error) ListTransactions() ([]*Transaction, *http.Response, error) CreateTransaction(req *CreateTransactionRequest) (*Transaction, *http.Response, error) GetTransaction(id string) (*Transaction, *http.Response, error) ListMarketProducts() ([]*MarketProduct, *http.Response, error) GetMarketProduct(id string) (*Product, *http.Response, error) ListMarketTransactions() ([]*Transaction, *http.Response, error) CreateMarketTransaction(req *CreateTransactionRequest) (*Transaction, *http.Response, error) GetMarketTransaction(id string) (*Transaction, *http.Response, error) }
OrderingService represents a service to work with server ordering. To use the Robot webservice for ordering servers, please activate this function in your Robot administrative interface first via "Administration; Settings; Web Service Settings; Ordering".
type OrderingServiceImpl ¶
type OrderingServiceImpl struct {
// contains filtered or unexported fields
}
func (*OrderingServiceImpl) CreateMarketTransaction ¶
func (s *OrderingServiceImpl) CreateMarketTransaction(req *CreateTransactionRequest) ( *Transaction, *http.Response, error, )
CreateMarketTransaction Order a new server from the server market. If the order is successful, the status code 201 CREATED is returned. See: https://robot.your-server.de/doc/webservice/en.html#post-order-server_market-transaction
func (*OrderingServiceImpl) CreateTransaction ¶
func (s *OrderingServiceImpl) CreateTransaction(req *CreateTransactionRequest) (*Transaction, *http.Response, error)
CreateTransaction Order a new server. If the order is successful, the status code 201 CREATED is returned. See: https://robot.your-server.de/doc/webservice/en.html#post-order-server-transaction
func (*OrderingServiceImpl) GetMarketProduct ¶
GetMarketProduct Query a specific server market product See: https://robot.your-server.de/doc/webservice/en.html#get-order-server_market-product-product-id
func (*OrderingServiceImpl) GetMarketTransaction ¶
func (s *OrderingServiceImpl) GetMarketTransaction(id string) (*Transaction, *http.Response, error)
GetMarketTransaction Query a specific order transaction See: https://robot.your-server.de/doc/webservice/en.html#get-order-server_market-transaction-id
func (*OrderingServiceImpl) GetProduct ¶
GetProduct Query a specific server product See: https://robot.your-server.de/doc/webservice/en.html#get-order-server-product-product-id
func (*OrderingServiceImpl) GetTransaction ¶
func (s *OrderingServiceImpl) GetTransaction(id string) (*Transaction, *http.Response, error)
GetTransaction Query a specific order transaction See: https://robot.your-server.de/doc/webservice/en.html#get-order-server-transaction-id
func (*OrderingServiceImpl) ListMarketProducts ¶
func (s *OrderingServiceImpl) ListMarketProducts() ([]*MarketProduct, *http.Response, error)
ListMarketProducts Product overview of currently offered server market products See: https://robot.your-server.de/doc/webservice/en.html#get-order-server_market-product
func (*OrderingServiceImpl) ListMarketTransactions ¶
func (s *OrderingServiceImpl) ListMarketTransactions() ([]*Transaction, *http.Response, error)
ListMarketTransactions Overview of all server orders within the last 30 days See: https://robot.your-server.de/doc/webservice/en.html#get-order-server_market-product-product-id
func (*OrderingServiceImpl) ListProducts ¶
func (s *OrderingServiceImpl) ListProducts() ([]*Product, *http.Response, error)
ListProducts Product overview of currently offered standard server products See: https://robot.your-server.de/doc/webservice/en.html#get-order-server-product
func (*OrderingServiceImpl) ListTransactions ¶
func (s *OrderingServiceImpl) ListTransactions() ([]*Transaction, *http.Response, error)
ListTransactions Overview of all server orders within the last 30 days See: https://robot.your-server.de/doc/webservice/en.html#get-order-server-product-product-id
type Plesk ¶
type Plesk struct { ServerIp string `json:"server_ip"` ServerIpv6Net string `json:"server_ipv6_net"` ServerNumber int `json:"server_number"` Dist []string `json:"dist"` Arch []int `json:"arch"` Lang []string `json:"lang"` Active bool `json:"active"` Password *string `json:"password"` Hostname *string `json:"hostname"` }
type Product ¶
type Product struct { ID string `json:"id"` Name string `json:"name"` Description []string `json:"description"` Traffic string `json:"traffic"` Dist []string `json:"dist"` Arch []int `json:"arch"` Lang []string `json:"lang"` Location []string `json:"location"` Prices []struct { Location string `json:"location"` Price struct { Net float64 `json:"net,string"` Gross float64 `json:"gross,string"` } `json:"price"` PriceSetup struct { Net float64 `json:"net,string"` Gross float64 `json:"gross,string"` } `json:"price_setup"` } `json:"prices"` OrderableAddons []struct { Id string `json:"id"` Name string `json:"name"` Min int `json:"min"` Max int `json:"max"` Prices []struct { Location string `json:"location"` Price struct { Net float64 `json:"net,string"` Gross float64 `json:"gross,string"` } `json:"price"` PriceSetup struct { Net float64 `json:"net,string"` Gross float64 `json:"gross,string"` } `json:"price_setup"` } `json:"prices"` } `json:"orderable_addons"` }
type RDNSService ¶
type RDNSService interface { List() ([]*RDNS, *http.Response, error) Get(ip string) (*RDNS, *http.Response, error) Create(req *RDNSUpdateRequest) (*RDNS, *http.Response, error) Update(req *RDNSUpdateRequest) (*RDNS, *http.Response, error) Delete(ip string) (*RDNS, *http.Response, error) }
RDNSService represents a service to work with Reverse DNS.
type RDNSServiceImpl ¶
type RDNSServiceImpl struct {
// contains filtered or unexported fields
}
func (*RDNSServiceImpl) Create ¶
func (s *RDNSServiceImpl) Create(req *RDNSUpdateRequest) (*RDNS, *http.Response, error)
Create new reverse DNS entry for one IP address. Once the reverse DNS entry is successfully created, the status code 201 CREATED is returned. See: https://robot.your-server.de/doc/webservice/en.html#put-rdns-ip
func (*RDNSServiceImpl) Delete ¶
Delete reverse DNS entry for one IP See: https://robot.your-server.de/doc/webservice/en.html#delete-rdns-ip
func (*RDNSServiceImpl) Get ¶
Get Query the current reverse DNS entry for one IP address See: https://robot.your-server.de/doc/webservice/en.html#get-ip-ip
func (*RDNSServiceImpl) List ¶
func (s *RDNSServiceImpl) List() ([]*RDNS, *http.Response, error)
List Query all rDNS entries See: https://robot.your-server.de/doc/webservice/en.html#get-rdns
func (*RDNSServiceImpl) Update ¶
func (s *RDNSServiceImpl) Update(req *RDNSUpdateRequest) (*RDNS, *http.Response, error)
Update create or Update a reverse DNS entry for one IP. Once the reverse DNS entry is successfully created, the status code is set to 201 created. On successful updates, the status code is 200 OK. See: https://robot.your-server.de/doc/webservice/en.html#post-rdns-ip
type RDNSUpdateRequest ¶
type Rescue ¶
type Rescue struct { ServerIp string `json:"server_ip"` ServerIpv6Net string `json:"server_ipv6_net"` ServerNumber int `json:"server_number"` Os []string `json:"os"` Arch []int `json:"arch"` Active bool `json:"active"` Password *string `json:"password"` AuthorizedKey []*AuthorizedKey `json:"authorized_key"` HostKey []*HostKey `json:"host_key"` }
type ResetCreateRequest ¶
type ResetCreateResponse ¶
type ResetService ¶
type ResetService interface { List() ([]*Reset, *http.Response, error) Get(serverIP string) (*Reset, *http.Response, error) Reset(req *ResetCreateRequest) (*Reset, *http.Response, error) }
ResetService represents a service to work with Reset ordering.
type ResetServiceImpl ¶
type ResetServiceImpl struct {
// contains filtered or unexported fields
}
func (*ResetServiceImpl) Get ¶
Get Query reset options for a specific server See: https://robot.your-server.de/doc/webservice/en.html#get-reset-server-number
func (*ResetServiceImpl) List ¶
func (s *ResetServiceImpl) List() ([]*Reset, *http.Response, error)
List Query reset options for all servers See: https://robot.your-server.de/doc/webservice/en.html#get-reset
func (*ResetServiceImpl) Reset ¶
func (s *ResetServiceImpl) Reset(req *ResetCreateRequest) (*Reset, *http.Response, error)
Reset Execute reset on specific server See: https://robot.your-server.de/doc/webservice/en.html#post-reset-server-number
type SSHKeyCreateRequest ¶
type SSHKeyService ¶
type SSHKeyService interface { List() ([]*SSHKey, *http.Response, error) Create(req *SSHKeyCreateRequest) (*SSHKey, *http.Response, error) Get(fingerprint string) (*SSHKey, *http.Response, error) Update(req *SSHKeyUpdateRequest) (*SSHKey, *http.Response, error) Delete(fingerprint string) (*http.Response, error) }
SSHKeyService represents a service to work with SSH service.
type SSHKeyServiceImpl ¶
type SSHKeyServiceImpl struct {
// contains filtered or unexported fields
}
func (*SSHKeyServiceImpl) Create ¶
func (s *SSHKeyServiceImpl) Create(req *SSHKeyCreateRequest) (*SSHKey, *http.Response, error)
Create Add a new SSH key. Once the key is successfully added, the status code 201 CREATED is returned. See: https://robot.your-server.de/doc/webservice/en.html#post-key
func (*SSHKeyServiceImpl) Delete ¶
func (s *SSHKeyServiceImpl) Delete(fingerprint string) (*http.Response, error)
Delete Remove public key See: https://robot.your-server.de/doc/webservice/en.html#delete-key-fingerprint
func (*SSHKeyServiceImpl) Get ¶
Get Query a specific SSH key See: https://robot.your-server.de/doc/webservice/en.html#get-key-fingerprint
func (*SSHKeyServiceImpl) List ¶
func (s *SSHKeyServiceImpl) List() ([]*SSHKey, *http.Response, error)
List Query all SSH keys See: https://robot.your-server.de/doc/webservice/en.html#get-key
func (*SSHKeyServiceImpl) Update ¶
func (s *SSHKeyServiceImpl) Update(req *SSHKeyUpdateRequest) (*SSHKey, *http.Response, error)
Update the key name See: https://robot.your-server.de/doc/webservice/en.html#post-key-fingerprint
type SSHKeyUpdateRequest ¶
type ServerService ¶
type ServerService interface { List() ([]*ServerSummary, *http.Response, error) Get(serverIP string) (*Server, *http.Response, error) Update(req *UpdateServerRequest) (*Server, *http.Response, error) GetCancellation(serverIP string) (*Cancellation, *http.Response, error) CancelServer(req *CancelServerRequest) (*Cancellation, *http.Response, error) WithdrawCancellation(serverIP string) (*http.Response, error) }
ServerService represents a service to work with server service.
type ServerServiceImpl ¶
type ServerServiceImpl struct {
// contains filtered or unexported fields
}
func (*ServerServiceImpl) CancelServer ¶
func (s *ServerServiceImpl) CancelServer(req *CancelServerRequest) (*Cancellation, *http.Response, error)
CancelServer Cancel a server See: https://robot.your-server.de/doc/webservice/en.html#post-server-server-number-cancellation
func (*ServerServiceImpl) Get ¶
Get Query server data for a specific server See: https://robot.your-server.de/doc/webservice/en.html#get-server-server-number
func (*ServerServiceImpl) GetCancellation ¶
func (s *ServerServiceImpl) GetCancellation(ServerNumber string) (*Cancellation, *http.Response, error)
GetCancellation Query cancellation data for a server See: https://robot.your-server.de/doc/webservice/en.html#get-server-server-number-cancellation
func (*ServerServiceImpl) List ¶
func (s *ServerServiceImpl) List() ([]*ServerSummary, *http.Response, error)
List Query data of all servers See: https://robot.your-server.de/doc/webservice/en.html#get-server
func (*ServerServiceImpl) Update ¶
func (s *ServerServiceImpl) Update(req *UpdateServerRequest) (*Server, *http.Response, error)
Update server name for a specific server See: https://robot.your-server.de/doc/webservice/en.html#post-server-server-number
func (*ServerServiceImpl) WithdrawCancellation ¶
func (s *ServerServiceImpl) WithdrawCancellation(ServerNumber string) (*http.Response, error)
WithdrawCancellation Withdraw a server cancellation See: https://robot.your-server.de/doc/webservice/en.html#delete-server-server-number-cancellation
func (*ServerServiceImpl) WithdrawOrder ¶
func (s *ServerServiceImpl) WithdrawOrder(req *WithdrawOrderRequest) (*Cancellation, *http.Response, error)
WithdrawOrder Withdraw a server order See: https://robot.your-server.de/doc/webservice/en.html#post-server-server-number-reversal
type ServerSummary ¶
type ServerSummary 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"` Status string `json:"status"` Cancelled bool `json:"cancelled"` PaidUntil string `json:"paid_until"` Ip []string `json:"ip"` Subnet []struct { Ip string `json:"ip"` Mask string `json:"mask"` } `json:"subnet"` }
type Subnet ¶
type Subnet struct { IP string `json:"ip"` Mask int `json:"mask"` Gateway string `json:"gateway"` ServerIp string `json:"server_ip"` ServerNumber int `json:"server_number"` Failover bool `json:"failover"` Locked bool `json:"locked"` TrafficWarnings bool `json:"traffic_warnings"` TrafficHourly int `json:"traffic_hourly"` TrafficDaily int `json:"traffic_daily"` TrafficMonthly int `json:"traffic_monthly"` }
type SubnetService ¶
type SubnetService interface { List() ([]*Subnet, *http.Response, error) Get(ip string) (*Subnet, *http.Response, error) UpdateWarring(req *SubnetUpdateRequest) (*Subnet, *http.Response, error) GetMac(ip string) (*SubnetMac, *http.Response, error) CreateMac(ip string) (*SubnetMac, *http.Response, error) DeleteMac(ip string) (*SubnetMac, *http.Response, error) }
SubnetService represents a service to work with Subnet.
type SubnetServiceImpl ¶
type SubnetServiceImpl struct {
// contains filtered or unexported fields
}
func (*SubnetServiceImpl) CreateMac ¶
CreateMac Generate a separate MAC address See: https://robot.your-server.de/doc/webservice/en.html#put-subnet-net-ip-mac
func (*SubnetServiceImpl) DeleteMac ¶
DeleteMac Remove a separate MAC address and set it to the default value (The MAC address of the servers main IP address). See: https://robot.your-server.de/doc/webservice/en.html#delete-subnet-net-ip-mac
func (*SubnetServiceImpl) Get ¶
Get Query data of a specific subnet See: https://robot.your-server.de/doc/webservice/en.html#get-subnet-net-ip
func (*SubnetServiceImpl) GetMac ¶
GetMac Query if it is possible to set a separate MAC address. See: https://robot.your-server.de/doc/webservice/en.html#get-subnet-net-ip-mac
func (*SubnetServiceImpl) List ¶
func (s *SubnetServiceImpl) List() ([]*Subnet, *http.Response, error)
List Query list of all subnets See: https://robot.your-server.de/doc/webservice/en.html#get-subnet
func (*SubnetServiceImpl) UpdateWarring ¶
func (s *SubnetServiceImpl) UpdateWarring(req *SubnetUpdateRequest) (*Subnet, *http.Response, error)
UpdateWarring Update traffic warning options for a subnet See: https://robot.your-server.de/doc/webservice/en.html#post-subnet-net-ip
type SubnetUpdateRequest ¶
type SubnetUpdateRequest struct { NetIP string // Net IP TrafficWarnings string `url:"traffic_warnings"` // Enable/disable traffic warnings (true, false) TrafficHourly string `url:"traffic_hourly"` // Hourly traffic limit in MB TrafficDaily string `url:"traffic_daily"` // Daily traffic limit in MB TrafficMonthly string `url:"traffic_monthly"` // Monthly traffic limit in GB }
type Traffic ¶
type Traffic struct { Type string `json:"type"` From string `json:"from"` To string `json:"to"` Data map[string]TrafficDataRow `json:"data"` }
type TrafficDataRow ¶
type TrafficGroup ¶
type TrafficRequest ¶
type TrafficRequest struct { IP []string `url:"ip,brackets"` // One or more IP addresses Subnet []string `url:"subnet,brackets"` // One or more subnet addresses From string `url:"from"` // Date/Time from To string `url:"to"` // Date/Time to Type string `url:"type"` // For type "day" the data is grouped by hours, for type "month" by days and for type "year" by months. SingleValues bool `url:"single_values" ` // If set to "true" the traffic data is returned not as a sum over the whole interval but grouped by hour, day or month (optional) }
type TrafficService ¶
type TrafficService interface { Get(req TrafficRequest) (*Traffic, *http.Response, error) GetByGroup(req TrafficRequest) (*TrafficGroup, *http.Response, error) }
TrafficService represents a service to work with Traffic.
type TrafficServiceImpl ¶
type TrafficServiceImpl struct {
// contains filtered or unexported fields
}
func (*TrafficServiceImpl) Get ¶
func (s *TrafficServiceImpl) Get(req TrafficRequest) (*Traffic, *http.Response, error)
Get Query traffic data for multiple IPs or Subnet See: https://robot.your-server.de/doc/webservice/en.html#post-traffic
func (*TrafficServiceImpl) GetByGroup ¶
func (s *TrafficServiceImpl) GetByGroup(req TrafficRequest) (*TrafficGroup, *http.Response, error)
GetByGroup Query traffic data for multiple IPs or Subnet, traffic data is returned not as a sum over the whole interval but grouped by hour, day or month See: https://robot.your-server.de/doc/webservice/en.html#post-traffic
type Transaction ¶
type Transaction struct { Id string `json:"id"` Date time.Time `json:"date"` Status string `json:"status"` ServerNumber interface{} `json:"server_number"` ServerIp interface{} `json:"server_ip"` AuthorizedKey []interface{} `json:"authorized_key"` HostKey []interface{} `json:"host_key"` Comment interface{} `json:"comment"` Product struct { Id string `json:"id"` Name string `json:"name"` Description []string `json:"description"` Traffic string `json:"traffic"` Dist string `json:"dist"` Arch string `json:"arch"` Lang string `json:"lang"` Location interface{} `json:"location"` } `json:"product"` Addons []string `json:"addons"` }
type UpdateServerRequest ¶
type WOLService ¶
type WOLService interface { Create(serverIP string) (*WOL, *http.Response, error) Get(serverIP string) (*WOL, *http.Response, error) }
WOLService represents a service to work with Wake on LAN service.
type WOLServiceImpl ¶
type WOLServiceImpl struct {
// contains filtered or unexported fields
}
func (*WOLServiceImpl) Create ¶
Create Send Wake On LAN packet to server See: https://robot.your-server.de/doc/webservice/en.html#post-wol-server-number
func (*WOLServiceImpl) Get ¶
Get Query Wake On LAN data See: https://robot.your-server.de/doc/webservice/en.html#get-wol-server-number
type WithdrawOrderRequest ¶
Source Files ¶
- boot.go
- boot_types.go
- client.go
- error.go
- failover.go
- failover_types.go
- ip.go
- ip_types.go
- json_time.go
- ordering.go
- ordering_type.go
- rdns.go
- rdns_types.go
- reset.go
- reset_types.go
- server.go
- server_types.go
- ssh_key.go
- ssh_key_types.go
- subnet.go
- subnet_types.go
- traffic.go
- traffic_types.go
- types.go
- wol.go
- wol_types.go