redis

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default() *redis.Client

func Nil

func Nil(err error) bool

func Redis

func Redis(ctx context.Context, config *configs.Config) error

Types

type Component added in v1.1.0

type Component struct {
	redis.Client
}

type Config

type Config struct {
	Addr     string
	Password string
	DB       int
}

type CtxRedis

type CtxRedis struct {
	*redis.Client
	// contains filtered or unexported fields
}

CtxRedis 简化操作,慢慢封装

func Ctx

func Ctx(ctx context.Context) *CtxRedis

func (*CtxRedis) Decr

func (c *CtxRedis) Decr(key string) *redis.IntCmd

func (*CtxRedis) DecrBy

func (c *CtxRedis) DecrBy(key string, decrement int64) *redis.IntCmd

func (*CtxRedis) Del

func (c *CtxRedis) Del(key string) *redis.IntCmd

func (*CtxRedis) Exists

func (c *CtxRedis) Exists(keys ...string) *redis.IntCmd

func (*CtxRedis) Expire

func (c *CtxRedis) Expire(key string, expiration time.Duration) *redis.BoolCmd

func (*CtxRedis) ExpireAt

func (c *CtxRedis) ExpireAt(key string, tm time.Time) *redis.BoolCmd

func (*CtxRedis) Get

func (c *CtxRedis) Get(key string) *redis.StringCmd

func (*CtxRedis) GetRange

func (c *CtxRedis) GetRange(key string, start, end int64) *redis.StringCmd

func (*CtxRedis) GetSet

func (c *CtxRedis) GetSet(key string, value interface{}) *redis.StringCmd

func (*CtxRedis) HDel

func (c *CtxRedis) HDel(key string, fields ...string) *redis.IntCmd

func (*CtxRedis) HExists

func (c *CtxRedis) HExists(key, field string) *redis.BoolCmd

func (*CtxRedis) HGet

func (c *CtxRedis) HGet(key, field string) *redis.StringCmd

func (*CtxRedis) HGetAll

func (c *CtxRedis) HGetAll(key string) *redis.MapStringStringCmd

func (*CtxRedis) HIncrBy

func (c *CtxRedis) HIncrBy(key, field string, incr int64) *redis.IntCmd

func (*CtxRedis) HIncrByFloat

func (c *CtxRedis) HIncrByFloat(key, field string, incr float64) *redis.FloatCmd

func (*CtxRedis) HKeys

func (c *CtxRedis) HKeys(key string) *redis.StringSliceCmd

func (*CtxRedis) HLen

func (c *CtxRedis) HLen(key string) *redis.IntCmd

func (*CtxRedis) HScan

func (c *CtxRedis) HScan(key string, cursor uint64, match string, count int64) *redis.ScanCmd

func (*CtxRedis) HSet

func (c *CtxRedis) HSet(key string, value ...interface{}) *redis.IntCmd

func (*CtxRedis) HSetNX

func (c *CtxRedis) HSetNX(key, field string, value interface{}) *redis.BoolCmd

func (*CtxRedis) HVals

func (c *CtxRedis) HVals(key string) *redis.StringSliceCmd

func (*CtxRedis) Incr

func (c *CtxRedis) Incr(key string) *redis.IntCmd

func (*CtxRedis) IncrBy

func (c *CtxRedis) IncrBy(key string, value int64) *redis.IntCmd

func (*CtxRedis) IncrByFloat

func (c *CtxRedis) IncrByFloat(key string, value float64) *redis.FloatCmd

func (*CtxRedis) LLen

func (c *CtxRedis) LLen(key string) *redis.IntCmd

func (*CtxRedis) LPop

func (c *CtxRedis) LPop(key string) *redis.StringCmd

func (*CtxRedis) LPush

func (c *CtxRedis) LPush(key string, values ...interface{}) *redis.IntCmd

func (*CtxRedis) LRange

func (c *CtxRedis) LRange(key string, start, stop int64) *redis.StringSliceCmd

