Documentation ¶
Index ¶
- func PaginateResp(gen Generator) ([]interface{}, error)
- type Account
- type AccountService
- type Action
- type Actions
- type ActionsService
- type Domain
- type DomainRecord
- type DomainRecords
- type Domains
- type DomainsService
- type Droplet
- type DropletActionsService
- type DropletIPTable
- type Droplets
- type DropletsService
- type FloatingIP
- type FloatingIPActionsService
- type FloatingIPs
- type FloatingIPsService
- type Generator
- type Image
- type ImageActionsService
- type Images
- type ImagesService
- type InterfaceType
- type Kernel
- type Kernels
- type KeysService
- type RateLimit
- type Region
- type Regions
- type RegionsService
- type SSHKey
- type SSHKeys
- type Size
- type Sizes
- type SizesService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PaginateResp ¶
PaginateResp paginates a Response.
Types ¶
type AccountService ¶
AccountService is an interface for interacting with DigitalOcean's account api.
func NewAccountService ¶
func NewAccountService(godoClient *godo.Client) AccountService
NewAccountService builds an AccountService instance.
type ActionsService ¶
ActionsService is an interface for interacting with DigitalOcean's action api.
func NewActionsService ¶
func NewActionsService(godoClient *godo.Client) ActionsService
NewActionsService builds an ActionsService instance.
type DomainRecord ¶
type DomainRecord struct {
*godo.DomainRecord
}
DomainRecord wraps a godo DomainRecord.
type DomainsService ¶
type DomainsService interface { List() (Domains, error) Get(string) (*Domain, error) Create(*godo.DomainCreateRequest) (*Domain, error) Delete(string) error Records(string) (DomainRecords, error) Record(string, int) (*DomainRecord, error) DeleteRecord(string, int) error EditRecord(string, int, *godo.DomainRecordEditRequest) (*DomainRecord, error) CreateRecord(string, *godo.DomainRecordEditRequest) (*DomainRecord, error) }
DomainsService is the godo DOmainsService interface.
func NewDomainsService ¶
func NewDomainsService(client *godo.Client) DomainsService
NewDomainsService builds an instance of DomainsService.
type DropletActionsService ¶
type DropletActionsService interface { Shutdown(int) (*Action, error) PowerOff(int) (*Action, error) PowerOn(int) (*Action, error) PowerCycle(int) (*Action, 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) EnableBackups(int) (*Action, error) DisableBackups(int) (*Action, error) PasswordReset(int) (*Action, error) RebuildByImageID(int, int) (*Action, error) RebuildByImageSlug(int, string) (*Action, error) ChangeKernel(int, int) (*Action, error) EnableIPv6(int) (*Action, error) EnablePrivateNetworking(int) (*Action, error) Upgrade(int) (*Action, error) Get(int, int) (*Action, error) GetByURI(string) (*Action, error) }
DropletActionsService is an interface for interacting with DigitalOcean's droplet action api.
func NewDropletActionsService ¶
func NewDropletActionsService(godoClient *godo.Client) DropletActionsService
NewDropletActionsService builds an instance of DropletActionsService.
type DropletIPTable ¶
type DropletIPTable map[InterfaceType]string
DropletIPTable is a table of interface IPS.
type DropletsService ¶
type DropletsService interface { List() (Droplets, error) Get(int) (*Droplet, error) Create(*godo.DropletCreateRequest, bool) (*Droplet, error) CreateMultiple(*godo.DropletMultiCreateRequest) (Droplets, error) Delete(int) error Kernels(int) (Kernels, error) Snapshots(int) (Images, error) Backups(int) (Images, error) Actions(int) (Actions, error) Neighbors(int) (Droplets, error) }
DropletsService is an interface for interacting with DigitalOcean's droplet api.
func NewDropletsService ¶
func NewDropletsService(client *godo.Client) DropletsService
NewDropletsService builds a DropletsService instance.
type FloatingIPActionsService ¶
type FloatingIPActionsService interface { Assign(ip string, dropletID int) (*Action, error) Unassign(ip string) (*Action, error) Get(ip string, actionID int) (*Action, error) List(ip string, opt *godo.ListOptions) ([]Action, error) }
FloatingIPActionsService is an interface for interacting with DigitalOcean's floating ip action api.
func NewFloatingIPActionsService ¶
func NewFloatingIPActionsService(godoClient *godo.Client) FloatingIPActionsService
NewFloatingIPActionsService builds a FloatingIPActionsService instance.
type FloatingIPsService ¶
type FloatingIPsService interface { List() (FloatingIPs, error) Get(ip string) (*FloatingIP, error) Create(ficr *godo.FloatingIPCreateRequest) (*FloatingIP, error) Delete(ip string) error }
FloatingIPsService is the godo FloatingIPsService interface.
func NewFloatingIPsService ¶
func NewFloatingIPsService(client *godo.Client) FloatingIPsService
NewFloatingIPsService builds an instance of FloatingIPsService.
type Generator ¶
type Generator func(*godo.ListOptions) ([]interface{}, *godo.Response, error)
Generator is a function that generates the list to be paginated.
type ImageActionsService ¶
type ImageActionsService interface { Get(int, int) (*Action, error) Transfer(int, *godo.ActionRequest) (*Action, error) }
ImageActionsService is an interface for interacting with DigitalOcean's image action api.
func NewImageActionsService ¶
func NewImageActionsService(client *godo.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 *godo.ImageUpdateRequest) (*Image, error) Delete(id int) error }
ImagesService is the godo ImagesService interface.
func NewImagesService ¶
func NewImagesService(client *godo.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 KeysService ¶
type KeysService interface { List() (SSHKeys, error) Get(id string) (*SSHKey, error) Create(kcr *godo.KeyCreateRequest) (*SSHKey, error) Update(id string, kur *godo.KeyUpdateRequest) (*SSHKey, error) Delete(id string) error }
KeysService is the godo KeysService interface.
func NewKeysService ¶
func NewKeysService(client *godo.Client) KeysService
NewKeysService builds an instance of KeysService.
type RegionsService ¶
RegionsService is the godo RegionsService interface.
func NewRegionsService ¶
func NewRegionsService(client *godo.Client) RegionsService
NewRegionsService builds an instance of RegionsService.
type SizesService ¶
SizesService is the godo SizesService interface.
func NewSizesService ¶
func NewSizesService(client *godo.Client) SizesService
NewSizesService builds an instance of SizesService.