mocks

package
v0.14.2-alpha Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheMock

type CacheMock struct {
	mock.Mock
}

CacheMock is an autogenerated mock type for the Cache type

func NewCacheMock

func NewCacheMock(t mockConstructorTestingTNewCacheMock) *CacheMock

NewCacheMock creates a new instance of CacheMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*CacheMock) EXPECT

func (_m *CacheMock) EXPECT() *CacheMock_Expecter

func (*CacheMock) Get

func (_m *CacheMock) Get(ctx context.Context, key string) ([]byte, error)

Get provides a mock function with given fields: ctx, key

func (*CacheMock) Set

func (_m *CacheMock) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error

Set provides a mock function with given fields: ctx, key, value, ttl

func (*CacheMock) Start

func (_m *CacheMock) Start(ctx context.Context) error

Start provides a mock function with given fields: ctx

func (*CacheMock) Stop

func (_m *CacheMock) Stop(ctx context.Context) error

Stop provides a mock function with given fields: ctx

type CacheMock_Expecter

type CacheMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*CacheMock_Expecter) Get

func (_e *CacheMock_Expecter) Get(ctx interface{}, key interface{}) *CacheMock_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*CacheMock_Expecter) Set

func (_e *CacheMock_Expecter) Set(ctx interface{}, key interface{}, value interface{}, ttl interface{}) *CacheMock_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value []byte
  • ttl time.Duration

func (*CacheMock_Expecter) Start

func (_e *CacheMock_Expecter) Start(ctx interface{}) *CacheMock_Start_Call

Start is a helper method to define mock.On call

  • ctx context.Context

func (*CacheMock_Expecter) Stop

func (_e *CacheMock_Expecter) Stop(ctx interface{}) *CacheMock_Stop_Call

Stop is a helper method to define mock.On call

  • ctx context.Context

type CacheMock_Get_Call

type CacheMock_Get_Call struct {
	*mock.Call
}

CacheMock_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*CacheMock_Get_Call) Return

func (_c *CacheMock_Get_Call) Return(_a0 []byte, _a1 error) *CacheMock_Get_Call

func (*CacheMock_Get_Call) Run

func (_c *CacheMock_Get_Call) Run(run func(ctx context.Context, key string)) *CacheMock_Get_Call

func (*CacheMock_Get_Call) RunAndReturn

func (_c *CacheMock_Get_Call) RunAndReturn(run func(context.Context, string) ([]byte, error)) *CacheMock_Get_Call

type CacheMock_Set_Call

type CacheMock_Set_Call struct {
	*mock.Call
}

CacheMock_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'

func (*CacheMock_Set_Call) Return

func (_c *CacheMock_Set_Call) Return(_a0 error) *CacheMock_Set_Call

func (*CacheMock_Set_Call) Run

func (_c *CacheMock_Set_Call) Run(run func(ctx context.Context, key string, value []byte, ttl time.Duration)) *CacheMock_Set_Call

func (*CacheMock_Set_Call) RunAndReturn

type CacheMock_Start_Call

type CacheMock_Start_Call struct {
	*mock.Call
}

CacheMock_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'

func (*CacheMock_Start_Call) Return

func (*CacheMock_Start_Call) Run

func (_c *CacheMock_Start_Call) Run(run func(ctx context.Context)) *CacheMock_Start_Call

func (*CacheMock_Start_Call) RunAndReturn

func (_c *CacheMock_Start_Call) RunAndReturn(run func(context.Context) error) *CacheMock_Start_Call

type CacheMock_Stop_Call

type CacheMock_Stop_Call struct {
	*mock.Call
}

CacheMock_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'

func (*CacheMock_Stop_Call) Return

func (*CacheMock_Stop_Call) Run

func (_c *CacheMock_Stop_Call) Run(run func(ctx context.Context)) *CacheMock_Stop_Call

func (*CacheMock_Stop_Call) RunAndReturn

func (_c *CacheMock_Stop_Call) RunAndReturn(run func(context.Context) error) *CacheMock_Stop_Call

Jump to

Keyboard shortcuts

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