cache

package
v0.0.0-...-f6a879a Latest Latest
Warning

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

Go to latest
Published: Apr 29, 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 MockLocalCache

type MockLocalCache struct {
	mock.Mock
}

MockLocalCache is an autogenerated mock type for the LocalCache type

func NewMockLocalCache

func NewMockLocalCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLocalCache

NewMockLocalCache creates a new instance of MockLocalCache. 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 (*MockLocalCache) Del

func (_m *MockLocalCache) Del(key string)

Del provides a mock function with given fields: key

func (*MockLocalCache) EXPECT

func (*MockLocalCache) Get

func (_m *MockLocalCache) Get(key string) []byte

Get provides a mock function with given fields: key

func (*MockLocalCache) Set

func (_m *MockLocalCache) Set(key string, data []byte)

Set provides a mock function with given fields: key, data

type MockLocalCache_Del_Call

type MockLocalCache_Del_Call struct {
	*mock.Call
}

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

func (*MockLocalCache_Del_Call) Return

func (*MockLocalCache_Del_Call) Run

func (_c *MockLocalCache_Del_Call) Run(run func(key string)) *MockLocalCache_Del_Call

func (*MockLocalCache_Del_Call) RunAndReturn

func (_c *MockLocalCache_Del_Call) RunAndReturn(run func(string)) *MockLocalCache_Del_Call

type MockLocalCache_Expecter

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

func (*MockLocalCache_Expecter) Del

func (_e *MockLocalCache_Expecter) Del(key interface{}) *MockLocalCache_Del_Call

Del is a helper method to define mock.On call

  • key string

func (*MockLocalCache_Expecter) Get

func (_e *MockLocalCache_Expecter) Get(key interface{}) *MockLocalCache_Get_Call

Get is a helper method to define mock.On call

  • key string

func (*MockLocalCache_Expecter) Set

func (_e *MockLocalCache_Expecter) Set(key interface{}, data interface{}) *MockLocalCache_Set_Call

Set is a helper method to define mock.On call

  • key string
  • data []byte

type MockLocalCache_Get_Call

type MockLocalCache_Get_Call struct {
	*mock.Call
}

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

func (*MockLocalCache_Get_Call) Return

func (*MockLocalCache_Get_Call) Run

func (_c *MockLocalCache_Get_Call) Run(run func(key string)) *MockLocalCache_Get_Call

func (*MockLocalCache_Get_Call) RunAndReturn

func (_c *MockLocalCache_Get_Call) RunAndReturn(run func(string) []byte) *MockLocalCache_Get_Call

type MockLocalCache_Set_Call

type MockLocalCache_Set_Call struct {
	*mock.Call
}

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

func (*MockLocalCache_Set_Call) Return

func (*MockLocalCache_Set_Call) Run

func (_c *MockLocalCache_Set_Call) Run(run func(key string, data []byte)) *MockLocalCache_Set_Call

func (*MockLocalCache_Set_Call) RunAndReturn

func (_c *MockLocalCache_Set_Call) RunAndReturn(run func(string, []byte)) *MockLocalCache_Set_Call

type MockRedisCache

type MockRedisCache struct {
	mock.Mock
}

MockRedisCache is an autogenerated mock type for the RedisCache type

func NewMockRedisCache

func NewMockRedisCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRedisCache

NewMockRedisCache creates a new instance of MockRedisCache. 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 (*MockRedisCache) Del

func (_m *MockRedisCache) Del(ctx context.Context, keys []string) error

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

func (*MockRedisCache) EXPECT

func (*MockRedisCache) Expire

func (_m *MockRedisCache) Expire(ctx context.Context, key string, ttl time.Duration) (bool, error)

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

func (*MockRedisCache) Get

func (_m *MockRedisCache) Get(ctx context.Context, maxItems int, keyIter func(int) string) (func() ([]byte, bool), error)

Get provides a mock function with given fields: ctx, maxItems, keyIter

func (*MockRedisCache) Listen

func (_m *MockRedisCache) Listen(ctx context.Context, key string, ready ...func() error) (string, error)

Listen provides a mock function with given fields: ctx, key, ready

func (*MockRedisCache) LockGet

func (_m *MockRedisCache) LockGet(ctx context.Context, keySet string, value string, ttl time.Duration, keyGet string) (bool, []byte, error)

LockGet provides a mock function with given fields: ctx, keySet, value, ttl, keyGet

func (*MockRedisCache) Set

func (_m *MockRedisCache) Set(ctx context.Context, maxItems int, iter func(int) (string, []byte, time.Duration)) error

Set provides a mock function with given fields: ctx, maxItems, iter

func (*MockRedisCache) Unlock

func (_m *MockRedisCache) Unlock(ctx context.Context, key string, value string) (bool, error)

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

type MockRedisCache_Del_Call

type MockRedisCache_Del_Call struct {
	*mock.Call
}

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

func (*MockRedisCache_Del_Call) Return

