Documentation ¶
Index ¶
- Constants
- func DisplayOutput(item interface{}, out io.Writer) error
- func PaginateResp(gen Generator) ([]interface{}, error)
- type AccountServiceMock
- type ActionsServiceMock
- type Command
- type Config
- type ConfigFile
- type DomainsServiceMock
- func (s *DomainsServiceMock) Create(req *godo.DomainCreateRequest) (*godo.Domain, *godo.Response, error)
- func (s *DomainsServiceMock) CreateRecord(name string, req *godo.DomainRecordEditRequest) (*godo.DomainRecord, *godo.Response, error)
- func (s *DomainsServiceMock) Delete(name string) (*godo.Response, error)
- func (s *DomainsServiceMock) DeleteRecord(name string, id int) (*godo.Response, error)
- func (s *DomainsServiceMock) EditRecord(name string, id int, req *godo.DomainRecordEditRequest) (*godo.DomainRecord, *godo.Response, error)
- func (s *DomainsServiceMock) Get(name string) (*godo.Domain, *godo.Response, error)
- func (s *DomainsServiceMock) List(opts *godo.ListOptions) ([]godo.Domain, *godo.Response, error)
- func (s *DomainsServiceMock) Record(name string, id int) (*godo.DomainRecord, *godo.Response, error)
- func (s *DomainsServiceMock) Records(name string, opts *godo.ListOptions) ([]godo.DomainRecord, *godo.Response, error)
- type DropletActionsServiceMock
- func (s *DropletActionsServiceMock) ChangeKernel(id, kernelID int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) DisableBackups(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) EnableBackups(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) EnableIPv6(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) EnablePrivateNetworking(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Get(dropletID, actionID int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) GetByURI(rawurl string) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) PasswordReset(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) PowerCycle(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) PowerOff(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) PowerOn(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Reboot(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) RebuildByImageID(id, imageID int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) RebuildByImageSlug(id int, slug string) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Rename(id int, name string) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Resize(id int, sizeSlug string, resizeDisk bool) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Restore(id, imageID int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Shutdown(id int) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Snapshot(id int, name string) (*godo.Action, *godo.Response, error)
- func (s *DropletActionsServiceMock) Upgrade(id int) (*godo.Action, *godo.Response, error)
- type DropletsServiceMock
- func (s *DropletsServiceMock) Actions(dropletID int, opt *godo.ListOptions) ([]godo.Action, *godo.Response, error)
- func (s *DropletsServiceMock) Backups(dropletID int, opt *godo.ListOptions) ([]godo.Image, *godo.Response, error)
- func (s *DropletsServiceMock) Create(createRequest *godo.DropletCreateRequest) (*godo.Droplet, *godo.Response, error)
- func (s *DropletsServiceMock) Delete(dropletID int) (*godo.Response, error)
- func (s *DropletsServiceMock) Get(dropletID int) (*godo.Droplet, *godo.Response, error)
- func (s *DropletsServiceMock) Kernels(dropletID int, opt *godo.ListOptions) ([]godo.Kernel, *godo.Response, error)
- func (s *DropletsServiceMock) List(opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error)
- func (s *DropletsServiceMock) Neighbors(dropletID int) ([]godo.Droplet, *godo.Response, error)
- func (s *DropletsServiceMock) Snapshots(dropletID int, opt *godo.ListOptions) ([]godo.Image, *godo.Response, error)
- type FloatingIPActionsServiceMock
- func (s *FloatingIPActionsServiceMock) Assign(ip string, dropletID int) (*godo.Action, *godo.Response, error)
- func (s *FloatingIPActionsServiceMock) Get(ip string, actionID int) (*godo.Action, *godo.Response, error)
- func (s *FloatingIPActionsServiceMock) List(ip string, opts *godo.ListOptions) ([]godo.Action, *godo.Response, error)
- func (s *FloatingIPActionsServiceMock) Unassign(ip string) (*godo.Action, *godo.Response, error)
- type FloatingIPsServiceMock
- func (f *FloatingIPsServiceMock) Create(createRequest *godo.FloatingIPCreateRequest) (*godo.FloatingIP, *godo.Response, error)
- func (f *FloatingIPsServiceMock) Delete(ip string) (*godo.Response, error)
- func (f *FloatingIPsServiceMock) Get(ip string) (*godo.FloatingIP, *godo.Response, error)
- func (f *FloatingIPsServiceMock) List(opt *godo.ListOptions) ([]godo.FloatingIP, *godo.Response, error)
- type Generator
- type ImageActionsServiceMock
- type ImagesServiceMock
- func (s *ImagesServiceMock) Delete(id int) (*godo.Response, error)
- func (s *ImagesServiceMock) GetByID(id int) (*godo.Image, *godo.Response, error)
- func (s *ImagesServiceMock) GetBySlug(slug string) (*godo.Image, *godo.Response, error)
- func (s *ImagesServiceMock) List(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
- func (s *ImagesServiceMock) ListApplication(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
- func (s *ImagesServiceMock) ListDistribution(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
- func (s *ImagesServiceMock) ListUser(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
- func (s *ImagesServiceMock) Update(id int, req *godo.ImageUpdateRequest) (*godo.Image, *godo.Response, error)
- type KeysServiceMock
- func (s *KeysServiceMock) Create(req *godo.KeyCreateRequest) (*godo.Key, *godo.Response, error)
- func (s *KeysServiceMock) DeleteByFingerprint(fingerprint string) (*godo.Response, error)
- func (s *KeysServiceMock) DeleteByID(id int) (*godo.Response, error)
- func (s *KeysServiceMock) GetByFingerprint(fingerprint string) (*godo.Key, *godo.Response, error)
- func (s *KeysServiceMock) GetByID(id int) (*godo.Key, *godo.Response, error)
- func (s *KeysServiceMock) List(opts *godo.ListOptions) ([]godo.Key, *godo.Response, error)
- func (s *KeysServiceMock) UpdateByFingerprint(fingerprint string, req *godo.KeyUpdateRequest) (*godo.Key, *godo.Response, error)
- func (s *KeysServiceMock) UpdateByID(id int, req *godo.KeyUpdateRequest) (*godo.Key, *godo.Response, error)
- type LiveCommand
- type LiveConfig
- func (c *LiveConfig) GetBool(ns, key string) (bool, error)
- func (c *LiveConfig) GetGodoClient() *godo.Client
- func (c *LiveConfig) GetInt(ns, key string) (int, error)
- func (c *LiveConfig) GetString(ns, key string) (string, error)
- func (c *LiveConfig) GetStringSlice(ns, key string) ([]string, error)
- func (c *LiveConfig) SSH(user, host, keyPath string, port int) Runner
- func (c *LiveConfig) Set(ns, key string, val interface{})
- type MissingArgsErr
- type MockCommand
- type MockRunner
- type RegionsServiceMock
- type Runner
- type SizesServiceMock
- type TokenSource
Constants ¶
const ( // ArgActionID is an action id argument. ArgActionID = "action-id" // ArgDomainName is a domain name argument. ArgDomainName = "domain-name" // ArgDropletID is a droplet id argument. ArgDropletID = "droplet-id" // ArgDropletWait is a wait for a droplet to be created argument. ArgDropletWait = "wait" // ArgKernelID is a ekrnel id argument. ArgKernelID = "kernel-id" // ArgImage is an image argument. ArgImage = "image" // ArgImageID is an image id argument. ArgImageID = "image-id" // ArgImagePublic is a public image argument. ArgImagePublic = "public" // ArgImageSlug is an image slug argment. ArgImageSlug = "image-slug" // ArgIPAddress is an IP address argument. ArgIPAddress = "ip-address" // ArgDropletName is a droplet name argument. ArgDropletName = "droplet-name" // ArgResizeDisk is a resize disk argument. ArgResizeDisk = "resize-disk" // ArgSnapshotName is a snapshot name arugment. ArgSnapshotName = "snapshot-name" // ArgBackups is an enable backups argument. ArgBackups = "enable-backups" // ArgIPv6 is an enable IPv6 argument. ArgIPv6 = "enable-ipv6" // ArgPrivateNetworking is an enable private networking argument. ArgPrivateNetworking = "enable-private-networking" // ArgRecordData is a record data argument. ArgRecordData = "record-data" // ArgRecordID is a record id argument. ArgRecordID = "record-id" // ArgRecordName is a record name argument. ArgRecordName = "record-name" // ArgRecordPort is a record port argument. ArgRecordPort = "record-port" // ArgRecordPriority is a record priority argument. ArgRecordPriority = "record-priority" // ArgRecordType is a record type argument. ArgRecordType = "record-type" // ArgRecordWeight is a record weight argument. ArgRecordWeight = "record-weight" // ArgRegionSlug is a region slug argument. ArgRegionSlug = "region" // ArgSizeSlug is a size slug argument. ArgSizeSlug = "size" // ArgsSSHKeyPath is a ssh argument. ArgsSSHKeyPath = "ssh-key-path" // ArgSSHKeys is a ssh key argument. ArgSSHKeys = "ssh-keys" // ArgsSSHPort is a ssh argument. ArgsSSHPort = "ssh-port" // ArgUserData is a user data argument. ArgUserData = "user-data" // ArgUserDataFile is a user data file location argument. ArgUserDataFile = "user-data-file" // ArgImageName name is an image name argument. ArgImageName = "image-name" // ArgKey is a key argument. ArgKey = "key" // ArgKeyName is a key name argument. ArgKeyName = "key-name" // ArgKeyPublicKey is a public key argument. ArgKeyPublicKey = "public-key" // ArgKeyPublicKeyFile is a public key file argument. ArgKeyPublicKeyFile = "public-key-file" // ArgSSHUser is a SSH user argument. ArgSSHUser = "ssh-user" // ArgOutput is an output type argument. ArgOutput = "output" )
const (
// NSRoot is a configuration key that signifies this value is at the root.
NSRoot = "doit"
)
Variables ¶
This section is empty.
Functions ¶
func DisplayOutput ¶ added in v0.5.0
DisplayOutput displays an object or group of objects to a user. It checks to see what the output type should be.
func PaginateResp ¶
PaginateResp paginates a Response.
Types ¶
type AccountServiceMock ¶
AccountServiceMock mocks github.com/digitalocean/AccountService.
type ActionsServiceMock ¶
type ActionsServiceMock struct { GetFn func(id int) (*godo.Action, *godo.Response, error) ListFn func(opts *godo.ListOptions) ([]godo.Action, *godo.Response, error) }
ActionsServiceMock mocks github.com/digitalocean/godo/ActionsService.
func (*ActionsServiceMock) List ¶
func (s *ActionsServiceMock) List(opts *godo.ListOptions) ([]godo.Action, *godo.Response, error)
List is a mocked method.
type Command ¶ added in v0.5.0
type Command interface { Run(args ...string) ([]byte, error) Start(args ...string) error Stop() error }
Command runs commands.
type Config ¶
type Config interface { GetGodoClient() *godo.Client SSH(user, host, keyPath string, port int) Runner Set(ns, key string, val interface{}) GetString(ns, key string) (string, error) GetBool(ns, key string) (bool, error) GetInt(ns, key string) (int, error) GetStringSlice(ns, key string) ([]string, error) }
Config is an interface that represent doit's config.
var ( // DoitConfig holds the app's current configuration. DoitConfig Config = &LiveConfig{} )
type ConfigFile ¶ added in v0.6.0
type ConfigFile struct{}
func NewConfigFile ¶ added in v0.6.0
func NewConfigFile() *ConfigFile
func (*ConfigFile) Set ¶ added in v0.6.0
func (cf *ConfigFile) Set(key string, val interface{}) error
type DomainsServiceMock ¶
type DomainsServiceMock struct { ListFn func(opts *godo.ListOptions) ([]godo.Domain, *godo.Response, error) GetFn func(string) (*godo.Domain, *godo.Response, error) CreateFn func(*godo.DomainCreateRequest) (*godo.Domain, *godo.Response, error) DeleteFn func(string) (*godo.Response, error) RecordsFn func(string, *godo.ListOptions) ([]godo.DomainRecord, *godo.Response, error) RecordFn func(string, int) (*godo.DomainRecord, *godo.Response, error) DeleteRecordFn func(string, int) (*godo.Response, error) EditRecordFn func(string, int, *godo.DomainRecordEditRequest) (*godo.DomainRecord, *godo.Response, error) CreateRecordFn func(string, *godo.DomainRecordEditRequest) (*godo.DomainRecord, *godo.Response, error) }
DomainsServiceMock mocks github.com/digitalocean/godo/DomainsService.
func (*DomainsServiceMock) Create ¶
func (s *DomainsServiceMock) Create(req *godo.DomainCreateRequest) (*godo.Domain, *godo.Response, error)
Create is a mocked method.
func (*DomainsServiceMock) CreateRecord ¶
func (s *DomainsServiceMock) CreateRecord(name string, req *godo.DomainRecordEditRequest) (*godo.DomainRecord, *godo.Response, error)
CreateRecord is a mocked method.
func (*DomainsServiceMock) Delete ¶
func (s *DomainsServiceMock) Delete(name string) (*godo.Response, error)
Delete is a mocked method.
func (*DomainsServiceMock) DeleteRecord ¶
DeleteRecord is a mocked method.
func (*DomainsServiceMock) EditRecord ¶
func (s *DomainsServiceMock) EditRecord(name string, id int, req *godo.DomainRecordEditRequest) (*godo.DomainRecord, *godo.Response, error)
EditRecord is a mocked method.
func (*DomainsServiceMock) List ¶
func (s *DomainsServiceMock) List(opts *godo.ListOptions) ([]godo.Domain, *godo.Response, error)
List is a mocked method.
func (*DomainsServiceMock) Record ¶
func (s *DomainsServiceMock) Record(name string, id int) (*godo.DomainRecord, *godo.Response, error)
Record is a mocked method.
func (*DomainsServiceMock) Records ¶
func (s *DomainsServiceMock) Records(name string, opts *godo.ListOptions) ([]godo.DomainRecord, *godo.Response, error)
Records is a mocked method.
type DropletActionsServiceMock ¶
type DropletActionsServiceMock struct { ChangeKernelFn func(id, kernelID int) (*godo.Action, *godo.Response, error) DisableBackupsFn func(id int) (*godo.Action, *godo.Response, error) EnableBackupsFn func(id int) (*godo.Action, *godo.Response, error) EnableIPv6Fn func(id int) (*godo.Action, *godo.Response, error) EnablePrivateNetworkingFn func(id int) (*godo.Action, *godo.Response, error) GetFn func(dropletID, actionID int) (*godo.Action, *godo.Response, error) GetByURIFn func(rawurl string) (*godo.Action, *godo.Response, error) PasswordResetFn func(id int) (*godo.Action, *godo.Response, error) PowerCycleFn func(id int) (*godo.Action, *godo.Response, error) PowerOffFn func(id int) (*godo.Action, *godo.Response, error) PowerOnFn func(id int) (*godo.Action, *godo.Response, error) RebootFn func(id int) (*godo.Action, *godo.Response, error) RebuildByImageIDFn func(id, imageID int) (*godo.Action, *godo.Response, error) RebuildByImageSlugFn func(id int, slug string) (*godo.Action, *godo.Response, error) RenameFn func(id int, name string) (*godo.Action, *godo.Response, error) ResizeFn func(id int, sizeSlug string, resizeDisk bool) (*godo.Action, *godo.Response, error) RestoreFn func(id, imageID int) (*godo.Action, *godo.Response, error) ShutdownFn func(id int) (*godo.Action, *godo.Response, error) SnapshotFn func(id int, name string) (*godo.Action, *godo.Response, error) UpgradeFn func(id int) (*godo.Action, *godo.Response, error) }
DropletActionsServiceMock mocks github.com/digitalocean/godo/DropletActionsServiceMock.
func (*DropletActionsServiceMock) ChangeKernel ¶
func (s *DropletActionsServiceMock) ChangeKernel(id, kernelID int) (*godo.Action, *godo.Response, error)
ChangeKernel is a mocked method.
func (*DropletActionsServiceMock) DisableBackups ¶
DisableBackups is a mocked method.
func (*DropletActionsServiceMock) EnableBackups ¶ added in v0.5.1
EnableBackups is a mocked method.
func (*DropletActionsServiceMock) EnableIPv6 ¶
EnableIPv6 is a mocked method.
func (*DropletActionsServiceMock) EnablePrivateNetworking ¶
func (s *DropletActionsServiceMock) EnablePrivateNetworking(id int) (*godo.Action, *godo.Response, error)
EnablePrivateNetworking is a mocked method.
func (*DropletActionsServiceMock) Get ¶
func (s *DropletActionsServiceMock) Get(dropletID, actionID int) (*godo.Action, *godo.Response, error)
Get is a mocked method.
func (*DropletActionsServiceMock) PasswordReset ¶
PasswordReset is a mocked method.
func (*DropletActionsServiceMock) PowerCycle ¶
PowerCycle is a mocked method.
func (*DropletActionsServiceMock) RebuildByImageID ¶
func (s *DropletActionsServiceMock) RebuildByImageID(id, imageID int) (*godo.Action, *godo.Response, error)
RebuildByImageID is a mocked method.
func (*DropletActionsServiceMock) RebuildByImageSlug ¶
func (s *DropletActionsServiceMock) RebuildByImageSlug(id int, slug string) (*godo.Action, *godo.Response, error)
RebuildByImageSlug is a mocked method.
func (*DropletActionsServiceMock) Rename ¶
func (s *DropletActionsServiceMock) Rename(id int, name string) (*godo.Action, *godo.Response, error)
Rename is a mocked method.
func (*DropletActionsServiceMock) Resize ¶
func (s *DropletActionsServiceMock) Resize(id int, sizeSlug string, resizeDisk bool) (*godo.Action, *godo.Response, error)
Resize is a mocked method.
type DropletsServiceMock ¶
type DropletsServiceMock struct { ActionsFn func(dropletID int, opt *godo.ListOptions) ([]godo.Action, *godo.Response, error) BackupsFn func(dropletID int, opt *godo.ListOptions) ([]godo.Image, *godo.Response, error) CreateFn func(createRequest *godo.DropletCreateRequest) (*godo.Droplet, *godo.Response, error) DeleteFn func(dropletID int) (*godo.Response, error) GetFn func(dropletID int) (*godo.Droplet, *godo.Response, error) KernelsFn func(dropletID int, opt *godo.ListOptions) ([]godo.Kernel, *godo.Response, error) ListFn func(opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error) NeighborsFn func(dropletID int) ([]godo.Droplet, *godo.Response, error) SnapshotsFn func(dropletID int, opt *godo.ListOptions) ([]godo.Image, *godo.Response, error) }
DropletsServiceMock mocks github.com/digitalocean/godo/DropletsService.
func (*DropletsServiceMock) Actions ¶
func (s *DropletsServiceMock) Actions(dropletID int, opt *godo.ListOptions) ([]godo.Action, *godo.Response, error)
Actions is a mocked method.
func (*DropletsServiceMock) Backups ¶
func (s *DropletsServiceMock) Backups(dropletID int, opt *godo.ListOptions) ([]godo.Image, *godo.Response, error)
Backups is a mocked method.
func (*DropletsServiceMock) Create ¶
func (s *DropletsServiceMock) Create(createRequest *godo.DropletCreateRequest) (*godo.Droplet, *godo.Response, error)
Create is a mocked method.
func (*DropletsServiceMock) Delete ¶
func (s *DropletsServiceMock) Delete(dropletID int) (*godo.Response, error)
Delete is a mocked method.
func (*DropletsServiceMock) Kernels ¶
func (s *DropletsServiceMock) Kernels(dropletID int, opt *godo.ListOptions) ([]godo.Kernel, *godo.Response, error)
Kernels is a mocked method.
func (*DropletsServiceMock) List ¶
func (s *DropletsServiceMock) List(opt *godo.ListOptions) ([]godo.Droplet, *godo.Response, error)
List is a mocked method.
type FloatingIPActionsServiceMock ¶ added in v0.5.0
type FloatingIPActionsServiceMock struct { AssignFn func(ip string, dropletID int) (*godo.Action, *godo.Response, error) UnassignFn func(ip string) (*godo.Action, *godo.Response, error) GetFn func(ip string, actionID int) (*godo.Action, *godo.Response, error) ListFn func(ip string, opts *godo.ListOptions) ([]godo.Action, *godo.Response, error) }
FloatingIPActionsServiceMock mocks github.com/digitalocean/godo/FloatingIPActionsService.
func (*FloatingIPActionsServiceMock) Assign ¶ added in v0.5.0
func (s *FloatingIPActionsServiceMock) Assign(ip string, dropletID int) (*godo.Action, *godo.Response, error)
Assign is a mocked method.
func (*FloatingIPActionsServiceMock) Get ¶ added in v0.5.0
func (s *FloatingIPActionsServiceMock) Get(ip string, actionID int) (*godo.Action, *godo.Response, error)
Get is a mocked method.
type FloatingIPsServiceMock ¶ added in v0.5.0
type FloatingIPsServiceMock struct { ListFn func(*godo.ListOptions) ([]godo.FloatingIP, *godo.Response, error) GetFn func(string) (*godo.FloatingIP, *godo.Response, error) CreateFn func(*godo.FloatingIPCreateRequest) (*godo.FloatingIP, *godo.Response, error) DeleteFn func(string) (*godo.Response, error) }
FloatingIPsServiceMock mocks github.com/digitalocean/godo/FloatingIPsService.
func (*FloatingIPsServiceMock) Create ¶ added in v0.5.0
func (f *FloatingIPsServiceMock) Create(createRequest *godo.FloatingIPCreateRequest) (*godo.FloatingIP, *godo.Response, error)
Create is a mocked method.
func (*FloatingIPsServiceMock) Delete ¶ added in v0.5.0
func (f *FloatingIPsServiceMock) Delete(ip string) (*godo.Response, error)
Delete is a mocked method.
func (*FloatingIPsServiceMock) Get ¶ added in v0.5.0
func (f *FloatingIPsServiceMock) Get(ip string) (*godo.FloatingIP, *godo.Response, error)
Get is a mocked method.
func (*FloatingIPsServiceMock) List ¶ added in v0.5.0
func (f *FloatingIPsServiceMock) List(opt *godo.ListOptions) ([]godo.FloatingIP, *godo.Response, error)
List is a mocked method.
type Generator ¶
type Generator func(*godo.ListOptions) ([]interface{}, *godo.Response, error)
Generator is a function that generates the list to be paginated.
type ImageActionsServiceMock ¶
type ImageActionsServiceMock struct { GetFn func(imageID, actionID int) (*godo.Action, *godo.Response, error) TransferFn func(imageID int, transferRequest *godo.ActionRequest) (*godo.Action, *godo.Response, error) }
ImageActionsServiceMock mocks github.com/digitalocean/godo/ImagesActionsService.
type ImagesServiceMock ¶
type ImagesServiceMock struct { ListFn func(*godo.ListOptions) ([]godo.Image, *godo.Response, error) ListDistributionFn func(opt *godo.ListOptions) ([]godo.Image, *godo.Response, error) ListApplicationFn func(opt *godo.ListOptions) ([]godo.Image, *godo.Response, error) ListUserFn func(opt *godo.ListOptions) ([]godo.Image, *godo.Response, error) GetByIDFn func(int) (*godo.Image, *godo.Response, error) GetBySlugFn func(string) (*godo.Image, *godo.Response, error) UpdateFn func(int, *godo.ImageUpdateRequest) (*godo.Image, *godo.Response, error) DeleteFn func(int) (*godo.Response, error) }
ImagesServiceMock mocks github.com/digitalocean/godo/ImagesService.
func (*ImagesServiceMock) Delete ¶
func (s *ImagesServiceMock) Delete(id int) (*godo.Response, error)
Delete is a mocked method.
func (*ImagesServiceMock) List ¶
func (s *ImagesServiceMock) List(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
List is a mocked method.
func (*ImagesServiceMock) ListApplication ¶
func (s *ImagesServiceMock) ListApplication(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
ListApplication is a mocked method.
func (*ImagesServiceMock) ListDistribution ¶
func (s *ImagesServiceMock) ListDistribution(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
ListDistribution is a mocked method.
func (*ImagesServiceMock) ListUser ¶
func (s *ImagesServiceMock) ListUser(opts *godo.ListOptions) ([]godo.Image, *godo.Response, error)
ListUser is a mocked method.
type KeysServiceMock ¶
type KeysServiceMock struct { ListFn func(*godo.ListOptions) ([]godo.Key, *godo.Response, error) GetByIDFn func(int) (*godo.Key, *godo.Response, error) GetByFingerprintFn func(string) (*godo.Key, *godo.Response, error) CreateFn func(*godo.KeyCreateRequest) (*godo.Key, *godo.Response, error) UpdateByIDFn func(int, *godo.KeyUpdateRequest) (*godo.Key, *godo.Response, error) UpdateByFingerprintFn func(string, *godo.KeyUpdateRequest) (*godo.Key, *godo.Response, error) DeleteByIDFn func(int) (*godo.Response, error) DeleteByFingerprintFn func(string) (*godo.Response, error) }
KeysServiceMock mocks github.com/digitalocean/godo/KeysService.
func (*KeysServiceMock) Create ¶
func (s *KeysServiceMock) Create(req *godo.KeyCreateRequest) (*godo.Key, *godo.Response, error)
Create is a mocked method.
func (*KeysServiceMock) DeleteByFingerprint ¶
func (s *KeysServiceMock) DeleteByFingerprint(fingerprint string) (*godo.Response, error)
DeleteByFingerprint is a mocked method.
func (*KeysServiceMock) DeleteByID ¶
func (s *KeysServiceMock) DeleteByID(id int) (*godo.Response, error)
DeleteByID is a mocked method.
func (*KeysServiceMock) GetByFingerprint ¶
GetByFingerprint is a mocked method.
func (*KeysServiceMock) List ¶
func (s *KeysServiceMock) List(opts *godo.ListOptions) ([]godo.Key, *godo.Response, error)
List is a mocked method.
func (*KeysServiceMock) UpdateByFingerprint ¶
func (s *KeysServiceMock) UpdateByFingerprint(fingerprint string, req *godo.KeyUpdateRequest) (*godo.Key, *godo.Response, error)
UpdateByFingerprint is a mocked method.
func (*KeysServiceMock) UpdateByID ¶
func (s *KeysServiceMock) UpdateByID(id int, req *godo.KeyUpdateRequest) (*godo.Key, *godo.Response, error)
UpdateByID is a mocked method.
type LiveCommand ¶ added in v0.5.0
type LiveCommand struct {
// contains filtered or unexported fields
}
LiveCommand is a live implementation of Command.
func NewLiveCommand ¶ added in v0.5.0
func NewLiveCommand(path string) *LiveCommand
NewLiveCommand creates a LiveCommand.
func (*LiveCommand) Run ¶ added in v0.5.0
func (c *LiveCommand) Run(args ...string) ([]byte, error)
Run runs a LiveCommand with args and returns stdout and an error if there was one.
func (*LiveCommand) Start ¶ added in v0.5.0
func (c *LiveCommand) Start(args ...string) error
Start runs a LiveCommand with args and starts it. This would most likely block, so you should call it in a goroutine.
func (*LiveCommand) Stop ¶ added in v0.5.0
func (c *LiveCommand) Stop() error
Stop stops an existing LiveCommand.
type LiveConfig ¶
type LiveConfig struct{}
LiveConfig is an implementation of Config for live values.
func (*LiveConfig) GetBool ¶ added in v0.5.0
func (c *LiveConfig) GetBool(ns, key string) (bool, error)
GetBool returns a config value as a bool.
func (*LiveConfig) GetGodoClient ¶ added in v0.5.0
func (c *LiveConfig) GetGodoClient() *godo.Client
GetGodoClient returns a GodoClient.
func (*LiveConfig) GetInt ¶ added in v0.5.0
func (c *LiveConfig) GetInt(ns, key string) (int, error)
GetInt returns a config value as an int.
func (*LiveConfig) GetString ¶ added in v0.5.0
func (c *LiveConfig) GetString(ns, key string) (string, error)
GetString returns a config value as a string.
func (*LiveConfig) GetStringSlice ¶ added in v0.5.0
func (c *LiveConfig) GetStringSlice(ns, key string) ([]string, error)
GetStringSlice returns a config value as a string slice.
func (*LiveConfig) SSH ¶
func (c *LiveConfig) SSH(user, host, keyPath string, port int) Runner
SSH creates a ssh connection to a host.
func (*LiveConfig) Set ¶ added in v0.5.0
func (c *LiveConfig) Set(ns, key string, val interface{})
Set sets a config key.
type MissingArgsErr ¶ added in v0.5.0
type MissingArgsErr struct {
Command string
}
MissingArgsErr is an error returned when their are too few arguments for a command.
func NewMissingArgsErr ¶ added in v0.5.0
func NewMissingArgsErr(cmd string) *MissingArgsErr
NewMissingArgsErr creates a MissingArgsErr instance.
func (*MissingArgsErr) Error ¶ added in v0.5.0
func (e *MissingArgsErr) Error() string
type MockCommand ¶ added in v0.5.0
type MockCommand struct {
// contains filtered or unexported fields
}
MockCommand is a mock command implementation. It allows you simulate running an external command.
func NewMockCommand ¶ added in v0.5.0
func NewMockCommand(path string) *MockCommand
NewMockCommand createsd a MockCommand.
func (*MockCommand) Run ¶ added in v0.5.0
func (c *MockCommand) Run(args ...string) ([]byte, error)
Run simulates the running of a command.
func (*MockCommand) Start ¶ added in v0.5.0
func (c *MockCommand) Start(args ...string) error
Start simulates starting a command.
func (*MockCommand) Stop ¶ added in v0.5.0
func (c *MockCommand) Stop() error
Stop simulates stoping a command.
type MockRunner ¶ added in v0.5.0
type MockRunner struct {
Err error
}
MockRunner is an implemenation of Runner for mocking.
type RegionsServiceMock ¶
type RegionsServiceMock struct {
ListFn func(opts *godo.ListOptions) ([]godo.Region, *godo.Response, error)
}
RegionsServiceMock mocks github.com/digitalocean/godo/RegionsService.
func (*RegionsServiceMock) List ¶
func (s *RegionsServiceMock) List(opts *godo.ListOptions) ([]godo.Region, *godo.Response, error)
List is a mocked method.
type Runner ¶ added in v0.5.0
type Runner interface {
Run() error
}
Runner is an interface that Runs things.
type SizesServiceMock ¶
type SizesServiceMock struct {
ListFn func(opts *godo.ListOptions) ([]godo.Size, *godo.Response, error)
}
SizesServiceMock mocks github.com/digitalocean/godo/SizesService.
func (*SizesServiceMock) List ¶
func (s *SizesServiceMock) List(opts *godo.ListOptions) ([]godo.Size, *godo.Response, error)
List is a mocked method.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/code.google.com/p/go-uuid/uuid
The uuid package generates and inspects UUIDs.
|
The uuid package generates and inspects UUIDs. |
_workspace/src/github.com/Sirupsen/logrus
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
|
Package logrus is a structured logger for Go, completely API compatible with the standard library logger. |
_workspace/src/github.com/digitalocean/godo
Package godo is the DigtalOcean API v2 client for Go
|
Package godo is the DigtalOcean API v2 client for Go |
_workspace/src/github.com/fatih/color
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
|
Package color is an ANSI color package to output colorized or SGR defined output to the standard output. |
_workspace/src/github.com/google/go-querystring/query
Package query implements encoding of structs into URL query parameters.
|
Package query implements encoding of structs into URL query parameters. |
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
|
Package context stores values shared during a request lifetime. |
_workspace/src/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
|
Package gorilla/mux implements a request router and dispatcher. |
_workspace/src/github.com/gorilla/pat
Package gorilla/pat is a request router and dispatcher with a pat-like interface.
|
Package gorilla/pat is a request router and dispatcher with a pat-like interface. |
_workspace/src/github.com/gorilla/securecookie
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values.
|
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values. |
_workspace/src/github.com/gorilla/sessions
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.
|
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends. |
_workspace/src/github.com/gorilla/websocket
Package websocket implements the WebSocket protocol defined in RFC 6455.
|
Package websocket implements the WebSocket protocol defined in RFC 6455. |
_workspace/src/github.com/gorilla/websocket/examples/autobahn
Command server is a test server for the Autobahn WebSockets Test Suite.
|
Command server is a test server for the Autobahn WebSockets Test Suite. |
_workspace/src/github.com/kr/pretty
Package pretty provides pretty-printing for Go values.
|
Package pretty provides pretty-printing for Go values. |
_workspace/src/github.com/kr/text
Package text provides rudimentary functions for manipulating text in paragraphs.
|
Package text provides rudimentary functions for manipulating text in paragraphs. |
_workspace/src/github.com/kr/text/colwriter
Package colwriter provides a write filter that formats input lines in multiple columns.
|
Package colwriter provides a write filter that formats input lines in multiple columns. |
_workspace/src/github.com/kr/text/mc
Command mc prints in multiple columns.
|
Command mc prints in multiple columns. |
_workspace/src/github.com/magiconair/properties
Package properties provides functions for reading and writing ISO-8859-1 and UTF-8 encoded .properties files and has support for recursive property expansion.
|
Package properties provides functions for reading and writing ISO-8859-1 and UTF-8 encoded .properties files and has support for recursive property expansion. |
_workspace/src/github.com/markbates/goth
Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications.
|
Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications. |
_workspace/src/github.com/markbates/goth/gothic
Package gothic wraps common behaviour when using Goth.
|
Package gothic wraps common behaviour when using Goth. |
_workspace/src/github.com/markbates/goth/providers/dropbox
Package dropbox implements the OAuth2 protocol for authenticating users through Dropbox.
|
Package dropbox implements the OAuth2 protocol for authenticating users through Dropbox. |
_workspace/src/github.com/markbates/goth/providers/facebook
Package facebook implements the OAuth2 protocol for authenticating users through Facebook.
|
Package facebook implements the OAuth2 protocol for authenticating users through Facebook. |
_workspace/src/github.com/markbates/goth/providers/faux
Package faux is used exclusively for testing purposes.
|
Package faux is used exclusively for testing purposes. |
_workspace/src/github.com/markbates/goth/providers/github
Package github implements the OAuth2 protocol for authenticating users through Github.
|
Package github implements the OAuth2 protocol for authenticating users through Github. |
_workspace/src/github.com/markbates/goth/providers/gplus
Package gplus implements the OAuth2 protocol for authenticating users through Google+.
|
Package gplus implements the OAuth2 protocol for authenticating users through Google+. |
_workspace/src/github.com/markbates/goth/providers/lastfm
Package lastfm implements the OAuth protocol for authenticating users through LastFM.
|
Package lastfm implements the OAuth protocol for authenticating users through LastFM. |
_workspace/src/github.com/markbates/goth/providers/linkedin
Package linkedin implements the OAuth2 protocol for authenticating users through Linkedin.
|
Package linkedin implements the OAuth2 protocol for authenticating users through Linkedin. |
_workspace/src/github.com/markbates/goth/providers/spotify
Package spotify implements the OAuth protocol for authenticating users through Spotify.
|
Package spotify implements the OAuth protocol for authenticating users through Spotify. |
_workspace/src/github.com/markbates/goth/providers/twitch
Package twitch implements the OAuth2 protocol for authenticating users through Twitch.
|
Package twitch implements the OAuth2 protocol for authenticating users through Twitch. |
_workspace/src/github.com/markbates/goth/providers/twitter
Package twitter implements the OAuth protocol for authenticating users through Twitter.
|
Package twitter implements the OAuth protocol for authenticating users through Twitter. |
_workspace/src/github.com/mitchellh/mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
|
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure. |
_workspace/src/github.com/russross/blackfriday
Blackfriday markdown processor.
|
Blackfriday markdown processor. |
_workspace/src/github.com/shiena/ansicolor
Package ansicolor provides color console in Windows as ANSICON.
|
Package ansicolor provides color console in Windows as ANSICON. |
_workspace/src/github.com/shiena/ansicolor/ansicolor
The ansicolor command colors a console text by ANSI escape sequence like wac.
|
The ansicolor command colors a console text by ANSI escape sequence like wac. |
_workspace/src/github.com/shurcooL/sanitized_anchor_name
Package sanitized_anchor_name provides a func to create sanitized anchor names.
|
Package sanitized_anchor_name provides a func to create sanitized anchor names. |
_workspace/src/github.com/spf13/cobra
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.
|
Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces. |
_workspace/src/github.com/spf13/pflag
Package pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
|
Package pflag is a drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags. |
_workspace/src/github.com/spf13/viper/remote
Package remote integrates the remote features of Viper.
|
Package remote integrates the remote features of Viper. |
_workspace/src/github.com/stretchr/testify/assert
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
|
Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. |
_workspace/src/github.com/tent/http-link-go
Package link implements parsing and serialization of Link header values as defined in RFC 5988.
|
Package link implements parsing and serialization of Link header values as defined in RFC 5988. |
_workspace/src/golang.org/x/crypto/curve25519
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519.
|
Package curve25519 provides an implementation of scalar multiplication on the elliptic curve known as curve25519. |
_workspace/src/golang.org/x/crypto/ssh
Package ssh implements an SSH client and server.
|
Package ssh implements an SSH client and server. |
_workspace/src/golang.org/x/crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
|
Package agent implements a client to an ssh-agent daemon. |
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
|
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems. |
_workspace/src/golang.org/x/crypto/ssh/test
This package contains integration tests for the golang.org/x/crypto/ssh package.
|
This package contains integration tests for the golang.org/x/crypto/ssh package. |
_workspace/src/golang.org/x/net/context
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
|
Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes. |
_workspace/src/golang.org/x/net/context/ctxhttp
Package ctxhttp provides helper functions for performing context-aware HTTP requests.
|
Package ctxhttp provides helper functions for performing context-aware HTTP requests. |
_workspace/src/golang.org/x/oauth2
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests.
|
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests. |
_workspace/src/golang.org/x/oauth2/bitbucket
Package bitbucket provides constants for using OAuth2 to access Bitbucket.
|
Package bitbucket provides constants for using OAuth2 to access Bitbucket. |
_workspace/src/golang.org/x/oauth2/clientcredentials
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0".
|
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0". |
_workspace/src/golang.org/x/oauth2/facebook
Package facebook provides constants for using OAuth2 to access Facebook.
|
Package facebook provides constants for using OAuth2 to access Facebook. |
_workspace/src/golang.org/x/oauth2/github
Package github provides constants for using OAuth2 to access Github.
|
Package github provides constants for using OAuth2 to access Github. |
_workspace/src/golang.org/x/oauth2/google
Package google provides support for making OAuth2 authorized and authenticated HTTP requests to Google APIs.
|
Package google provides support for making OAuth2 authorized and authenticated HTTP requests to Google APIs. |
_workspace/src/golang.org/x/oauth2/internal
Package internal contains support packages for oauth2 package.
|
Package internal contains support packages for oauth2 package. |
_workspace/src/golang.org/x/oauth2/jws
Package jws provides encoding and decoding utilities for signed JWS messages.
|
Package jws provides encoding and decoding utilities for signed JWS messages. |
_workspace/src/golang.org/x/oauth2/jwt
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0".
|
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0". |
_workspace/src/golang.org/x/oauth2/linkedin
Package linkedin provides constants for using OAuth2 to access LinkedIn.
|
Package linkedin provides constants for using OAuth2 to access LinkedIn. |
_workspace/src/golang.org/x/oauth2/odnoklassniki
Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki.
|
Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki. |
_workspace/src/golang.org/x/oauth2/paypal
Package paypal provides constants for using OAuth2 to access PayPal.
|
Package paypal provides constants for using OAuth2 to access PayPal. |
_workspace/src/golang.org/x/oauth2/vk
Package vk provides constants for using OAuth2 to access VK.com.
|
Package vk provides constants for using OAuth2 to access VK.com. |
_workspace/src/gopkg.in/yaml.v2
Package yaml implements YAML support for the Go language.
|
Package yaml implements YAML support for the Go language. |
cmd
|
|