redis

package
v0.0.0-...-6302c98 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRedisPool

func GetRedisPool(name string) *redisPool

func InitRedisPool

func InitRedisPool(redisConfigs map[string]config.RedisConfig)

InitRedisPool 初始化redis

Types

type RedisProxy

type RedisProxy struct {
	// contains filtered or unexported fields
}

func GetProxy

func GetProxy() *RedisProxy

GetProxy get default redis oper proxy

func GetProxyByName

func GetProxyByName(name string) *RedisProxy

GetProxyByName get redis oper proxy

func (*RedisProxy) BitCount

func (rp *RedisProxy) BitCount(ctx context.Context, key string) (int, errors.AppError)

func (*RedisProxy) BitFieldGetU

func (rp *RedisProxy) BitFieldGetU(ctx context.Context, key string, num int, start int) (int64, errors.AppError)

func (*RedisProxy) Decrby

func (rp *RedisProxy) Decrby(ctx context.Context, key string, v int64) (int64, errors.AppError)

func (*RedisProxy) Del

func (rp *RedisProxy) Del(ctx context.Context, keys ...string) (int, errors.AppError)

func (*RedisProxy) Exist

func (rp *RedisProxy) Exist(ctx context.Context, key string) (bool, errors.AppError)

func (*RedisProxy) Expire

func (rp *RedisProxy) Expire(ctx context.Context, key string, expire int) (bool, errors.AppError)

func (*RedisProxy) Get

func (rp *RedisProxy) Get(ctx context.Context, key string) (string, errors.AppError)

func (*RedisProxy) GetBit

func (rp *RedisProxy) GetBit(ctx context.Context, key string, offset int) (int, errors.AppError)

func (*RedisProxy) HDel

func (rp *RedisProxy) HDel(ctx context.Context, key string, fields ...interface{}) (int64, errors.AppError)

func (*RedisProxy) HExists

func (rp *RedisProxy) HExists(ctx context.Context, key, field string) (bool, errors.AppError)

func (*RedisProxy) HGet

func (rp *RedisProxy) HGet(ctx context.Context, key, field string) (string, errors.AppError)

func (*RedisProxy) HMGet

func (rp *RedisProxy) HMGet(ctx context.Context, key string, fields ...interface{}) (map[string]string, errors.AppError)

func (*RedisProxy) HMSet

func (rp *RedisProxy) HMSet(ctx context.Context, key string, fieldValue map[string]string) errors.AppError

func (*RedisProxy) HSet

func (rp *RedisProxy) HSet(ctx context.Context, key, field, value string) errors.AppError

func (*RedisProxy) Incrby

func (rp *RedisProxy) Incrby(ctx context.Context, key string, v int64) (int64, errors.AppError)

func (RedisProxy) IsEmpty

func (rp RedisProxy) IsEmpty() bool

func (*RedisProxy) MGet

func (rp *RedisProxy) MGet(ctx context.Context, keys ...string) ([]string, errors.AppError)

func (*RedisProxy) MSet

func (rp *RedisProxy) MSet(ctx context.Context, fieldValue map[string]string) errors.AppError

func (*RedisProxy) Pool

func (rp *RedisProxy) Pool() *redisPool

func (*RedisProxy) ReleaseDistributedLock

func (rp *RedisProxy) ReleaseDistributedLock(ctx context.Context, key string, v string) (bool, errors.AppError)

func (*RedisProxy) Scan

func (rp *RedisProxy) Scan(ctx context.Context, index int64, match string, count int) (int64, []string, errors.AppError)

func (*RedisProxy) Set

func (rp *RedisProxy) Set(ctx context.Context, key string, value string) errors.AppError

func (*RedisProxy) SetBit

func (rp *RedisProxy) SetBit(ctx context.Context, key string, offset int, value int, ex int) errors.AppError

func (*RedisProxy) SetEx

func (rp *RedisProxy) SetEx(ctx context.Context, key string, value string, ex int) errors.AppError

func (*RedisProxy) TryGetDistributedLock

func (rp *RedisProxy) TryGetDistributedLock(ctx context.Context, key string, v string, timeOut int) (bool, errors.AppError)

func (*RedisProxy) ZAdd

func (rp *RedisProxy) ZAdd(ctx context.Context, key string, score float64, value string) errors.AppError

Jump to

Keyboard shortcuts

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