bl

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PaginateResp

func PaginateResp(gen Generator) ([]interface{}, error)

PaginateResp paginates a Response.

Types

type Account

type Account struct {
	*binarylane.Account
}

Account is a wrapper for binarylane.Account.

type AccountService

type AccountService interface {
	Get() (*Account, error)
	RateLimit() (*RateLimit, error)
}

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 Action

type Action struct {
	*binarylane.Action
}

Action is a wrapper for binarylane.Action

type Actions

type Actions []Action

Actions is a slice of Action.

type ActionsService

type ActionsService interface {
	List() (Actions, error)
	Get(int) (*Action, error)
}

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

type BalanceService interface {
	Get() (*Balance, error)
}

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 Domain

type Domain struct {
	*binarylane.Domain
}

Domain wraps a binarylane Domain.

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 DomainRecords

type DomainRecords []DomainRecord

DomainRecords is a slice of DomainRecord.

type Domains

type Domains []Domain

Domains is a slice of Domain.

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 Firewall

type Firewall struct {
	*binarylane.Firewall
}

Firewall wraps a binarylane Firewall.

type Firewalls

type Firewalls []Firewall

Firewalls is a slice of Firewall.

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 FloatingIPs

type FloatingIPs []FloatingIP

FloatingIPs is a slice of FloatingIP.

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 Image

type Image struct {
	*binarylane.Image
}

Image is a werapper for binarylane.Image

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 Images

type Images []Image

Images is a slice of Server.

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 Kernel

type Kernel struct {
	*binarylane.Kernel
}

Kernel is a wrapper for binarylane.Kernel

type Kernels

type Kernels []Kernel

Kernels is a slice of Kernel.

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 LoadBalancers

type LoadBalancers []LoadBalancer

LoadBalancers is a slice of 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 Project

type Project struct {
	*binarylane.Project
}

Project wraps a binarylane Project.

type ProjectResource

type ProjectResource struct {
	*binarylane.ProjectResource
}

ProjectResource wraps a binarylane ProjectResource

type ProjectResources

type ProjectResources []ProjectResource

ProjectResources is a slice of ProjectResource.

type Projects

type Projects []Project

Projects is a slice of Project.

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 Region

type Region struct {
	*binarylane.Region
}

Region wraps binarylane Region.

type Regions

type Regions []Region

Regions is a slice of Region.

type RegionsService

type RegionsService interface {
	List() (Regions, error)
}

RegionsService is the binarylane RegionsService interface.

func NewRegionsService

func NewRegionsService(client *binarylane.Client) RegionsService

NewRegionsService builds an instance of RegionsService.

type SSHKey

type SSHKey struct {
	*binarylane.Key
}

SSHKey wraps binarylane Key.

type SSHKeys

type SSHKeys []SSHKey

SSHKeys is a slice of SSHKey

type Server

type Server struct {
	*binarylane.Server
}

Server is a wrapper for binarylane.Server

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 Servers

type Servers []Server

Servers is a slice of Server.

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 Size

type Size struct {
	*binarylane.Size
}

Size wraps binarylane Size.

type Sizes

type Sizes []Size

Sizes is a slice of Size.

type SizesService

type SizesService interface {
	List() (Sizes, error)
}

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 Snapshots

type Snapshots []Snapshot

Snapshots is a slice of 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 Tag

type Tag struct {
	*binarylane.Tag
}

Tag is a wrapper for binarylane.Tag

type Tags

type Tags []Tag

Tags is a slice of Tag.

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 VPC

type VPC struct {
	*binarylane.VPC
}

VPC wraps a binarylane VPC.

type VPCs

type VPCs []VPC

VPCs is a slice of VPC.

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.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL