package
1.1.0
Repository: https://github.com/adam-qiang/beego-tool.git
Documentation: pkg.go.dev

# Functions

BLPop LPop的阻塞式弹出(从左侧).
BRPop RPop的阻塞式弹出(从右侧).
BRPopLPush RPopLPush的阻塞版本,当列表source为空时将阻塞连接,直到等待超时或有另一个客户端对source执行LPUSH或RPUSH命令为止 @param source string @param destination string @param timeout int64.
Decr 将key中储存的数字值减一 @param key string @return int64 @return bool.
DecrBy 将key中储存的数字值减少increment @param key string @param increment int64 @return int64 @return bool.
Del 删除一个指定key @param key string @return bool.
Dump 序列化给定key,并返回被序列化的值,使用Restore命令可以将这个值反序列化为Redis键 @param key string @return bool.
Exists 判断一个指定key是否存在 @param key string @return bool.
Expire 设置一个指定key的过期时间 @param key string @param expiration int64 @return bool.
ExpireAt 与Expire类似,都用于为key设置生存时间。但ExpireAt接受的时间参数是 UNIX 时间戳(unix timestamp) @param key string @param timestamp time.Time @return bool.
Get 获取一个指定key @param key string @return string.
HDel 删除一个hash类型key的field @param key string @param fields []string @return bool.
HExists 判断一个hash类型key的field是否存在 @param key string @param field string @return bool.
HGet 获取一个hash类型key的field的值 @param key string @param field string @return string.
HGetAll 获取一个hash类型key的所有field和value @param key string @return map[string]string.
HIncrBy 增加一个hash类型key的field的值 @param key string @param field string @param incr int64 @return int64 @return bool.
HKeys 获取一个hash类型key的所有field @param key string @return []string.
HLen 获取一个hash类型key的field数量 @param key int64.
HMGetMap HMGet以map数据类型获取一个hash类型key的多个field的值 @param key string @param fields []string @return map[string]interface{}.
HMSet 设置一个hash类型key的多个field和value @param key string @param fieldValues map[string]string @return bool.
HSet 设置一个hash类型key的field的值 @param key string @param field string @param value string @return bool.
Incr 将key中储存的数字值增一 @param key string @return int64 @return bool.
IncrBy 将key中储存的数字值增加increment @param key string @param increment int64 @return int64 @return bool.
IsExistTable 判断表是否存在 @param tableName string @param databaseName string @return bool.
Keys 查找所有符合给定模式 pattern 的 key * 匹配数据库中所有 key 。 h?llo 匹配hello,hallo和hxllo等。 h*llo 匹配 hllo和heeeeello等。 h[ae]llo 匹配hello和hallo,但不匹配 hillo @param pattern string @param []]string.
LIndex 通过索引获取列表中的元素 @param key string @param index int64 @return string.
LInsert 在列表的元素前或后插入元素 @param key string @param where string before|after @param pivot string @param value string @return int64 @return bool.
LLen 获取列表长度 @param key string @return int64.
LPop 从左侧移出并获取列表的第一个元素 @param key string @return string.
LPush 向列表左侧添加元素 @param key string @param value string @return int64 @return bool.
LPushX 向列表左侧添加元素,仅当列表中不存在该元素时,才插入 @param key string @param value string @return int64 @return bool.
LRange 获取列表指定范围内的元素 @param key string @param start int64 @param stop int64 @return []string.
LRem 根据参数count的值移除列表中与参数value相等的元素。count 的值可以是以下几种: 1、count > 0: 从表头开始向表尾搜索,移除与value相等的元素,数量为count 2、count < 0: 从表尾开始向表头搜索,移除与value相等的元素,数量为count的绝对值 3、count = 0: 移除表中所有与value相等的值 @param key string @param count int64 @return bool.
LSet 设置指定下标的元素值 @param key string @param index int64 @param value string @return bool.
MGetMap MGet以map数据类型返回所有(一个或多个)给定key的值 @param keys []string @return map[string]interface{}.
Move 将当前数据库的key移动到给定的数据库db当中 @param key string @param db int @return bool.
MSet 同时设置一个或多个key-value对 @param keyValues map[string]string @return bool.
MSetNX 同时设置一个或多个key-value对,当且仅当所有给定 key 都不存在 @param keyValues map[string]string @return bool.
Persist 移除给定 key 的生存时间,将这个 key 从『易失的』(带生存时间 key )转换成『持久的』(一个不带生存时间、永不过期的 key ) @param key string @return bool.
PExpire 与Expire作用类似,但是它以毫秒为单位设置key的生存时间,而不像Expire以秒为单位 @param key string @param timeout time.Duration @return bool.
PExpireAt 与ExpireAt命令类似,但它以毫秒为单位设置key的过期unix时间戳,而不是像ExpireAt以秒为单位.
PTTL 与TTL类似,但它以毫秒为单位返回key剩余生存时间,而不是像TTL以秒为单位 @param key string @return int64.
Rename 将key改名为newKey @param key string @param newKey string @return bool.
RenameNX 当且仅当newKey不存在时,将key改名为newKey @param key string @param newKey string @return bool.
Restore 反序列化给定的序列化值,并将它和给定的key关联 @param key string @param ttl int64 @param value string @return string.
RPop 从右侧移出并获取列表的第一个元素 @param key string @return string.
RPopLPush 在一个原子时间内,执行以下两个动作: 1、将列表 source 中的最后一个元素(从右侧)弹出,并返回给客户端。 2、将 source 弹出的元素插入(向左侧)到列表destination,作为destination列表的的头元素 @param source string @param destination string @param timeout int64.
RPush 向列表右侧添加元素 @param key string @param value string @return int64 @return error.
RPushX 向列表左侧添加元素,仅当列表中不存在该元素时,才插入 @param key string @param value string @return int64 @return bool.
SAdd 将一个或多个member元素加入到集合key当中,已经存在于集合的member元素将被忽略 @param key string @param members []string @return int64 @return error.
SCard 返回集合key的基数(集合中元素的数量) @param key string @return int64.
SDiff 返回一个集合的全部成员,该集合是所有给定集合之间的差集 @param keys []string @return []string.
SDiffStore 与SDiff类似,但它将结果保存到destination集合 如果destination集合已经存在,则将其覆盖 destination可以是key本身 @param destination string @param keys []string @return bool.
Set 给指定key设置value @param key string @param value string @param expiration int64 @return bool.
SetNX 给指定key设置value,当且仅当 key 不存在 @param key string @param value string @param expiration int64 @return bool.
SInter 返回一个集合的全部成员,该集合是所有给定集合的交集 @param keys []string @return []string.
SInterStore 与SInter类似,但它将结果保存到destination集合 如果destination集合已经存在,则将其覆盖 destination可以是key本身 @param destination string @param keys []string @return bool.
SIsMember 判断member元素是否集合key的成员 @param key string @param member string @return bool.
SMembers 返回集合 key 中的所有成员 @param key string @return []string.
SMove 将member元素从source集合移动到destination集合 @param key string @param destination string @return bool.
SRem 移除集合key中的一个或多个member元素,不存在的member元素会被忽略 @param key string @param members []interface @return bool.
StrLen 返回key所储存的字符串值的长度 @param key string @return int64.
SUnion 返回一个集合的全部成员,该集合是所有给定集合的并集 @param keys []string @return []string.
SUnionStore 类似于SUnion命令,但它将结果保存到destination集合 @param destination string @param keys []string @return bool.
TTL 获取一个指定key的过期时间 @param key string @return int64.
Type 返回 key 所储存的值的类型 @param key string @return string.
ZAdd 将一个或多个member元素及其score值加入到有序集key当中 @param key string @param members map[interface{}]int64 @return bool.
ZCard 返回有序集key的基数 @param key string @return int64.
ZCount 返回有序集key中,score 值在min和max之间(默认包括score值等于min或max)的成员的数量 @param key string @param min string @param max string @return int64.
ZIncrBy 为有序集key的成员member的score值加上增量increment @param key string @param increment int64 @param member string @return int64 @return error.
ZRange 返回有序集key中,指定区间内的成员。 其中成员的位置按score值递增(从小到大)来排序。 具有相同score值的成员按字典序(lexicographical order )来排列 @param key string @param start int64 @param stop int64 @return []string.
ZRangeByScore 返回有序集ey中所有score 值介于min和max 之间(包括等于min或max)的成员。有序集成员按score值递增(从小到大)次序排列 具有相同 score 值的成员按字典序(lexicographical order)来排列(该属性是有序集提供的,不需要额外的计算) @param key string @param opt *redis.ZRangeBy @return []string.
ZRank 返回有序集 key 中成员 member 的排名。 其中有序集成员按 score 值递增(从小到大)顺序排列 @param key string @param member string @return int64.
ZRem 移除有序集key中的一个或多个成员,不存在的成员将被忽略 @param key string @param members []string @return bool.
ZRemRangeByRank 移除有序集key中指定排名(rank)区间内的所有成员 @param key string @param opt *redis.ZRangeBy @return bool.
ZRemRangeByScore 移除有序集key中指定分数(score)区间内的所有成员 @param key string @param min string @param max string @return bool.
ZRevRange 返回有序集key中,指定区间内的成员。 其中成员的位置按score值递减(从大到小)来排列。 具有相同score值的成员按字典序的逆序(reverse lexicographical order)排列。 @param key string @param start int64 @param stop int64 @return []string.
ZRevRangeByLex 返回有序集key中指定区间内的成员。其中成员的位置按score值递减(从大到小)来排列 @param key string @param opt *redis.ZRangeBy @return []string.
ZRevRangeByScore 返回有序集key中指定区间内的成员。其中成员的位置按score值递减(从大到小)来排列 @param key string @param opt *redis.ZRangeBy @return []string.
ZRevRangeByScoreWithScores 返回有序集key中指定区间内的成员。其中成员的位置按score值递减(从大到小)来排列 @param key string @param opt *redis.ZRangeBy @return []redis.Z.
ZRevRangeWithScores 返回有序集key中指定区间内的成员。其中成员的位置按score值递减(从大到小)来排列 @param key string @param start int64 @param stop int64 @return []redis.Z.
ZRevRank 返回有序集key中成员member的排名。其中有序集成员按score值递减(从大到小)排序 @param key string @param member string @return int64.
ZScore 返回有序集key中成员member的score值.

# Variables

No description provided by the author

# Structs

No description provided by the author