Documentation ¶
Overview ¶
Package redis is a generated GoMock package.
Index ¶
- type MockRedisRepository
- func (m *MockRedisRepository) Del(arg0 context.Context, arg1 string) error
- func (m *MockRedisRepository) EXPECT() *MockRedisRepositoryMockRecorder
- func (m *MockRedisRepository) Get(arg0 context.Context, arg1 string) (string, error)
- func (m *MockRedisRepository) Incr(arg0 context.Context, arg1 string) int64
- func (m *MockRedisRepository) Set(arg0 context.Context, arg1, arg2 string, arg3 time.Duration) error
- func (m *MockRedisRepository) SetNX(arg0 context.Context, arg1, arg2 string, arg3 time.Duration) (bool, error)
- type MockRedisRepositoryMockRecorder
- func (mr *MockRedisRepositoryMockRecorder) Del(arg0, arg1 any) *gomock.Call
- func (mr *MockRedisRepositoryMockRecorder) Get(arg0, arg1 any) *gomock.Call
- func (mr *MockRedisRepositoryMockRecorder) Incr(arg0, arg1 any) *gomock.Call
- func (mr *MockRedisRepositoryMockRecorder) Set(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockRedisRepositoryMockRecorder) SetNX(arg0, arg1, arg2, arg3 any) *gomock.Call
- type RedisConsumerRepository
- func (rr *RedisConsumerRepository) Del(ctx context.Context, key string) error
- func (rr *RedisConsumerRepository) Get(ctx context.Context, key string) (string, error)
- func (rr *RedisConsumerRepository) Incr(ctx context.Context, key string) int64
- func (rr *RedisConsumerRepository) Set(ctx context.Context, key, value string, ttl time.Duration) error
- func (rr *RedisConsumerRepository) SetNX(ctx context.Context, key, value string, ttl time.Duration) (bool, error)
- type RedisRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRedisRepository ¶
type MockRedisRepository struct {
// contains filtered or unexported fields
}
MockRedisRepository is a mock of RedisRepository interface.
func NewMockRedisRepository ¶
func NewMockRedisRepository(ctrl *gomock.Controller) *MockRedisRepository
NewMockRedisRepository creates a new mock instance.
func (*MockRedisRepository) Del ¶
func (m *MockRedisRepository) Del(arg0 context.Context, arg1 string) error
Del mocks base method.
func (*MockRedisRepository) EXPECT ¶
func (m *MockRedisRepository) EXPECT() *MockRedisRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRedisRepository) Incr ¶ added in v1.45.0
func (m *MockRedisRepository) Incr(arg0 context.Context, arg1 string) int64
Incr mocks base method.
type MockRedisRepositoryMockRecorder ¶
type MockRedisRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRedisRepositoryMockRecorder is the mock recorder for MockRedisRepository.
func (*MockRedisRepositoryMockRecorder) Del ¶
func (mr *MockRedisRepositoryMockRecorder) Del(arg0, arg1 any) *gomock.Call
Del indicates an expected call of Del.
func (*MockRedisRepositoryMockRecorder) Get ¶
func (mr *MockRedisRepositoryMockRecorder) Get(arg0, arg1 any) *gomock.Call
Get indicates an expected call of Get.
func (*MockRedisRepositoryMockRecorder) Incr ¶ added in v1.45.0
func (mr *MockRedisRepositoryMockRecorder) Incr(arg0, arg1 any) *gomock.Call
Incr indicates an expected call of Incr.
type RedisConsumerRepository ¶
type RedisConsumerRepository struct {
// contains filtered or unexported fields
}
RedisConsumerRepository is a Redis implementation of the Redis consumer.
func NewConsumerRedis ¶
func NewConsumerRedis(rc *mredis.RedisConnection) *RedisConsumerRepository
NewConsumerRedis returns a new instance of RedisRepository using the given Redis connection.
func (*RedisConsumerRepository) Del ¶
func (rr *RedisConsumerRepository) Del(ctx context.Context, key string) error
func (*RedisConsumerRepository) Incr ¶ added in v1.45.0
func (rr *RedisConsumerRepository) Incr(ctx context.Context, key string) int64
type RedisRepository ¶
type RedisRepository interface { Set(ctx context.Context, key, value string, ttl time.Duration) error SetNX(ctx context.Context, key, value string, ttl time.Duration) (bool, error) Get(ctx context.Context, key string) (string, error) Del(ctx context.Context, key string) error Incr(ctx context.Context, key string) int64 }
RedisRepository provides an interface for redis.