Documentation ¶
Overview ¶
Package util is a generated GoMock package.
Package util is a generated GoMock package.
Index ¶
- Variables
- func IfEmpty(value, fallback string) string
- type Machine
- type MachineArgs
- type MockMachine
- type MockMachineMockRecorder
- type MockOperatingSystem
- func (m *MockOperatingSystem) EXPECT() *MockOperatingSystemMockRecorder
- func (m *MockOperatingSystem) Getenv(key string) string
- func (m *MockOperatingSystem) Getwd() (string, error)
- func (m *MockOperatingSystem) IsNotExist(err error) bool
- func (m *MockOperatingSystem) MkdirAll(path string, perm os.FileMode) error
- func (m *MockOperatingSystem) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (m *MockOperatingSystem) Remove(name string) error
- func (m *MockOperatingSystem) Stat(name string) (os.FileInfo, error)
- type MockOperatingSystemMockRecorder
- func (mr *MockOperatingSystemMockRecorder) Getenv(key interface{}) *gomock.Call
- func (mr *MockOperatingSystemMockRecorder) Getwd() *gomock.Call
- func (mr *MockOperatingSystemMockRecorder) IsNotExist(err interface{}) *gomock.Call
- func (mr *MockOperatingSystemMockRecorder) MkdirAll(path, perm interface{}) *gomock.Call
- func (mr *MockOperatingSystemMockRecorder) OpenFile(name, flag, perm interface{}) *gomock.Call
- func (mr *MockOperatingSystemMockRecorder) Remove(name interface{}) *gomock.Call
- func (mr *MockOperatingSystemMockRecorder) Stat(name interface{}) *gomock.Call
- type OperatingSystem
- type Pair
Constants ¶
This section is empty.
Variables ¶
var ( ErrEmptyNetworkInterfaces = errors.New("could not find network interfaces") ErrGetNetworkInterfaces = errors.New("failed to get network interfaces") ErrInvalidNetworkInterface = errors.New("could not find network interfaces with a valid MAC address") ErrSlicesLengthMismatch = errors.New("slices have different lengths") )
Functions ¶
Types ¶
type Machine ¶
type Machine interface { MacAddress() (string, error) HomeDirectory() string ReadPassword(fd int) ([]byte, error) }
func NewMachine ¶
func NewMachine(args MachineArgs) Machine
type MachineArgs ¶
type MachineArgs struct {
OperatingSystem OperatingSystem
}
type MockMachine ¶
type MockMachine struct {
// contains filtered or unexported fields
}
MockMachine is a mock of Machine interface.
func NewMockMachine ¶
func NewMockMachine(ctrl *gomock.Controller) *MockMachine
NewMockMachine creates a new mock instance.
func (*MockMachine) EXPECT ¶
func (m *MockMachine) EXPECT() *MockMachineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMachine) HomeDirectory ¶
func (m *MockMachine) HomeDirectory() string
HomeDirectory mocks base method.
func (*MockMachine) MacAddress ¶
func (m *MockMachine) MacAddress() (string, error)
MacAddress mocks base method.
func (*MockMachine) ReadPassword ¶
func (m *MockMachine) ReadPassword(fd int) ([]byte, error)
ReadPassword mocks base method.
type MockMachineMockRecorder ¶
type MockMachineMockRecorder struct {
// contains filtered or unexported fields
}
MockMachineMockRecorder is the mock recorder for MockMachine.
func (*MockMachineMockRecorder) HomeDirectory ¶
func (mr *MockMachineMockRecorder) HomeDirectory() *gomock.Call
HomeDirectory indicates an expected call of HomeDirectory.
func (*MockMachineMockRecorder) MacAddress ¶
func (mr *MockMachineMockRecorder) MacAddress() *gomock.Call
MacAddress indicates an expected call of MacAddress.
func (*MockMachineMockRecorder) ReadPassword ¶
func (mr *MockMachineMockRecorder) ReadPassword(fd interface{}) *gomock.Call
ReadPassword indicates an expected call of ReadPassword.
type MockOperatingSystem ¶
type MockOperatingSystem struct {
// contains filtered or unexported fields
}
MockOperatingSystem is a mock of OperatingSystem interface.
func NewMockOperatingSystem ¶
func NewMockOperatingSystem(ctrl *gomock.Controller) *MockOperatingSystem
NewMockOperatingSystem creates a new mock instance.
func (*MockOperatingSystem) EXPECT ¶
func (m *MockOperatingSystem) EXPECT() *MockOperatingSystemMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOperatingSystem) Getenv ¶
func (m *MockOperatingSystem) Getenv(key string) string
Getenv mocks base method.
func (*MockOperatingSystem) Getwd ¶
func (m *MockOperatingSystem) Getwd() (string, error)
Getwd mocks base method.
func (*MockOperatingSystem) IsNotExist ¶
func (m *MockOperatingSystem) IsNotExist(err error) bool
IsNotExist mocks base method.
func (*MockOperatingSystem) MkdirAll ¶
func (m *MockOperatingSystem) MkdirAll(path string, perm os.FileMode) error
MkdirAll mocks base method.
func (*MockOperatingSystem) Remove ¶
func (m *MockOperatingSystem) Remove(name string) error
Remove mocks base method.
type MockOperatingSystemMockRecorder ¶
type MockOperatingSystemMockRecorder struct {
// contains filtered or unexported fields
}
MockOperatingSystemMockRecorder is the mock recorder for MockOperatingSystem.
func (*MockOperatingSystemMockRecorder) Getenv ¶
func (mr *MockOperatingSystemMockRecorder) Getenv(key interface{}) *gomock.Call
Getenv indicates an expected call of Getenv.
func (*MockOperatingSystemMockRecorder) Getwd ¶
func (mr *MockOperatingSystemMockRecorder) Getwd() *gomock.Call
Getwd indicates an expected call of Getwd.
func (*MockOperatingSystemMockRecorder) IsNotExist ¶
func (mr *MockOperatingSystemMockRecorder) IsNotExist(err interface{}) *gomock.Call
IsNotExist indicates an expected call of IsNotExist.
func (*MockOperatingSystemMockRecorder) MkdirAll ¶
func (mr *MockOperatingSystemMockRecorder) MkdirAll(path, perm interface{}) *gomock.Call
MkdirAll indicates an expected call of MkdirAll.
func (*MockOperatingSystemMockRecorder) OpenFile ¶
func (mr *MockOperatingSystemMockRecorder) OpenFile(name, flag, perm interface{}) *gomock.Call
OpenFile indicates an expected call of OpenFile.
func (*MockOperatingSystemMockRecorder) Remove ¶
func (mr *MockOperatingSystemMockRecorder) Remove(name interface{}) *gomock.Call
Remove indicates an expected call of Remove.
func (*MockOperatingSystemMockRecorder) Stat ¶
func (mr *MockOperatingSystemMockRecorder) Stat(name interface{}) *gomock.Call
Stat indicates an expected call of Stat.
type OperatingSystem ¶
type OperatingSystem interface { Getenv(key string) string Stat(name string) (os.FileInfo, error) Getwd() (string, error) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) Remove(name string) error IsNotExist(err error) bool MkdirAll(path string, perm os.FileMode) error }
func NewOperatingSystem ¶
func NewOperatingSystem() OperatingSystem