redisrepo

package
v0.0.0-...-ca0d999 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryStorageI

type InMemoryStorageI interface {
	Set(key, value string) error
	SetWithTTL(key, value string, seconds int) error
	Get(key string) (interface{}, error)
	Exists(key string) (interface{}, error)
	Del(key string) (interface{}, error)
	Keys(pattern string) (interface{}, error)
}

func NewRedisRepo

func NewRedisRepo(rds *redis.Pool) InMemoryStorageI

type RedisRepo

type RedisRepo struct {
	Rds *redis.Pool
}

func (*RedisRepo) Del

func (r *RedisRepo) Del(key string) (interface{}, error)

func (*RedisRepo) Exists

func (r *RedisRepo) Exists(key string) (interface{}, error)

func (*RedisRepo) Get

func (r *RedisRepo) Get(key string) (interface{}, error)

func (*RedisRepo) Keys

func (r *RedisRepo) Keys(pattern string) (interface{}, error)

func (*RedisRepo) Set

func (r *RedisRepo) Set(key, value string) error

func (*RedisRepo) SetWithTTL

func (r *RedisRepo) SetWithTTL(key, value string, seconds int) error

Jump to

Keyboard shortcuts

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