Documentation ¶
Overview ¶
Package mock is a generated GoMock package.
Index ¶
- type HandlerKit
- type MockSession
- func (m *MockSession) EXPECT() *MockSessionMockRecorder
- func (m *MockSession) Err() io.Writer
- func (m *MockSession) ExitOnErr(err error, msg string, code int)
- func (m *MockSession) ExitOnErrShort(err error, msg string, code int)
- func (m *MockSession) ExitOnErrsShort(errs []error, code int)
- func (m *MockSession) Exitf(code int, format string, a ...interface{})
- func (m *MockSession) In() io.Reader
- func (m *MockSession) OnSignal(s os.Signal, do func(os.Signal)) func()
- func (m *MockSession) Out() io.Writer
- func (m *MockSession) SetErr(arg0 io.Writer)
- func (m *MockSession) SetIn(arg0 io.Reader)
- func (m *MockSession) SetOut(arg0 io.Writer)
- type MockSessionMockRecorder
- func (mr *MockSessionMockRecorder) Err() *gomock.Call
- func (mr *MockSessionMockRecorder) ExitOnErr(err, msg, code interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) ExitOnErrShort(err, msg, code interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) ExitOnErrsShort(errs, code interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) Exitf(code, format interface{}, a ...interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) In() *gomock.Call
- func (mr *MockSessionMockRecorder) OnSignal(s, do interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) Out() *gomock.Call
- func (mr *MockSessionMockRecorder) SetErr(arg0 interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) SetIn(arg0 interface{}) *gomock.Call
- func (mr *MockSessionMockRecorder) SetOut(arg0 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerKit ¶
type HandlerKit struct { Executor *mock_exec.MockExecutor MockCtrl *gomock.Controller Session *MockSession // ExitOnErr defines the expected pattern for an ExitOnErr/ExitOnErrShort call. // // After NewHandlerKit processes all HandlerKitOption functions, it configures the related // mock if the pattern is non-nil. ExitOnErr *regexp.Regexp // stdout if non-nil will be used by the Handler for session instead of os.Stdout. Stdout io.Writer // stderr if non-nil will be used by the Handler for session instead of os.Stderr. Stderr io.Writer }
HandlerKit provides an embeddable starting point for sub-commands' own HandlerKit implementations to build on, providing setup for common mocks via NewHandlerKit.
Embedders must call Finish.
func NewHandlerKit ¶
func NewHandlerKit(mockCtrl *gomock.Controller) *HandlerKit
func (*HandlerKit) Finish ¶
func (k *HandlerKit) Finish()
Finish creates the expected calls, based on mock-related HandlerKit fields, that were not already created by other methods.
type MockSession ¶
type MockSession struct {
// contains filtered or unexported fields
}
MockSession is a mock of Session interface
func NewMockSession ¶
func NewMockSession(ctrl *gomock.Controller) *MockSession
NewMockSession creates a new mock instance
func (*MockSession) EXPECT ¶
func (m *MockSession) EXPECT() *MockSessionMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSession) ExitOnErr ¶
func (m *MockSession) ExitOnErr(err error, msg string, code int)
ExitOnErr mocks base method
func (*MockSession) ExitOnErrShort ¶
func (m *MockSession) ExitOnErrShort(err error, msg string, code int)
ExitOnErrShort mocks base method
func (*MockSession) ExitOnErrsShort ¶
func (m *MockSession) ExitOnErrsShort(errs []error, code int)
ExitOnErrsShort mocks base method
func (*MockSession) Exitf ¶
func (m *MockSession) Exitf(code int, format string, a ...interface{})
Exitf mocks base method
type MockSessionMockRecorder ¶
type MockSessionMockRecorder struct {
// contains filtered or unexported fields
}
MockSessionMockRecorder is the mock recorder for MockSession
func (*MockSessionMockRecorder) Err ¶
func (mr *MockSessionMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockSessionMockRecorder) ExitOnErr ¶
func (mr *MockSessionMockRecorder) ExitOnErr(err, msg, code interface{}) *gomock.Call
ExitOnErr indicates an expected call of ExitOnErr
func (*MockSessionMockRecorder) ExitOnErrShort ¶
func (mr *MockSessionMockRecorder) ExitOnErrShort(err, msg, code interface{}) *gomock.Call
ExitOnErrShort indicates an expected call of ExitOnErrShort
func (*MockSessionMockRecorder) ExitOnErrsShort ¶
func (mr *MockSessionMockRecorder) ExitOnErrsShort(errs, code interface{}) *gomock.Call
ExitOnErrsShort indicates an expected call of ExitOnErrsShort
func (*MockSessionMockRecorder) Exitf ¶
func (mr *MockSessionMockRecorder) Exitf(code, format interface{}, a ...interface{}) *gomock.Call
Exitf indicates an expected call of Exitf
func (*MockSessionMockRecorder) In ¶
func (mr *MockSessionMockRecorder) In() *gomock.Call
In indicates an expected call of In
func (*MockSessionMockRecorder) OnSignal ¶
func (mr *MockSessionMockRecorder) OnSignal(s, do interface{}) *gomock.Call
OnSignal indicates an expected call of OnSignal
func (*MockSessionMockRecorder) Out ¶
func (mr *MockSessionMockRecorder) Out() *gomock.Call
Out indicates an expected call of Out
func (*MockSessionMockRecorder) SetErr ¶
func (mr *MockSessionMockRecorder) SetErr(arg0 interface{}) *gomock.Call
SetErr indicates an expected call of SetErr
func (*MockSessionMockRecorder) SetIn ¶
func (mr *MockSessionMockRecorder) SetIn(arg0 interface{}) *gomock.Call
SetIn indicates an expected call of SetIn
func (*MockSessionMockRecorder) SetOut ¶
func (mr *MockSessionMockRecorder) SetOut(arg0 interface{}) *gomock.Call
SetOut indicates an expected call of SetOut