mocks

package
v1.0.0-...-73df5cd Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

func (*Client) AddIP

func (c *Client) AddIP(name *lib.VirtualMachineName, spec *lib.IPCreateRequest) (lib.IPs, error)

func (*Client) AddUserAuthorizedKey

func (c *Client) AddUserAuthorizedKey(name, key string) error

func (*Client) AllowInsecureRequests

func (c *Client) AllowInsecureRequests()

func (*Client) AuthWithCredentials

func (c *Client) AuthWithCredentials(credents auth3.Credentials) error

func (*Client) AuthWithToken

func (c *Client) AuthWithToken(token string) error

func (*Client) BuildRequest

func (c *Client) BuildRequest(method string, endpoint lib.Endpoint, path string, parts ...string) (*lib.Request, error)

func (*Client) BuildRequestNoAuth

func (c *Client) BuildRequestNoAuth(method string, endpoint lib.Endpoint, path string, parts ...string) (*lib.Request, error)

func (*Client) CreateAccount

func (c *Client) CreateAccount(acc *lib.Account) (*lib.Account, error)

func (*Client) CreateCreditCard

func (c *Client) CreateCreditCard(cc *lib.CreditCard) (string, error)

func (*Client) CreateDisc

func (c *Client) CreateDisc(name *lib.VirtualMachineName, disc lib.Disc) error

func (*Client) CreateGroup

func (c *Client) CreateGroup(name *lib.GroupName) error

func (*Client) CreateVirtualMachine

func (c *Client) CreateVirtualMachine(group *lib.GroupName, vm lib.VirtualMachineSpec) (*lib.VirtualMachine, error)

func (*Client) DeleteDisc

func (c *Client) DeleteDisc(name *lib.VirtualMachineName, disc string) error

func (*Client) DeleteGroup

func (c *Client) DeleteGroup(name *lib.GroupName) error

func (*Client) DeleteUserAuthorizedKey

func (c *Client) DeleteUserAuthorizedKey(name, key string) error

func (*Client) DeleteVirtualMachine

func (c *Client) DeleteVirtualMachine(name *lib.VirtualMachineName, purge bool) error

func (*Client) GetAccount

func (c *Client) GetAccount(name string) (account *lib.Account, err error)

func (*Client) GetAccounts

func (c *Client) GetAccounts() (accounts []*lib.Account, err error)

func (*Client) GetDefaultAccount

func (c *Client) GetDefaultAccount() (account *lib.Account, err error)

func (*Client) GetDisc

func (c *Client) GetDisc(name *lib.VirtualMachineName, discId string) (disc *lib.Disc, err error)

func (*Client) GetEndpoint

func (c *Client) GetEndpoint() string

func (*Client) GetGroup

func (c *Client) GetGroup(name *lib.GroupName) (*lib.Group, error)

func (*Client) GetSessionFactors

func (c *Client) GetSessionFactors() []string

func (*Client) GetSessionToken

func (c *Client) GetSessionToken() string

func (*Client) GetSessionUser

func (c *Client) GetSessionUser() string

func (*Client) GetUser

func (c *Client) GetUser(name string) (*lib.User, error)

func (*Client) GetVirtualMachine

func (c *Client) GetVirtualMachine(name *lib.VirtualMachineName) (vm *lib.VirtualMachine, err error)

func (*Client) MoveVirtualMachine

func (c *Client) MoveVirtualMachine(oldName *lib.VirtualMachineName, newName *lib.VirtualMachineName) error

func (*Client) NewRequest

func (c *Client) NewRequest(method string, url *url.URL) *lib.Request

func (*Client) NewRequestNoAuth

func (c *Client) NewRequestNoAuth(method string, url *url.URL) *lib.Request

func (*Client) ParseAccountName

func (c *Client) ParseAccountName(name string, defaults ...string) string

func (*Client) ParseGroupName

func (c *Client) ParseGroupName(name string, defaults ...*lib.GroupName) *lib.GroupName

func (*Client) ParseVirtualMachineName

func (c *Client) ParseVirtualMachineName(name string, defaults ...*lib.VirtualMachineName) (*lib.VirtualMachineName, error)

func (*Client) ReadDefinitions

func (c *Client) ReadDefinitions() (*lib.Definitions, error)

func (*Client) RegisterNewAccount

func (c *Client) RegisterNewAccount(acc *lib.Account) (*lib.Account, error)

func (*Client) ReimageVirtualMachine

func (c *Client) ReimageVirtualMachine(name *lib.VirtualMachineName, image *lib.ImageInstall) error

func (*Client) Request

func (c *Client) Request(auth bool, method string, location string, requestBody string) (req *http.Request, res *http.Response, err error)

func (*Client) RequestAndRead

func (c *Client) RequestAndRead(auth bool, method, path, requestBody string) (responseBody []byte, err error)

func (*Client) RequestAndUnmarshal

func (c *Client) RequestAndUnmarshal(auth bool, method, path, requestBody string, output interface{}) error

func (*Client) ResetVirtualMachine

func (c *Client) ResetVirtualMachine(name *lib.VirtualMachineName) error

func (*Client) ResizeDisc

func (c *Client) ResizeDisc(name *lib.VirtualMachineName, id string, size int) error

func (*Client) RestartVirtualMachine

func (c *Client) RestartVirtualMachine(name *lib.VirtualMachineName) error

func (*Client) SetDebugLevel

func (c *Client) SetDebugLevel(level int)

func (*Client) SetVirtualMachineCores

func (c *Client) SetVirtualMachineCores(name *lib.VirtualMachineName, cores int) error

func (*Client) SetVirtualMachineHardwareProfile

func (c *Client) SetVirtualMachineHardwareProfile(name *lib.VirtualMachineName, hwprofile string, locked ...bool) error

func (*Client) SetVirtualMachineHardwareProfileLock

func (c *Client) SetVirtualMachineHardwareProfileLock(name *lib.VirtualMachineName, locked bool) error

func (*Client) SetVirtualMachineMemory

func (c *Client) SetVirtualMachineMemory(name *lib.VirtualMachineName, memory int) error

func (*Client) ShutdownVirtualMachine

func (c *Client) ShutdownVirtualMachine(name *lib.VirtualMachineName, stayoff bool) error

func (*Client) StartVirtualMachine

func (c *Client) StartVirtualMachine(name *lib.VirtualMachineName) error

func (*Client) StopVirtualMachine

func (c *Client) StopVirtualMachine(name *lib.VirtualMachineName) error

func (*Client) UndeleteVirtualMachine

func (c *Client) UndeleteVirtualMachine(name *lib.VirtualMachineName) error

type Config

type Config struct {
	mock.Mock
}

func (*Config) EndpointName

func (c *Config) EndpointName() string

func (*Config) Force

func (c *Config) Force() bool

func (*Config) Get

func (c *Config) Get(name string) (string, error)

func (*Config) GetAll

func (c *Config) GetAll() ([]util.ConfigVar, error)

func (*Config) GetBool

func (c *Config) GetBool(name string) (bool, error)

func (*Config) GetDebugLevel

func (c *Config) GetDebugLevel() int

func (*Config) GetGroup

func (c *Config) GetGroup() *lib.GroupName

func (*Config) GetIgnoreErr

func (c *Config) GetIgnoreErr(name string) string

func (*Config) GetV

func (c *Config) GetV(name string) (util.ConfigVar, error)

func (*Config) GetVirtualMachine

func (c *Config) GetVirtualMachine() *lib.VirtualMachineName

func (*Config) ImportFlags

func (c *Config) ImportFlags(*flag.FlagSet) []string

func (*Config) PanelURL

func (c *Config) PanelURL() string

func (*Config) Set

func (c *Config) Set(name, value, source string)

func (*Config) SetPersistent

func (c *Config) SetPersistent(name, value, source string) error

func (*Config) Unset

func (c *Config) Unset(name string) error

Jump to

Keyboard shortcuts

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