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() (*os.ProcessState, error)
- func (fake *ProcessFake) WaitCallCount() int
- func (fake *ProcessFake) WaitReturns(result1 *os.ProcessState, result2 error)
- type ProcessReal
- 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() (*os.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() (*os.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 *os.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() (*os.ProcessState, error)
Wait is a wrapper around os.Process.Wait()
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()