Documentation
¶
Index ¶
- type Account
- type AssignedTo
- type AttachTo
- type AttachedTo
- type AvailableRegions
- type BGPRoute
- type Bandwidth
- type Billing
- type BlockStorage
- type Client
- type ClientOpt
- type Cpus
- type CreateIPAddress
- type CreateProject
- type CreateSSHKey
- type CreateServer
- type CreateStorage
- type Credit
- type DeleteProject
- type DeleteSSHKey
- type DeleteServer
- type DeleteStorage
- type DetachFrom
- type ErrorResponse
- type GetIP
- type GetIPS
- type GetImages
- type GetOptions
- type GetPlans
- type GetProject
- type GetProjects
- type GetSSHKey
- type GetSSHKeys
- type GetServer
- type GetServers
- type GetStorage
- type GetStorages
- type GetTeams
- type IPAddresses
- type IPClient
- 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
- type Images
- type ImagesClient
- type Memory
- type Meta
- type Nics
- type Plans
- type PlansClient
- type PowerState
- type Pricing
- type Pricing2
- type Project
- type ProjectBGP
- type ProjectClient
- 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
- type Promo
- type Raid
- type Region
- type RegionBGP
- type RemoveIPAddress
- type Resources
- type Response
- type RoutedTo
- type SSHKey
- type SSHKeyClient
- 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
- type SSHKeysClient
- type Server
- type ServerAction
- type ServerBGP
- type ServerClient
- 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
- type Specs
- type Storage
- type StorageClient
- 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
- type Teams
- type TeamsClient
- type UpdateIPAddress
- type UpdateProject
- type UpdateSSHKey
- type UpdateServer
- type Vat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Remaining float32 `json:"remaining,omitempty"` Usage float32 `json:"usage,omitempty"` Currency string `json:"currency,omitempty"` }
Account fields
type AssignedTo ¶
type AssignedTo struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Href string `json:"href,omitempty"` Hostname string `json:"hostname,omitempty"` Image string `json:"image,omitempty"` Region Region `json:"region,omitempty"` State string `json:"state,omitempty"` Pricing Pricing `json:"pricing,omitempty"` }
AssignedTo fields
type AttachedTo ¶
type AttachedTo struct {
Href string `json:"href"`
}
type AvailableRegions ¶
type AvailableRegions struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` RegionIso2 string `json:"region_iso_2,omitempty"` StockQty int `json:"stock_qty,omitempty"` }
AvailableRegions specifies fields for specs
type Billing ¶
type Billing struct { Type string `json:"type,omitempty"` CompanyName string `json:"company_name,ommitempty"` CompanyCode string `json:"company_code,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Address1 string `json:"address_1,omitempty"` Address2 string `json:"address_2,omitempty"` CountryIso2 string `json:"country_iso_2,omitempty"` City string `json:"city,omitempty"` Vat Vat `json:"vat,omitempty"` Currency string `json:"currency,omitempty"` }
Billing fields
type BlockStorage ¶
type BlockStorage struct { ID int `json:"id"` Name string `json:"name"` Href string `json:"href"` Size int `json:"size"` AllowEditSize bool `json:"allow_edit_size"` Unit string `json:"unit"` Description string `json:"description,omitempty"` AttachedTo AttachedTo `json:"attached_to,omitempty"` VlanID string `json:"vlan_id"` VlanIP string `json:"vlan_ip"` Initiator string `json:"initiator"` DiscoveryIP string `json:"discovery_ip"` }
type Client ¶
type Client struct { BaseURL *url.URL UserAgent string AuthToken string Teams GetTeams Plans GetPlans Images GetImages Project GetProject Projects GetProjects SSHKeys GetSSHKeys SSHKey GetSSHKey Servers GetServers Server GetServer IPAddresses GetIPS IPAddress GetIP Storages GetStorages Storage GetStorage // contains filtered or unexported fields }
Client returns struct for client
type ClientOpt ¶
type ClientOpt func(*options) error
func WithAuthToken ¶
WithAuthToken use provided auth token to make requests, defaults to environment variable CHERRY_AUTH_TOKEN
func WithHTTPClient ¶
WithHTTPClient use client as the http.Client to make API requests
func WithUserAgent ¶
WithUserAgent set user agent when making requests
type Cpus ¶
type Cpus struct { Count int `json:"count,omitempty"` Name string `json:"name,omitempty"` Cores int `json:"cores,omitempty"` Frequency float32 `json:"frequency,omitempty"` Unit string `json:"unit,omitempty"` }
Cpus fields
type CreateIPAddress ¶
type CreateIPAddress struct { Type string `json:"type,omitempty"` Region string `json:"region,omitempty"` PtrRecord string `json:"ptr_record,omitempty"` ARecord string `json:"a_record,omitempty"` RoutedTo string `json:"routed_to,omitempty"` AssignedTo string `json:"assigned_to,omitempty"` TargetedTo string `json:"targeted_to,omitempty"` Tags *map[string]string `json:"tags,omitempty"` }
CreateIPAddress fields for adding addition IP address
type CreateProject ¶
CreateProject fields for adding new project with specified name
type CreateSSHKey ¶
type CreateSSHKey struct { Label string `json:"label,omitempty"` Key string `json:"key,omitempty"` }
CreateSSHKey fields for adding new key with label and raw key
type CreateServer ¶
type CreateServer struct { ProjectID string `json:"project_id,omitempty"` PlanID string `json:"plan_id,omitempty"` Hostname string `json:"hostname,omitempty"` Image string `json:"image,omitempty"` Region string `json:"region,omitempty"` SSHKeys []string `json:"ssh_keys"` IPAddresses []string `json:"ip_addresses"` UserData string `json:"user_data,omitempty"` Tags *map[string]string `json:"tags,omitempty"` SpotInstance bool `json:"spot_market"` }
CreateServer fields for ordering new server
type CreateStorage ¶
type Credit ¶
type Credit struct { Account Account `json:"account,omitempty"` Promo Promo `json:"promo,omitempty"` Resources Resources `json:"resources,omitempty"` }
Credit fields
type DeleteProject ¶
type DeleteProject struct {
ID string `json:"id,omitempty"`
}
DeleteProject fields for key delition by its ID
type DeleteSSHKey ¶
type DeleteSSHKey struct {
ID string `json:"id,omitempty"`
}
DeleteSSHKey fields for key delition by its ID
type DeleteServer ¶
type DeleteServer struct {
ID string `json:"id,omitempty"`
}
DeleteServer field for removing server
type DeleteStorage ¶
type DetachFrom ¶
type ErrorResponse ¶
type ErrorResponse struct { Response *http.Response Errors []string `json:"errors"` SingleError string `json:"error"` }
ErrorResponse fields
type GetIP ¶
type GetIP interface { List(projectID string, ipID string, opts *GetOptions) (IPAddresses, *Response, error) Create(projectID string, request *CreateIPAddress) (IPAddresses, *Response, error) Remove(projectID string, request *RemoveIPAddress) (IPAddresses, *Response, error) Update(projectID string, ipID string, request *UpdateIPAddress) (IPAddresses, *Response, error) }
GetIP interface metodas isgauti team'sus
type GetIPS ¶
type GetIPS interface {
List(projectID string) ([]IPAddresses, *Response, error)
}
GetIPS interface metodas isgauti team'sus
type GetImages ¶
type GetImages interface {
List(planID int, opts *GetOptions) ([]Images, *Response, error)
}
GetImages interface metodas isgauti team'sus
type GetOptions ¶
type GetOptions struct { Fields []string `url:"fields,omitempty,comma"` Limit int `url:"limit,omitempty"` Offset int `url:"offset,omitempty"` Type []string `url:"type,ommitempty"` Status []string `url:"status,ommitempty"` }
func (*GetOptions) Encode ¶
func (g *GetOptions) Encode() string
func (*GetOptions) WithQuery ¶
func (g *GetOptions) WithQuery(apiPath string) string
type GetPlans ¶
type GetPlans interface {
List(teamID int, opts *GetOptions) ([]Plans, *Response, error)
}
GetPlans interface metodas isgauti team'sus
type GetProject ¶
type GetProject interface { List(projectID string) (Project, *Response, error) Create(teamID int, request *CreateProject) (Project, *Response, error) Update(projectID string, request *UpdateProject) (Project, *Response, error) Delete(projectID string, request *DeleteProject) (Project, *Response, error) }
GetProject interface metodas isgauti team'sus
type GetProjects ¶
type GetProjects interface {
List(teamID int, opts *GetOptions) ([]Project, *Response, error)
}
GetProjects interface metodas isgauti team'sus
type GetSSHKey ¶
type GetSSHKey interface { List(sshKeyID string, opts *GetOptions) (SSHKey, *Response, error) Create(request *CreateSSHKey) (SSHKeys, *Response, error) Delete(request *DeleteSSHKey) (SSHKeys, *Response, error) Update(sshKeyID string, request *UpdateSSHKey) (SSHKeys, *Response, error) }
GetSSHKey interface
type GetSSHKeys ¶
type GetSSHKeys interface {
List(opts *GetOptions) ([]SSHKeys, *Response, error)
}
GetSSHKeys interface metodas isgauti team'sus
type GetServer ¶
type GetServer interface { List(serverID string, opts *GetOptions) (Server, *Response, error) PowerOff(serverID string) (Server, *Response, error) PowerOn(serverID string) (Server, *Response, error) Create(projectID string, request *CreateServer) (Server, *Response, error) Delete(request *DeleteServer) (Server, *Response, error) PowerState(serverID string) (PowerState, *Response, error) Reboot(serverID string) (Server, *Response, error) Update(serverID string, request *UpdateServer) (Server, *Response, error) }
GetServer interface metodas isgauti team'sus
type GetServers ¶
type GetServers interface {
List(projectID string, opts *GetOptions) ([]Server, *Response, error)
}
GetServers interface metodas isgauti team'sus
type GetStorage ¶
type GetStorage interface { List(projectID string, storageID string, opts *GetOptions) (BlockStorage, *Response, error) Create(request *CreateStorage) (BlockStorage, *Response, error) Delete(request *DeleteStorage) (*Response, error) Attach(request *AttachTo) (BlockStorage, *Response, error) Detach(*DetachFrom) (*Response, error) }
type GetStorages ¶
type GetStorages interface {
List(projectID string, opts *GetOptions) ([]BlockStorage, *Response, error)
}
type GetTeams ¶
type GetTeams interface {
List(opts *GetOptions) ([]Teams, *Response, error)
}
GetTeams interface metodas isgauti team'sus
type IPAddresses ¶
type IPAddresses struct { ID string `json:"id,omitempty"` Address string `json:"address,omitempty"` AddressFamily int `json:"address_family,omitempty"` Cidr string `json:"cidr,omitempty"` Gateway string `json:"gateway,omitempty"` Type string `json:"type,omitempty"` Region Region `json:"region,omitempty"` RoutedTo RoutedTo `json:"routed_to,omitempty"` AssignedTo AssignedTo `json:"assigned_to,omitempty"` TargetedTo AssignedTo `json:"targeted_to,omitempty"` Project Project `json:"project,omitempty"` PtrRecord string `json:"ptr_record,omitempty"` ARecord string `json:"a_record,omitempty"` Tags map[string]string `json:"tags,omitempty"` Href string `json:"href,omitempty"` }
IPAddresses fields
type IPClient ¶
type IPClient struct {
// contains filtered or unexported fields
}
IPClient paveldi client
func (*IPClient) Create ¶
func (i *IPClient) Create(projectID string, request *CreateIPAddress) (IPAddresses, *Response, error)
Create function orders new floating IP address
func (*IPClient) List ¶
func (i *IPClient) List(projectID string, ipID string, opts *GetOptions) (IPAddresses, *Response, error)
List func lists teams
func (*IPClient) Remove ¶
func (i *IPClient) Remove(projectID string, request *RemoveIPAddress) (IPAddresses, *Response, error)
Remove function remove existing floating IP address
func (*IPClient) Update ¶
func (i *IPClient) Update(projectID string, ipID string, request *UpdateIPAddress) (IPAddresses, *Response, error)
Update function updates existing floating IP address
type IPSClient ¶
type IPSClient struct {
// contains filtered or unexported fields
}
IPSClient paveldi client
type Images ¶
type Images struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Pricing []Pricing `json:"pricing,omitempty"` }
Images tai ka grazina api
type ImagesClient ¶
type ImagesClient struct {
// contains filtered or unexported fields
}
ImagesClient paveldi client
func (*ImagesClient) List ¶
func (i *ImagesClient) List(planID int, opts *GetOptions) ([]Images, *Response, error)
List func lists teams
type Memory ¶
type Memory struct { Count int `json:"count,omitempty"` Total int `json:"total,omitempty"` Unit string `json:"unit,omitempty"` Name string `json:"name,omitempty"` }
Memory fields
type Plans ¶
type Plans struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Custom bool `json:"custom,omitempty"` Specs Specs `json:"specs,omitempty"` Pricing []Pricing `json:"pricing,omitempty"` AvailableRegions []AvailableRegions `json:"available_regions,omitempty"` }
Plans tai ka grazina api
type PlansClient ¶
type PlansClient struct {
// contains filtered or unexported fields
}
PlansClient paveldi client
func (*PlansClient) List ¶
func (p *PlansClient) List(teamID int, opts *GetOptions) ([]Plans, *Response, error)
List func lists teams
type PowerState ¶
type PowerState struct {
Power string `json:"power,omitempty"`
}
PowerState fields
type Pricing ¶
type Pricing struct { Price float32 `json:"price,omitempty"` Taxed bool `json:"taxed,omitempty"` Currency string `json:"currency,omitempty"` Unit string `json:"unit,omitempty"` }
Pricing for resources
type Pricing2 ¶
type Pricing2 struct { Price float32 `json:"price,omitempty"` Currency string `json:"currency,omitempty"` Taxed bool `json:"taxed,omitempty"` Unit string `json:"unit,omitempty"` }
Pricing2 specifies fields for specs
type Project ¶
type Project struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Bgp ProjectBGP `json:"bgp,omitempty"` Href string `json:"href,omitempty"` }
Project tai ka grazina api
type ProjectBGP ¶
type ProjectClient ¶
type ProjectClient struct {
// contains filtered or unexported fields
}
ProjectClient paveldi client
func (*ProjectClient) Create ¶
func (p *ProjectClient) Create(teamID int, request *CreateProject) (Project, *Response, error)
Create func will create new Project for specified team
func (*ProjectClient) Delete ¶
func (p *ProjectClient) Delete(projectID string, request *DeleteProject) (Project, *Response, error)
Delete func will delete a project
func (*ProjectClient) List ¶
func (p *ProjectClient) List(projectID string) (Project, *Response, error)
List project
func (*ProjectClient) Update ¶
func (p *ProjectClient) Update(projectID string, request *UpdateProject) (Project, *Response, error)
Update func will update a project
type ProjectsClient ¶
type ProjectsClient struct {
// contains filtered or unexported fields
}
ProjectsClient paveldi client
func (*ProjectsClient) List ¶
func (p *ProjectsClient) List(teamID int, opts *GetOptions) ([]Project, *Response, error)
List func lists teams
type Promo ¶
type Promo struct { Remaining float32 `json:"remaining,omitempty"` Usage float32 `json:"usage,omitempty"` Currency string `json:"currency,omitempty"` }
Promo fields
type Region ¶
type Region struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` RegionIso2 string `json:"region_iso_2,omitempty"` BGP RegionBGP `json:"bgp,omitempty"` Href string `json:"href,omitempty"` }
Region fields
type RemoveIPAddress ¶
type RemoveIPAddress struct {
ID string `json:"id,omitempty"`
}
RemoveIPAddress fields for removing IP address
type Resources ¶
type Resources struct {
Pricing Pricing `json:"pricing,omitempty"`
}
Resources fields
type RoutedTo ¶
type RoutedTo struct { ID string `json:"id,omitempty"` Address string `json:"address,omitempty"` AddressFamily int `json:"address_family,omitempty"` Cidr string `json:"cidr,omitempty"` Gateway string `json:"gateway,omitempty"` Type string `json:"type,omitempty"` Region Region `json:"region,omitempty"` }
RoutedTo fields
type SSHKey ¶
type SSHKey struct { ID int `json:"id,omitempty"` Label string `json:"label,omitempty"` Key string `json:"key,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` Updated string `json:"updated,omitempty"` Created string `json:"created,omitempty"` Href string `json:"href,omitempty"` }
SSHKey fields for return values after creation
type SSHKeyClient ¶
type SSHKeyClient struct {
// contains filtered or unexported fields
}
SSHKeyClient paveldi client
func (*SSHKeyClient) Create ¶
func (s *SSHKeyClient) Create(request *CreateSSHKey) (SSHKeys, *Response, error)
Create adds new SSH key
func (*SSHKeyClient) Delete ¶
func (s *SSHKeyClient) Delete(request *DeleteSSHKey) (SSHKeys, *Response, error)
Delete removes desired SSH key by its ID
func (*SSHKeyClient) List ¶
func (s *SSHKeyClient) List(sshKeyID string, opts *GetOptions) (SSHKey, *Response, error)
List func lists all available ssh keys
func (*SSHKeyClient) Update ¶
func (s *SSHKeyClient) Update(sshKeyID string, request *UpdateSSHKey) (SSHKeys, *Response, error)
Update function updates keys Label or key itself
type SSHKeys ¶
type SSHKeys struct { ID int `json:"id,omitempty"` Label string `json:"label,omitempty"` Key string `json:"key,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` Updated string `json:"updated,omitempty"` Created string `json:"created,omitempty"` Href string `json:"href,omitempty"` }
SSHKeys fields for return values after creation
type SSHKeysClient ¶
type SSHKeysClient struct {
// contains filtered or unexported fields
}
SSHKeysClient paveldi client
func (*SSHKeysClient) List ¶
func (s *SSHKeysClient) List(opts *GetOptions) ([]SSHKeys, *Response, error)
List func lists all available ssh keys
type Server ¶
type Server struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Href string `json:"href,omitempty"` Hostname string `json:"hostname,omitempty"` Image string `json:"image,omitempty"` SpotInstance bool `json:"spot_instance"` BGP ServerBGP `json:"bgp,omitempty"` Project Project `json:"project,omitempty"` Region Region `json:"region,omitempty"` State string `json:"state,omitempty"` Plans Plans `json:"plan,omitempty"` AvailableRegions AvailableRegions `json:"availableregions,omitempty"` Pricing Pricing `json:"pricing,omitempty"` IPAddresses []IPAddresses `json:"ip_addresses,omitempty"` SSHKeys []SSHKeys `json:"ssh_keys,omitempty"` Tags map[string]string `json:"tags,omitempty"` Storage BlockStorage `json:"storage,omitempty"` Created string `json:"created_at,omitempty"` TerminationDate string `json:"termination_date,omitempty"` }
Server response object
type ServerAction ¶
type ServerAction struct {
Type string `json:"type,omitempty"`
}
ServerAction fields for performed action on server
type ServerBGP ¶
type ServerBGP struct { Enabled bool `json:"enabled"` Available bool `json:"available,omitempty"` Status string `json:"status,omitempty"` Routers int `json:"routers,omitempty"` Connected int `json:"connected,omitempty"` Limit int `json:"limit,omitempty"` Active int `json:"active,omitempty"` Routes []BGPRoute `json:"routes,omitempty"` Updated string `json:"updated,omitempty"` }
type ServerClient ¶
type ServerClient struct {
// contains filtered or unexported fields
}
ServerClient paveldi client
func (*ServerClient) Create ¶
func (s *ServerClient) Create(projectID string, request *CreateServer) (Server, *Response, error)
Create function orders new floating IP address
func (*ServerClient) Delete ¶
func (s *ServerClient) Delete(request *DeleteServer) (Server, *Response, error)
Delete removes desired SSH key by its ID
func (*ServerClient) List ¶
func (s *ServerClient) List(serverID string, opts *GetOptions) (Server, *Response, error)
List func lists teams
func (*ServerClient) PowerOff ¶
func (s *ServerClient) PowerOff(serverID string) (Server, *Response, error)
PowerOff function turns server off
func (*ServerClient) PowerOn ¶
func (s *ServerClient) PowerOn(serverID string) (Server, *Response, error)
PowerOn function turns server on
func (*ServerClient) PowerState ¶
func (s *ServerClient) PowerState(serverID string) (PowerState, *Response, error)
PowerState func
func (*ServerClient) Reboot ¶
func (s *ServerClient) Reboot(serverID string) (Server, *Response, error)
Reboot function restarts desired server
func (*ServerClient) Update ¶
func (s *ServerClient) Update(serverID string, request *UpdateServer) (Server, *Response, error)
Update update server with tags
type ServersClient ¶
type ServersClient struct {
// contains filtered or unexported fields
}
ServersClient paveldi client
func (*ServersClient) List ¶
func (s *ServersClient) List(projectID string, opts *GetOptions) ([]Server, *Response, error)
List func lists teams
type Specs ¶
type Specs struct { Cpus Cpus `json:"cpus,omitempty"` Memory Memory `json:"memory,omitempty"` Storage []Storage `json:"storage,omitempty"` Raid Raid `json:"raid,omitempty"` Nics Nics `json:"nics,omitempty"` Bandwidth Bandwidth `json:"bandwidth,omitempty"` }
Specs specifies fields for specs
type Storage ¶
type Storage struct { Count int `json:"count,omitempty"` Name string `json:"name,omitempty"` Size float32 `json:"size,omitempty"` Unit string `json:"unit,omitempty"` }
Storage fields
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
func (*StorageClient) Attach ¶
func (s *StorageClient) Attach(request *AttachTo) (BlockStorage, *Response, error)
func (*StorageClient) Create ¶
func (s *StorageClient) Create(request *CreateStorage) (BlockStorage, *Response, error)
func (*StorageClient) Delete ¶
func (s *StorageClient) Delete(request *DeleteStorage) (*Response, error)
func (*StorageClient) Detach ¶
func (s *StorageClient) Detach(request *DetachFrom) (*Response, error)
func (*StorageClient) List ¶
func (s *StorageClient) List(projectID string, storageID string, opts *GetOptions) (BlockStorage, *Response, error)
type StoragesClient ¶
type StoragesClient struct {
// contains filtered or unexported fields
}
func (*StoragesClient) List ¶
func (c *StoragesClient) List(projectID string, opts *GetOptions) ([]BlockStorage, *Response, error)
type Teams ¶
type Teams struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Credit Credit `json:"credit,omitempty"` Billing Billing `json:"billing,omitempty"` Href string `json:"href,omitempty"` }
Teams tai ka grazina api
type TeamsClient ¶
type TeamsClient struct {
// contains filtered or unexported fields
}
TeamsClient paveldi client
func (*TeamsClient) List ¶
func (t *TeamsClient) List(opts *GetOptions) ([]Teams, *Response, error)
List func lists teams
type UpdateIPAddress ¶
type UpdateIPAddress struct { PtrRecord string `json:"ptr_record,omitempty"` ARecord string `json:"a_record,omitempty"` RoutedTo string `json:"routed_to,omitempty"` AssignedTo string `json:"assigned_to,omitempty"` TargetedTo string `json:"targeted_to,omitempty"` Tags *map[string]string `json:"tags,omitempty"` }
UpdateIPAddress fields for updating IP address
type UpdateProject ¶
UpdateProject fields for updating a project with specified name
type UpdateSSHKey ¶
type UpdateSSHKey struct { Label string `json:"label,omitempty"` Key string `json:"key,omitempty"` }
UpdateSSHKey fields for label or key update
type UpdateServer ¶
UpdateServer fields for updating a server with specified tags