Documentation
¶
Index ¶
- Constants
- func PrettyPrint(i interface{}) string
- type AddvSwitchOps
- type BootClient
- func (c *BootClient) ActivateLinux(ctx context.Context, servernumber string, opt *LinuxOpts) (*BootLinux, *Response, error)
- func (c *BootClient) ActivateRescue(ctx context.Context, servernumber string, opt *RescueOpts) (*BootRescue, *Response, error)
- func (c *BootClient) ActivateVNC(ctx context.Context, servernumber string, opt *VNCOpts) (*BootVnc, *Response, error)
- func (c *BootClient) ActivateWindows(ctx context.Context, servernumber string, language string) (*BootWindows, *Response, error)
- func (c *BootClient) DeactivateLinux(ctx context.Context, servernumber string) (*BootLinux, *Response, error)
- func (c *BootClient) DeactivateRescue(ctx context.Context, servernumber string) (*BootRescue, *Response, error)
- func (c *BootClient) DeactivateVNC(ctx context.Context, servernumber string) (*BootVnc, *Response, error)
- func (c *BootClient) DeactivateWindows(ctx context.Context, servernumber string) (*BootWindows, *Response, error)
- func (c *BootClient) GetBootOptions(ctx context.Context, servernumber string) (*BootList, *Response, error)
- func (c *BootClient) GetLastLinux(ctx context.Context, servernumber string) (*BootLinux, *Response, error)
- func (c *BootClient) GetLastRescue(ctx context.Context, servernumber string) (*BootRescue, *Response, error)
- func (c *BootClient) GetLinux(ctx context.Context, servernumber string) (*BootLinux, *Response, error)
- func (c *BootClient) GetRescue(ctx context.Context, servernumber string) (*BootRescue, *Response, error)
- func (c *BootClient) GetVNC(ctx context.Context, servernumber string) (*BootVnc, *Response, error)
- func (c *BootClient) GetWindows(ctx context.Context, servernumber string) (*BootWindows, *Response, error)
- type BootLinux
- type BootList
- type BootRescue
- type BootVnc
- type BootWindows
- type Cancellation
- type CancellationOps
- type Client
- type ClientOption
- type CpanelOpts
- type CreateKeyOpts
- type Error
- type Failover
- type FailoverClient
- func (c *FailoverClient) DeleteFailover(ctx context.Context, failover_ip string) (*Failover, *Response, error)
- func (c *FailoverClient) GetFailoverIP(ctx context.Context, ip string) (*Failover, *Response, error)
- func (c *FailoverClient) List(ctx context.Context) ([]*Failover, *Response, error)
- func (c *FailoverClient) SwitchFailover(ctx context.Context, failover_ip, active_server_ip string) (*Failover, *Response, error)
- type Firewall
- type FirewallClient
- func (c *FirewallClient) DeleteFirewallByIP(ctx context.Context, ip string) (*Response, error)
- func (c *FirewallClient) DeleteFirewallByServerNumber(ctx context.Context, servernumber string) (*Response, error)
- func (c *FirewallClient) DeleteFirewallTemplateById(ctx context.Context, id string) (*Response, error)
- func (c *FirewallClient) GetFirewallByIP(ctx context.Context, ip string) (*Firewall, *Response, error)
- func (c *FirewallClient) GetFirewallByServernumber(ctx context.Context, servernumber string) (*Firewall, *Response, error)
- func (c *FirewallClient) GetFirewallTemplate(ctx context.Context) ([]*FirewallTemplate, *Response, error)
- func (c *FirewallClient) GetFirewallTemplateById(ctx context.Context, id string) (*FirewallTemplateWithRules, *Response, error)
- func (c *FirewallClient) PostFirewallByIP(ctx context.Context, ip string, opt *FirewallOps) (*Firewall, *Response, error)
- func (c *FirewallClient) PostFirewallByServernumber(ctx context.Context, servernumber string, opt *FirewallOps) (*Firewall, *Response, error)
- func (c *FirewallClient) PostFirewallTemplate(ctx context.Context, opt *FirewallTemplateOps) (*FirewallTemplateWithRules, *Response, error)
- func (c *FirewallClient) UpdateFirewallTemplateById(ctx context.Context, id string, opt *FirewallTemplateOps) (*FirewallTemplateWithRules, *Response, error)
- type FirewallOps
- type FirewallRules
- type FirewallTemplate
- type FirewallTemplateOps
- type FirewallTemplateWithRules
- type IP
- type IPCancellation
- type IPClient
- func (c *IPClient) DeleteCancellation(ctx context.Context, ip string) (*IPCancellation, *Response, error)
- func (c *IPClient) DeleteMAC(ctx context.Context, ip string) (*MAC, *Response, error)
- func (c *IPClient) GenerateMAC(ctx context.Context, ip string) (*MAC, *Response, error)
- func (c *IPClient) GetCancellation(ctx context.Context, ip string) (*IPCancellation, *Response, error)
- func (c *IPClient) GetIPByIP(ctx context.Context, ip string) (*IPSingle, *Response, error)
- func (c *IPClient) GetMACByIP(ctx context.Context, ip string) (*MAC, *Response, error)
- func (c *IPClient) List(ctx context.Context) ([]*IP, *Response, error)
- func (c *IPClient) PostCancellation(ctx context.Context, ip string, cancellation_date string) (*IPCancellation, *Response, error)
- func (c *IPClient) UpdateTrafficByIP(ctx context.Context, ip string, opt *IPOps) (*IPSingle, *Response, error)
- type IPOps
- type IPSingle
- type InputRule
- type LinuxOpts
- type MAC
- type OrderClient
- func (c *OrderClient) GetMarketServerById(ctx context.Context, transaction int) (*ServerMarketProduct, *Response, error)
- func (c *OrderClient) GetMarketTransactionById(ctx context.Context, id string) (*ServerMarketTransaction, *Response, error)
- func (c *OrderClient) GetProductById(ctx context.Context, id string) (*ServerProduct, *Response, error)
- func (c *OrderClient) GetServerMarketTransactionList(ctx context.Context) ([]*ServerMarketTransaction, *Response, error)
- func (c *OrderClient) GetServerTransactionById(ctx context.Context, id string) (*ServerOrderTransaction, *Response, error)
- func (c *OrderClient) GetServerTransactionList(ctx context.Context) ([]*ServerOrderTransaction, *Response, error)
- func (c *OrderClient) ListMarket(ctx context.Context, opt *OrderMarketListOpts) ([]*ServerMarketProduct, *Response, error)
- func (c *OrderClient) OrderServer(ctx context.Context, opt *OrderServerOpts) (*ServerOrderTransaction, *Response, error)
- func (c *OrderClient) OrderServerMarket(ctx context.Context, opt *OrderMarketOpts) (*ServerMarketTransaction, *Response, error)
- func (c *OrderClient) ProductList(ctx context.Context, opt *OrderServerListOpts) ([]*ServerProduct, *Response, error)
- type OrderMarketListOpts
- type OrderMarketOpts
- type OrderServerListOpts
- type OrderServerOpts
- type Password
- type PleskOpts
- type RDNS
- type RDNSClient
- func (c *RDNSClient) CreateRDNS(ctx context.Context, ip string, ptr string) (*RDNS, *Response, error)
- func (c *RDNSClient) Delete(ctx context.Context, ip string) (*Response, error)
- func (c *RDNSClient) GetAll(ctx context.Context) ([]*RDNS, *Response, error)
- func (c *RDNSClient) GetByIP(ctx context.Context, ip string) (*RDNS, *Response, error)
- func (c *RDNSClient) UpdateRDNS(ctx context.Context, ip string, ptr string) (*RDNS, *Response, error)
- type RescueOpts
- type Reset
- type ResetClient
- func (c *ResetClient) ExecuteReset(ctx context.Context, servernumber string, hwtype string) (*Reset, *Response, error)
- func (c *ResetClient) GetResetByServernumber(ctx context.Context, servernumber string) (*Reset, *Response, error)
- func (c *ResetClient) List(ctx context.Context) ([]*Reset, *Response, error)
- type Response
- type RulesJSONtoURLENCode
- type SSHKey
- type SSHKeyClient
- func (c *SSHKeyClient) Create(ctx context.Context, opt *CreateKeyOpts) (*SSHKey, *Response, error)
- func (c *SSHKeyClient) Delete(ctx context.Context, fingerprint string) (*Response, error)
- func (c *SSHKeyClient) GetByFingerprint(ctx context.Context, fingerprint string) (*SSHKey, *Response, error)
- func (c *SSHKeyClient) List(ctx context.Context) ([]*SSHKey, *Response, error)
- func (c *SSHKeyClient) Update(ctx context.Context, fingerprint string, opt *UpdateKeyOpts) (*SSHKey, *Response, error)
- type Server
- type ServerClient
- func (c *ServerClient) DeleteCancellation(ctx context.Context, servernumber string) (*Response, error)
- func (c *ServerClient) GetCancellation(ctx context.Context, servernumber string) (*Cancellation, *Response, error)
- func (c *ServerClient) GetServerById(ctx context.Context, id string) (*SingleServer, *Response, error)
- func (c *ServerClient) List(ctx context.Context) ([]*Server, *Response, error)
- func (c *ServerClient) PostCancellation(ctx context.Context, servernumber string, opt *CancellationOps) (*Cancellation, *Response, error)
- func (c *ServerClient) PostReversal(ctx context.Context, servernumber string, reversal_reason string) (*Cancellation, *Response, error)
- func (c *ServerClient) UpdateServerName(ctx context.Context, id string, servername string) (*SingleServer, *Response, error)
- type ServerMarketProduct
- type ServerMarketTransaction
- type ServerOrderTransaction
- type ServerProduct
- type SingleServer
- type StorageBox
- type StorageBoxClient
- func (c *StorageBoxClient) GetStorageBoxById(ctx context.Context, id int) (*StorageBoxSingle, *Response, error)
- func (c *StorageBoxClient) GetStorageBoxList(ctx context.Context) ([]*StorageBox, *Response, error)
- func (c *StorageBoxClient) ResetStorageBoxPasswordById(ctx context.Context, id int, password *string) (*Password, *Response, error)
- func (c *StorageBoxClient) UpdateStorageBoxById(ctx context.Context, id int, opt *UpdateStorageBoxOps) (*StorageBoxSingle, *Response, error)
- type StorageBoxSingle
- type Subnet
- type SubnetCancellation
- type SubnetClient
- func (c *SubnetClient) DeleteCancellation(ctx context.Context, netip string) (*SubnetCancellation, *Response, error)
- func (c *SubnetClient) DeleteMAC(ctx context.Context, netip string) (*SubnetMac, *Response, error)
- func (c *SubnetClient) GenerateMac(ctx context.Context, netip string) (*SubnetMac, *Response, error)
- func (c *SubnetClient) GetCancellation(ctx context.Context, netip string) (*SubnetCancellation, *Response, error)
- func (c *SubnetClient) GetMac(ctx context.Context, netip string) (*SubnetMac, *Response, error)
- func (c *SubnetClient) GetSubnetByIP(ctx context.Context, netip string) (*Subnet, *Response, error)
- func (c *SubnetClient) List(ctx context.Context) ([]*Subnet, *Response, error)
- func (c *SubnetClient) PostCancellation(ctx context.Context, netip string, cancellation_date string) (*SubnetCancellation, *Response, error)
- func (c *SubnetClient) UpdateTraffic(ctx context.Context, netip string, opt *SubnetOps) (*Subnet, *Response, error)
- type SubnetMac
- type SubnetOps
- type UpdateKeyOpts
- type UpdateStorageBoxOps
- type VNCOpts
- type VSwitch
- type VSwitchClient
- func (c *VSwitchClient) AddToServer(ctx context.Context, id string, server interface{}) (*Response, error)
- func (c *VSwitchClient) AddVSwitch(ctx context.Context, opt *AddvSwitchOps) (*VSwitchSingle, *Response, error)
- func (c *VSwitchClient) CancelVSwitch(ctx context.Context, id string, cancellation_date string) (*Response, error)
- func (c *VSwitchClient) GetVSwitchById(ctx context.Context, id string) (*VSwitchSingle, *Response, error)
- func (c *VSwitchClient) GetVSwitchList(ctx context.Context) ([]*VSwitch, *Response, error)
- func (c *VSwitchClient) RemoveServer(ctx context.Context, id string, server interface{}) (*Response, error)
- func (c *VSwitchClient) UpdateVSwitchById(ctx context.Context, id string, opt *AddvSwitchOps) (*VSwitchSingle, *Response, error)
- type VSwitchServer
- type VSwitchSingle
- type WOL
- type WOLClient
Constants ¶
const Endpoint = "https://robot-ws.your-server.de"
Endpoint is th
const Version = "0.0.1"
Variables ¶
This section is empty.
Functions ¶
func PrettyPrint ¶
func PrettyPrint(i interface{}) string
Types ¶
type AddvSwitchOps ¶
Vlan_ID has to be in range: 4000 to 4091
type BootClient ¶
type BootClient struct {
// contains filtered or unexported fields
}
func (*BootClient) ActivateLinux ¶
func (*BootClient) ActivateRescue ¶
func (c *BootClient) ActivateRescue(ctx context.Context, servernumber string, opt *RescueOpts) (*BootRescue, *Response, error)
activate the rescue system
func (*BootClient) ActivateVNC ¶
func (*BootClient) ActivateWindows ¶
func (c *BootClient) ActivateWindows(ctx context.Context, servernumber string, language string) (*BootWindows, *Response, error)
func (*BootClient) DeactivateLinux ¶
func (*BootClient) DeactivateRescue ¶
func (c *BootClient) DeactivateRescue(ctx context.Context, servernumber string) (*BootRescue, *Response, error)
func (*BootClient) DeactivateVNC ¶
func (*BootClient) DeactivateWindows ¶
func (c *BootClient) DeactivateWindows(ctx context.Context, servernumber string) (*BootWindows, *Response, error)
func (*BootClient) GetBootOptions ¶
func (c *BootClient) GetBootOptions(ctx context.Context, servernumber string) (*BootList, *Response, error)
servernumber can also be serverip
func (*BootClient) GetLastLinux ¶
func (c *BootClient) GetLastLinux(ctx context.Context, servernumber string) (*BootLinux, *Response, error)
Show data of last rescue activation
func (*BootClient) GetLastRescue ¶
func (c *BootClient) GetLastRescue(ctx context.Context, servernumber string) (*BootRescue, *Response, error)
Show data of last rescue activation
func (*BootClient) GetRescue ¶
func (c *BootClient) GetRescue(ctx context.Context, servernumber string) (*BootRescue, *Response, error)
query boot options for the Rescue System
func (*BootClient) GetWindows ¶
func (c *BootClient) GetWindows(ctx context.Context, servernumber string) (*BootWindows, *Response, error)
type BootLinux ¶
type BootLinux struct { ServerIP string ServerIpv6Net string ServerNumber int Dist []string Arch []int Lang []string Active bool Password string AuthorizedKey []interface{} HostKey []interface{} }
func LinuxFromSchema ¶
type BootList ¶
type BootList struct { Rescue BootRescue Linux BootLinux Vnc BootVnc Windows interface{} Plesk interface{} Cpanel interface{} }
func BootListFromSchema ¶
type BootRescue ¶
type BootRescue struct { ServerIP string ServerIpv6Net string ServerNumber int Os interface{} Arch interface{} Active bool Password interface{} AuthorizedKey []interface{} HostKey []interface{} BootTime interface{} }
func RescueFromSchema ¶
func RescueFromSchema(s schema.RescueList) *BootRescue
type BootVnc ¶
type BootVnc struct { ServerIP string ServerIpv6Net string ServerNumber int Dist []string Arch []int Lang []string Active bool Password string }
func VncFromSchema ¶
type BootWindows ¶
type BootWindows struct { ServerIP string ServerIpv6Net string ServerNumber int Dist []string Lang []string Active bool Password string }
func WindowsFromSchema ¶
func WindowsFromSchema(s schema.WindowsList) *BootWindows
type Cancellation ¶
type Cancellation struct { ServerIP string ServerIpv6Net string ServerNumber int ServerName string EarliestCancellationDate string Cancelled bool ReservationPossible bool Reserved bool CancellationDate interface{} CancellationReason interface{} }
func CancellationFromSchema ¶
func CancellationFromSchema(s schema.Cancellation) *Cancellation
type CancellationOps ¶
type Client ¶
type Client struct { SSHKey SSHKeyClient Server ServerClient Order OrderClient Boot BootClient IP IPClient Subnet SubnetClient Reset ResetClient WakeOnLane WOLClient Firewall FirewallClient VSwitch VSwitchClient Failover FailoverClient RDNS RDNSClient StorageBox StorageBoxClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(options ...ClientOption) *Client
type ClientOption ¶
type ClientOption func(*Client)
func WithBasicAuth ¶
func WithBasicAuth(username, password string) ClientOption
func WithDebugWriter ¶
func WithDebugWriter(debugWriter io.Writer) ClientOption
WithDebugWriter configures a Client to print debug information to the given writer. To, for example, print debug information on stderr, set it to os.Stderr.
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
WithHTTPClient configures a Client to perform HTTP requests with httpClient.
func WithToken ¶
func WithToken(token string) ClientOption
Token must be provided in this format: username:password
type CpanelOpts ¶
type CreateKeyOpts ¶
type Failover ¶
type Failover struct { IP string Netmask string ServerIP string ServerNumber int ActiveServerIP string }
func FailoverFromSchema ¶
type FailoverClient ¶
type FailoverClient struct {
// contains filtered or unexported fields
}
func (*FailoverClient) DeleteFailover ¶
func (c *FailoverClient) DeleteFailover(ctx context.Context, failover_ip string) (*Failover, *Response, error)
deletes the routing of a given IP
func (*FailoverClient) GetFailoverIP ¶
func (*FailoverClient) SwitchFailover ¶
func (c *FailoverClient) SwitchFailover(ctx context.Context, failover_ip, active_server_ip string) (*Failover, *Response, error)
switches failover routing to given IP
type Firewall ¶
type Firewall struct { ServerIP string ServerNumber int Status string Filter_IPv6 bool WhitelistHos bool Port string Rules struct { Input []struct { IPVersion string Name string DstIP interface{} SrcIP string DstPort string SrcPort interface{} Protocol interface{} TCPFlags interface{} Action string } Output []struct { IPVersion string Name string DstIP interface{} SrcIP string DstPort string SrcPort interface{} Protocol interface{} TCPFlags interface{} Action string } } }
func FirewallFromSchema ¶
type FirewallClient ¶
type FirewallClient struct {
// contains filtered or unexported fields
}
func (*FirewallClient) DeleteFirewallByIP ¶
func (*FirewallClient) DeleteFirewallByServerNumber ¶
func (*FirewallClient) DeleteFirewallTemplateById ¶
func (*FirewallClient) GetFirewallByIP ¶
func (*FirewallClient) GetFirewallByServernumber ¶
func (*FirewallClient) GetFirewallTemplate ¶
func (c *FirewallClient) GetFirewallTemplate(ctx context.Context) ([]*FirewallTemplate, *Response, error)
func (*FirewallClient) GetFirewallTemplateById ¶
func (c *FirewallClient) GetFirewallTemplateById(ctx context.Context, id string) (*FirewallTemplateWithRules, *Response, error)
func (*FirewallClient) PostFirewallByIP ¶
func (c *FirewallClient) PostFirewallByIP(ctx context.Context, ip string, opt *FirewallOps) (*Firewall, *Response, error)
func (*FirewallClient) PostFirewallByServernumber ¶
func (c *FirewallClient) PostFirewallByServernumber(ctx context.Context, servernumber string, opt *FirewallOps) (*Firewall, *Response, error)
func (*FirewallClient) PostFirewallTemplate ¶
func (c *FirewallClient) PostFirewallTemplate(ctx context.Context, opt *FirewallTemplateOps) (*FirewallTemplateWithRules, *Response, error)
func (*FirewallClient) UpdateFirewallTemplateById ¶
func (c *FirewallClient) UpdateFirewallTemplateById(ctx context.Context, id string, opt *FirewallTemplateOps) (*FirewallTemplateWithRules, *Response, error)
type FirewallOps ¶
type FirewallOps struct { Status string `url:"status"` //change the status of the firewall ('active' or 'disabled') Filter_IPv6 string `url:"filter_ipv6"` // activate or deactivate the ipv6 filter ('true' or 'false', optional) Whitelist_hos string `url:"whitelist_hos"` // change the flag of hetzner services whitelisting (true or false) Rules []InputRule `url:"-"` Template_id string `url:"template_id,omitempty"` // not possible in combination of whitelist_hos and rules }
type FirewallRules ¶
type FirewallRules struct { Rules struct { Input []struct { IPVersion string `json:"ip_version"` Name string `json:"name"` DstIP interface{} `json:"dst_ip"` SrcIP string `json:"src_ip"` DstPort string `json:"dst_port"` SrcPort interface{} `json:"src_port"` Protocol interface{} `json:"protocol"` TCPFlags interface{} `json:"tcp_flags"` Action string `json:"action"` } `json:"input"` } `json:"rules"` }
type FirewallTemplate ¶
type FirewallTemplate struct { ID int Name string Filter_IPv6 bool WhitelistHos bool IsDefault bool }
func FirewallTemplateFromSchema ¶
func FirewallTemplateFromSchema(s schema.FirewallTemplate) *FirewallTemplate
type FirewallTemplateOps ¶
type FirewallTemplateOps struct { Name string `url:"name"` //template name Filter_IPv6 string `url:"filter_ipv6"` // activate or deactivate the ipv6 filter ('true' or 'false', optional) Whitelist_hos bool `url:"whitelist_hos"` // change the flag of hetzner services whitelisting (true or false) Is_Default bool `url:"is_default"` Rules []InputRule `url:"-"` }
type FirewallTemplateWithRules ¶
type FirewallTemplateWithRules struct { ID int `json:"id"` Name string Filter_IPv6 bool WhitelistHos bool `json:"whitelist_hos"` IsDefault bool `json:"is_default"` Rules struct { Input []struct { IPVersion string Name string DstIP interface{} SrcIP string DstPort string SrcPort interface{} Protocol interface{} TCPFlags interface{} PacketLength interface{} Action string } Output []struct { IPVersion string Name string DstIP interface{} SrcIP string DstPort string SrcPort interface{} Protocol interface{} TCPFlags interface{} PacketLength interface{} Action string } } }
func FirewallTemplateWithRulesFromSchema ¶
func FirewallTemplateWithRulesFromSchema(s schema.FirewallTemplateWithRules) *FirewallTemplateWithRules
type IP ¶
type IP struct { IP string ServerIP string ServerNumber int Locked bool SeparateMac interface{} TrafficWarnings bool TrafficHourly int TrafficDaily int TrafficMonthly int }
func IPFromSchema ¶
type IPCancellation ¶
type IPCancellation struct { IP string ServerNumber int EarliestCancellationDate string Cancelled bool CancellationDate interface{} }
func IPCancellationFromSchema ¶
func IPCancellationFromSchema(s schema.IPCancellation) *IPCancellation
type IPClient ¶
type IPClient struct {
// contains filtered or unexported fields
}
func (*IPClient) DeleteCancellation ¶
func (*IPClient) GenerateMAC ¶
func (*IPClient) GetCancellation ¶
func (*IPClient) GetMACByIP ¶
func (*IPClient) PostCancellation ¶
type IPOps ¶
type IPOps struct { TrafficWarnings bool `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 IPSingle ¶
type IPSingle struct { IP string Gateway string Mask int Broadcast string ServerIP string ServerNumber int Locked bool SeparateMac interface{} TrafficWarnings bool TrafficHourly int TrafficDaily int TrafficMonthly int }
func IPSingleFromSchema ¶
type InputRule ¶
type InputRule struct { IPVersion string `url:"ip_version"` Name string `url:"name"` DstIP string `url:"dst_ip"` SrcIP string `url:"src_ip"` DstPort string `url:"dst_port"` SrcPort string `url:"src_port"` Protocol string `url:"protocol"` TCPFlags string `url:"tcp_flags"` Action string `url:"action"` }
type MAC ¶
func MACFromSchema ¶
type OrderClient ¶
type OrderClient struct {
// contains filtered or unexported fields
}
func (*OrderClient) GetMarketServerById ¶
func (c *OrderClient) GetMarketServerById(ctx context.Context, transaction int) (*ServerMarketProduct, *Response, error)
func (*OrderClient) GetMarketTransactionById ¶
func (c *OrderClient) GetMarketTransactionById(ctx context.Context, id string) (*ServerMarketTransaction, *Response, error)
func (*OrderClient) GetProductById ¶
func (c *OrderClient) GetProductById(ctx context.Context, id string) (*ServerProduct, *Response, error)
func (*OrderClient) GetServerMarketTransactionList ¶
func (c *OrderClient) GetServerMarketTransactionList(ctx context.Context) ([]*ServerMarketTransaction, *Response, error)
func (*OrderClient) GetServerTransactionById ¶
func (c *OrderClient) GetServerTransactionById(ctx context.Context, id string) (*ServerOrderTransaction, *Response, error)
func (*OrderClient) GetServerTransactionList ¶
func (c *OrderClient) GetServerTransactionList(ctx context.Context) ([]*ServerOrderTransaction, *Response, error)
overview of the last orders within 30 days
func (*OrderClient) ListMarket ¶
func (c *OrderClient) ListMarket(ctx context.Context, opt *OrderMarketListOpts) ([]*ServerMarketProduct, *Response, error)
func (*OrderClient) OrderServer ¶
func (c *OrderClient) OrderServer(ctx context.Context, opt *OrderServerOpts) (*ServerOrderTransaction, *Response, error)
orders a server return 201 if succesful
func (*OrderClient) OrderServerMarket ¶
func (c *OrderClient) OrderServerMarket(ctx context.Context, opt *OrderMarketOpts) (*ServerMarketTransaction, *Response, error)
func (*OrderClient) ProductList ¶
func (c *OrderClient) ProductList(ctx context.Context, opt *OrderServerListOpts) ([]*ServerProduct, *Response, error)
type OrderMarketListOpts ¶
type OrderMarketListOpts struct { CPU string `url:"cpu"` Min_CPU_Benchmark string `url:"min_cpu_benchmark"` Max_CPU_Benchmark string `url:"max_cpu_benchmark"` Min_Memory_Size string `url:"min_memory_size"` Max_Memory_Size string `url:"max_memory_size"` Min_HDD_Size string `url:"min_hdd_size"` Max_HDD_Size string `url:"max_hdd_size"` Search string `url:"search"` Min_Price string `url:"min_price"` Max_Price string `url:"max_price"` }
type OrderMarketOpts ¶
type OrderMarketOpts struct { Product_ID string `url:"product_id"` //required Authorized_Keys string `url:"authorized_key[]"` //required //Password string `url:"password"` Dist string `url:"dist"` Arch string `url:"arch"` Lang string `url:"lang"` Comment string `url:"comment"` Test bool `url:"test"` }
type OrderServerListOpts ¶
type OrderServerOpts ¶
type OrderServerOpts struct { Product_ID string `url:"product_id"` //required Authorized_Key string `url:"authorized_key[]"` //required //Password string `url:"password"` Location string `url:"location"` //required Dist string `url:"dist"` Arch string `url:"arch"` Lang string `url:"lang"` Comment string `url:"comment"` Addons string `url:"addon[]"` Test bool `url:"test"` }
type RDNS ¶
func RDNSFromSchema ¶
type RDNSClient ¶
type RDNSClient struct {
// contains filtered or unexported fields
}
func (*RDNSClient) CreateRDNS ¶
func (*RDNSClient) UpdateRDNS ¶
type RescueOpts ¶
type Reset ¶
type Reset struct { ServerIP string ServerIpv6Net string ServerNumber int Type interface{} OperatingStatus string }
func ResetFromSchema ¶
type ResetClient ¶
type ResetClient struct {
// contains filtered or unexported fields
}
func (*ResetClient) ExecuteReset ¶
func (*ResetClient) GetResetByServernumber ¶
type RulesJSONtoURLENCode ¶
type RulesJSONtoURLENCode func()
type SSHKey ¶
type SSHKey struct { Name string Fingerprint string Type string Size int Data string Created string }
func SSHKeyFromSchema ¶
Converts an json Key to SSHKey struct
type SSHKeyClient ¶
type SSHKeyClient struct {
// contains filtered or unexported fields
}
func (*SSHKeyClient) Create ¶
func (c *SSHKeyClient) Create(ctx context.Context, opt *CreateKeyOpts) (*SSHKey, *Response, error)
func (*SSHKeyClient) GetByFingerprint ¶
func (*SSHKeyClient) List ¶
GetByID retrieves a SSH key by its ID. If the SSH key does not exist, nil is returned.
func (*SSHKeyClient) Update ¶
func (c *SSHKeyClient) Update(ctx context.Context, fingerprint string, opt *UpdateKeyOpts) (*SSHKey, *Response, error)
type Server ¶
type Server struct { ServerIP string ServerIpv6Net string ServerNumber int ServerName string Product string Dc string Traffic string Status string Cancelled bool PaidUntil string IP []string Subnet []struct { IP string Mask string } LinkedStoragebox interface{} }
func ServerFromSchema ¶
type ServerClient ¶
type ServerClient struct {
// contains filtered or unexported fields
}
func (*ServerClient) DeleteCancellation ¶
func (c *ServerClient) DeleteCancellation(ctx context.Context, servernumber string) (*Response, error)
revoke a cancellation
func (*ServerClient) GetCancellation ¶
func (c *ServerClient) GetCancellation(ctx context.Context, servernumber string) (*Cancellation, *Response, error)
get the cancellation status of a server
func (*ServerClient) GetServerById ¶
func (c *ServerClient) GetServerById(ctx context.Context, id string) (*SingleServer, *Response, error)
func (*ServerClient) PostCancellation ¶
func (c *ServerClient) PostCancellation(ctx context.Context, servernumber string, opt *CancellationOps) (*Cancellation, *Response, error)
cancel a server
func (*ServerClient) PostReversal ¶
func (c *ServerClient) PostReversal(ctx context.Context, servernumber string, reversal_reason string) (*Cancellation, *Response, error)
cancel orderd server
func (*ServerClient) UpdateServerName ¶
func (c *ServerClient) UpdateServerName(ctx context.Context, id string, servername string) (*SingleServer, *Response, error)
updates servername
type ServerMarketProduct ¶
type ServerMarketProduct struct { ID int Name string Description []string Traffic string Dist []string Arch []int Lang []string CPU string CPUBenchmark int MemorySize int HddSize int HddText string HddCount int Datacenter string NetworkSpeed string Price string PriceSetup string PriceVat string PriceSetupVat string FixedPrice bool NextReduce int NextReduceDate string }
func ServerMarketOrderFromSchema ¶
func ServerMarketOrderFromSchema(s schema.Server_market_product) *ServerMarketProduct
type ServerMarketTransaction ¶
type ServerMarketTransaction struct { ID string Date time.Time Status string ServerNumber interface{} ServerIP interface{} AuthorizedKey []struct { Key struct { Name string Fingerprint string Type string Size int } } HostKey []interface{} Comment interface{} Product struct { ID int Name string Description []string Traffic string Dist string Arch string Lang string CPU string CPUBenchmark int MemorySize int HddSize int HddText string HddCount int Datacenter string NetworkSpeed string } }
func ServerMarketTransactionFromSchema ¶
func ServerMarketTransactionFromSchema(s schema.ServerMarketTransaction) *ServerMarketTransaction
type ServerOrderTransaction ¶
type ServerOrderTransaction struct { ID string Date time.Time Status string ServerNumber interface{} ServerIP interface{} AuthorizedKey []struct { Key struct { Name string Fingerprint string Type string Size int } } HostKey []interface{} Comment interface{} Product struct { ID string Name string Description []string Traffic string Dist string Arch int Lang string Location string } Addons []interface{} }
func ServerOrderTransactionFromSchema ¶
func ServerOrderTransactionFromSchema(s schema.ServerOrderTransaction) *ServerOrderTransaction
type ServerProduct ¶
type ServerProduct struct { ID string Name string Description []string Traffic string Dist []string Arch []int Lang []string Location []string Prices []struct { Location string Price struct { Net string Gross string } PriceSetup struct { Net string Gross string } } OrderableAddons []struct { ID string Name string Min int Max int Prices interface{} } }
func ServerProductFromSchema ¶
func ServerProductFromSchema(s schema.ServerProduct) *ServerProduct
type SingleServer ¶
type SingleServer struct { ServerIP string ServerIpv6Net string ServerNumber int ServerName string Product string Dc string Traffic string Status string Cancelled bool PaidUntil string IP []string Subnet []struct { IP string Mask string } Reset bool Rescue bool Vnc bool Windows bool Plesk bool Cpanel bool Wol bool HotSwap bool LinkedStoragebox interface{} }
func SingleServerFromSchema ¶
func SingleServerFromSchema(s schema.SingleServer) *SingleServer
type StorageBox ¶
type StorageBox struct { ID int Login string Name string Product string Cancelled bool Locked bool Location string LinkedServer int PaidUntil string }
func StorageBoxFromSchema ¶
func StorageBoxFromSchema(s schema.StorageBox) *StorageBox
type StorageBoxClient ¶
type StorageBoxClient struct {
// contains filtered or unexported fields
}
func (*StorageBoxClient) GetStorageBoxById ¶
func (c *StorageBoxClient) GetStorageBoxById(ctx context.Context, id int) (*StorageBoxSingle, *Response, error)
func (*StorageBoxClient) GetStorageBoxList ¶
func (c *StorageBoxClient) GetStorageBoxList(ctx context.Context) ([]*StorageBox, *Response, error)
func (*StorageBoxClient) ResetStorageBoxPasswordById ¶
func (*StorageBoxClient) UpdateStorageBoxById ¶
func (c *StorageBoxClient) UpdateStorageBoxById(ctx context.Context, id int, opt *UpdateStorageBoxOps) (*StorageBoxSingle, *Response, error)
type StorageBoxSingle ¶
type StorageBoxSingle struct { ID int Login string Name string Product string Cancelled bool Locked bool Location string LinkedServer int PaidUntil string DiskQuota int DiskUsage int DiskUsageData int DiskUsageSnapshots int WebDAV bool Samba bool SSH bool ExternalReachability bool ZFS bool Server string HostSystem string }
func StorageBoxSingleFromSchema ¶
func StorageBoxSingleFromSchema(s schema.StorageBoxSingle) *StorageBoxSingle
type Subnet ¶
type Subnet struct { IP string Mask int Gateway string ServerIP string ServerNumber int Failover bool Locked bool TrafficWarnings bool TrafficHourly int TrafficDaily int TrafficMonthly int }
func SubnetFromSchema ¶
type SubnetCancellation ¶
type SubnetCancellation struct { IP string Mask int ServerNumber int EarliestCancellationDate string Cancelled bool CancellationDate interface{} }
func SubnetCancellationFromSchema ¶
func SubnetCancellationFromSchema(s schema.SubnetCancellation) *SubnetCancellation
type SubnetClient ¶
type SubnetClient struct {
// contains filtered or unexported fields
}
func (*SubnetClient) DeleteCancellation ¶
func (c *SubnetClient) DeleteCancellation(ctx context.Context, netip string) (*SubnetCancellation, *Response, error)
func (*SubnetClient) GenerateMac ¶
func (*SubnetClient) GetCancellation ¶
func (c *SubnetClient) GetCancellation(ctx context.Context, netip string) (*SubnetCancellation, *Response, error)
func (*SubnetClient) GetSubnetByIP ¶
requires the net ip of the subnet
func (*SubnetClient) PostCancellation ¶
func (c *SubnetClient) PostCancellation(ctx context.Context, netip string, cancellation_date string) (*SubnetCancellation, *Response, error)
func (*SubnetClient) UpdateTraffic ¶
func (c *SubnetClient) UpdateTraffic(ctx context.Context, netip string, opt *SubnetOps) (*Subnet, *Response, error)
requires the net ip of the subnet
type SubnetMac ¶
func SubnetMacFromSchema ¶
type SubnetOps ¶
type SubnetOps struct { TrafficWarnings bool `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 UpdateKeyOpts ¶
type UpdateKeyOpts struct {
Name string `url:"name"`
}
type UpdateStorageBoxOps ¶
type VSwitch ¶
func VswitchFromSchema ¶
type VSwitchClient ¶
type VSwitchClient struct {
// contains filtered or unexported fields
}
func (*VSwitchClient) AddToServer ¶
func (c *VSwitchClient) AddToServer(ctx context.Context, id string, server interface{}) (*Response, error)
adds server to vswitch, server can be server number or ip
func (*VSwitchClient) AddVSwitch ¶
func (c *VSwitchClient) AddVSwitch(ctx context.Context, opt *AddvSwitchOps) (*VSwitchSingle, *Response, error)
func (*VSwitchClient) CancelVSwitch ¶
func (c *VSwitchClient) CancelVSwitch(ctx context.Context, id string, cancellation_date string) (*Response, error)
cancellation_date format yyyy-MM-dd
func (*VSwitchClient) GetVSwitchById ¶
func (c *VSwitchClient) GetVSwitchById(ctx context.Context, id string) (*VSwitchSingle, *Response, error)
func (*VSwitchClient) GetVSwitchList ¶
func (*VSwitchClient) RemoveServer ¶
func (c *VSwitchClient) RemoveServer(ctx context.Context, id string, server interface{}) (*Response, error)
removes server by servernumber or ip from vswitch
func (*VSwitchClient) UpdateVSwitchById ¶
func (c *VSwitchClient) UpdateVSwitchById(ctx context.Context, id string, opt *AddvSwitchOps) (*VSwitchSingle, *Response, error)
type VSwitchServer ¶
type VSwitchSingle ¶
type VSwitchSingle struct { ID int Name string Vlan int Cancelled bool Server []interface{} Subnet []interface{} CloudNetwork []interface{} }
func VSwitchSingleFromSchema ¶
func VSwitchSingleFromSchema(s schema.VSwitchSingle) *VSwitchSingle
type WOL ¶
func WOLFromSchema ¶
type WOLClient ¶
type WOLClient struct {
// contains filtered or unexported fields
}