Versions in this module Expand all Collapse all v2 v2.2.0 Apr 4, 2022 Changes in this version + type Account struct + Currency string + Remaining float32 + Usage float32 + type AssignedTo struct + Hostname string + Href string + ID int + Image string + Name string + Pricing Pricing + Region Region + State string + type AttachTo struct + AttachTo int + ProjectID string + StorageID string + type AttachedTo struct + Href string + type AvailableRegions struct + ID int + Name string + RegionIso2 string + StockQty int + type BGPRoute struct + Active bool + Age string + Router string + Subnet string + Updated string + type Bandwidth struct + Name string + type Billing struct + Address1 string + Address2 string + City string + CompanyCode string + CompanyName string + CountryIso2 string + Currency string + FirstName string + LastName string + Type string + Vat Vat + type BlockStorage struct + AllowEditSize bool + AttachedTo AttachedTo + Description string + DiscoveryIP string + Href string + ID int + Initiator string + Name string + Size int + Unit string + VlanID string + VlanIP string + type Client struct + AuthToken string + BaseURL *url.URL + IPAddress GetIP + IPAddresses GetIPS + Images GetImages + Plans GetPlans + Project GetProject + Projects GetProjects + SSHKey GetSSHKey + SSHKeys GetSSHKeys + Server GetServer + Servers GetServers + Storage GetStorage + Storages GetStorages + Teams GetTeams + UserAgent string + func NewClient(opts ...ClientOpt) (*Client, error) + func (c *Client) MakeRequest(method, path string, body, v interface{}) (*Response, error) + type ClientOpt func(*options) error + func WithAuthToken(authToken string) ClientOpt + func WithHTTPClient(client *http.Client) ClientOpt + func WithURL(url string) ClientOpt + func WithUserAgent(ua string) ClientOpt + type Cpus struct + Cores int + Count int + Frequency float32 + Name string + Unit string + type CreateIPAddress struct + ARecord string + AssignedTo string + PtrRecord string + Region string + RoutedTo string + Tags *map[string]string + TargetedTo string + Type string + type CreateProject struct + Bgp bool + Name string + type CreateSSHKey struct + Key string + Label string + type CreateServer struct + Hostname string + IPAddresses []string + Image string + PlanID string + ProjectID string + Region string + SSHKeys []string + SpotInstance bool + Tags *map[string]string + UserData string + type CreateStorage struct + Description string + ProjectID string + Region string + Size int + type Credit struct + Account Account + Promo Promo + Resources Resources + type DeleteProject struct + ID string + type DeleteSSHKey struct + ID string + type DeleteServer struct + ID string + type DeleteStorage struct + ProjectID string + StorageID string + type DetachFrom struct + ProjectID string + StorageID string + type ErrorResponse struct + Errors []string + Response *http.Response + SingleError string + type GetIP interface + Create func(projectID string, request *CreateIPAddress) (IPAddresses, *Response, error) + List func(projectID string, ipID string, opts *GetOptions) (IPAddresses, *Response, error) + Remove func(projectID string, request *RemoveIPAddress) (IPAddresses, *Response, error) + Update func(projectID string, ipID string, request *UpdateIPAddress) (IPAddresses, *Response, error) + type GetIPS interface + List func(projectID string) ([]IPAddresses, *Response, error) + type GetImages interface + List func(planID int, opts *GetOptions) ([]Images, *Response, error) + type GetOptions struct + Fields []string + Limit int + Offset int + Status []string + Type []string + func (g *GetOptions) Encode() string + func (g *GetOptions) WithQuery(apiPath string) string + type GetPlans interface + List func(teamID int, opts *GetOptions) ([]Plans, *Response, error) + type GetProject interface + Create func(teamID int, request *CreateProject) (Project, *Response, error) + Delete func(projectID string, request *DeleteProject) (Project, *Response, error) + List func(projectID string) (Project, *Response, error) + Update func(projectID string, request *UpdateProject) (Project, *Response, error) + type GetProjects interface + List func(teamID int, opts *GetOptions) ([]Project, *Response, error) + type GetSSHKey interface + Create func(request *CreateSSHKey) (SSHKeys, *Response, error) + Delete func(request *DeleteSSHKey) (SSHKeys, *Response, error) + List func(sshKeyID string, opts *GetOptions) (SSHKey, *Response, error) + Update func(sshKeyID string, request *UpdateSSHKey) (SSHKeys, *Response, error) + type GetSSHKeys interface + List func(opts *GetOptions) ([]SSHKeys, *Response, error) + type GetServer interface + Create func(projectID string, request *CreateServer) (Server, *Response, error) + Delete func(request *DeleteServer) (Server, *Response, error) + List func(serverID string, opts *GetOptions) (Server, *Response, error) + PowerOff func(serverID string) (Server, *Response, error) + PowerOn func(serverID string) (Server, *Response, error) + PowerState func(serverID string) (PowerState, *Response, error) + Reboot func(serverID string) (Server, *Response, error) + Update func(serverID string, request *UpdateServer) (Server, *Response, error) + type GetServers interface + List func(projectID string, opts *GetOptions) ([]Server, *Response, error) + type GetStorage interface + Attach func(request *AttachTo) (BlockStorage, *Response, error) + Create func(request *CreateStorage) (BlockStorage, *Response, error) + Delete func(request *DeleteStorage) (*Response, error) + Detach func(*DetachFrom) (*Response, error) + List func(projectID string, storageID string, opts *GetOptions) (BlockStorage, *Response, error) + type GetStorages interface + List func(projectID string, opts *GetOptions) ([]BlockStorage, *Response, error) + type GetTeams interface + List func(opts *GetOptions) ([]Teams, *Response, error) + type IPAddresses struct + ARecord string + Address string + AddressFamily int + AssignedTo AssignedTo + Cidr string + Gateway string + Href string + ID string + Project Project + PtrRecord string + Region Region + RoutedTo RoutedTo + Tags map[string]string + TargetedTo AssignedTo + Type string + type IPClient struct + func (i *IPClient) Create(projectID string, request *CreateIPAddress) (IPAddresses, *Response, error) + func (i *IPClient) List(projectID string, ipID string, opts *GetOptions) (IPAddresses, *Response, error) + func (i *IPClient) Remove(projectID string, request *RemoveIPAddress) (IPAddresses, *Response, error) + func (i *IPClient) Update(projectID string, ipID string, request *UpdateIPAddress) (IPAddresses, *Response, error) + type IPSClient struct + func (i *IPSClient) List(projectID string) ([]IPAddresses, *Response, error) + type Images struct + ID int + Name string + Pricing []Pricing + type ImagesClient struct + func (i *ImagesClient) List(planID int, opts *GetOptions) ([]Images, *Response, error) + type Memory struct + Count int + Name string + Total int + Unit string + type Meta struct + Total int + type Nics struct + Name string + type Plans struct + AvailableRegions []AvailableRegions + Custom bool + ID int + Name string + Pricing []Pricing + Specs Specs + type PlansClient struct + func (p *PlansClient) List(teamID int, opts *GetOptions) ([]Plans, *Response, error) + type PowerState struct + Power string + type Pricing struct + Currency string + Price float32 + Taxed bool + Unit string + type Pricing2 struct + Currency string + Price float32 + Taxed bool + Unit string + type Project struct + Bgp ProjectBGP + Href string + ID int + Name string + type ProjectBGP struct + Enabled bool + LocalASN int + type ProjectClient struct + func (p *ProjectClient) Create(teamID int, request *CreateProject) (Project, *Response, error) + func (p *ProjectClient) Delete(projectID string, request *DeleteProject) (Project, *Response, error) + func (p *ProjectClient) List(projectID string) (Project, *Response, error) + func (p *ProjectClient) Update(projectID string, request *UpdateProject) (Project, *Response, error) + type ProjectsClient struct + func (p *ProjectsClient) List(teamID int, opts *GetOptions) ([]Project, *Response, error) + type Promo struct + Currency string + Remaining float32 + Usage float32 + type Raid struct + Name string + type Region struct + BGP RegionBGP + Href string + ID int + Name string + RegionIso2 string + type RegionBGP struct + Asn int + Hosts []string + type RemoveIPAddress struct + ID string + type Resources struct + Pricing Pricing + type Response struct + type RoutedTo struct + Address string + AddressFamily int + Cidr string + Gateway string + ID string + Region Region + Type string + type SSHKey struct + Created string + Fingerprint string + Href string + ID int + Key string + Label string + Updated string + type SSHKeyClient struct + func (s *SSHKeyClient) Create(request *CreateSSHKey) (SSHKeys, *Response, error) + func (s *SSHKeyClient) Delete(request *DeleteSSHKey) (SSHKeys, *Response, error) + func (s *SSHKeyClient) List(sshKeyID string, opts *GetOptions) (SSHKey, *Response, error) + func (s *SSHKeyClient) Update(sshKeyID string, request *UpdateSSHKey) (SSHKeys, *Response, error) + type SSHKeys struct + Created string + Fingerprint string + Href string + ID int + Key string + Label string + Updated string + type SSHKeysClient struct + func (s *SSHKeysClient) List(opts *GetOptions) ([]SSHKeys, *Response, error) + type Server struct + AvailableRegions AvailableRegions + BGP ServerBGP + Created string + Hostname string + Href string + ID int + IPAddresses []IPAddresses + Image string + Name string + Plans Plans + Pricing Pricing + Project Project + Region Region + SSHKeys []SSHKeys + SpotInstance bool + State string + Storage BlockStorage + Tags map[string]string + TerminationDate string + type ServerAction struct + Type string + type ServerBGP struct + Active int + Available bool + Connected int + Enabled bool + Limit int + Routers int + Routes []BGPRoute + Status string + Updated string + type ServerClient struct + func (s *ServerClient) Create(projectID string, request *CreateServer) (Server, *Response, error) + func (s *ServerClient) Delete(request *DeleteServer) (Server, *Response, error) + func (s *ServerClient) List(serverID string, opts *GetOptions) (Server, *Response, error) + func (s *ServerClient) PowerOff(serverID string) (Server, *Response, error) + func (s *ServerClient) PowerOn(serverID string) (Server, *Response, error) + func (s *ServerClient) PowerState(serverID string) (PowerState, *Response, error) + func (s *ServerClient) Reboot(serverID string) (Server, *Response, error) + func (s *ServerClient) Update(serverID string, request *UpdateServer) (Server, *Response, error) + type ServersClient struct + func (s *ServersClient) List(projectID string, opts *GetOptions) ([]Server, *Response, error) + type Specs struct + Bandwidth Bandwidth + Cpus Cpus + Memory Memory + Nics Nics + Raid Raid + Storage []Storage + type Storage struct + Count int + Name string + Size float32 + Unit string + type StorageClient struct + func (s *StorageClient) Attach(request *AttachTo) (BlockStorage, *Response, error) + func (s *StorageClient) Create(request *CreateStorage) (BlockStorage, *Response, error) + func (s *StorageClient) Delete(request *DeleteStorage) (*Response, error) + func (s *StorageClient) Detach(request *DetachFrom) (*Response, error) + func (s *StorageClient) List(projectID string, storageID string, opts *GetOptions) (BlockStorage, *Response, error) + type StoragesClient struct + func (c *StoragesClient) List(projectID string, opts *GetOptions) ([]BlockStorage, *Response, error) + type Teams struct + Billing Billing + Credit Credit + Href string + ID int + Name string + type TeamsClient struct + func (t *TeamsClient) List(opts *GetOptions) ([]Teams, *Response, error) + type UpdateIPAddress struct + ARecord string + AssignedTo string + PtrRecord string + RoutedTo string + Tags *map[string]string + TargetedTo string + type UpdateProject struct + Bgp bool + Name string + type UpdateSSHKey struct + Key string + Label string + type UpdateServer struct + Bgp bool + Tags *map[string]string + type Vat struct + Amount int + Number string + Valid bool Other modules containing this package github.com/cherryservers/cherrygo github.com/cherryservers/cherrygo/v3