cache

package
v0.0.0-...-7907c65 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	mock.Mock
}

Cache is an autogenerated mock type for the Cache type

func NewCache

func NewCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *Cache

NewCache creates a new instance of Cache. 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 (*Cache) Connect

func (_m *Cache) Connect(ctx context.Context) error

Connect provides a mock function with given fields: ctx

func (*Cache) Del

func (_m *Cache) Del(ctx context.Context, key string) error

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

func (*Cache) Disconnect

func (_m *Cache) Disconnect(ctx context.Context) error

Disconnect provides a mock function with given fields: ctx

func (*Cache) EXPECT

func (_m *Cache) EXPECT() *Cache_Expecter

func (*Cache) Exist

func (_m *Cache) Exist(ctx context.Context, key string) bool

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

func (*Cache) Expire

func (_m *Cache) Expire(ctx context.Context, key string, at time.Time) error

Expire provides a mock function with given fields: ctx, key, at

func (*Cache) Get

func (_m *Cache) Get(ctx context.Context, key string, entry interface{}) error

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

func (*Cache) Liveness

func (_m *Cache) Liveness() error

Liveness provides a mock function with given fields:

func (*Cache) Readiness

func (_m *Cache) Readiness() error

Readiness provides a mock function with given fields:

func (*Cache) Set

func (_m *Cache) Set(ctx context.Context, key string, entry interface{}, ttl time.Duration) error

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

type Cache_Connect_Call

type Cache_Connect_Call struct {
	*mock.Call
}

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

func (*Cache_Connect_Call) Return

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

func (*Cache_Connect_Call) Run

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

func (*Cache_Connect_Call) RunAndReturn

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

type Cache_Del_Call

type Cache_Del_Call struct {
	*mock.Call
}

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

func (*Cache_Del_Call) Return

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

func (*Cache_Del_Call) Run

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

func (*Cache_Del_Call) RunAndReturn

func (_c *Cache_Del_Call) RunAndReturn(run func(context.Context, string) error) *Cache_Del_Call

type Cache_Disconnect_Call

type Cache_Disconnect_Call struct {
	*mock.Call
}

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

func (*Cache_Disconnect_Call) Return

func (*Cache_Disconnect_Call) Run

func (*Cache_Disconnect_Call) RunAndReturn

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

type Cache_Exist_Call

type Cache_Exist_Call struct {
	*mock.Call
}

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

func (*Cache_Exist_Call) Return

func (_c *Cache_Exist_Call) Return(_a0 bool) *Cache_Exist_Call

func (*Cache_Exist_Call) Run

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

func (*Cache_Exist_Call) RunAndReturn

func (_c *Cache_Exist_Call) RunAndReturn(run func(context.Context, string) bool) *Cache_Exist_Call

type Cache_Expecter

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

func (*Cache_Expecter) Connect

func (_e *Cache_Expecter) Connect(ctx interface{}) *Cache_Connect_Call

Connect is a helper method to define mock.On call

  • ctx context.Context

func (*Cache_Expecter) Del

func (_e *Cache_Expecter) Del(ctx interface{}, key interface{}) *Cache_Del_Call

Del is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*Cache_Expecter) Disconnect

func (_e *Cache_Expecter) Disconnect(ctx interface{}) *Cache_Disconnect_Call

Disconnect is a helper method to define mock.On call

  • ctx context.Context

func (*Cache_Expecter) Exist

func (_e *Cache_Expecter) Exist(ctx interface{}, key interface{}) *Cache_Exist_Call

Exist is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*Cache_Expecter) Expire

func (_e *Cache_Expecter) Expire(ctx interface{}, key interface{}, at interface{}) *Cache_Expire_Call

Expire is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • at time.Time

func (*Cache_Expecter) Get

func (_e *Cache_Expecter) Get(ctx interface{}, key interface{}, entry interface{}) *Cache_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • entry interface{}

func (*Cache_Expecter) Liveness

func (_e *Cache_Expecter) Liveness() *Cache_Liveness_Call

Liveness is a helper method to define mock.On call

func (*Cache_Expecter) Readiness

func (_e *Cache_Expecter) Readiness() *Cache_Readiness_Call

Readiness is a helper method to define mock.On call

func (*Cache_Expecter) Set

func (_e *Cache_Expecter) Set(ctx interface{}, key interface{}, entry interface{}, ttl interface{}) *Cache_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • entry interface{}
  • ttl time.Duration

type Cache_Expire_Call

type Cache_Expire_Call struct {
	*mock.Call
}

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

func (*Cache_Expire_Call) Return

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

func (*Cache_Expire_Call) Run

func (_c *Cache_Expire_Call) Run(run func(ctx context.Context, key string, at time.Time)) *Cache_Expire_Call

func (*Cache_Expire_Call) RunAndReturn

func (_c *Cache_Expire_Call) RunAndReturn(run func(context.Context, string, time.Time) error) *Cache_Expire_Call

type Cache_Get_Call

type Cache_Get_Call struct {
	*mock.Call
}

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

func (*Cache_Get_Call) Return

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

func (*Cache_Get_Call) Run

func (_c *Cache_Get_Call) Run(run func(ctx context.Context, key string, entry interface{})) *Cache_Get_Call

func (*Cache_Get_Call) RunAndReturn

func (_c *Cache_Get_Call) RunAndReturn(run func(context.Context, string, interface{}) error) *Cache_Get_Call

type Cache_Liveness_Call

type Cache_Liveness_Call struct {
	*mock.Call
}

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

func (*Cache_Liveness_Call) Return

func (*Cache_Liveness_Call) Run

func (_c *Cache_Liveness_Call) Run(run func()) *Cache_Liveness_Call

func (*Cache_Liveness_Call) RunAndReturn

func (_c *Cache_Liveness_Call) RunAndReturn(run func() error) *Cache_Liveness_Call

type Cache_Readiness_Call

type Cache_Readiness_Call struct {
	*mock.Call
}

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

func (*Cache_Readiness_Call) Return

func (*Cache_Readiness_Call) Run

func (_c *Cache_Readiness_Call) Run(run func()) *Cache_Readiness_Call

func (*Cache_Readiness_Call) RunAndReturn

func (_c *Cache_Readiness_Call) RunAndReturn(run func() error) *Cache_Readiness_Call

type Cache_Set_Call

type Cache_Set_Call struct {
	*mock.Call
}

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

func (*Cache_Set_Call) Return

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

func (*Cache_Set_Call) Run

func (_c *Cache_Set_Call) Run(run func(ctx context.Context, key string, entry interface{}, ttl time.Duration)) *Cache_Set_Call

func (*Cache_Set_Call) RunAndReturn

func (_c *Cache_Set_Call) RunAndReturn(run func(context.Context, string, interface{}, time.Duration) error) *Cache_Set_Call

Jump to

Keyboard shortcuts

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