Documentation ¶
Overview ¶
Package redis Date: 2022/9/23 00:51 Author: Amu Description:
Package redis Date: 2023/12/4 13:59 Author: Amu Description:
Package redis Date: 2023/12/4 14:01 Author: Amu Description:
Package redis Date: 2023/12/4 14:00 Author: Amu Description:
Package redis Date: 2023/12/4 12:12 Author: Amu Description:
Package redis Date: 2023/12/4 14:01 Author: Amu Description:
Package redis Date: 2023/12/4 14:00 Author: Amu Description:
Package redis Date: 2023/12/4 14:01 Author: Amu Description:
Index ¶
- type Client
- func (rc *Client) Append(key string, appendString string) (int64, error)
- func (rc *Client) Close()
- func (rc *Client) DBSize() (int64, error)
- func (rc *Client) Decr(key string) (int64, error)
- func (rc *Client) DecrBy(key string, step int64) (int64, error)
- func (rc *Client) Delete(keys ...string) (int64, error)
- func (rc *Client) Exists(key string) (int64, error)
- func (rc *Client) Expire(key string, expireDuration time.Duration) (bool, error)
- func (rc *Client) ExpireAt(key string, expireTime time.Time) (bool, error)
- func (rc *Client) FlushAll() (string, error)
- func (rc *Client) FlushDB() (string, error)
- func (rc *Client) Get(key string) (string, error)
- func (rc *Client) GetRange(key string, startIndex int64, endIndex int64) (string, error)
- func (rc *Client) HDel(key string, field ...string) (int64, error)
- func (rc *Client) HExists(key, field string) (bool, error)
- func (rc *Client) HGet(key, field string) (interface{}, error)
- func (rc *Client) HGetAll(key string) (map[string]string, error)
- func (rc *Client) HLen(key string) (int64, error)
- func (rc *Client) HMset(key string, values map[string]interface{}) (bool, error)
- func (rc *Client) Hset(key string, field1, value1 string, field2, value2 string) (int64, error)
- func (rc *Client) Incr(key string) (int64, error)
- func (rc *Client) IncrBy(key string, step int64) (int64, error)
- func (rc *Client) Keys() ([]string, error)
- func (rc *Client) LIndex(key string, index int64) (string, error)
- func (rc *Client) LInsert(key string, location string, target interface{}, value interface{}) (int64, error)
- func (rc *Client) LInsertAfter(key string, target interface{}, value interface{}) (int64, error)
- func (rc *Client) LInsertBefore(key string, target interface{}, value interface{}) (int64, error)
- func (rc *Client) LLen(key string) (int64, error)
- func (rc *Client) LPop(key string) (string, error)
- func (rc *Client) LPush(key string, values ...interface{}) (int64, error)
- func (rc *Client) LRange(key string, start int64, end int64) ([]string, error)
- func (rc *Client) LRem(key string, nums int64, value string) (int64, error)
- func (rc *Client) LSet(key string, index int64, value interface{}) (string, error)
- func (rc *Client) PTTL(key string) (time.Duration, error)
- func (rc *Client) RPop(key string) (string, error)
- func (rc *Client) RPush(key string, values ...interface{}) (int64, error)
- func (rc *Client) SAdd(key string, values ...interface{}) (int64, error)
- func (rc *Client) SCard(key string) (int64, error)
- func (rc *Client) SDiff(key1, key2 string) ([]string, error)
- func (rc *Client) SInter(key1, key2 string) ([]string, error)
- func (rc *Client) SIsMembers(key string, value interface{}) (bool, error)
- func (rc *Client) SMembers(key string) ([]string, error)
- func (rc *Client) SPop(key string) (string, error)
- func (rc *Client) SRem(key string, values ...interface{}) (int64, error)
- func (rc *Client) SUnion(key1, key2 string) ([]string, error)
- func (rc *Client) Set(key, value string) (string, error)
- func (rc *Client) SetEX(key, value string, duration time.Duration) (string, error)
- func (rc *Client) SetNX(key, value string, duration time.Duration) (bool, error)
- func (rc *Client) StrLen(key string) (int64, error)
- func (rc *Client) TTL(key string) (time.Duration, error)
- func (rc *Client) Type(key string) (string, error)
- func (rc *Client) ZAdd(key string, member interface{}, score float64) (int64, error)
- func (rc *Client) ZCard(key string) (int64, error)
- func (rc *Client) ZCount(key string, minScore, maxScore string) (int64, error)
- func (rc *Client) ZIncrBy(key string, member string, score float64) (float64, error)
- func (rc *Client) ZRange(key string, start int64, end int64) ([]string, error)
- func (rc *Client) ZRangeByScore(key string, minScore string, maxScore string) ([]string, error)
- func (rc *Client) ZRank(key string, value string) (int64, error)
- func (rc *Client) ZRem(key string, value string) (int64, error)
- func (rc *Client) ZRemRangeByRank(key string, startIndex, endIndex int64) (int64, error)
- func (rc *Client) ZRemRangeByScore(key string, minScore, maxScore string) (int64, error)
- func (rc *Client) ZRevRange(key string, start int64, end int64) ([]string, error)
- func (rc *Client) ZRevRangeByScore(key string, minScore string, maxScore string) ([]string, error)
- func (rc *Client) ZRevRank(key string, value string) (int64, error)
- func (rc *Client) ZScore(key string, score string) (float64, error)
- type Option
- func WithAddrs(addrs []string) Option
- func WithConnectionTimeout(connectionTimeout string) Option
- func WithDB(db int) Option
- func WithIdleTimeout(idleTimeout string) Option
- func WithMasterName(masterName string) Option
- func WithPassword(password string) Option
- func WithPoolSize(poolSize int) Option
- func WithReadTimeout(readTimeout string) Option
- func WithWriteTimeout(writeTimeout string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
redis.UniversalClient
}
func (*Client) LInsert ¶
func (rc *Client) LInsert(key string, location string, target interface{}, value interface{}) (int64, error)
LInsert 在第一个 target 的前或后插入新元素 value
func (*Client) LInsertAfter ¶
func (*Client) LInsertBefore ¶
func (*Client) SIsMembers ¶
func (*Client) ZRangeByScore ¶
func (*Client) ZRemRangeByRank ¶
func (*Client) ZRemRangeByScore ¶
func (*Client) ZRevRangeByScore ¶
type Option ¶
type Option func(*option)
func WithConnectionTimeout ¶
func WithIdleTimeout ¶
func WithMasterName ¶
func WithPassword ¶
func WithPoolSize ¶
func WithReadTimeout ¶
func WithWriteTimeout ¶
Click to show internal directories.
Click to hide internal directories.