func (*MockRedisCache_Del_Call) Run

func (_c *MockRedisCache_Del_Call) Run(run func(ctx context.Context, keys []string)) *MockRedisCache_Del_Call

func (*MockRedisCache_Del_Call) RunAndReturn

type MockRedisCache_Expecter

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

func (*MockRedisCache_Expecter) Del

func (_e *MockRedisCache_Expecter) Del(ctx interface{}, keys interface{}) *MockRedisCache_Del_Call

Del is a helper method to define mock.On call

  • ctx context.Context
  • keys []string

func (*MockRedisCache_Expecter) Expire

func (_e *MockRedisCache_Expecter) Expire(ctx interface{}, key interface{}, ttl interface{}) *MockRedisCache_Expire_Call

Expire is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • ttl time.Duration

func (*MockRedisCache_Expecter) Get

func (_e *MockRedisCache_Expecter) Get(ctx interface{}, maxItems interface{}, keyIter interface{}) *MockRedisCache_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • maxItems int
  • keyIter func(int) string

func (*MockRedisCache_Expecter) Listen

func (_e *MockRedisCache_Expecter) Listen(ctx interface{}, key interface{}, ready ...interface{}) *MockRedisCache_Listen_Call

Listen is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • ready ...func() error

func (*MockRedisCache_Expecter) LockGet

func (_e *MockRedisCache_Expecter) LockGet(ctx interface{}, keySet interface{}, value interface{}, ttl interface{}, keyGet interface{}) *MockRedisCache_LockGet_Call

LockGet is a helper method to define mock.On call

  • ctx context.Context
  • keySet string
  • value string
  • ttl time.Duration
  • keyGet string

func (*MockRedisCache_Expecter) Set

func (_e *MockRedisCache_Expecter) Set(ctx interface{}, maxItems interface{}, iter interface{}) *MockRedisCache_Set_Call

Set is a helper method to define mock.On call

  • ctx context.Context
  • maxItems int
  • iter func(int)(string , []byte , time.Duration)

func (*MockRedisCache_Expecter) Unlock

func (_e *MockRedisCache_Expecter) Unlock(ctx interface{}, key interface{}, value interface{}) *MockRedisCache_Unlock_Call

Unlock is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • value string

type MockRedisCache_Expire_Call

type MockRedisCache_Expire_Call struct {
	*mock.Call
}

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

func (*MockRedisCache_Expire_Call) Return

func (*MockRedisCache_Expire_Call) Run

func (*MockRedisCache_Expire_Call) RunAndReturn

type MockRedisCache_Get_Call

type MockRedisCache_Get_Call struct {
	*mock.Call
}

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

func (*MockRedisCache_Get_Call) Return

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

func (*MockRedisCache_Get_Call) Run

func (_c *MockRedisCache_Get_Call) Run(run func(ctx context.Context, maxItems int, keyIter func(int) string)) *MockRedisCache_Get_Call

func (*MockRedisCache_Get_Call) RunAndReturn

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

type MockRedisCache_Listen_Call

type MockRedisCache_Listen_Call struct {
	*mock.Call
}

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

func (*MockRedisCache_Listen_Call) Return

func (*MockRedisCache_Listen_Call) Run

func (_c *MockRedisCache_Listen_Call) Run(run func(ctx context.Context, key string, ready ...func() error)) *MockRedisCache_Listen_Call

func (*MockRedisCache_Listen_Call) RunAndReturn

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

type MockRedisCache_LockGet_Call

type MockRedisCache_LockGet_Call struct {
	*mock.Call
}

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

func (*MockRedisCache_LockGet_Call) Return

func (*MockRedisCache_LockGet_Call) Run

func (_c *MockRedisCache_LockGet_Call) Run(run func(ctx context.Context, keySet string, value string, ttl time.Duration, keyGet string)) *MockRedisCache_LockGet_Call

func (*MockRedisCache_LockGet_Call) RunAndReturn

type MockRedisCache_Set_Call

type MockRedisCache_Set_Call struct {
	*mock.Call
}

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

func (*MockRedisCache_Set_Call) Return

func (*MockRedisCache_Set_Call) Run

func (_c *MockRedisCache_Set_Call) Run(run func(ctx context.Context, maxItems int, iter func(int) (string, []byte, time.Duration))) *MockRedisCache_Set_Call

func (*MockRedisCache_Set_Call) RunAndReturn

func (_c *MockRedisCache_Set_Call) RunAndReturn(run func(context.Context, int, func(int) (string, []byte, time.Duration)) error) *MockRedisCache_Set_Call

type MockRedisCache_Unlock_Call

type MockRedisCache_Unlock_Call struct {
	*mock.Call
}

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

func (*MockRedisCache_Unlock_Call) Return

func (*MockRedisCache_Unlock_Call) Run

func (*MockRedisCache_Unlock_Call) RunAndReturn

Jump to

Keyboard shortcuts

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