redisadapter

package module
v0.0.0-...-b11d239 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key string

func (Key) Add

func (k Key) Add(key string) Key

func (Key) FormatAndAdd

func (k Key) FormatAndAdd(a ...any) Key

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]) Delete

func (r *RedisAdapter[K]) Delete(ctx context.Context, key K) 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

func (*RedisAdapter[K]) IncrBy

func (r *RedisAdapter[K]) IncrBy(ctx context.Context, key K, val int64) error

func (*RedisAdapter[K]) SetJSON

func (r *RedisAdapter[K]) SetJSON(ctx context.Context, key K, value any, exp time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL