Documentation
¶
Index ¶
- type Key
- type RedisAdapter
- func (r *RedisAdapter[K]) Close() error
- func (r *RedisAdapter[K]) Delete(ctx context.Context, key K) error
- func (r *RedisAdapter[K]) Get(ctx context.Context, key K) (string, error)
- func (r *RedisAdapter[K]) GetBool(ctx context.Context, key K) (bool, error)
- func (r *RedisAdapter[K]) GetInt64(ctx context.Context, key K) (int64, error)
- func (r *RedisAdapter[K]) GetJSON(ctx context.Context, key K, dest any) error
- func (r *RedisAdapter[K]) IncrBy(ctx context.Context, key K, val int64) error
- func (r *RedisAdapter[K]) SetJSON(ctx context.Context, key K, value any, exp time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisAdapter ¶
type RedisAdapter[K ~string] struct { // contains filtered or unexported fields }
func NewRedisAdapter ¶
func NewRedisAdapter[K ~string](client *redis.Client) *RedisAdapter[K]
func (*RedisAdapter[K]) Close ¶
func (r *RedisAdapter[K]) Close() error
func (*RedisAdapter[K]) Get ¶
func (r *RedisAdapter[K]) Get(ctx context.Context, key K) (string, error)
func (*RedisAdapter[K]) GetBool ¶
func (r *RedisAdapter[K]) GetBool(ctx context.Context, key K) (bool, error)
func (*RedisAdapter[K]) GetInt64 ¶
func (r *RedisAdapter[K]) GetInt64(ctx context.Context, key K) (int64, error)
func (*RedisAdapter[K]) GetJSON ¶
func (r *RedisAdapter[K]) GetJSON(ctx context.Context, key K, dest any) error
Click to show internal directories.
Click to hide internal directories.