Documentation ¶
Index ¶
- func PaginateResp(gen Generator) ([]interface{}, error)
- type Account
- type AccountService
- type Action
- type Actions
- type ActionsService
- type Balance
- type BalanceService
- type BillingHistory
- type BillingHistoryService
- type Domain
- type DomainRecord
- type DomainRecordEditRequest
- type DomainRecords
- type Domains
- type DomainsService
- type Firewall
- type Firewalls
- type FirewallsService
- type FloatingIP
- type FloatingIPActionsService
- type FloatingIPs
- type FloatingIPsService
- type Generator
- type Image
- type ImageActionsService
- type Images
- type ImagesService
- type InterfaceType
- type Invoice
- type InvoiceItem
- type InvoiceList
- type InvoiceSummary
- type InvoicesService
- type Kernel
- type Kernels
- type KeysService
- type LoadBalancer
- type LoadBalancers
- type LoadBalancersService
- type Project
- type ProjectResource
- type ProjectResources
- type Projects
- type ProjectsService
- type RateLimit
- type Region
- type Regions
- type RegionsService
- type SSHKey
- type SSHKeys
- type Server
- type ServerActionsService
- type ServerIPTable
- type Servers
- type ServersService
- type Size
- type Sizes
- type SizesService
- type Snapshot
- type Snapshots
- type SnapshotsService
- type Tag
- type Tags
- type TagsService
- type VPC
- type VPCs
- type VPCsService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PaginateResp ¶
PaginateResp paginates a Response.
Types ¶
type Account ¶
type Account struct {
*binarylane.Account
}
Account is a wrapper for binarylane.Account.
type AccountService ¶
AccountService is an interface for interacting with BinaryLane's account api.
func NewAccountService ¶
func NewAccountService(client *binarylane.Client) AccountService
NewAccountService builds an AccountService instance.
type ActionsService ¶
ActionsService is an interface for interacting with BinaryLane's action api.
func NewActionsService ¶
func NewActionsService(client *binarylane.Client) ActionsService
NewActionsService builds an ActionsService instance.
type Balance ¶
type Balance struct {
*binarylane.Balance
}
Balance is a wrapper for binarylane.Balance.
type BalanceService ¶
BalanceService is an interface for interacting with BinaryLane's balance api.
func NewBalanceService ¶
func NewBalanceService(client *binarylane.Client) BalanceService
NewBalanceService builds an BalanceService instance.
type BillingHistory ¶
type BillingHistory struct {
*binarylane.BillingHistory
}
BillingHistory is a wrapper for binarylane.BillingHistory
type BillingHistoryService ¶
type BillingHistoryService interface {
List() (*BillingHistory, error)
}
BillingHistoryService is an interface for interacting with BinaryLane's invoices api.
func NewBillingHistoryService ¶
func NewBillingHistoryService(client *binarylane.Client) BillingHistoryService
NewBillingHistoryService builds an BillingHistoryService instance.
type DomainRecord ¶
type DomainRecord struct {
*binarylane.DomainRecord
}
DomainRecord wraps a binarylane DomainRecord.
type DomainRecordEditRequest ¶
type DomainRecordEditRequest struct { Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` Data string `json:"data,omitempty"` Priority int `json:"priority"` Port *int `json:"port,omitempty"` TTL int `json:"ttl,omitempty"` Weight int `json:"weight"` Flags int `json:"flags"` Tag string `json:"tag,omitempty"` }
A DomainRecordEditRequest is used in place of binarylane's DomainRecordEditRequest in order to work around the fact that we cannot send a port value of 0 via binarylane due to Go's JSON encoding logic.
type DomainsService ¶
type DomainsService interface { List() (Domains, error) Get(string) (*Domain, error) Create(*binarylane.DomainCreateRequest) (*Domain, error) Delete(string) error Records(string) (DomainRecords, error) Record(string, int) (*DomainRecord, error) DeleteRecord(string, int) error EditRecord(string, int, *DomainRecordEditRequest) (*DomainRecord, error) CreateRecord(string, *DomainRecordEditRequest) (*DomainRecord, error) }
DomainsService is the binarylane DOmainsService interface.
func NewDomainsService ¶
func NewDomainsService(client *binarylane.Client) DomainsService
NewDomainsService builds an instance of DomainsService.
type FirewallsService ¶
type FirewallsService interface { Get(fID string) (*Firewall, error) Create(fr *binarylane.FirewallRequest) (*Firewall, error) Update(fID string, fr *binarylane.FirewallRequest) (*Firewall, error) List() (Firewalls, error) ListByServer(sID int) (Firewalls, error) Delete(fID string) error AddServers(fID string, sIDs ...int) error RemoveServers(fID string, sIDs ...int) error AddTags(fID string, tags ...string) error RemoveTags(fID string, tags ...string) error AddRules(fID string, rr *binarylane.FirewallRulesRequest) error RemoveRules(fID string, rr *binarylane.FirewallRulesRequest) error }
FirewallsService is the binarylane FirewallsService interface.
func NewFirewallsService ¶
func NewFirewallsService(client *binarylane.Client) FirewallsService
NewFirewallsService builds an instance of FirewallsService.
type FloatingIP ¶
type FloatingIP struct {
*binarylane.FloatingIP
}
FloatingIP wraps a binarylane FloatingIP.
type FloatingIPActionsService ¶
type FloatingIPActionsService interface { Assign(ip string, serverID int) (*Action, error) Unassign(ip string) (*Action, error) Get(ip string, actionID int) (*Action, error) List(ip string, opt *binarylane.ListOptions) ([]Action, error) }
FloatingIPActionsService is an interface for interacting with BinaryLane's floating ip action api.
func NewFloatingIPActionsService ¶
func NewFloatingIPActionsService(client *binarylane.Client) FloatingIPActionsService
NewFloatingIPActionsService builds a FloatingIPActionsService instance.
type FloatingIPsService ¶
type FloatingIPsService interface { List() (FloatingIPs, error) Get(ip string) (*FloatingIP, error) Create(ficr *binarylane.FloatingIPCreateRequest) (*FloatingIP, error) Delete(ip string) error }
FloatingIPsService is the binarylane FloatingIPsService interface.
func NewFloatingIPsService ¶
func NewFloatingIPsService(client *binarylane.Client) FloatingIPsService
NewFloatingIPsService builds an instance of FloatingIPsService.
type Generator ¶
type Generator func(*binarylane.ListOptions) ([]interface{}, *binarylane.Response, error)
Generator is a function that generates the list to be paginated.
type ImageActionsService ¶
type ImageActionsService interface { Get(int, int) (*Action, error) Convert(int) (*Action, error) Transfer(int, *binarylane.ActionRequest) (*Action, error) }
ImageActionsService is an interface for interacting with BinaryLane's image action api.
func NewImageActionsService ¶
func NewImageActionsService(client *binarylane.Client) ImageActionsService
NewImageActionsService builds an ImageActionsService instance.
type ImagesService ¶
type ImagesService interface { List(public bool) (Images, error) ListDistribution(public bool) (Images, error) ListApplication(public bool) (Images, error) ListUser(public bool) (Images, error) GetByID(id int) (*Image, error) GetBySlug(slug string) (*Image, error) Update(id int, iur *binarylane.ImageUpdateRequest) (*Image, error) Delete(id int) error Create(icr *binarylane.CustomImageCreateRequest) (*Image, error) }
ImagesService is the binarylane ImagesService interface.
func NewImagesService ¶
func NewImagesService(client *binarylane.Client) ImagesService
NewImagesService builds an instance of ImagesService.
type InterfaceType ¶
type InterfaceType string
InterfaceType is a an interface type.
const ( // InterfacePublic is a public interface. InterfacePublic InterfaceType = "public" // InterfacePrivate is a private interface. InterfacePrivate InterfaceType = "private" )
type Invoice ¶
type Invoice struct {
*binarylane.Invoice
}
Invoice is a wrapper for binarylane.Invoice
type InvoiceItem ¶
type InvoiceItem struct {
*binarylane.InvoiceItem
}
InvoiceItem is a wrapper for binarylane.InvoiceItem
type InvoiceList ¶
type InvoiceList struct {
*binarylane.InvoiceList
}
InvoiceList is a the results when listing invoices
type InvoiceSummary ¶
type InvoiceSummary struct {
*binarylane.InvoiceSummary
}
InvoiceSummary is a wrapper for binarylane.InvoiceSummary
type InvoicesService ¶
type InvoicesService interface { Get(string) (*Invoice, error) List() (*InvoiceList, error) GetSummary(string) (*InvoiceSummary, error) GetPDF(string) ([]byte, error) GetCSV(string) ([]byte, error) }
InvoicesService is an interface for interacting with BinaryLane's invoices api.
func NewInvoicesService ¶
func NewInvoicesService(client *binarylane.Client) InvoicesService
NewInvoicesService builds an InvoicesService instance.
type KeysService ¶
type KeysService interface { List() (SSHKeys, error) Get(id string) (*SSHKey, error) Create(kcr *binarylane.KeyCreateRequest) (*SSHKey, error) Update(id string, kur *binarylane.KeyUpdateRequest) (*SSHKey, error) Delete(id string) error }
KeysService is the binarylane KeysService interface.
func NewKeysService ¶
func NewKeysService(client *binarylane.Client) KeysService
NewKeysService builds an instance of KeysService.
type LoadBalancer ¶
type LoadBalancer struct {
*binarylane.LoadBalancer
}
LoadBalancer wraps a binarylane LoadBalancer.
type LoadBalancersService ¶
type LoadBalancersService interface { Get(lbID int) (*LoadBalancer, error) List() (LoadBalancers, error) Create(lbr *binarylane.LoadBalancerRequest) (*LoadBalancer, error) Update(lbID int, lbr *binarylane.LoadBalancerRequest) (*LoadBalancer, error) Delete(lbID int) error AddServers(lbID int, sIDs ...int) error RemoveServers(lbID int, sIDs ...int) error AddForwardingRules(lbID int, rules ...binarylane.ForwardingRule) error RemoveForwardingRules(lbID int, rules ...binarylane.ForwardingRule) error }
LoadBalancersService is the binarylane LoadBalancersService interface.
func NewLoadBalancersService ¶
func NewLoadBalancersService(client *binarylane.Client) LoadBalancersService
NewLoadBalancersService builds an instance of LoadBalancersService.
type ProjectResource ¶
type ProjectResource struct {
*binarylane.ProjectResource
}
ProjectResource wraps a binarylane ProjectResource
type ProjectResources ¶
type ProjectResources []ProjectResource
ProjectResources is a slice of ProjectResource.
type ProjectsService ¶
type ProjectsService interface { List() (Projects, error) GetDefault() (*Project, error) Get(projectUUID string) (*Project, error) Create(*binarylane.CreateProjectRequest) (*Project, error) Update(projectUUID string, req *binarylane.UpdateProjectRequest) (*Project, error) Delete(projectUUID string) error ListResources(projectUUID string) (ProjectResources, error) AssignResources(projectUUID string, resources []string) (ProjectResources, error) }
ProjectsService is the binarylane ProjectsService interface.
func NewProjectsService ¶
func NewProjectsService(client *binarylane.Client) ProjectsService
NewProjectsService builds an instance of ProjectsService.
type RateLimit ¶
type RateLimit struct {
*binarylane.Rate
}
RateLimit is a wrapper for binarylane.Rate.
type RegionsService ¶
RegionsService is the binarylane RegionsService interface.
func NewRegionsService ¶
func NewRegionsService(client *binarylane.Client) RegionsService
NewRegionsService builds an instance of RegionsService.
type ServerActionsService ¶
type ServerActionsService interface { Shutdown(int) (*Action, error) ShutdownByTag(string) (Actions, error) PowerOff(int) (*Action, error) PowerOffByTag(string) (Actions, error) PowerOn(int) (*Action, error) PowerOnByTag(string) (Actions, error) PowerCycle(int) (*Action, error) PowerCycleByTag(string) (Actions, error) Reboot(int) (*Action, error) Restore(int, int) (*Action, error) Resize(int, string, bool) (*Action, error) Rename(int, string) (*Action, error) Snapshot(int, string) (*Action, error) SnapshotByTag(string, string) (Actions, error) EnableBackups(int) (*Action, error) EnableBackupsByTag(string) (Actions, error) DisableBackups(int) (*Action, error) DisableBackupsByTag(string) (Actions, error) PasswordReset(int) (*Action, error) RebuildByImageID(int, int) (*Action, error) RebuildByImageSlug(int, string) (*Action, error) ChangeKernel(int, int) (*Action, error) EnableIPv6(int) (*Action, error) EnableIPv6ByTag(string) (Actions, error) EnablePrivateNetworking(int) (*Action, error) EnablePrivateNetworkingByTag(string) (Actions, error) Get(int, int) (*Action, error) GetByURI(string) (*Action, error) }
ServerActionsService is an interface for interacting with BinaryLane's server action api.
func NewServerActionsService ¶
func NewServerActionsService(client *binarylane.Client) ServerActionsService
NewServerActionsService builds an instance of ServerActionsService.
type ServerIPTable ¶
type ServerIPTable map[InterfaceType]string
ServerIPTable is a table of interface IPS.
type ServersService ¶
type ServersService interface { List() (Servers, error) ListByTag(string) (Servers, error) Get(int) (*Server, error) Create(*binarylane.ServerCreateRequest, bool) (*Server, error) CreateMultiple(*binarylane.ServerMultiCreateRequest) (Servers, error) Delete(int) error DeleteByTag(string) error Kernels(int) (Kernels, error) Snapshots(int) (Images, error) Backups(int) (Images, error) Actions(int) (Actions, error) Neighbors(int) (Servers, error) }
ServersService is an interface for interacting with BinaryLane's server api.
func NewServersService ¶
func NewServersService(client *binarylane.Client) ServersService
NewServersService builds a ServersService instance.
type SizesService ¶
SizesService is the binarylane SizesService interface.
func NewSizesService ¶
func NewSizesService(client *binarylane.Client) SizesService
NewSizesService builds an instance of SizesService.
type Snapshot ¶
type Snapshot struct {
*binarylane.Snapshot
}
Snapshot is a wrapper for binarylane.Snapshot
type SnapshotsService ¶
type SnapshotsService interface { List() (Snapshots, error) ListVolume() (Snapshots, error) ListServer() (Snapshots, error) Get(string) (*Snapshot, error) Delete(string) error }
SnapshotsService is an interface for interacting with BinaryLane's snapshot api.
func NewSnapshotsService ¶
func NewSnapshotsService(client *binarylane.Client) SnapshotsService
NewSnapshotsService builds a SnapshotsService instance.
type TagsService ¶
type TagsService interface { List() (Tags, error) Get(string) (*Tag, error) Create(*binarylane.TagCreateRequest) (*Tag, error) Delete(string) error TagResources(string, *binarylane.TagResourcesRequest) error UntagResources(string, *binarylane.UntagResourcesRequest) error }
TagsService is an interface for interacting with BinaryLane's tags api.
func NewTagsService ¶
func NewTagsService(client *binarylane.Client) TagsService
NewTagsService builds a TagsService instance.
type VPCsService ¶
type VPCsService interface { Get(id int) (*VPC, error) List() (VPCs, error) Create(vpcr *binarylane.VPCCreateRequest) (*VPC, error) Update(id int, vpcr *binarylane.VPCUpdateRequest) (*VPC, error) Delete(id int) error }
VPCsService is the binarylane VPCsService interface.
func NewVPCsService ¶
func NewVPCsService(client *binarylane.Client) VPCsService
NewVPCsService builds an instance of VPCsService.