redis

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient struct {
	Redis   *redis.Client
	Context context.Context
}

func NewRedisClient

func NewRedisClient(host string, port int, password string, db int) *RedisClient

func (*RedisClient) GetBool

func (s *RedisClient) GetBool(key string) (bool, error)

func (*RedisClient) GetInt

func (s *RedisClient) GetInt(key string) (int, error)

func (*RedisClient) GetObject

func (s *RedisClient) GetObject(obj interface{}, key string) error

func (*RedisClient) GetString

func (s *RedisClient) GetString(key string) (string, error)

func (*RedisClient) SetBool

func (s *RedisClient) SetBool(key string, value bool) error

func (*RedisClient) SetBoolWithExpiration

func (s *RedisClient) SetBoolWithExpiration(key string, value bool, expiration time.Duration) error

func (*RedisClient) SetInt

func (s *RedisClient) SetInt(key string, value int) error

func (*RedisClient) SetIntWithExpiration

func (s *RedisClient) SetIntWithExpiration(key string, value int, expiration time.Duration) error

func (*RedisClient) SetObject

func (s *RedisClient) SetObject(key string, value interface{}) error

func (*RedisClient) SetObjectWithExpiration

func (s *RedisClient) SetObjectWithExpiration(key string, value interface{}, expiration time.Duration) error

func (*RedisClient) SetString

func (s *RedisClient) SetString(key string, value string) error

func (*RedisClient) SetStringWithExpiration

func (s *RedisClient) SetStringWithExpiration(key string, value string, expiration time.Duration) error

Jump to

Keyboard shortcuts

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