Documentation
¶
Index ¶
- type Fake
- func (fake *Fake) Chmod(arg1 string, arg2 os.FileMode) error
- func (fake *Fake) ChmodArgsForCall(i int) (string, os.FileMode)
- func (fake *Fake) ChmodCallCount() int
- func (fake *Fake) ChmodReturns(result1 error)
- func (fake *Fake) Chown(arg1 string, arg2 int, arg3 int) error
- func (fake *Fake) ChownArgsForCall(i int) (string, int, int)
- func (fake *Fake) ChownCallCount() int
- func (fake *Fake) ChownReturns(result1 error)
- func (fake *Fake) FindProcess(arg1 int) (Process, error)
- func (fake *Fake) FindProcessArgsForCall(i int) int
- func (fake *Fake) FindProcessCallCount() int
- func (fake *Fake) FindProcessReturns(result1 Process, result2 error)
- func (fake *Fake) Getwd() (string, error)
- func (fake *Fake) GetwdCallCount() int
- func (fake *Fake) GetwdReturns(result1 string, result2 error)
- func (fake *Fake) Invocations() map[string][][]interface{}
- func (fake *Fake) OpenFile(arg1 string, arg2 int, arg3 os.FileMode) (*os.File, error)
- func (fake *Fake) OpenFileArgsForCall(i int) (string, int, os.FileMode)
- func (fake *Fake) OpenFileCallCount() int
- func (fake *Fake) OpenFileReturns(result1 *os.File, result2 error)
- func (fake *Fake) Remove(arg1 string) error
- func (fake *Fake) RemoveArgsForCall(i int) string
- func (fake *Fake) RemoveCallCount() int
- func (fake *Fake) RemoveReturns(result1 error)
- func (fake *Fake) Rename(arg1 string, arg2 string) error
- func (fake *Fake) RenameArgsForCall(i int) (string, string)
- func (fake *Fake) RenameCallCount() int
- func (fake *Fake) RenameReturns(result1 error)
- func (fake *Fake) Stat(arg1 string) (os.FileInfo, error)
- func (fake *Fake) StatArgsForCall(i int) string
- func (fake *Fake) StatCallCount() int
- func (fake *Fake) StatReturns(result1 os.FileInfo, result2 error)
- type OS
- type Process
- type ProcessFake
- func (fake *ProcessFake) GetPid() int
- func (fake *ProcessFake) GetPidCallCount() int
- func (fake *ProcessFake) GetPidReturns(result1 int)
- func (fake *ProcessFake) Invocations() map[string][][]interface{}
- func (fake *ProcessFake) Kill() error
- func (fake *ProcessFake) KillCallCount() int
- func (fake *ProcessFake) KillReturns(result1 error)
- func (fake *ProcessFake) Release() error
- func (fake *ProcessFake) ReleaseCallCount() int
- func (fake *ProcessFake) ReleaseReturns(result1 error)
- func (fake *ProcessFake) SetPid(arg1 int)
- func (fake *ProcessFake) SetPidArgsForCall(i int) int
- func (fake *ProcessFake) SetPidCallCount() int
- func (fake *ProcessFake) Signal(arg1 os.Signal) error
- func (fake *ProcessFake) SignalArgsForCall(i int) os.Signal
- func (fake *ProcessFake) SignalCallCount() int
- func (fake *ProcessFake) SignalReturns(result1 error)
- func (fake *ProcessFake) Wait() (ProcessState, error)
- func (fake *ProcessFake) WaitCallCount() int
- func (fake *ProcessFake) WaitReturns(result1 ProcessState, result2 error)
- type ProcessReal
- type ProcessState
- type ProcessStateFake
- func (fake *ProcessStateFake) Exited() bool
- func (fake *ProcessStateFake) ExitedCallCount() int
- func (fake *ProcessStateFake) ExitedReturns(result1 bool)
- func (fake *ProcessStateFake) Invocations() map[string][][]interface{}
- func (fake *ProcessStateFake) Pid() int
- func (fake *ProcessStateFake) PidCallCount() int
- func (fake *ProcessStateFake) PidReturns(result1 int)
- func (fake *ProcessStateFake) String() string
- func (fake *ProcessStateFake) StringCallCount() int
- func (fake *ProcessStateFake) StringReturns(result1 string)
- func (fake *ProcessStateFake) Success() bool
- func (fake *ProcessStateFake) SuccessCallCount() int
- func (fake *ProcessStateFake) SuccessReturns(result1 bool)
- func (fake *ProcessStateFake) Sys() interface{}
- func (fake *ProcessStateFake) SysCallCount() int
- func (fake *ProcessStateFake) SysReturns(result1 interface{})
- func (fake *ProcessStateFake) SysUsage() interface{}
- func (fake *ProcessStateFake) SysUsageCallCount() int
- func (fake *ProcessStateFake) SysUsageReturns(result1 interface{})
- func (fake *ProcessStateFake) SystemTime() time.Duration
- func (fake *ProcessStateFake) SystemTimeCallCount() int
- func (fake *ProcessStateFake) SystemTimeReturns(result1 time.Duration)
- func (fake *ProcessStateFake) UserTime() time.Duration
- func (fake *ProcessStateFake) UserTimeCallCount() int
- func (fake *ProcessStateFake) UserTimeReturns(result1 time.Duration)
- type ProcessStateReal
- func (p *ProcessStateReal) Exited() bool
- func (p *ProcessStateReal) Pid() int
- func (p *ProcessStateReal) String() string
- func (p *ProcessStateReal) Success() bool
- func (p *ProcessStateReal) Sys() interface{}
- func (p *ProcessStateReal) SysUsage() interface{}
- func (p *ProcessStateReal) SystemTime() time.Duration
- func (p *ProcessStateReal) UserTime() time.Duration
- type Real
- func (*Real) Chmod(name string, mode os.FileMode) error
- func (*Real) Chown(name string, uid, gid int) error
- func (*Real) FindProcess(pid int) (Process, error)
- func (*Real) Getwd() (string, error)
- func (*Real) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (*Real) Remove(path string) error
- func (*Real) Rename(oldpath, newpath string) error
- func (*Real) Stat(name string) (os.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
type Fake struct {
RenameStub func(string, string) error
RemoveStub func(string) error
ChmodStub func(string, os.FileMode) error
ChownStub func(string, int, int) error
OpenFileStub func(string, int, os.FileMode) (*os.File, error)
StatStub func(string) (os.FileInfo, error)
FindProcessStub func(int) (Process, error)
GetwdStub func() (string, error)
// contains filtered or unexported fields
}
Fake ...
func (*Fake) ChmodArgsForCall ¶
ChmodArgsForCall ...
func (*Fake) ChownArgsForCall ¶
ChownArgsForCall ...
func (*Fake) FindProcessArgsForCall ¶
FindProcessArgsForCall ...
func (*Fake) FindProcessCallCount ¶
FindProcessCallCount ...
func (*Fake) FindProcessReturns ¶
FindProcessReturns ...
func (*Fake) GetwdReturns ¶
GetwdReturns ...
func (*Fake) Invocations ¶
Invocations ...
func (*Fake) OpenFileArgsForCall ¶
OpenFileArgsForCall ...
func (*Fake) OpenFileReturns ¶
OpenFileReturns ...
func (*Fake) RemoveArgsForCall ¶
RemoveArgsForCall ...
func (*Fake) RenameArgsForCall ¶
RenameArgsForCall ...
type OS ¶
type OS interface {
Rename(string, string) error
Remove(string) error
Chmod(string, os.FileMode) error
Chown(string, int, int) error
OpenFile(string, int, os.FileMode) (*os.File, error)
Stat(string) (os.FileInfo, error)
FindProcess(int) (Process, error)
Getwd() (string, error)
}
OS is an interface around os
type Process ¶
type Process interface {
Kill() error
Release() error
Signal(os.Signal) error
Wait() (ProcessState, error)
GetPid() int
SetPid(int)
}
Process is an interface around os.Process
func NewProcess ¶
NewProcess creates a struct that behaves like os.Process
type ProcessFake ¶
type ProcessFake struct {
KillStub func() error
ReleaseStub func() error
SignalStub func(os.Signal) error
WaitStub func() (ProcessState, error)
GetPidStub func() int
SetPidStub func(int)
// contains filtered or unexported fields
}
ProcessFake ...
func NewProcessFake ¶
func NewProcessFake() *ProcessFake
NewProcessFake is the preferred way to initialise a ProcessFake
func (*ProcessFake) GetPidCallCount ¶
func (fake *ProcessFake) GetPidCallCount() int
GetPidCallCount ...
func (*ProcessFake) GetPidReturns ¶
func (fake *ProcessFake) GetPidReturns(result1 int)
GetPidReturns ...
func (*ProcessFake) Invocations ¶
func (fake *ProcessFake) Invocations() map[string][][]interface{}
Invocations ...
func (*ProcessFake) KillReturns ¶
func (fake *ProcessFake) KillReturns(result1 error)
KillReturns ...
func (*ProcessFake) ReleaseCallCount ¶
func (fake *ProcessFake) ReleaseCallCount() int
ReleaseCallCount ...
func (*ProcessFake) ReleaseReturns ¶
func (fake *ProcessFake) ReleaseReturns(result1 error)
ReleaseReturns ...
func (*ProcessFake) SetPidArgsForCall ¶
func (fake *ProcessFake) SetPidArgsForCall(i int) int
SetPidArgsForCall ...
func (*ProcessFake) SetPidCallCount ¶
func (fake *ProcessFake) SetPidCallCount() int
SetPidCallCount ...
func (*ProcessFake) SignalArgsForCall ¶
func (fake *ProcessFake) SignalArgsForCall(i int) os.Signal
SignalArgsForCall ...
func (*ProcessFake) SignalCallCount ¶
func (fake *ProcessFake) SignalCallCount() int
SignalCallCount ...
func (*ProcessFake) SignalReturns ¶
func (fake *ProcessFake) SignalReturns(result1 error)
SignalReturns ...
func (*ProcessFake) WaitReturns ¶
func (fake *ProcessFake) WaitReturns(result1 ProcessState, result2 error)
WaitReturns ...
type ProcessReal ¶
type ProcessReal struct {
// contains filtered or unexported fields
}
ProcessReal is a wrapper around os.Process that implements ios.Process
func (*ProcessReal) GetPid ¶
func (p *ProcessReal) GetPid() int
GetPid is a wrapper around getting os.Process.Pid
func (*ProcessReal) Kill ¶
func (p *ProcessReal) Kill() error
Kill is a wrapper around os.Process.Kill()
func (*ProcessReal) Release ¶
func (p *ProcessReal) Release() error
Release is a wrapper around os.Process.Release()
func (*ProcessReal) SetPid ¶
func (p *ProcessReal) SetPid(pid int)
SetPid is a wrapper around setting os.Process.Pid
func (*ProcessReal) Signal ¶
func (p *ProcessReal) Signal(sig os.Signal) error
Signal is a wrapper around os.Process.Signal()
func (*ProcessReal) Wait ¶
func (p *ProcessReal) Wait() (ProcessState, error)
Wait is a wrapper around os.Process.Wait()
type ProcessState ¶ added in v1.1.0
type ProcessState interface {
Exited() bool
Pid() int
String() string
Success() bool
Sys() interface{}
SysUsage() interface{}
SystemTime() time.Duration
UserTime() time.Duration
}
ProcessState is an interface around os.ProcessState
func NewProcessState ¶ added in v1.1.0
func NewProcessState(processState ...*os.ProcessState) ProcessState
NewProcessState creates a struct that behaves like os.Process
type ProcessStateFake ¶ added in v1.1.0
type ProcessStateFake struct {
ExitedStub func() bool
PidStub func() int
StringStub func() string
SuccessStub func() bool
SysStub func() interface{}
SysUsageStub func() interface{}
SystemTimeStub func() time.Duration
UserTimeStub func() time.Duration
// contains filtered or unexported fields
}
ProcessStateFake ...
func NewProcessStateFake ¶ added in v1.1.0
func NewProcessStateFake() *ProcessStateFake
NewProcessStateFake is the preferred way to initialise a ProcessStateFake
func (*ProcessStateFake) Exited ¶ added in v1.1.0
func (fake *ProcessStateFake) Exited() bool
Exited ...
func (*ProcessStateFake) ExitedCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) ExitedCallCount() int
ExitedCallCount ...
func (*ProcessStateFake) ExitedReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) ExitedReturns(result1 bool)
ExitedReturns ...
func (*ProcessStateFake) Invocations ¶ added in v1.1.0
func (fake *ProcessStateFake) Invocations() map[string][][]interface{}
Invocations ...
func (*ProcessStateFake) PidCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) PidCallCount() int
PidCallCount ...
func (*ProcessStateFake) PidReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) PidReturns(result1 int)
PidReturns ...
func (*ProcessStateFake) String ¶ added in v1.1.0
func (fake *ProcessStateFake) String() string
String ...
func (*ProcessStateFake) StringCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) StringCallCount() int
StringCallCount ...
func (*ProcessStateFake) StringReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) StringReturns(result1 string)
StringReturns ...
func (*ProcessStateFake) Success ¶ added in v1.1.0
func (fake *ProcessStateFake) Success() bool
Success ...
func (*ProcessStateFake) SuccessCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) SuccessCallCount() int
SuccessCallCount ...
func (*ProcessStateFake) SuccessReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) SuccessReturns(result1 bool)
SuccessReturns ...
func (*ProcessStateFake) Sys ¶ added in v1.1.0
func (fake *ProcessStateFake) Sys() interface{}
Sys ...
func (*ProcessStateFake) SysCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) SysCallCount() int
SysCallCount ...
func (*ProcessStateFake) SysReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) SysReturns(result1 interface{})
SysReturns ...
func (*ProcessStateFake) SysUsage ¶ added in v1.1.0
func (fake *ProcessStateFake) SysUsage() interface{}
SysUsage ...
func (*ProcessStateFake) SysUsageCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) SysUsageCallCount() int
SysUsageCallCount ...
func (*ProcessStateFake) SysUsageReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) SysUsageReturns(result1 interface{})
SysUsageReturns ...
func (*ProcessStateFake) SystemTime ¶ added in v1.1.0
func (fake *ProcessStateFake) SystemTime() time.Duration
SystemTime ...
func (*ProcessStateFake) SystemTimeCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) SystemTimeCallCount() int
SystemTimeCallCount ...
func (*ProcessStateFake) SystemTimeReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) SystemTimeReturns(result1 time.Duration)
SystemTimeReturns ...
func (*ProcessStateFake) UserTime ¶ added in v1.1.0
func (fake *ProcessStateFake) UserTime() time.Duration
UserTime ...
func (*ProcessStateFake) UserTimeCallCount ¶ added in v1.1.0
func (fake *ProcessStateFake) UserTimeCallCount() int
UserTimeCallCount ...
func (*ProcessStateFake) UserTimeReturns ¶ added in v1.1.0
func (fake *ProcessStateFake) UserTimeReturns(result1 time.Duration)
UserTimeReturns ...
type ProcessStateReal ¶ added in v1.1.0
type ProcessStateReal struct {
// contains filtered or unexported fields
}
ProcessStateReal is a wrapper around os.Process that implements ios.ProcessState
func (*ProcessStateReal) Exited ¶ added in v1.1.0
func (p *ProcessStateReal) Exited() bool
Exited is a wrapper around os.ProcessState.Exited()
func (*ProcessStateReal) Pid ¶ added in v1.1.0
func (p *ProcessStateReal) Pid() int
Pid is a wrapper around os.ProcessState.Pid()
func (*ProcessStateReal) String ¶ added in v1.1.0
func (p *ProcessStateReal) String() string
String is a wrapper around os.ProcessState.String()
func (*ProcessStateReal) Success ¶ added in v1.1.0
func (p *ProcessStateReal) Success() bool
Success is a wrapper around os.ProcessState.Success()
func (*ProcessStateReal) Sys ¶ added in v1.1.0
func (p *ProcessStateReal) Sys() interface{}
Sys is a wrapper around os.ProcessState.Sys()
func (*ProcessStateReal) SysUsage ¶ added in v1.1.0
func (p *ProcessStateReal) SysUsage() interface{}
SysUsage is a wrapper around os.ProcessState.SysUsage()
func (*ProcessStateReal) SystemTime ¶ added in v1.1.0
func (p *ProcessStateReal) SystemTime() time.Duration
SystemTime is a wrapper around os.ProcessState.SystemTime()
func (*ProcessStateReal) UserTime ¶ added in v1.1.0
func (p *ProcessStateReal) UserTime() time.Duration
UserTime is a wrapper around os.ProcessState.UserTime()
type Real ¶
type Real struct{}
Real is a wrapper around os that implements ios.OS
func (*Real) FindProcess ¶
FindProcess is a wrapper around os.FindProcess()