Documentation
¶
Overview ¶
Package cache is a generated GoMock package.
Index ¶
- type Cache
- type MockCache
- func (m *MockCache) Clear() error
- func (m *MockCache) Delete(ctx context.Context, key string) error
- func (m *MockCache) DeleteByPattern(ctx context.Context, pattern string) error
- func (m *MockCache) EXPECT() *MockCacheMockRecorder
- func (m *MockCache) Get(ctx context.Context, key string) (interface{}, error)
- func (m *MockCache) Set(ctx context.Context, key string, value []byte, duration time.Duration) error
- type MockCacheMockRecorder
- func (mr *MockCacheMockRecorder) Clear() *gomock.Call
- func (mr *MockCacheMockRecorder) Delete(ctx, key interface{}) *gomock.Call
- func (mr *MockCacheMockRecorder) DeleteByPattern(ctx, pattern interface{}) *gomock.Call
- func (mr *MockCacheMockRecorder) Get(ctx, key interface{}) *gomock.Call
- func (mr *MockCacheMockRecorder) Set(ctx, key, value, duration interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Set(ctx context.Context, key string, value []byte, duration time.Duration) error
Get(ctx context.Context, key string) (interface{}, error)
Delete(ctx context.Context, key string) error
DeleteByPattern(ctx context.Context, pattern string) error
Clear() error
}
func NewMemoryCache ¶
func NewMemoryCache() Cache
type MockCache ¶
type MockCache struct {
// contains filtered or unexported fields
}
MockCache is a mock of Cache interface.
func NewMockCache ¶
func NewMockCache(ctrl *gomock.Controller) *MockCache
NewMockCache creates a new mock instance.
func (*MockCache) DeleteByPattern ¶
DeleteByPattern mocks base method.
func (*MockCache) EXPECT ¶
func (m *MockCache) EXPECT() *MockCacheMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockCacheMockRecorder ¶
type MockCacheMockRecorder struct {
// contains filtered or unexported fields
}
MockCacheMockRecorder is the mock recorder for MockCache.
func (*MockCacheMockRecorder) Clear ¶
func (mr *MockCacheMockRecorder) Clear() *gomock.Call
Clear indicates an expected call of Clear.
func (*MockCacheMockRecorder) Delete ¶
func (mr *MockCacheMockRecorder) Delete(ctx, key interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockCacheMockRecorder) DeleteByPattern ¶
func (mr *MockCacheMockRecorder) DeleteByPattern(ctx, pattern interface{}) *gomock.Call
DeleteByPattern indicates an expected call of DeleteByPattern.
func (*MockCacheMockRecorder) Get ¶
func (mr *MockCacheMockRecorder) Get(ctx, key interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockCacheMockRecorder) Set ¶
func (mr *MockCacheMockRecorder) Set(ctx, key, value, duration interface{}) *gomock.Call
Set indicates an expected call of Set.
Click to show internal directories.
Click to hide internal directories.