func (*CtxRedis) LRem

func (c *CtxRedis) LRem(key string, count int64, value interface{}) *redis.IntCmd

func (*CtxRedis) LTrim

func (c *CtxRedis) LTrim(key string, start, stop int64) *redis.StatusCmd

func (*CtxRedis) PFAdd

func (c *CtxRedis) PFAdd(key string, els ...interface{}) *redis.IntCmd

func (*CtxRedis) PFCount

func (c *CtxRedis) PFCount(keys ...string) *redis.IntCmd

func (*CtxRedis) PFMerge

func (c *CtxRedis) PFMerge(dest string, keys ...string) *redis.StatusCmd

func (*CtxRedis) RPop

func (c *CtxRedis) RPop(key string) *redis.StringCmd

func (*CtxRedis) RPush

func (c *CtxRedis) RPush(key string, values ...interface{}) *redis.IntCmd

func (*CtxRedis) ScanType

func (c *CtxRedis) ScanType(cursor uint64, match string, count int64, keyType string) *redis.ScanCmd

func (*CtxRedis) Set

func (c *CtxRedis) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd

func (*CtxRedis) SetEx

func (c *CtxRedis) SetEx(key string, value interface{}, expiration time.Duration) *redis.StatusCmd

func (*CtxRedis) SetNX

func (c *CtxRedis) SetNX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd

func (*CtxRedis) SetRange

func (c *CtxRedis) SetRange(key string, offset int64, value string) *redis.IntCmd

func (*CtxRedis) SetXX

func (c *CtxRedis) SetXX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd

func (*CtxRedis) TTL

func (c *CtxRedis) TTL(key string) *redis.DurationCmd

func (*CtxRedis) ZAdd

func (c *CtxRedis) ZAdd(key string, members ...redis.Z) *redis.IntCmd

func (*CtxRedis) ZAddArgs

func (c *CtxRedis) ZAddArgs(key string, args redis.ZAddArgs) *redis.IntCmd

func (*CtxRedis) ZAddArgsIncr

func (c *CtxRedis) ZAddArgsIncr(key string, args redis.ZAddArgs) *redis.FloatCmd

func (*CtxRedis) ZAddNX

func (c *CtxRedis) ZAddNX(key string, members ...redis.Z) *redis.IntCmd

func (*CtxRedis) ZAddXX

func (c *CtxRedis) ZAddXX(key string, members ...redis.Z) *redis.IntCmd

func (*CtxRedis) ZRangeByLex

func (c *CtxRedis) ZRangeByLex(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*CtxRedis) ZRangeByScore

func (c *CtxRedis) ZRangeByScore(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*CtxRedis) ZRangeByScoreWithScores

func (c *CtxRedis) ZRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd

func (*CtxRedis) ZRangeWithScores

func (c *CtxRedis) ZRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd

func (*CtxRedis) ZRemRangeByLex

func (c *CtxRedis) ZRemRangeByLex(key, min, max string) *redis.IntCmd

func (*CtxRedis) ZRemRangeByRank

func (c *CtxRedis) ZRemRangeByRank(key string, start, stop int64) *redis.IntCmd

func (*CtxRedis) ZRemRangeByScore

func (c *CtxRedis) ZRemRangeByScore(key, min, max string) *redis.IntCmd

func (*CtxRedis) ZRevRangeByLex

func (c *CtxRedis) ZRevRangeByLex(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*CtxRedis) ZRevRangeByScore

func (c *CtxRedis) ZRevRangeByScore(key string, opt *redis.ZRangeBy) *redis.StringSliceCmd

func (*CtxRedis) ZRevRangeByScoreWithScores

func (c *CtxRedis) ZRevRangeByScoreWithScores(key string, opt *redis.ZRangeBy) *redis.ZSliceCmd

func (*CtxRedis) ZRevRangeWithScores

func (c *CtxRedis) ZRevRangeWithScores(key string, start, stop int64) *redis.ZSliceCmd

Jump to

Keyboard shortcuts

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