Versions in this module Expand all Collapse all v1 v1.1.0 Oct 16, 2020 Changes in this version + type AccountHistory struct + History []struct{ ... } + Total int type AccountService + func (as *AccountService) History(page, perPage int) (*AccountHistory, error) + func (as *AccountService) Usage(filter ...string) (*AccountUsage, error) + type AccountUsage struct + Backup []usageData + Bandwidth []usageData + NextMonth string + PrevMonth string + Protection []usageData + Server []usageData + ThisMonth string + TotalUSD int + type Ports struct + PortNumber int + Protocol string + type RebuildOptions struct + Description string + ID string type Server + Protection struct{ ... } type ServerService + func (ss *ServerService) Protection(id string, enabled bool) (*Server, error) + func (ss *ServerService) Rebuild(id string, opts *RebuildOptions) error + func (ss *ServerService) Resize(id string, size string) error + func (ss *ServerService) Restart(id string) error + func (ss *ServerService) SetPorts(id string, ports *[]Ports) (*Server, error) v1.0.0 Apr 8, 2020 Changes in this version + type Account struct + Balance int + CostPerHr int + Created time.Time + Email string + EmailConfirmed bool + ID string + Limit int + LowBalanceAlertDays int + NegativeAllowance int + Twofa bool + Used int + type AccountService struct + func (as *AccountService) Show() (*Account, error) + type Client struct + Account *AccountService + CreateOptions *CreateOptionsService + SSHKey *SSHKeyService + Server *ServerService + Transaction *TransactionService + func NewClient(token string) *Client + func (c *Client) DoRequest(r *http.Request, data interface{}) error + func (c *Client) NewRequest(method, path string, body []byte) (*http.Request, error) + type CreateOptionsService struct + func (co *CreateOptionsService) Show(hostID int) (*ServerCreateOptions, error) + type CreateServerOptions struct + HostID int + HostImageID string + InitScript string + Name string + Password string + RegionID string + SSHKeys []string + SizeID string + type CreateTransactionOptions struct + AmountUSD int + CryptoSymbol string + LightningNetwork bool + type HostDisks struct + Count int + Size string + Type string + Unit string + type HostImage struct + DefaultVersion HostImageVersion + ExtraCostPerMonth int + ID int + MinDiskSize int + Name string + Type string + UnavailableRegions []string + Versions []HostImageVersion + Windows bool + type HostImageVersion struct + Description string + ID string + PasswordUnsupported bool + type HostOptions struct + Backups bool + Rebuild bool + Resize bool + Userscript bool + type HostPlanType struct + Description string + Name string + Type string + type HostRegion struct + DefaultSubregion HostSubRegion + ID int + ISO string + Name string + Subregions []HostSubRegion + type HostSize struct + BandwidthGB int + CPUCount int + CostPerHour int + CostPerMonth float64 + DiskGB int + Disks []HostDisks + ID string + MemoryMB int + PlanType string + Slug string + type HostSubRegion struct + Description string + ID string + Slug string + UnavailableSizes []string + type SSHKey struct + Content string + Created time.Time + Fingerprint string + ID string + Name string + type SSHKeyService struct + func (ss *SSHKeyService) Create(k *SSHKey) (*SSHKey, error) + func (ss *SSHKeyService) Delete(id string) error + func (ss *SSHKeyService) List() ([]SSHKey, error) + type Server struct + Abuse bool + BackupsEnabled bool + BandwidthAllowance int + BandwidthUsed int + Created time.Time + DiskGB int + ErrorText string + HostID int + ID string + Image string + ImageDesc string + Ipv4 string + Name string + Rate int + Region string + Size string + SizeDesc string + Status string + Version string + type ServerCreateOptions struct + Available bool + BandwidthCost int + HostID int + Images []HostImage + PlanTypes []HostPlanType + Regions []HostRegion + Sizes []HostSize + type ServerService struct + func (ss *ServerService) Create(opts *CreateServerOptions) (*Server, error) + func (ss *ServerService) Destroy(id string) error + func (ss *ServerService) List() ([]Server, error) + func (ss *ServerService) Show(id string) (*Server, error) + type Transaction struct + Address string + AmountCrypto string + AmountUSD float64 + Date time.Time + ID string + QrCodeURL string + Status string + StatusURL string + Symbol string + TID string + type TransactionService struct + func (ss *TransactionService) Create(opts *CreateTransactionOptions) (*Transaction, error) + func (ss *TransactionService) List(page, perPage int) ([]Transaction, error) + func (ss *TransactionService) Show(id string) (*Transaction, error)