Documentation ¶
Overview ¶
Package codec is a generated GoMock package.
Index ¶
- type Codec
- func (c *Codec) Clear(ctx context.Context) error
- func (c *Codec) Delete(ctx context.Context, key any) error
- func (c *Codec) Get(ctx context.Context, key any) (any, error)
- func (c *Codec) GetStats() *Stats
- func (c *Codec) GetStore() store.StoreInterface
- func (c *Codec) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (c *Codec) Invalidate(ctx context.Context, options ...store.InvalidateOption) error
- func (c *Codec) Set(ctx context.Context, key any, value any, options ...store.Option) error
- type CodecInterface
- type MockCodecInterface
- func (m *MockCodecInterface) Clear(ctx context.Context) error
- func (m *MockCodecInterface) Delete(ctx context.Context, key any) error
- func (m *MockCodecInterface) EXPECT() *MockCodecInterfaceMockRecorder
- func (m *MockCodecInterface) Get(ctx context.Context, key any) (any, error)
- func (m *MockCodecInterface) GetStats() *Stats
- func (m *MockCodecInterface) GetStore() store.StoreInterface
- func (m *MockCodecInterface) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error)
- func (m *MockCodecInterface) Invalidate(ctx context.Context, options ...store.InvalidateOption) error
- func (m *MockCodecInterface) Set(ctx context.Context, key, value any, options ...store.Option) error
- type MockCodecInterfaceMockRecorder
- func (mr *MockCodecInterfaceMockRecorder) Clear(ctx interface{}) *gomock.Call
- func (mr *MockCodecInterfaceMockRecorder) Delete(ctx, key interface{}) *gomock.Call
- func (mr *MockCodecInterfaceMockRecorder) Get(ctx, key interface{}) *gomock.Call
- func (mr *MockCodecInterfaceMockRecorder) GetStats() *gomock.Call
- func (mr *MockCodecInterfaceMockRecorder) GetStore() *gomock.Call
- func (mr *MockCodecInterfaceMockRecorder) GetWithTTL(ctx, key interface{}) *gomock.Call
- func (mr *MockCodecInterfaceMockRecorder) Invalidate(ctx interface{}, options ...interface{}) *gomock.Call
- func (mr *MockCodecInterfaceMockRecorder) Set(ctx, key, value interface{}, options ...interface{}) *gomock.Call
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
Codec represents an instance of a cache store
func (*Codec) GetStore ¶
func (c *Codec) GetStore() store.StoreInterface
GetStore returns the store associated to this codec
func (*Codec) GetWithTTL ¶
GetWithTTL allows to retrieve the value from a given key identifier and its corresponding TTL
func (*Codec) Invalidate ¶
Invalidate invalidates some cach items from given options
type CodecInterface ¶
type CodecInterface interface { Get(ctx context.Context, key any) (any, error) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error) Set(ctx context.Context, key any, value any, options ...store.Option) error Delete(ctx context.Context, key any) error Invalidate(ctx context.Context, options ...store.InvalidateOption) error Clear(ctx context.Context) error GetStore() store.StoreInterface GetStats() *Stats }
CodecInterface represents an instance of a cache codec
type MockCodecInterface ¶
type MockCodecInterface struct {
// contains filtered or unexported fields
}
MockCodecInterface is a mock of CodecInterface interface.
func NewMockCodecInterface ¶
func NewMockCodecInterface(ctrl *gomock.Controller) *MockCodecInterface
NewMockCodecInterface creates a new mock instance.
func (*MockCodecInterface) Clear ¶
func (m *MockCodecInterface) Clear(ctx context.Context) error
Clear mocks base method.
func (*MockCodecInterface) Delete ¶
func (m *MockCodecInterface) Delete(ctx context.Context, key any) error
Delete mocks base method.
func (*MockCodecInterface) EXPECT ¶
func (m *MockCodecInterface) EXPECT() *MockCodecInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCodecInterface) GetStats ¶
func (m *MockCodecInterface) GetStats() *Stats
GetStats mocks base method.
func (*MockCodecInterface) GetStore ¶
func (m *MockCodecInterface) GetStore() store.StoreInterface
GetStore mocks base method.
func (*MockCodecInterface) GetWithTTL ¶
GetWithTTL mocks base method.
func (*MockCodecInterface) Invalidate ¶
func (m *MockCodecInterface) Invalidate(ctx context.Context, options ...store.InvalidateOption) error
Invalidate mocks base method.
type MockCodecInterfaceMockRecorder ¶
type MockCodecInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockCodecInterfaceMockRecorder is the mock recorder for MockCodecInterface.
func (*MockCodecInterfaceMockRecorder) Clear ¶
func (mr *MockCodecInterfaceMockRecorder) Clear(ctx interface{}) *gomock.Call
Clear indicates an expected call of Clear.
func (*MockCodecInterfaceMockRecorder) Delete ¶
func (mr *MockCodecInterfaceMockRecorder) Delete(ctx, key interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockCodecInterfaceMockRecorder) Get ¶
func (mr *MockCodecInterfaceMockRecorder) Get(ctx, key interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockCodecInterfaceMockRecorder) GetStats ¶
func (mr *MockCodecInterfaceMockRecorder) GetStats() *gomock.Call
GetStats indicates an expected call of GetStats.
func (*MockCodecInterfaceMockRecorder) GetStore ¶
func (mr *MockCodecInterfaceMockRecorder) GetStore() *gomock.Call
GetStore indicates an expected call of GetStore.
func (*MockCodecInterfaceMockRecorder) GetWithTTL ¶
func (mr *MockCodecInterfaceMockRecorder) GetWithTTL(ctx, key interface{}) *gomock.Call
GetWithTTL indicates an expected call of GetWithTTL.
func (*MockCodecInterfaceMockRecorder) Invalidate ¶
func (mr *MockCodecInterfaceMockRecorder) Invalidate(ctx interface{}, options ...interface{}) *gomock.Call
Invalidate indicates an expected call of Invalidate.
func (*MockCodecInterfaceMockRecorder) Set ¶
func (mr *MockCodecInterfaceMockRecorder) Set(ctx, key, value interface{}, options ...interface{}) *gomock.Call
Set indicates an expected call of Set.