Versions in this module Expand all Collapse all v0 v0.1.0 Apr 9, 2021 Changes in this version + const ActionCompleted + const ActionInProgress + const DefaultProject + func Bool(v bool) *bool + func CheckResponse(r *http.Response) error + func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error) + func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) + func Int(v int) *int + func StreamToString(stream io.Reader) string + func String(v string) *string + func Stringify(message interface{}) string + func ToURN(resourceType string, id interface{}) string + type Account struct + Email string + EmailVerified bool + FloatingIPLimit int + ServerLimit int + Status string + StatusMessage string + UUID string + VolumeLimit int + func (r Account) String() string + type AccountService interface + Get func(context.Context) (*Account, *Response, error) + type AccountServiceOp struct + func (s *AccountServiceOp) Get(ctx context.Context) (*Account, *Response, error) + type Action struct + CompletedAt *Timestamp + ID int + Region *Region + RegionSlug string + ResourceID int + ResourceType string + StartedAt *Timestamp + Status string + Type string + func (a Action) String() string + type ActionRequest map[string]interface + type ActionsService interface + Get func(context.Context, int) (*Action, *Response, error) + List func(context.Context, *ListOptions) ([]Action, *Response, error) + type ActionsServiceOp struct + func (s *ActionsServiceOp) Get(ctx context.Context, id int) (*Action, *Response, error) + func (s *ActionsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Action, *Response, error) + type Address struct + AddressLine1 string + AddressLine2 string + City string + CountryISO2Code string + CreatedAt time.Time + PostalCode string + Region string + UpdatedAt time.Time + type ArgError struct + func NewArgError(arg, reason string) *ArgError + func (e *ArgError) Error() string + type BackupWindow struct + End *Timestamp + Start *Timestamp + type Balance struct + AccountBalance string + GeneratedAt time.Time + MonthToDateBalance string + MonthToDateUsage string + func (r Balance) String() string + type BalanceService interface + Get func(context.Context) (*Balance, *Response, error) + type BalanceServiceOp struct + func (s *BalanceServiceOp) Get(ctx context.Context) (*Balance, *Response, error) + type BillingHistory struct + BillingHistory []BillingHistoryEntry + Links *Links + Meta *Meta + func (b BillingHistory) String() string + type BillingHistoryEntry struct + Amount string + Date time.Time + Description string + InvoiceID *string + InvoiceUUID *string + Type string + type BillingHistoryService interface + List func(context.Context, *ListOptions) (*BillingHistory, *Response, error) + type BillingHistoryServiceOp struct + func (s *BillingHistoryServiceOp) List(ctx context.Context, opt *ListOptions) (*BillingHistory, *Response, error) + type Client struct + Account AccountService + Actions ActionsService + Balance BalanceService + BaseURL *url.URL + BillingHistory BillingHistoryService + Domains DomainsService + Firewalls FirewallsService + FloatingIPActions FloatingIPActionsService + FloatingIPs FloatingIPsService + ImageActions ImageActionsService + Images ImagesService + Invoices InvoicesService + Keys KeysService + LoadBalancers LoadBalancersService + Projects ProjectsService + Rate Rate + Regions RegionsService + ServerActions ServerActionsService + Servers ServersService + Sizes SizesService + Snapshots SnapshotsService + Tags TagsService + UserAgent string + VPCs VPCsService + func New(httpClient *http.Client, opts ...ClientOpt) (*Client, error) + func NewClient(httpClient *http.Client) *Client + func NewFromToken(token string) *Client + func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) + func (c *Client) GetRate() Rate + func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error) + func (c *Client) OnRequestCompleted(rc RequestCompletionCallback) + type ClientOpt func(*Client) error + func SetBaseURL(bu string) ClientOpt + func SetUserAgent(ua string) ClientOpt + type CreateProjectRequest struct + Description string + Environment string + Name string + Purpose string + type CustomImageCreateRequest struct + Description string + Distribution string + Name string + Region string + Tags []string + Url string + type Destinations struct + Addresses []string + LoadBalancerUIDs []string + ServerIDs []int + Tags []string + type Domain struct + Name string + TTL int + ZoneFile string + func (d Domain) String() string + func (d Domain) URN() string + type DomainCreateRequest struct + IPAddress string + Name string + type DomainRecord struct + Data string + Flags int + ID int + Name string + Port int + Priority int + TTL int + Tag string + Type string + Weight int + func (d DomainRecord) String() string + type DomainRecordEditRequest struct + Data string + Flags int + Name string + Port int + Priority int + TTL int + Tag string + Type string + Weight int + func (d DomainRecordEditRequest) String() string + type DomainsService interface + Create func(context.Context, *DomainCreateRequest) (*Domain, *Response, error) + CreateRecord func(context.Context, string, *DomainRecordEditRequest) (*DomainRecord, *Response, error) + Delete func(context.Context, string) (*Response, error) + DeleteRecord func(context.Context, string, int) (*Response, error) + EditRecord func(context.Context, string, int, *DomainRecordEditRequest) (*DomainRecord, *Response, error) + Get func(context.Context, string) (*Domain, *Response, error) + List func(context.Context, *ListOptions) ([]Domain, *Response, error) + Record func(context.Context, string, int) (*DomainRecord, *Response, error) + Records func(context.Context, string, *ListOptions) ([]DomainRecord, *Response, error) + RecordsByName func(context.Context, string, string, *ListOptions) ([]DomainRecord, *Response, error) + RecordsByType func(context.Context, string, string, *ListOptions) ([]DomainRecord, *Response, error) + RecordsByTypeAndName func(context.Context, string, string, string, *ListOptions) ([]DomainRecord, *Response, error) + type DomainsServiceOp struct + func (s *DomainsServiceOp) Create(ctx context.Context, createRequest *DomainCreateRequest) (*Domain, *Response, error) + func (s *DomainsServiceOp) CreateRecord(ctx context.Context, domain string, createRequest *DomainRecordEditRequest) (*DomainRecord, *Response, error) + func (s *DomainsServiceOp) Delete(ctx context.Context, name string) (*Response, error) + func (s *DomainsServiceOp) DeleteRecord(ctx context.Context, domain string, id int) (*Response, error) + func (s *DomainsServiceOp) EditRecord(ctx context.Context, domain string, id int, ...) (*DomainRecord, *Response, error) + func (s *DomainsServiceOp) Get(ctx context.Context, name string) (*Domain, *Response, error) + func (s *DomainsServiceOp) Record(ctx context.Context, domain string, id int) (*DomainRecord, *Response, error) + func (s *DomainsServiceOp) Records(ctx context.Context, domain string, opt *ListOptions) ([]DomainRecord, *Response, error) + func (s *DomainsServiceOp) RecordsByName(ctx context.Context, domain, name string, opt *ListOptions) ([]DomainRecord, *Response, error) + func (s *DomainsServiceOp) RecordsByType(ctx context.Context, domain, ofType string, opt *ListOptions) ([]DomainRecord, *Response, error) + func (s *DomainsServiceOp) RecordsByTypeAndName(ctx context.Context, domain, ofType, name string, opt *ListOptions) ([]DomainRecord, *Response, error) + func (s DomainsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Domain, *Response, error) + type ErrorResponse struct + Message string + RequestID string + Response *http.Response + func (r *ErrorResponse) Error() string + type Firewall struct + Created string + ID string + InboundRules []InboundRule + Name string + OutboundRules []OutboundRule + PendingChanges []PendingChange + ServerIDs []int + Status string + Tags []string + func (fw Firewall) String() string + func (fw Firewall) URN() string + type FirewallRequest struct + InboundRules []InboundRule + Name string + OutboundRules []OutboundRule + ServerIDs []int + Tags []string + type FirewallRulesRequest struct + InboundRules []InboundRule + OutboundRules []OutboundRule + type FirewallsService interface + AddRules func(context.Context, string, *FirewallRulesRequest) (*Response, error) + AddServers func(context.Context, string, ...int) (*Response, error) + AddTags func(context.Context, string, ...string) (*Response, error) + Create func(context.Context, *FirewallRequest) (*Firewall, *Response, error) + Delete func(context.Context, string) (*Response, error) + Get func(context.Context, string) (*Firewall, *Response, error) + List func(context.Context, *ListOptions) ([]Firewall, *Response, error) + ListByServer func(context.Context, int, *ListOptions) ([]Firewall, *Response, error) + RemoveRules func(context.Context, string, *FirewallRulesRequest) (*Response, error) + RemoveServers func(context.Context, string, ...int) (*Response, error) + RemoveTags func(context.Context, string, ...string) (*Response, error) + Update func(context.Context, string, *FirewallRequest) (*Firewall, *Response, error) + type FirewallsServiceOp struct + func (fw *FirewallsServiceOp) AddRules(ctx context.Context, fID string, rr *FirewallRulesRequest) (*Response, error) + func (fw *FirewallsServiceOp) AddServers(ctx context.Context, fID string, serverIDs ...int) (*Response, error) + func (fw *FirewallsServiceOp) AddTags(ctx context.Context, fID string, tags ...string) (*Response, error) + func (fw *FirewallsServiceOp) Create(ctx context.Context, fr *FirewallRequest) (*Firewall, *Response, error) + func (fw *FirewallsServiceOp) Delete(ctx context.Context, fID string) (*Response, error) + func (fw *FirewallsServiceOp) Get(ctx context.Context, fID string) (*Firewall, *Response, error) + func (fw *FirewallsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Firewall, *Response, error) + func (fw *FirewallsServiceOp) ListByServer(ctx context.Context, sID int, opt *ListOptions) ([]Firewall, *Response, error) + func (fw *FirewallsServiceOp) RemoveRules(ctx context.Context, fID string, rr *FirewallRulesRequest) (*Response, error) + func (fw *FirewallsServiceOp) RemoveServers(ctx context.Context, fID string, serverIDs ...int) (*Response, error) + func (fw *FirewallsServiceOp) RemoveTags(ctx context.Context, fID string, tags ...string) (*Response, error) + func (fw *FirewallsServiceOp) Update(ctx context.Context, fID string, fr *FirewallRequest) (*Firewall, *Response, error) + type FloatingIP struct + IP string + Region *Region + Server *Server + func (f FloatingIP) String() string + func (f FloatingIP) URN() string + type FloatingIPActionsService interface + Assign func(ctx context.Context, ip string, serverID int) (*Action, *Response, error) + Get func(ctx context.Context, ip string, actionID int) (*Action, *Response, error) + List func(ctx context.Context, ip string, opt *ListOptions) ([]Action, *Response, error) + Unassign func(ctx context.Context, ip string) (*Action, *Response, error) + type FloatingIPActionsServiceOp struct + func (s *FloatingIPActionsServiceOp) Assign(ctx context.Context, ip string, serverID int) (*Action, *Response, error) + func (s *FloatingIPActionsServiceOp) Get(ctx context.Context, ip string, actionID int) (*Action, *Response, error) + func (s *FloatingIPActionsServiceOp) List(ctx context.Context, ip string, opt *ListOptions) ([]Action, *Response, error) + func (s *FloatingIPActionsServiceOp) Unassign(ctx context.Context, ip string) (*Action, *Response, error) + type FloatingIPCreateRequest struct + Region string + ServerID int + type FloatingIPsService interface + Create func(context.Context, *FloatingIPCreateRequest) (*FloatingIP, *Response, error) + Delete func(context.Context, string) (*Response, error) + Get func(context.Context, string) (*FloatingIP, *Response, error) + List func(context.Context, *ListOptions) ([]FloatingIP, *Response, error) + type FloatingIPsServiceOp struct + func (f *FloatingIPsServiceOp) Create(ctx context.Context, createRequest *FloatingIPCreateRequest) (*FloatingIP, *Response, error) + func (f *FloatingIPsServiceOp) Delete(ctx context.Context, ip string) (*Response, error) + func (f *FloatingIPsServiceOp) Get(ctx context.Context, ip string) (*FloatingIP, *Response, error) + func (f *FloatingIPsServiceOp) List(ctx context.Context, opt *ListOptions) ([]FloatingIP, *Response, error) + type ForwardingRule struct + CertificateID string + EntryPort int + EntryProtocol string + TargetPort int + TargetProtocol string + TlsPassthrough bool + func (f ForwardingRule) String() string + type HealthCheck struct + CheckIntervalSeconds int + HealthyThreshold int + Path string + Port int + Protocol string + ResponseTimeoutSeconds int + UnhealthyThreshold int + func (h HealthCheck) String() string + type Image struct + Created string + Description string + Distribution string + ErrorMessage string + ID int + MinDiskSize int + Name string + Public bool + Regions []string + SizeGigaBytes float64 + Slug string + Status string + Tags []string + Type string + func (i Image) String() string + type ImageActionsService interface + Convert func(context.Context, int) (*Action, *Response, error) + Get func(context.Context, int, int) (*Action, *Response, error) + Transfer func(context.Context, int, *ActionRequest) (*Action, *Response, error) + type ImageActionsServiceOp struct + func (i *ImageActionsServiceOp) Convert(ctx context.Context, imageID int) (*Action, *Response, error) + func (i *ImageActionsServiceOp) Get(ctx context.Context, imageID, actionID int) (*Action, *Response, error) + func (i *ImageActionsServiceOp) Transfer(ctx context.Context, imageID int, transferRequest *ActionRequest) (*Action, *Response, error) + type ImageUpdateRequest struct + Name string + type ImagesService interface + Create func(context.Context, *CustomImageCreateRequest) (*Image, *Response, error) + Delete func(context.Context, int) (*Response, error) + GetByID func(context.Context, int) (*Image, *Response, error) + GetBySlug func(context.Context, string) (*Image, *Response, error) + List func(context.Context, *ListOptions) ([]Image, *Response, error) + ListApplication func(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + ListByTag func(ctx context.Context, tag string, opt *ListOptions) ([]Image, *Response, error) + ListDistribution func(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + ListUser func(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + Update func(context.Context, int, *ImageUpdateRequest) (*Image, *Response, error) + type ImagesServiceOp struct + func (s *ImagesServiceOp) Create(ctx context.Context, createRequest *CustomImageCreateRequest) (*Image, *Response, error) + func (s *ImagesServiceOp) Delete(ctx context.Context, imageID int) (*Response, error) + func (s *ImagesServiceOp) GetByID(ctx context.Context, imageID int) (*Image, *Response, error) + func (s *ImagesServiceOp) GetBySlug(ctx context.Context, slug string) (*Image, *Response, error) + func (s *ImagesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + func (s *ImagesServiceOp) ListApplication(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + func (s *ImagesServiceOp) ListByTag(ctx context.Context, tag string, opt *ListOptions) ([]Image, *Response, error) + func (s *ImagesServiceOp) ListDistribution(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + func (s *ImagesServiceOp) ListUser(ctx context.Context, opt *ListOptions) ([]Image, *Response, error) + func (s *ImagesServiceOp) Update(ctx context.Context, imageID int, updateRequest *ImageUpdateRequest) (*Image, *Response, error) + type InboundRule struct + PortRange string + Protocol string + Sources *Sources + type Invoice struct + InvoiceItems []InvoiceItem + Links *Links + Meta *Meta + func (i Invoice) String() string + type InvoiceItem struct + Amount string + Category string + Description string + Duration string + DurationUnit string + EndTime time.Time + GroupDescription string + Product string + ProjectName string + ResourceID string + ResourceUUID string + StartTime time.Time + type InvoiceList struct + InvoicePreview InvoiceListItem + Invoices []InvoiceListItem + Links *Links + Meta *Meta + type InvoiceListItem struct + Amount string + InvoicePeriod string + InvoiceUUID string + UpdatedAt time.Time + type InvoiceSummary struct + Amount string + BillingPeriod string + CreditsAndAdjustments InvoiceSummaryBreakdown + InvoiceUUID string + Overages InvoiceSummaryBreakdown + ProductCharges InvoiceSummaryBreakdown + Taxes InvoiceSummaryBreakdown + UserBillingAddress Address + UserCompany string + UserEmail string + UserName string + type InvoiceSummaryBreakdown struct + Amount string + Items []InvoiceSummaryBreakdownItem + Name string + type InvoiceSummaryBreakdownItem struct + Amount string + Count string + Name string + type InvoicesService interface + Get func(context.Context, string, *ListOptions) (*Invoice, *Response, error) + GetCSV func(context.Context, string) ([]byte, *Response, error) + GetPDF func(context.Context, string) ([]byte, *Response, error) + GetSummary func(context.Context, string) (*InvoiceSummary, *Response, error) + List func(context.Context, *ListOptions) (*InvoiceList, *Response, error) + type InvoicesServiceOp struct + func (s *InvoicesServiceOp) Get(ctx context.Context, invoiceUUID string, opt *ListOptions) (*Invoice, *Response, error) + func (s *InvoicesServiceOp) GetCSV(ctx context.Context, invoiceUUID string) ([]byte, *Response, error) + func (s *InvoicesServiceOp) GetPDF(ctx context.Context, invoiceUUID string) ([]byte, *Response, error) + func (s *InvoicesServiceOp) GetSummary(ctx context.Context, invoiceUUID string) (*InvoiceSummary, *Response, error) + func (s *InvoicesServiceOp) List(ctx context.Context, opt *ListOptions) (*InvoiceList, *Response, error) + type Kernel struct + ID int + Name string + Version string + type Key struct + Fingerprint string + ID int + Name string + PublicKey string + func (s Key) String() string + type KeyCreateRequest struct + Name string + PublicKey string + type KeyUpdateRequest struct + Name string + type KeysService interface + Create func(context.Context, *KeyCreateRequest) (*Key, *Response, error) + DeleteByFingerprint func(context.Context, string) (*Response, error) + DeleteByID func(context.Context, int) (*Response, error) + GetByFingerprint func(context.Context, string) (*Key, *Response, error) + GetByID func(context.Context, int) (*Key, *Response, error) + List func(context.Context, *ListOptions) ([]Key, *Response, error) + UpdateByFingerprint func(context.Context, string, *KeyUpdateRequest) (*Key, *Response, error) + UpdateByID func(context.Context, int, *KeyUpdateRequest) (*Key, *Response, error) + type KeysServiceOp struct + func (s *KeysServiceOp) Create(ctx context.Context, createRequest *KeyCreateRequest) (*Key, *Response, error) + func (s *KeysServiceOp) DeleteByFingerprint(ctx context.Context, fingerprint string) (*Response, error) + func (s *KeysServiceOp) DeleteByID(ctx context.Context, keyID int) (*Response, error) + func (s *KeysServiceOp) GetByFingerprint(ctx context.Context, fingerprint string) (*Key, *Response, error) + func (s *KeysServiceOp) GetByID(ctx context.Context, keyID int) (*Key, *Response, error) + func (s *KeysServiceOp) List(ctx context.Context, opt *ListOptions) ([]Key, *Response, error) + func (s *KeysServiceOp) UpdateByFingerprint(ctx context.Context, fingerprint string, updateRequest *KeyUpdateRequest) (*Key, *Response, error) + func (s *KeysServiceOp) UpdateByID(ctx context.Context, keyID int, updateRequest *KeyUpdateRequest) (*Key, *Response, error) + type LinkAction struct + HREF string + ID int + Rel string + func (la *LinkAction) Get(ctx context.Context, client *Client) (*Action, *Response, error) + type Links struct + Actions []LinkAction + Pages *Pages + func (l *Links) CurrentPage() (int, error) + func (l *Links) IsLastPage() bool + type ListOptions struct + Page int + PerPage int + type LoadBalancer struct + Algorithm string + Created string + EnableBackendKeepalive bool + EnableProxyProtocol bool + ForwardingRules []ForwardingRule + HealthCheck *HealthCheck + ID int + IP string + Name string + RedirectHttpToHttps bool + Region *Region + ServerIDs []int + SizeSlug string + Status string + StickySessions *StickySessions + Tag string + Tags []string + VPCID int + func (l LoadBalancer) AsRequest() *LoadBalancerRequest + func (l LoadBalancer) String() string + func (l LoadBalancer) URN() string + type LoadBalancerRequest struct + Algorithm string + EnableBackendKeepalive bool + EnableProxyProtocol bool + ForwardingRules []ForwardingRule + HealthCheck *HealthCheck + Name string + RedirectHttpToHttps bool + Region string + ServerIDs []int + SizeSlug string + StickySessions *StickySessions + Tag string + Tags []string + VPCID int + func (l LoadBalancerRequest) String() string + type LoadBalancersService interface + AddForwardingRules func(ctx context.Context, lbID int, rules ...ForwardingRule) (*Response, error) + AddServers func(ctx context.Context, lbID int, serverIDs ...int) (*Response, error) + Create func(context.Context, *LoadBalancerRequest) (*LoadBalancer, *Response, error) + Delete func(ctx context.Context, lbID int) (*Response, error) + Get func(context.Context, int) (*LoadBalancer, *Response, error) + List func(context.Context, *ListOptions) ([]LoadBalancer, *Response, error) + RemoveForwardingRules func(ctx context.Context, lbID int, rules ...ForwardingRule) (*Response, error) + RemoveServers func(ctx context.Context, lbID int, serverIDs ...int) (*Response, error) + Update func(ctx context.Context, lbID int, lbr *LoadBalancerRequest) (*LoadBalancer, *Response, error) + type LoadBalancersServiceOp struct + func (l *LoadBalancersServiceOp) AddForwardingRules(ctx context.Context, lbID int, rules ...ForwardingRule) (*Response, error) + func (l *LoadBalancersServiceOp) AddServers(ctx context.Context, lbID int, serverIDs ...int) (*Response, error) + func (l *LoadBalancersServiceOp) Create(ctx context.Context, lbr *LoadBalancerRequest) (*LoadBalancer, *Response, error) + func (l *LoadBalancersServiceOp) Delete(ctx context.Context, ldID int) (*Response, error) + func (l *LoadBalancersServiceOp) Get(ctx context.Context, lbID int) (*LoadBalancer, *Response, error) + func (l *LoadBalancersServiceOp) List(ctx context.Context, opt *ListOptions) ([]LoadBalancer, *Response, error) + func (l *LoadBalancersServiceOp) RemoveForwardingRules(ctx context.Context, lbID int, rules ...ForwardingRule) (*Response, error) + func (l *LoadBalancersServiceOp) RemoveServers(ctx context.Context, lbID int, serverIDs ...int) (*Response, error) + func (l *LoadBalancersServiceOp) Update(ctx context.Context, lbID int, lbr *LoadBalancerRequest) (*LoadBalancer, *Response, error) + type Meta struct + Total int + type NetworkV4 struct + Gateway string + IPAddress string + Netmask string + Type string + func (n NetworkV4) String() string + type NetworkV6 struct + Gateway string + IPAddress string + Netmask int + Type string + func (n NetworkV6) String() string + type Networks struct + V4 []NetworkV4 + V6 []NetworkV6 + type OutboundRule struct + Destinations *Destinations + PortRange string + Protocol string + type Pages struct + First string + Last string + Next string + Prev string + type PendingChange struct + Removing bool + ServerID int + Status string + type Project struct + CreatedAt string + Description string + Environment string + ID string + IsDefault bool + Name string + OwnerID uint64 + OwnerUUID string + Purpose string + UpdatedAt string + func (p Project) String() string + type ProjectResource struct + AssignedAt string + Links *ProjectResourceLinks + Status string + URN string + type ProjectResourceLinks struct + Self string + type ProjectsService interface + AssignResources func(context.Context, string, ...interface{}) ([]ProjectResource, *Response, error) + Create func(context.Context, *CreateProjectRequest) (*Project, *Response, error) + Delete func(context.Context, string) (*Response, error) + Get func(context.Context, string) (*Project, *Response, error) + GetDefault func(context.Context) (*Project, *Response, error) + List func(context.Context, *ListOptions) ([]Project, *Response, error) + ListResources func(context.Context, string, *ListOptions) ([]ProjectResource, *Response, error) + Update func(context.Context, string, *UpdateProjectRequest) (*Project, *Response, error) + type ProjectsServiceOp struct + func (p *ProjectsServiceOp) AssignResources(ctx context.Context, projectID string, resources ...interface{}) ([]ProjectResource, *Response, error) + func (p *ProjectsServiceOp) Create(ctx context.Context, cr *CreateProjectRequest) (*Project, *Response, error) + func (p *ProjectsServiceOp) Delete(ctx context.Context, projectID string) (*Response, error) + func (p *ProjectsServiceOp) Get(ctx context.Context, projectID string) (*Project, *Response, error) + func (p *ProjectsServiceOp) GetDefault(ctx context.Context) (*Project, *Response, error) + func (p *ProjectsServiceOp) List(ctx context.Context, opts *ListOptions) ([]Project, *Response, error) + func (p *ProjectsServiceOp) ListResources(ctx context.Context, projectID string, opts *ListOptions) ([]ProjectResource, *Response, error) + func (p *ProjectsServiceOp) Update(ctx context.Context, projectID string, ur *UpdateProjectRequest) (*Project, *Response, error) + type Rate struct + Limit int + Remaining int + Reset Timestamp + func (r Rate) String() string + type Region struct + Available bool + Features []string + Name string + Sizes []string + Slug string + func (r Region) String() string + type RegionsService interface + List func(context.Context, *ListOptions) ([]Region, *Response, error) + type RegionsServiceOp struct + func (s *RegionsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Region, *Response, error) + type RequestCompletionCallback func(*http.Request, *http.Response) + type Resource struct + ID string + Type ResourceType + type ResourceType string + const DatabaseResourceType + const ImageResourceType + const LoadBalancerResourceType + const ServerResourceType + const VolumeResourceType + const VolumeSnapshotResourceType + type ResourceWithURN interface + URN func() string + type Response struct + Links *Links + Meta *Meta + Monitor string + type Server struct + BackupIDs []int + Created string + Disk int + Features []string + ID int + Image *Image + Kernel *Kernel + Locked bool + Memory int + Name string + Networks *Networks + NextBackupWindow *BackupWindow + Region *Region + Size *Size + SizeSlug string + SnapshotIDs []int + Status string + Tags []string + VPCID int + Vcpus int + VolumeIDs []string + func (s *Server) PrivateIPv4() (string, error) + func (s *Server) PublicIPv4() (string, error) + func (s *Server) PublicIPv6() (string, error) + func (s Server) String() string + func (s Server) URN() string + type ServerActionsService interface + ChangeKernel func(context.Context, int, int) (*Action, *Response, error) + DisableBackups func(context.Context, int) (*Action, *Response, error) + DisableBackupsByTag func(context.Context, string) ([]Action, *Response, error) + EnableBackups func(context.Context, int) (*Action, *Response, error) + EnableBackupsByTag func(context.Context, string) ([]Action, *Response, error) + EnableIPv6 func(context.Context, int) (*Action, *Response, error) + EnableIPv6ByTag func(context.Context, string) ([]Action, *Response, error) + EnablePrivateNetworking func(context.Context, int) (*Action, *Response, error) + EnablePrivateNetworkingByTag func(context.Context, string) ([]Action, *Response, error) + Get func(context.Context, int, int) (*Action, *Response, error) + GetByURI func(context.Context, string) (*Action, *Response, error) + PasswordReset func(context.Context, int) (*Action, *Response, error) + PowerCycle func(context.Context, int) (*Action, *Response, error) + PowerCycleByTag func(context.Context, string) ([]Action, *Response, error) + PowerOff func(context.Context, int) (*Action, *Response, error) + PowerOffByTag func(context.Context, string) ([]Action, *Response, error) + PowerOn func(context.Context, int) (*Action, *Response, error) + PowerOnByTag func(context.Context, string) ([]Action, *Response, error) + Reboot func(context.Context, int) (*Action, *Response, error) + RebuildByImageID func(context.Context, int, int) (*Action, *Response, error) + RebuildByImageSlug func(context.Context, int, string) (*Action, *Response, error) + Rename func(context.Context, int, string) (*Action, *Response, error) + Resize func(context.Context, int, string, bool) (*Action, *Response, error) + Restore func(context.Context, int, int) (*Action, *Response, error) + Shutdown func(context.Context, int) (*Action, *Response, error) + ShutdownByTag func(context.Context, string) ([]Action, *Response, error) + Snapshot func(context.Context, int, string) (*Action, *Response, error) + SnapshotByTag func(context.Context, string, string) ([]Action, *Response, error) + type ServerActionsServiceOp struct + func (s *ServerActionsServiceOp) ChangeKernel(ctx context.Context, id, kernelID int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) DisableBackups(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) DisableBackupsByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) EnableBackups(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) EnableBackupsByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) EnableIPv6(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) EnableIPv6ByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) EnablePrivateNetworking(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) EnablePrivateNetworkingByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) Get(ctx context.Context, serverID, actionID int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) GetByURI(ctx context.Context, rawurl string) (*Action, *Response, error) + func (s *ServerActionsServiceOp) PasswordReset(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) PowerCycle(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) PowerCycleByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) PowerOff(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) PowerOffByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) PowerOn(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) PowerOnByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) Reboot(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) RebuildByImageID(ctx context.Context, id, imageID int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) RebuildByImageSlug(ctx context.Context, id int, slug string) (*Action, *Response, error) + func (s *ServerActionsServiceOp) Rename(ctx context.Context, id int, name string) (*Action, *Response, error) + func (s *ServerActionsServiceOp) Resize(ctx context.Context, id int, sizeSlug string, resizeDisk bool) (*Action, *Response, error) + func (s *ServerActionsServiceOp) Restore(ctx context.Context, id, imageID int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) Shutdown(ctx context.Context, id int) (*Action, *Response, error) + func (s *ServerActionsServiceOp) ShutdownByTag(ctx context.Context, tag string) ([]Action, *Response, error) + func (s *ServerActionsServiceOp) Snapshot(ctx context.Context, id int, name string) (*Action, *Response, error) + func (s *ServerActionsServiceOp) SnapshotByTag(ctx context.Context, tag string, name string) ([]Action, *Response, error) + type ServerCreateImage struct + ID int + Slug string + func (d ServerCreateImage) MarshalJSON() ([]byte, error) + type ServerCreateRequest struct + Backups bool + IPv6 bool + Image ServerCreateImage + Monitoring bool + Name string + PrivateNetworking bool + Region string + SSHKeys []ServerCreateSSHKey + Size string + Tags []string + UserData string + VPCID int + Volumes []ServerCreateVolume + func (d ServerCreateRequest) String() string + type ServerCreateSSHKey struct + Fingerprint string + ID int + func (d ServerCreateSSHKey) MarshalJSON() ([]byte, error) + type ServerCreateVolume struct + ID string + Name string + func (d ServerCreateVolume) MarshalJSON() ([]byte, error) + type ServerMultiCreateRequest struct + Backups bool + IPv6 bool + Image ServerCreateImage + Monitoring bool + Names []string + PrivateNetworking bool + Region string + SSHKeys []ServerCreateSSHKey + Size string + Tags []string + UserData string + VPCID int + func (d ServerMultiCreateRequest) String() string + type ServersService interface + Actions func(context.Context, int, *ListOptions) ([]Action, *Response, error) + Backups func(context.Context, int, *ListOptions) ([]Image, *Response, error) + Create func(context.Context, *ServerCreateRequest) (*Server, *Response, error) + CreateMultiple func(context.Context, *ServerMultiCreateRequest) ([]Server, *Response, error) + Delete func(context.Context, int) (*Response, error) + DeleteByTag func(context.Context, string) (*Response, error) + Get func(context.Context, int) (*Server, *Response, error) + Kernels func(context.Context, int, *ListOptions) ([]Kernel, *Response, error) + List func(context.Context, *ListOptions) ([]Server, *Response, error) + ListByTag func(context.Context, string, *ListOptions) ([]Server, *Response, error) + Neighbors func(context.Context, int) ([]Server, *Response, error) + Snapshots func(context.Context, int, *ListOptions) ([]Image, *Response, error) + type ServersServiceOp struct + func (s *ServersServiceOp) Actions(ctx context.Context, serverID int, opt *ListOptions) ([]Action, *Response, error) + func (s *ServersServiceOp) Backups(ctx context.Context, serverID int, opt *ListOptions) ([]Image, *Response, error) + func (s *ServersServiceOp) Create(ctx context.Context, createRequest *ServerCreateRequest) (*Server, *Response, error) + func (s *ServersServiceOp) CreateMultiple(ctx context.Context, createRequest *ServerMultiCreateRequest) ([]Server, *Response, error) + func (s *ServersServiceOp) Delete(ctx context.Context, serverID int) (*Response, error) + func (s *ServersServiceOp) DeleteByTag(ctx context.Context, tag string) (*Response, error) + func (s *ServersServiceOp) Get(ctx context.Context, serverID int) (*Server, *Response, error) + func (s *ServersServiceOp) Kernels(ctx context.Context, serverID int, opt *ListOptions) ([]Kernel, *Response, error) + func (s *ServersServiceOp) List(ctx context.Context, opt *ListOptions) ([]Server, *Response, error) + func (s *ServersServiceOp) ListByTag(ctx context.Context, tag string, opt *ListOptions) ([]Server, *Response, error) + func (s *ServersServiceOp) Neighbors(ctx context.Context, serverID int) ([]Server, *Response, error) + func (s *ServersServiceOp) Snapshots(ctx context.Context, serverID int, opt *ListOptions) ([]Image, *Response, error) + type Size struct + Available bool + Disk int + Memory int + PriceHourly float64 + PriceMonthly float64 + Regions []string + Slug string + Transfer float64 + Vcpus int + func (s Size) String() string + type SizesService interface + List func(context.Context, *ListOptions) ([]Size, *Response, error) + type SizesServiceOp struct + func (s *SizesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Size, *Response, error) + type Snapshot struct + Created string + ID string + MinDiskSize int + Name string + Regions []string + ResourceID string + ResourceType string + SizeGigaBytes float64 + Tags []string + func (s Snapshot) String() string + type SnapshotsService interface + Delete func(context.Context, string) (*Response, error) + Get func(context.Context, string) (*Snapshot, *Response, error) + List func(context.Context, *ListOptions) ([]Snapshot, *Response, error) + ListServer func(context.Context, *ListOptions) ([]Snapshot, *Response, error) + ListVolume func(context.Context, *ListOptions) ([]Snapshot, *Response, error) + type SnapshotsServiceOp struct + func (s *SnapshotsServiceOp) Delete(ctx context.Context, snapshotID string) (*Response, error) + func (s *SnapshotsServiceOp) Get(ctx context.Context, snapshotID string) (*Snapshot, *Response, error) + func (s *SnapshotsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Snapshot, *Response, error) + func (s *SnapshotsServiceOp) ListServer(ctx context.Context, opt *ListOptions) ([]Snapshot, *Response, error) + func (s *SnapshotsServiceOp) ListVolume(ctx context.Context, opt *ListOptions) ([]Snapshot, *Response, error) + type Sources struct + Addresses []string + LoadBalancerUIDs []string + ServerIDs []int + Tags []string + type StickySessions struct + CookieName string + CookieTtlSeconds int + Type string + func (s StickySessions) String() string + type Tag struct + Name string + Resources *TaggedResources + type TagCreateRequest struct + Name string + type TagResourcesRequest struct + Resources []Resource + type TaggedDatabasesResources TaggedResourcesData + type TaggedImagesResources TaggedResourcesData + type TaggedResources struct + Count int + Databases *TaggedDatabasesResources + Images *TaggedImagesResources + LastTaggedURI string + Servers *TaggedServersResources + VolumeSnapshots *TaggedVolumeSnapshotsResources + Volumes *TaggedVolumesResources + type TaggedResourcesData struct + Count int + LastTaggedURI string + type TaggedServersResources struct + Count int + LastTagged *Server + LastTaggedURI string + type TaggedVolumeSnapshotsResources TaggedResourcesData + type TaggedVolumesResources TaggedResourcesData + type TagsService interface + Create func(context.Context, *TagCreateRequest) (*Tag, *Response, error) + Delete func(context.Context, string) (*Response, error) + Get func(context.Context, string) (*Tag, *Response, error) + List func(context.Context, *ListOptions) ([]Tag, *Response, error) + TagResources func(context.Context, string, *TagResourcesRequest) (*Response, error) + UntagResources func(context.Context, string, *UntagResourcesRequest) (*Response, error) + type TagsServiceOp struct + func (s *TagsServiceOp) Create(ctx context.Context, createRequest *TagCreateRequest) (*Tag, *Response, error) + func (s *TagsServiceOp) Delete(ctx context.Context, name string) (*Response, error) + func (s *TagsServiceOp) Get(ctx context.Context, name string) (*Tag, *Response, error) + func (s *TagsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Tag, *Response, error) + func (s *TagsServiceOp) TagResources(ctx context.Context, name string, tagRequest *TagResourcesRequest) (*Response, error) + func (s *TagsServiceOp) UntagResources(ctx context.Context, name string, untagRequest *UntagResourcesRequest) (*Response, error) + type Timestamp struct + func (t *Timestamp) UnmarshalJSON(data []byte) error + func (t Timestamp) Equal(u Timestamp) bool + func (t Timestamp) String() string + type UntagResourcesRequest struct + Resources []Resource + type UpdateProjectRequest struct + Description interface{} + Environment interface{} + IsDefault interface{} + Name interface{} + Purpose interface{} + func (upr *UpdateProjectRequest) MarshalJSON() ([]byte, error) + type VPC struct + CreatedAt time.Time + Default bool + Description string + ID int + IPRange string + Name string + RegionSlug string + func (v VPC) URN() string + type VPCCreateRequest struct + Description string + IPRange string + Name string + RegionSlug string + type VPCSetDescription string + type VPCSetField interface + func VPCSetDefault() VPCSetField + type VPCSetName string + type VPCUpdateRequest struct + Default *bool + Description string + Name string + type VPCsService interface + Create func(context.Context, *VPCCreateRequest) (*VPC, *Response, error) + Delete func(context.Context, int) (*Response, error) + Get func(context.Context, int) (*VPC, *Response, error) + List func(context.Context, *ListOptions) ([]*VPC, *Response, error) + Set func(context.Context, int, ...VPCSetField) (*VPC, *Response, error) + Update func(context.Context, int, *VPCUpdateRequest) (*VPC, *Response, error) + type VPCsServiceOp struct + func (v *VPCsServiceOp) Create(ctx context.Context, create *VPCCreateRequest) (*VPC, *Response, error) + func (v *VPCsServiceOp) Delete(ctx context.Context, id int) (*Response, error) + func (v *VPCsServiceOp) Get(ctx context.Context, id int) (*VPC, *Response, error) + func (v *VPCsServiceOp) List(ctx context.Context, opt *ListOptions) ([]*VPC, *Response, error) + func (v *VPCsServiceOp) Set(ctx context.Context, id int, fields ...VPCSetField) (*VPC, *Response, error) + func (v *VPCsServiceOp) Update(ctx context.Context, id int, update *VPCUpdateRequest) (*VPC, *Response, error)