Documentation ¶
Overview ¶
Package bigcache is a generated GoMock package.
Index ¶
- Constants
- type BigcacheClientInterface
- type BigcacheStore
- func (s *BigcacheStore) Clear(_ context.Context) error
- func (s *BigcacheStore) Delete(_ context.Context, key any) error
- func (s *BigcacheStore) Get(_ context.Context, key any) (any, error)
- func (s *BigcacheStore) GetType() string
- func (s *BigcacheStore) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (s *BigcacheStore) Invalidate(ctx context.Context, options ...store.InvalidateOption) error
- func (s *BigcacheStore) Set(ctx context.Context, key any, value any, options ...store.Option) error
- type MockBigcacheClientInterface
- func (m *MockBigcacheClientInterface) Delete(key string) error
- func (m *MockBigcacheClientInterface) EXPECT() *MockBigcacheClientInterfaceMockRecorder
- func (m *MockBigcacheClientInterface) Get(key string) ([]byte, error)
- func (m *MockBigcacheClientInterface) Reset() error
- func (m *MockBigcacheClientInterface) Set(key string, entry []byte) error
- type MockBigcacheClientInterfaceMockRecorder
- func (mr *MockBigcacheClientInterfaceMockRecorder) Delete(key interface{}) *gomock.Call
- func (mr *MockBigcacheClientInterfaceMockRecorder) Get(key interface{}) *gomock.Call
- func (mr *MockBigcacheClientInterfaceMockRecorder) Reset() *gomock.Call
- func (mr *MockBigcacheClientInterfaceMockRecorder) Set(key, entry interface{}) *gomock.Call
Constants ¶
const ( // BigcacheType represents the storage type as a string value BigcacheType = "bigcache" // BigcacheTagPattern represents the tag pattern to be used as a key in specified storage BigcacheTagPattern = "gocache_tag_%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigcacheClientInterface ¶
type BigcacheClientInterface interface { Get(key string) ([]byte, error) Set(key string, entry []byte) error Delete(key string) error Reset() error }
BigcacheClientInterface represents a allegro/bigcache client
type BigcacheStore ¶
type BigcacheStore struct {
// contains filtered or unexported fields
}
BigcacheStore is a store for Bigcache
func NewBigcache ¶
func NewBigcache(client BigcacheClientInterface, options ...store.Option) *BigcacheStore
NewBigcache creates a new store to Bigcache instance(s)
func (*BigcacheStore) Clear ¶
func (s *BigcacheStore) Clear(_ context.Context) error
Clear resets all data in the store
func (*BigcacheStore) Delete ¶
func (s *BigcacheStore) Delete(_ context.Context, key any) error
Delete removes data from Bigcache for given key identifier
func (*BigcacheStore) GetType ¶
func (s *BigcacheStore) GetType() string
GetType returns the store type
func (*BigcacheStore) GetWithTTL ¶
Not implemented for BigcacheStore
func (*BigcacheStore) Invalidate ¶
func (s *BigcacheStore) Invalidate(ctx context.Context, options ...store.InvalidateOption) error
Invalidate invalidates some cache data in Bigcache for given options
type MockBigcacheClientInterface ¶
type MockBigcacheClientInterface struct {
// contains filtered or unexported fields
}
MockBigcacheClientInterface is a mock of BigcacheClientInterface interface.
func NewMockBigcacheClientInterface ¶
func NewMockBigcacheClientInterface(ctrl *gomock.Controller) *MockBigcacheClientInterface
NewMockBigcacheClientInterface creates a new mock instance.
func (*MockBigcacheClientInterface) Delete ¶
func (m *MockBigcacheClientInterface) Delete(key string) error
Delete mocks base method.
func (*MockBigcacheClientInterface) EXPECT ¶
func (m *MockBigcacheClientInterface) EXPECT() *MockBigcacheClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBigcacheClientInterface) Get ¶
func (m *MockBigcacheClientInterface) Get(key string) ([]byte, error)
Get mocks base method.
func (*MockBigcacheClientInterface) Reset ¶
func (m *MockBigcacheClientInterface) Reset() error
Reset mocks base method.
type MockBigcacheClientInterfaceMockRecorder ¶
type MockBigcacheClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockBigcacheClientInterfaceMockRecorder is the mock recorder for MockBigcacheClientInterface.
func (*MockBigcacheClientInterfaceMockRecorder) Delete ¶
func (mr *MockBigcacheClientInterfaceMockRecorder) Delete(key interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockBigcacheClientInterfaceMockRecorder) Get ¶
func (mr *MockBigcacheClientInterfaceMockRecorder) Get(key interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockBigcacheClientInterfaceMockRecorder) Reset ¶
func (mr *MockBigcacheClientInterfaceMockRecorder) Reset() *gomock.Call
Reset indicates an expected call of Reset.
func (*MockBigcacheClientInterfaceMockRecorder) Set ¶
func (mr *MockBigcacheClientInterfaceMockRecorder) Set(key, entry interface{}) *gomock.Call
Set indicates an expected call of Set.