Documentation ¶
Index ¶
- func PaginateResp(gen Generator) ([]interface{}, error)
- type Account
- type AccountService
- type Action
- type Actions
- type ActionsService
- type Certificate
- type Certificates
- type CertificatesService
- type Domain
- type DomainRecord
- type DomainRecords
- type Domains
- type DomainsService
- type Droplet
- type DropletActionsService
- type DropletIPTable
- type Droplets
- type DropletsService
- 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 Kernel
- type Kernels
- type KeysService
- type LoadBalancer
- type LoadBalancers
- type LoadBalancersService
- type RateLimit
- type Region
- type Regions
- type RegionsService
- type SSHKey
- type SSHKeys
- type Size
- type Sizes
- type SizesService
- type Snapshot
- type Snapshots
- type SnapshotsService
- type Tag
- type Tags
- type TagsService
- type Volume
- type VolumeActionsService
- type VolumesService
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 Certificate ¶ added in v1.6.0
type Certificate struct {
*godo.Certificate
}
Certificate wraps a godo Certificate.
type Certificates ¶ added in v1.6.0
type Certificates []Certificate
Certificates is a slice of Certificate.
type CertificatesService ¶ added in v1.6.0
type CertificatesService interface { Get(cID string) (*Certificate, error) Create(cr *godo.CertificateRequest) (*Certificate, error) List() (Certificates, error) Delete(cID string) error }
CertificatesService is the godo CertificatesService interface.
func NewCertificatesService ¶ added in v1.6.0
func NewCertificatesService(client *godo.Client) CertificatesService
NewCertificatesService builds an instance of CertificatesService.
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) 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) }
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) ListByTag(string) (Droplets, error) Get(int) (*Droplet, error) Create(*godo.DropletCreateRequest, bool) (*Droplet, error) CreateMultiple(*godo.DropletMultiCreateRequest) (Droplets, 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) (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 FirewallsService ¶ added in v1.7.0
type FirewallsService interface { Get(fID string) (*Firewall, error) Create(fr *godo.FirewallRequest) (*Firewall, error) Update(fID string, fr *godo.FirewallRequest) (*Firewall, error) List() (Firewalls, error) ListByDroplet(dID int) (Firewalls, error) Delete(fID string) error AddDroplets(fID string, dIDs ...int) error RemoveDroplets(fID string, dIDs ...int) error AddTags(fID string, tags ...string) error RemoveTags(fID string, tags ...string) error AddRules(fID string, rr *godo.FirewallRulesRequest) error RemoveRules(fID string, rr *godo.FirewallRulesRequest) error }
FirewallsService is the godo FirewallsService interface.
func NewFirewallsService ¶ added in v1.7.0
func NewFirewallsService(client *godo.Client) FirewallsService
NewFirewallsService builds an instance of FirewallsService.
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) Convert(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 LoadBalancer ¶ added in v1.6.0
type LoadBalancer struct {
*godo.LoadBalancer
}
LoadBalancer wraps a godo LoadBalancer.
type LoadBalancers ¶ added in v1.6.0
type LoadBalancers []LoadBalancer
LoadBalancers is a slice of LoadBalancer.
type LoadBalancersService ¶ added in v1.6.0
type LoadBalancersService interface { Get(lbID string) (*LoadBalancer, error) List() (LoadBalancers, error) Create(lbr *godo.LoadBalancerRequest) (*LoadBalancer, error) Update(lbID string, lbr *godo.LoadBalancerRequest) (*LoadBalancer, error) Delete(lbID string) error AddDroplets(lbID string, dIDs ...int) error RemoveDroplets(lbID string, dIDs ...int) error AddForwardingRules(lbID string, rules ...godo.ForwardingRule) error RemoveForwardingRules(lbID string, rules ...godo.ForwardingRule) error }
LoadBalancersService is the godo LoadBalancersService interface.
func NewLoadBalancersService ¶ added in v1.6.0
func NewLoadBalancersService(client *godo.Client) LoadBalancersService
NewLoadBalancersService builds an instance of LoadBalancersService.
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.
type SnapshotsService ¶ added in v1.6.0
type SnapshotsService interface { List() (Snapshots, error) ListVolume() (Snapshots, error) ListDroplet() (Snapshots, error) Get(string) (*Snapshot, error) Delete(string) error }
SnapshotsService is an interface for interacting with DigitalOcean's snapshot api.
func NewSnapshotsService ¶ added in v1.6.0
func NewSnapshotsService(client *godo.Client) SnapshotsService
NewSnapshotsService builds a SnapshotsService instance.
type TagsService ¶ added in v1.1.0
type TagsService interface { List() (Tags, error) Get(string) (*Tag, error) Create(*godo.TagCreateRequest) (*Tag, error) Delete(string) error TagResources(string, *godo.TagResourcesRequest) error UntagResources(string, *godo.UntagResourcesRequest) error }
TagsService is an interface for interacting with DigitalOcean's tags api.
func NewTagsService ¶ added in v1.1.0
func NewTagsService(godoClient *godo.Client) TagsService
NewTagsService builds a TagsService instance.
type VolumeActionsService ¶ added in v1.3.0
type VolumeActionsService interface { Attach(string, int) (*Action, error) Detach(string, int) (*Action, error) Get(string, int) (*Action, error) List(string, *godo.ListOptions) ([]Action, error) Resize(string, int, string) (*Action, error) }
VolumeActionsService is an interface for interacting with DigitalOcean's volume-action api.
func NewVolumeActionsService ¶ added in v1.3.0
func NewVolumeActionsService(godoClient *godo.Client) VolumeActionsService
NewVolumeActionsService builds an VolumeActionsService instance.
type VolumesService ¶ added in v1.3.0
type VolumesService interface { List() ([]Volume, error) CreateVolume(*godo.VolumeCreateRequest) (*Volume, error) DeleteVolume(string) error Get(string) (*Volume, error) CreateSnapshot(*godo.SnapshotCreateRequest) (*Snapshot, error) GetSnapshot(string) (*Snapshot, error) DeleteSnapshot(string) error ListSnapshots(string, *godo.ListOptions) ([]Snapshot, error) }
VolumesService is an interface for interacting with DigitalOcean's volume api.
func NewVolumesService ¶ added in v1.3.0
func NewVolumesService(godoClient *godo.Client) VolumesService
NewVolumesService builds an NewVolumesService instance.