Documentation ¶
Overview ¶
Package context is a generated GoMock package.
Package context is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelFunc ¶
type CancelFunc interface {
Do()
}
CancelFunc is an interface that allows mocking `CancelFunc`.
type Context ¶
Context allows mocking context.Context. The interface is necessary due to an issue with golang/mock not being able to generate code for go's core context package.
type MockCancelFunc ¶
type MockCancelFunc struct {
// contains filtered or unexported fields
}
MockCancelFunc is a mock of CancelFunc interface.
func NewMockCancelFunc ¶
func NewMockCancelFunc(ctrl *gomock.Controller) *MockCancelFunc
NewMockCancelFunc creates a new mock instance.
func (*MockCancelFunc) EXPECT ¶
func (m *MockCancelFunc) EXPECT() *MockCancelFuncMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockCancelFuncMockRecorder ¶
type MockCancelFuncMockRecorder struct {
// contains filtered or unexported fields
}
MockCancelFuncMockRecorder is the mock recorder for MockCancelFunc.
func (*MockCancelFuncMockRecorder) Do ¶
func (mr *MockCancelFuncMockRecorder) Do() *gomock.Call
Do indicates an expected call of Do.
type MockContext ¶
type MockContext struct {
// contains filtered or unexported fields
}
MockContext is a mock of Context interface.
func NewMockContext ¶
func NewMockContext(ctrl *gomock.Controller) *MockContext
NewMockContext creates a new mock instance.
func (*MockContext) Deadline ¶
func (m *MockContext) Deadline() (time.Time, bool)
Deadline mocks base method.
func (*MockContext) EXPECT ¶
func (m *MockContext) EXPECT() *MockContextMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockContextMockRecorder ¶
type MockContextMockRecorder struct {
// contains filtered or unexported fields
}
MockContextMockRecorder is the mock recorder for MockContext.
func (*MockContextMockRecorder) Deadline ¶
func (mr *MockContextMockRecorder) Deadline() *gomock.Call
Deadline indicates an expected call of Deadline.
func (*MockContextMockRecorder) Done ¶
func (mr *MockContextMockRecorder) Done() *gomock.Call
Done indicates an expected call of Done.
func (*MockContextMockRecorder) Err ¶
func (mr *MockContextMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err.
type MockWithTimeout ¶
type MockWithTimeout struct {
// contains filtered or unexported fields
}
MockWithTimeout is a mock of WithTimeout interface.
func NewMockWithTimeout ¶
func NewMockWithTimeout(ctrl *gomock.Controller) *MockWithTimeout
NewMockWithTimeout creates a new mock instance.
func (*MockWithTimeout) Do ¶
func (m *MockWithTimeout) Do(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
Do mocks base method.
func (*MockWithTimeout) EXPECT ¶
func (m *MockWithTimeout) EXPECT() *MockWithTimeoutMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockWithTimeoutMockRecorder ¶
type MockWithTimeoutMockRecorder struct {
// contains filtered or unexported fields
}
MockWithTimeoutMockRecorder is the mock recorder for MockWithTimeout.
type WithTimeout ¶
type WithTimeout interface {
Do(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
}
WithTimeout is an interface that allows mocking `WithTimeout`.