mocks

package
v2.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0, 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 CacheInterface

type CacheInterface[T any] struct {
	mock.Mock
}

CacheInterface is an autogenerated mock type for the CacheInterface type

func NewCacheInterface

func NewCacheInterface[T any](t interface {
	mock.TestingT
	Cleanup(func())
}) *CacheInterface[T]

NewCacheInterface creates a new instance of CacheInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*CacheInterface[T]) Clear

func (_mock *CacheInterface[T]) Clear(ctx context.Context) error

Clear provides a mock function for the type CacheInterface

func (*CacheInterface[T]) Delete

func (_mock *CacheInterface[T]) Delete(ctx context.Context, key any) error

Delete provides a mock function for the type CacheInterface

func (*CacheInterface[T]) EXPECT

func (_m *CacheInterface[T]) EXPECT() *CacheInterface_Expecter[T]

func (*CacheInterface[T]) Get

func (_mock *CacheInterface[T]) Get(ctx context.Context, key any) (T, error)

Get provides a mock function for the type CacheInterface

func (*CacheInterface[T]) GetType

func (_mock *CacheInterface[T]) GetType() string

GetType provides a mock function for the type CacheInterface

func (*CacheInterface[T]) Invalidate

func (_mock *CacheInterface[T]) Invalidate(ctx context.Context, options ...store.InvalidateOption) error

Invalidate provides a mock function for the type CacheInterface

func (*CacheInterface[T]) Set

func (_mock *CacheInterface[T]) Set(ctx context.Context, key any, object T, options ...store.Option) error

Set provides a mock function for the type CacheInterface

type CacheInterface_Clear_Call

type CacheInterface_Clear_Call[T any] struct {
	*mock.Call
}

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

func (*CacheInterface_Clear_Call[T]) Return

func (*CacheInterface_Clear_Call[T]) Run

func (*CacheInterface_Clear_Call[T]) RunAndReturn

func (_c *CacheInterface_Clear_Call[T]) RunAndReturn(run func(ctx context.Context) error) *CacheInterface_Clear_Call[T]

type CacheInterface_Delete_Call

type CacheInterface_Delete_Call[T any] struct {
	*mock.Call
}

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

func (*CacheInterface_Delete_Call[T]) Return

func (*CacheInterface_Delete_Call[T]) Run

func (_c *CacheInterface_Delete_Call[T]) Run(run func(ctx context.Context, key any)) *CacheInterface_Delete_Call[T]

func (*CacheInterface_Delete_Call[T]) RunAndReturn

func (_c *CacheInterface_Delete_Call[T]) RunAndReturn(run func(ctx context.Context, key any) error) *CacheInterface_Delete_Call[T]

type CacheInterface_Expecter

type CacheInterface_Expecter[T any] struct {
	// contains filtered or unexported fields
}

func (*CacheInterface_Expecter[T]) Clear

func (_e *CacheInterface_Expecter[T]) Clear(ctx interface{}) *CacheInterface_Clear_Call[T]

Clear is a helper method to define mock.On call

  • ctx context.Context

func (*CacheInterface_Expecter[T]) Delete

func (_e *CacheInterface_Expecter[T]) Delete(ctx interface{}, key interface{}) *CacheInterface_Delete_Call[T]

Delete is a helper method to define mock.On call

  • ctx context.Context
  • key any

func (*CacheInterface_Expecter[T]) Get

func (_e *CacheInterface_Expecter[T]) Get(ctx interface{}, key interface{}) *CacheInterface_Get_Call[T]

Get is a helper method to define mock.On call

  • ctx context.Context
  • key any

func (*CacheInterface_Expecter[T]) GetType

GetType is a helper method to define mock.On call

func (*CacheInterface_Expecter[T]) Invalidate

func (_e *CacheInterface_Expecter[T]) Invalidate(ctx interface{}, options ...interface{}) *CacheInterface_Invalidate_Call[T]

Invalidate is a helper method to define mock.On call

  • ctx context.Context
  • options ...store.InvalidateOption

func (*CacheInterface_Expecter[T]) Set

func (_e *CacheInterface_Expecter[T]) Set(ctx interface{}, key interface{}, object interface{}, options ...interface{}) *CacheInterface_Set_Call[T]

Set is a helper method to define mock.On call

  • ctx context.Context
  • key any
  • object T
  • options ...store.Option

type CacheInterface_GetType_Call

type CacheInterface_GetType_Call[T any] struct {
	*mock.Call
}

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

func (*CacheInterface_GetType_Call[T]) Return

func (*CacheInterface_GetType_Call[T]) Run

func (_c *CacheInterface_GetType_Call[T]) Run(run func()) *CacheInterface_GetType_Call[T]

func (*CacheInterface_GetType_Call[T]) RunAndReturn

func (_c *CacheInterface_GetType_Call[T]) RunAndReturn(run func() string) *CacheInterface_GetType_Call[T]

type CacheInterface_Get_Call

type CacheInterface_Get_Call[T any] struct {
	*mock.Call
}

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

func (*CacheInterface_Get_Call[T]) Return

func (_c *CacheInterface_Get_Call[T]) Return(v T, err error) *CacheInterface_Get_Call[T]

func (*CacheInterface_Get_Call[T]) Run

func (_c *CacheInterface_Get_Call[T]) Run(run func(ctx context.Context, key any)) *CacheInterface_Get_Call[T]

func (*CacheInterface_Get_Call[T]) RunAndReturn

func (_c *CacheInterface_Get_Call[T]) RunAndReturn(run func(ctx context.Context, key any) (T, error)) *CacheInterface_Get_Call[T]

type CacheInterface_Invalidate_Call

type CacheInterface_Invalidate_Call[T any] struct {
	*mock.Call
}

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

func (*CacheInterface_Invalidate_Call[T]) Return

func (*CacheInterface_Invalidate_Call[T]) Run

func (*CacheInterface_Invalidate_Call[T]) RunAndReturn

type CacheInterface_Set_Call

type CacheInterface_Set_Call[T any] struct {
	*mock.Call
}

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

func (*CacheInterface_Set_Call[T]) Return

func (_c *CacheInterface_Set_Call[T]) Return(err error) *CacheInterface_Set_Call[T]

func (*CacheInterface_Set_Call[T]) Run

func (_c *CacheInterface_Set_Call[T]) Run(run func(ctx context.Context, key any, object T, options ...store.Option)) *CacheInterface_Set_Call[T]

func (*CacheInterface_Set_Call[T]) RunAndReturn

func (_c *CacheInterface_Set_Call[T]) RunAndReturn(run func(ctx context.Context, key any, object T, options ...store.Option) error) *CacheInterface_Set_Call[T]

Jump to

Keyboard shortcuts

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