Documentation
¶
Overview ¶
Package store is a generated GoMock package.
Index ¶
- func Register(types ...any)
- type GenericInterface
- type MemStore
- func (s *MemStore) Delete(ctx context.Context, key string) error
- func (s *MemStore) Get(ctx context.Context, key string, target any) error
- func (s *MemStore) Set(ctx context.Context, key string, value any) error
- func (s *MemStore) Update(ctx context.Context, key string, fn func(func(target any) error) (any, error)) error
- type MockGenericInterface
- func (m *MockGenericInterface) Delete(ctx context.Context, key string) error
- func (m *MockGenericInterface) EXPECT() *MockGenericInterfaceMockRecorder
- func (m *MockGenericInterface) Get(ctx context.Context, key string, target any) error
- func (m *MockGenericInterface) Set(ctx context.Context, key string, value any) error
- func (m *MockGenericInterface) Update(ctx context.Context, key string, fn func(func(any) error) (any, error)) error
- type MockGenericInterfaceMockRecorder
- func (mr *MockGenericInterfaceMockRecorder) Delete(ctx, key interface{}) *gomock.Call
- func (mr *MockGenericInterfaceMockRecorder) Get(ctx, key, target interface{}) *gomock.Call
- func (mr *MockGenericInterfaceMockRecorder) Set(ctx, key, value interface{}) *gomock.Call
- func (mr *MockGenericInterfaceMockRecorder) Update(ctx, key, fn interface{}) *gomock.Call
- type RedisStore
- func (s *RedisStore) Delete(ctx context.Context, key string) error
- func (s *RedisStore) Get(ctx context.Context, key string, target any) error
- func (s *RedisStore) Set(ctx context.Context, key string, value any) error
- func (s *RedisStore) Update(ctx context.Context, key string, fn func(func(target any) error) (any, error)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GenericInterface ¶
type GenericInterface interface {
Set(ctx context.Context, key string, value any) error
Get(ctx context.Context, key string, target any) error
Update(ctx context.Context, key string, fn func(func(target any) error) (any, error)) error
Delete(ctx context.Context, key string) error
}
func NewMemStore ¶
func NewMemStore(storeName string, ttl time.Duration) GenericInterface
func NewRedisStore ¶
type MockGenericInterface ¶
type MockGenericInterface struct {
// contains filtered or unexported fields
}
MockGenericInterface is a mock of GenericInterface interface.
func NewMockGenericInterface ¶
func NewMockGenericInterface(ctrl *gomock.Controller) *MockGenericInterface
NewMockGenericInterface creates a new mock instance.
func (*MockGenericInterface) Delete ¶
func (m *MockGenericInterface) Delete(ctx context.Context, key string) error
Delete mocks base method.
func (*MockGenericInterface) EXPECT ¶
func (m *MockGenericInterface) EXPECT() *MockGenericInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockGenericInterfaceMockRecorder ¶
type MockGenericInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockGenericInterfaceMockRecorder is the mock recorder for MockGenericInterface.
func (*MockGenericInterfaceMockRecorder) Delete ¶
func (mr *MockGenericInterfaceMockRecorder) Delete(ctx, key interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockGenericInterfaceMockRecorder) Get ¶
func (mr *MockGenericInterfaceMockRecorder) Get(ctx, key, target interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockGenericInterfaceMockRecorder) Set ¶
func (mr *MockGenericInterfaceMockRecorder) Set(ctx, key, value interface{}) *gomock.Call
Set indicates an expected call of Set.
func (*MockGenericInterfaceMockRecorder) Update ¶
func (mr *MockGenericInterfaceMockRecorder) Update(ctx, key, fn interface{}) *gomock.Call
Update indicates an expected call of Update.
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.