mocks

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KvStore

type KvStore[T interface{}] struct {
	mock.Mock
}

KvStore is an autogenerated mock type for the KvStore type

func NewKvStore

func NewKvStore[T interface{}](t mockConstructorTestingTNewKvStore) *KvStore[T]

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

func (*KvStore[T]) Contains

func (_m *KvStore[T]) Contains(ctx context.Context, key interface{}) (bool, error)

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

func (*KvStore[T]) Delete

func (_m *KvStore[T]) Delete(ctx context.Context, key interface{}) error

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

func (*KvStore[T]) DeleteBatch

func (_m *KvStore[T]) DeleteBatch(ctx context.Context, keys interface{}) error

DeleteBatch provides a mock function with given fields: ctx, keys

func (*KvStore[T]) EXPECT

func (_m *KvStore[T]) EXPECT() *KvStore_Expecter[T]

func (*KvStore[T]) Get

func (_m *KvStore[T]) Get(ctx context.Context, key interface{}, value *T) (bool, error)

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

func (*KvStore[T]) GetBatch

func (_m *KvStore[T]) GetBatch(ctx context.Context, keys interface{}, values interface{}) ([]interface{}, error)

GetBatch provides a mock function with given fields: ctx, keys, values

func (*KvStore[T]) Put

func (_m *KvStore[T]) Put(ctx context.Context, key interface{}, value T) error

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

func (*KvStore[T]) PutBatch

func (_m *KvStore[T]) PutBatch(ctx context.Context, values interface{}) error

PutBatch provides a mock function with given fields: ctx, values

type KvStore_Contains_Call

type KvStore_Contains_Call[T interface{}] struct {
	*mock.Call
}

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

func (*KvStore_Contains_Call[T]) Return

func (_c *KvStore_Contains_Call[T]) Return(_a0 bool, _a1 error) *KvStore_Contains_Call[T]

func (*KvStore_Contains_Call[T]) Run

func (_c *KvStore_Contains_Call[T]) Run(run func(ctx context.Context, key interface{})) *KvStore_Contains_Call[T]

func (*KvStore_Contains_Call[T]) RunAndReturn

func (_c *KvStore_Contains_Call[T]) RunAndReturn(run func(context.Context, interface{}) (bool, error)) *KvStore_Contains_Call[T]

type KvStore_DeleteBatch_Call

type KvStore_DeleteBatch_Call[T interface{}] struct {
	*mock.Call
}

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

func (*KvStore_DeleteBatch_Call[T]) Return

func (*KvStore_DeleteBatch_Call[T]) Run

func (_c *KvStore_DeleteBatch_Call[T]) Run(run func(ctx context.Context, keys interface{})) *KvStore_DeleteBatch_Call[T]

func (*KvStore_DeleteBatch_Call[T]) RunAndReturn

func (_c *KvStore_DeleteBatch_Call[T]) RunAndReturn(run func(context.Context, interface{}) error) *KvStore_DeleteBatch_Call[T]

type KvStore_Delete_Call

type KvStore_Delete_Call[T interface{}] struct {
	*mock.Call
}

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

func (*KvStore_Delete_Call[T]) Return

func (_c *KvStore_Delete_Call[T]) Return(_a0 error) *KvStore_Delete_Call[T]

func (*KvStore_Delete_Call[T]) Run

func (_c *KvStore_Delete_Call[T]) Run(run func(ctx context.Context, key interface{})) *KvStore_Delete_Call[T]

func (*KvStore_Delete_Call[T]) RunAndReturn

func (_c *KvStore_Delete_Call[T]) RunAndReturn(run func(context.Context, interface{}) error) *KvStore_Delete_Call[T]

type KvStore_Expecter

type KvStore_Expecter[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*KvStore_Expecter[T]) Contains

func (_e *KvStore_Expecter[T]) Contains(ctx interface{}, key interface{}) *KvStore_Contains_Call[T]

Contains is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}

func (*KvStore_Expecter[T]) Delete

func (_e *KvStore_Expecter[T]) Delete(ctx interface{}, key interface{}) *KvStore_Delete_Call[T]

Delete is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}

func (*KvStore_Expecter[T]) DeleteBatch

func (_e *KvStore_Expecter[T]) DeleteBatch(ctx interface{}, keys interface{}) *KvStore_DeleteBatch_Call[T]

DeleteBatch is a helper method to define mock.On call

  • ctx context.Context
  • keys interface{}

func (*KvStore_Expecter[T]) Get

func (_e *KvStore_Expecter[T]) Get(ctx interface{}, key interface{}, value interface{}) *KvStore_Get_Call[T]

Get is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}
  • value *T

func (*KvStore_Expecter[T]) GetBatch

func (_e *KvStore_Expecter[T]) GetBatch(ctx interface{}, keys interface{}, values interface{}) *KvStore_GetBatch_Call[T]

GetBatch is a helper method to define mock.On call

  • ctx context.Context
  • keys interface{}
  • values interface{}

func (*KvStore_Expecter[T]) Put

func (_e *KvStore_Expecter[T]) Put(ctx interface{}, key interface{}, value interface{}) *KvStore_Put_Call[T]

Put is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}
  • value T

func (*KvStore_Expecter[T]) PutBatch

func (_e *KvStore_Expecter[T]) PutBatch(ctx interface{}, values interface{}) *KvStore_PutBatch_Call[T]

PutBatch is a helper method to define mock.On call

  • ctx context.Context
  • values interface{}

type KvStore_GetBatch_Call

type KvStore_GetBatch_Call[T interface{}] struct {
	*mock.Call
}

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

func (*KvStore_GetBatch_Call[T]) Return

func (_c *KvStore_GetBatch_Call[T]) Return(_a0 []interface{}, _a1 error) *KvStore_GetBatch_Call[T]

func (*KvStore_GetBatch_Call[T]) Run

func (_c *KvStore_GetBatch_Call[T]) Run(run func(ctx context.Context, keys interface{}, values interface{})) *KvStore_GetBatch_Call[T]

func (*KvStore_GetBatch_Call[T]) RunAndReturn

func (_c *KvStore_GetBatch_Call[T]) RunAndReturn(run func(context.Context, interface{}, interface{}) ([]interface{}, error)) *KvStore_GetBatch_Call[T]

type KvStore_Get_Call

type KvStore_Get_Call[T interface{}] struct {
	*mock.Call
}

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

func (*KvStore_Get_Call[T]) Return

func (_c *KvStore_Get_Call[T]) Return(_a0 bool, _a1 error) *KvStore_Get_Call[T]

func (*KvStore_Get_Call[T]) Run

func (_c *KvStore_Get_Call[T]) Run(run func(ctx context.Context, key interface{}, value *T)) *KvStore_Get_Call[T]

func (*KvStore_Get_Call[T]) RunAndReturn

func (_c *KvStore_Get_Call[T]) RunAndReturn(run func(context.Context, interface{}, *T) (bool, error)) *KvStore_Get_Call[T]

type KvStore_PutBatch_Call

type KvStore_PutBatch_Call[T interface{}] struct {
	*mock.Call
}

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

func (*KvStore_PutBatch_Call[T]) Return

func (_c *KvStore_PutBatch_Call[T]) Return(_a0 error) *KvStore_PutBatch_Call[T]

func (*KvStore_PutBatch_Call[T]) Run

func (_c *KvStore_PutBatch_Call[T]) Run(run func(ctx context.Context, values interface{})) *KvStore_PutBatch_Call[T]

func (*KvStore_PutBatch_Call[T]) RunAndReturn

func (_c *KvStore_PutBatch_Call[T]) RunAndReturn(run func(context.Context, interface{}) error) *KvStore_PutBatch_Call[T]

type KvStore_Put_Call

type KvStore_Put_Call[T interface{}] struct {
	*mock.Call
}

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

func (*KvStore_Put_Call[T]) Return

func (_c *KvStore_Put_Call[T]) Return(_a0 error) *KvStore_Put_Call[T]

func (*KvStore_Put_Call[T]) Run

func (_c *KvStore_Put_Call[T]) Run(run func(ctx context.Context, key interface{}, value T)) *KvStore_Put_Call[T]

func (*KvStore_Put_Call[T]) RunAndReturn

func (_c *KvStore_Put_Call[T]) RunAndReturn(run func(context.Context, interface{}, T) error) *KvStore_Put_Call[T]

type SizedStore

type SizedStore[T interface{}] struct {
	mock.Mock
}

SizedStore is an autogenerated mock type for the SizedStore type

func NewSizedStore

func NewSizedStore[T interface{}](t mockConstructorTestingTNewSizedStore) *SizedStore[T]

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

func (*SizedStore[T]) Contains

func (_m *SizedStore[T]) Contains(ctx context.Context, key interface{}) (bool, error)

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

func (*SizedStore[T]) Delete

func (_m *SizedStore[T]) Delete(ctx context.Context, key interface{}) error

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

func (*SizedStore[T]) DeleteBatch

func (_m *SizedStore[T]) DeleteBatch(ctx context.Context, keys interface{}) error

DeleteBatch provides a mock function with given fields: ctx, keys

func (*SizedStore[T]) EXPECT

func (_m *SizedStore[T]) EXPECT() *SizedStore_Expecter[T]

func (*SizedStore[T]) EstimateSize

func (_m *SizedStore[T]) EstimateSize() *int64

EstimateSize provides a mock function with given fields:

func (*SizedStore[T]) Get

func (_m *SizedStore[T]) Get(ctx context.Context, key interface{}, value *T) (bool, error)

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

func (*SizedStore[T]) GetBatch

func (_m *SizedStore[T]) GetBatch(ctx context.Context, keys interface{}, values interface{}) ([]interface{}, error)

GetBatch provides a mock function with given fields: ctx, keys, values

func (*SizedStore[T]) Put

func (_m *SizedStore[T]) Put(ctx context.Context, key interface{}, value T) error

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

func (*SizedStore[T]) PutBatch

func (_m *SizedStore[T]) PutBatch(ctx context.Context, values interface{}) error

PutBatch provides a mock function with given fields: ctx, values

type SizedStore_Contains_Call

type SizedStore_Contains_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_Contains_Call[T]) Return

func (_c *SizedStore_Contains_Call[T]) Return(_a0 bool, _a1 error) *SizedStore_Contains_Call[T]

func (*SizedStore_Contains_Call[T]) Run

func (_c *SizedStore_Contains_Call[T]) Run(run func(ctx context.Context, key interface{})) *SizedStore_Contains_Call[T]

func (*SizedStore_Contains_Call[T]) RunAndReturn

func (_c *SizedStore_Contains_Call[T]) RunAndReturn(run func(context.Context, interface{}) (bool, error)) *SizedStore_Contains_Call[T]

type SizedStore_DeleteBatch_Call

type SizedStore_DeleteBatch_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_DeleteBatch_Call[T]) Return

func (*SizedStore_DeleteBatch_Call[T]) Run

func (_c *SizedStore_DeleteBatch_Call[T]) Run(run func(ctx context.Context, keys interface{})) *SizedStore_DeleteBatch_Call[T]

func (*SizedStore_DeleteBatch_Call[T]) RunAndReturn

func (_c *SizedStore_DeleteBatch_Call[T]) RunAndReturn(run func(context.Context, interface{}) error) *SizedStore_DeleteBatch_Call[T]

type SizedStore_Delete_Call

type SizedStore_Delete_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_Delete_Call[T]) Return

func (_c *SizedStore_Delete_Call[T]) Return(_a0 error) *SizedStore_Delete_Call[T]

func (*SizedStore_Delete_Call[T]) Run

func (_c *SizedStore_Delete_Call[T]) Run(run func(ctx context.Context, key interface{})) *SizedStore_Delete_Call[T]

func (*SizedStore_Delete_Call[T]) RunAndReturn

func (_c *SizedStore_Delete_Call[T]) RunAndReturn(run func(context.Context, interface{}) error) *SizedStore_Delete_Call[T]

type SizedStore_EstimateSize_Call

type SizedStore_EstimateSize_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_EstimateSize_Call[T]) Return

func (*SizedStore_EstimateSize_Call[T]) Run

func (*SizedStore_EstimateSize_Call[T]) RunAndReturn

func (_c *SizedStore_EstimateSize_Call[T]) RunAndReturn(run func() *int64) *SizedStore_EstimateSize_Call[T]

type SizedStore_Expecter

type SizedStore_Expecter[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*SizedStore_Expecter[T]) Contains

func (_e *SizedStore_Expecter[T]) Contains(ctx interface{}, key interface{}) *SizedStore_Contains_Call[T]

Contains is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}

func (*SizedStore_Expecter[T]) Delete

func (_e *SizedStore_Expecter[T]) Delete(ctx interface{}, key interface{}) *SizedStore_Delete_Call[T]

Delete is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}

func (*SizedStore_Expecter[T]) DeleteBatch

func (_e *SizedStore_Expecter[T]) DeleteBatch(ctx interface{}, keys interface{}) *SizedStore_DeleteBatch_Call[T]

DeleteBatch is a helper method to define mock.On call

  • ctx context.Context
  • keys interface{}

func (*SizedStore_Expecter[T]) EstimateSize

func (_e *SizedStore_Expecter[T]) EstimateSize() *SizedStore_EstimateSize_Call[T]

EstimateSize is a helper method to define mock.On call

func (*SizedStore_Expecter[T]) Get

func (_e *SizedStore_Expecter[T]) Get(ctx interface{}, key interface{}, value interface{}) *SizedStore_Get_Call[T]

Get is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}
  • value *T

func (*SizedStore_Expecter[T]) GetBatch

func (_e *SizedStore_Expecter[T]) GetBatch(ctx interface{}, keys interface{}, values interface{}) *SizedStore_GetBatch_Call[T]

GetBatch is a helper method to define mock.On call

  • ctx context.Context
  • keys interface{}
  • values interface{}

func (*SizedStore_Expecter[T]) Put

func (_e *SizedStore_Expecter[T]) Put(ctx interface{}, key interface{}, value interface{}) *SizedStore_Put_Call[T]

Put is a helper method to define mock.On call

  • ctx context.Context
  • key interface{}
  • value T

func (*SizedStore_Expecter[T]) PutBatch

func (_e *SizedStore_Expecter[T]) PutBatch(ctx interface{}, values interface{}) *SizedStore_PutBatch_Call[T]

PutBatch is a helper method to define mock.On call

  • ctx context.Context
  • values interface{}

type SizedStore_GetBatch_Call

type SizedStore_GetBatch_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_GetBatch_Call[T]) Return

func (_c *SizedStore_GetBatch_Call[T]) Return(_a0 []interface{}, _a1 error) *SizedStore_GetBatch_Call[T]

func (*SizedStore_GetBatch_Call[T]) Run

func (_c *SizedStore_GetBatch_Call[T]) Run(run func(ctx context.Context, keys interface{}, values interface{})) *SizedStore_GetBatch_Call[T]

func (*SizedStore_GetBatch_Call[T]) RunAndReturn

func (_c *SizedStore_GetBatch_Call[T]) RunAndReturn(run func(context.Context, interface{}, interface{}) ([]interface{}, error)) *SizedStore_GetBatch_Call[T]

type SizedStore_Get_Call

type SizedStore_Get_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_Get_Call[T]) Return

func (_c *SizedStore_Get_Call[T]) Return(_a0 bool, _a1 error) *SizedStore_Get_Call[T]

func (*SizedStore_Get_Call[T]) Run

func (_c *SizedStore_Get_Call[T]) Run(run func(ctx context.Context, key interface{}, value *T)) *SizedStore_Get_Call[T]

func (*SizedStore_Get_Call[T]) RunAndReturn

func (_c *SizedStore_Get_Call[T]) RunAndReturn(run func(context.Context, interface{}, *T) (bool, error)) *SizedStore_Get_Call[T]

type SizedStore_PutBatch_Call

type SizedStore_PutBatch_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_PutBatch_Call[T]) Return

func (*SizedStore_PutBatch_Call[T]) Run

func (_c *SizedStore_PutBatch_Call[T]) Run(run func(ctx context.Context, values interface{})) *SizedStore_PutBatch_Call[T]

func (*SizedStore_PutBatch_Call[T]) RunAndReturn

func (_c *SizedStore_PutBatch_Call[T]) RunAndReturn(run func(context.Context, interface{}) error) *SizedStore_PutBatch_Call[T]

type SizedStore_Put_Call

type SizedStore_Put_Call[T interface{}] struct {
	*mock.Call
}

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

func (*SizedStore_Put_Call[T]) Return

func (_c *SizedStore_Put_Call[T]) Return(_a0 error) *SizedStore_Put_Call[T]

func (*SizedStore_Put_Call[T]) Run

func (_c *SizedStore_Put_Call[T]) Run(run func(ctx context.Context, key interface{}, value T)) *SizedStore_Put_Call[T]

func (*SizedStore_Put_Call[T]) RunAndReturn

func (_c *SizedStore_Put_Call[T]) RunAndReturn(run func(context.Context, interface{}, T) error) *SizedStore_Put_Call[T]

Jump to

Keyboard shortcuts

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