context

package
v1.7.1-0...-23dd39d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 4 Imported by: 0

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

type Context interface {
	context.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) Do

func (m *MockCancelFunc) Do()

Do mocks base method.

func (*MockCancelFunc) EXPECT

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

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) Done

func (m *MockContext) Done() <-chan struct{}

Done mocks base method.

func (*MockContext) EXPECT

func (m *MockContext) EXPECT() *MockContextMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockContext) Err

func (m *MockContext) Err() error

Err mocks base method.

func (*MockContext) Value

func (m *MockContext) Value(arg0 interface{}) interface{}

Value mocks base method.

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.

func (*MockContextMockRecorder) Value

func (mr *MockContextMockRecorder) Value(arg0 interface{}) *gomock.Call

Value indicates an expected call of Value.

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

Do mocks base method.

func (*MockWithTimeout) EXPECT

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.

func (*MockWithTimeoutMockRecorder) Do

func (mr *MockWithTimeoutMockRecorder) Do(arg0, arg1 interface{}) *gomock.Call

Do indicates an expected call of Do.

type WithTimeout

type WithTimeout interface {
	Do(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
}

WithTimeout is an interface that allows mocking `WithTimeout`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL