cache

package
v0.0.0-...-a548ab7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 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) Contains

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

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

func (*Cache) Delete

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

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

func (*Cache) Fetch

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

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

func (*Cache) Ping

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

Ping provides a mock function with given fields: ctx

func (*Cache) Save

func (_m *Cache) Save(ctx context.Context, key string, value interface{}, expiration ...time.Duration) error

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

func (*Cache) Scan

func (_m *Cache) Scan(ctx context.Context, match string) (cache.Iterator, error)

Scan provides a mock function with given fields: ctx, match

type Iterator

type Iterator struct {
	mock.Mock
}

Iterator is an autogenerated mock type for the Iterator type

func NewIterator

func NewIterator(t interface {
	mock.TestingT
	Cleanup(func())
}) *Iterator

NewIterator creates a new instance of Iterator. 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 (*Iterator) Next

func (_m *Iterator) Next(ctx context.Context) bool

Next provides a mock function with given fields: ctx

func (*Iterator) Val

func (_m *Iterator) Val() string

Val provides a mock function with given fields:

Jump to

Keyboard shortcuts

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