Documentation ¶
Index ¶
- type ConfigRedis
- type ErrorMapStringBool
- type RedisModule
- func (m *RedisModule) DelHash(args ...interface{}) error
- func (m *RedisModule) DelString(key interface{}) error
- func (m *RedisModule) DelStringKeyList(keys []interface{}) (map[interface{}]bool, error)
- func (m *RedisModule) EXPlREInsert(key string, TTl int) error
- func (m *RedisModule) ExistsKey(key interface{}) (bool, error)
- func (m *RedisModule) GetAllHashJSON(redisKey string) (map[string]string, error)
- func (m *RedisModule) GetHash(redisKey interface{}, fieldKey interface{}) (string, error)
- func (m *RedisModule) GetListLen(key string) (int, error)
- func (m *RedisModule) GetMuchHash(args ...interface{}) ([]string, error)
- func (m *RedisModule) GetString(key interface{}) (string, error)
- func (m *RedisModule) GetStringJSON(key string, st interface{}) error
- func (m *RedisModule) GetStringMap(keys []string) (retMap map[string]string, err error)
- func (m *RedisModule) HGetStruct(key string, out_val interface{}) error
- func (m *RedisModule) HSetStruct(key string, val interface{}) error
- func (m *RedisModule) HincrbyHashInt(redisKey, hashKey string, value int) error
- func (m *RedisModule) Init(redisCfg *ConfigRedis)
- func (m *RedisModule) Keys(key string) ([]string, error)
- func (m *RedisModule) LPushList(args ...interface{}) error
- func (m *RedisModule) LPushListJSON(key interface{}, value ...interface{}) error
- func (m *RedisModule) LRange(key string, start, stop int) ([]byte, error)
- func (m *RedisModule) LRangeJSON(key string, start, stop int, data interface{}) error
- func (m *RedisModule) LRangeList(key string, start, end int) ([]string, error)
- func (m *RedisModule) LTrimList(key string, start, end int) error
- func (m *RedisModule) ListPop(key string, fromLeft, block bool, timeout int) ([]byte, error)
- func (m *RedisModule) ListPopJson(key string, fromLeft, block bool, timeout int, out interface{}) error
- func (m *RedisModule) RPOPListValue(key string) (string, error)
- func (m *RedisModule) RPushList(args ...interface{}) error
- func (m *RedisModule) RPushListJSON(key interface{}, value ...interface{}) error
- func (m *RedisModule) ScanMatchKeys(cursorValue int, redisKey string, count int) (int, []string, error)
- func (m *RedisModule) SetHash(redisKey, hashKey, value interface{}) error
- func (m *RedisModule) SetHashMapJSON(redisKey string, mapFieldValue map[interface{}]interface{}) error
- func (m *RedisModule) SetMuchStringExpire(mapInfo map[interface{}]interface{}, ex string) (err error)
- func (m *RedisModule) SetString(key, value interface{}) (err error)
- func (m *RedisModule) SetStringExpire(key, value, expire string) (err error)
- func (m *RedisModule) SetStringJSON(key interface{}, val interface{}) (err error)
- func (m *RedisModule) SetStringJSONExpire(key interface{}, val interface{}, expire string) (err error)
- func (m *RedisModule) SetStringMap(mapInfo map[interface{}]interface{}) (err error)
- func (m *RedisModule) TestPingRedis() error
- func (m *RedisModule) ZADDInsert(key string, score float64, Data interface{}) error
- func (m *RedisModule) ZADDInsertJson(key string, score float64, value interface{}) error
- func (m *RedisModule) ZREM(key string, member interface{}) (int, error)
- func (m *RedisModule) ZREMMulti(key string, member ...interface{}) (int, error)
- func (m *RedisModule) ZREMRANGEBYSCORE(key string, start, stop interface{}) error
- func (m *RedisModule) ZRange(key string, start, stop int, ascend bool, withScores bool) ([]byte, error)
- func (m *RedisModule) ZRangeByScore(key string, start, stop float64, ascend bool, withScores bool) ([]byte, error)
- func (m *RedisModule) ZRangeByScoreJSON(key string, start, stop float64, ascend bool, withScores bool, ...) error
- func (m *RedisModule) ZRangeJSON(key string, start, stop int, ascend bool, withScores bool, data interface{}) error
- func (m *RedisModule) ZRank(key string, member interface{}, ascend bool) (int, error)
- func (m *RedisModule) ZScore(key string, member interface{}) (float64, error)
- func (m *RedisModule) Zcard(key string) (int, error)
- func (m *RedisModule) Zremrangebyrank(redisKey string, start, end interface{}) (int, error)
- type RetError
- type RetMapString
- type ZSetDataWithScore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigRedis ¶
type ConfigRedis struct { IP string Port int Password string DbIndex int MaxIdle int //最大的空闲连接数,表示即使没有redis连接时依然可以保持N个空闲的连接,而不被清除,随时处于待命状态。 MaxActive int //最大的激活连接数,表示同时最多有N个连接 IdleTimeout int //最大的空闲连接等待时间,超过此时间后,空闲连接将被关闭 }
ConfigRedis 服务器配置
type ErrorMapStringBool ¶
type ErrorMapStringBool struct {
// contains filtered or unexported fields
}
type RedisModule ¶
func (*RedisModule) DelHash ¶
func (m *RedisModule) DelHash(args ...interface{}) error
func (*RedisModule) DelString ¶
func (m *RedisModule) DelString(key interface{}) error
func (*RedisModule) DelStringKeyList ¶
func (m *RedisModule) DelStringKeyList(keys []interface{}) (map[interface{}]bool, error)
func (*RedisModule) EXPlREInsert ¶
func (m *RedisModule) EXPlREInsert(key string, TTl int) error
func (*RedisModule) ExistsKey ¶
func (m *RedisModule) ExistsKey(key interface{}) (bool, error)
func (*RedisModule) GetAllHashJSON ¶
func (m *RedisModule) GetAllHashJSON(redisKey string) (map[string]string, error)
GetRedisAllHashJSON ...
func (*RedisModule) GetHash ¶
func (m *RedisModule) GetHash(redisKey interface{}, fieldKey interface{}) (string, error)
func (*RedisModule) GetListLen ¶
func (m *RedisModule) GetListLen(key string) (int, error)
获取List的长度
func (*RedisModule) GetMuchHash ¶
func (m *RedisModule) GetMuchHash(args ...interface{}) ([]string, error)
func (*RedisModule) GetString ¶
func (m *RedisModule) GetString(key interface{}) (string, error)
func (*RedisModule) GetStringJSON ¶
func (m *RedisModule) GetStringJSON(key string, st interface{}) error
func (*RedisModule) GetStringMap ¶
func (m *RedisModule) GetStringMap(keys []string) (retMap map[string]string, err error)
func (*RedisModule) HGetStruct ¶
func (m *RedisModule) HGetStruct(key string, out_val interface{}) error
func (*RedisModule) HSetStruct ¶
func (m *RedisModule) HSetStruct(key string, val interface{}) error
func (*RedisModule) HincrbyHashInt ¶
func (m *RedisModule) HincrbyHashInt(redisKey, hashKey string, value int) error
func (*RedisModule) Init ¶
func (m *RedisModule) Init(redisCfg *ConfigRedis)
func (*RedisModule) LPushList ¶
func (m *RedisModule) LPushList(args ...interface{}) error
func (*RedisModule) LPushListJSON ¶
func (m *RedisModule) LPushListJSON(key interface{}, value ...interface{}) error
func (*RedisModule) LRange ¶
func (m *RedisModule) LRange(key string, start, stop int) ([]byte, error)
func (*RedisModule) LRangeJSON ¶
func (m *RedisModule) LRangeJSON(key string, start, stop int, data interface{}) error
func (*RedisModule) LRangeList ¶
func (m *RedisModule) LRangeList(key string, start, end int) ([]string, error)
Lrange ...
func (*RedisModule) ListPopJson ¶
func (m *RedisModule) ListPopJson(key string, fromLeft, block bool, timeout int, out interface{}) error
弹出list(消息队列)数据,数据放入out fromLeft表示是否从左侧弹出 block表示是否阻塞 timeout表示阻塞超时
func (*RedisModule) RPOPListValue ¶
func (m *RedisModule) RPOPListValue(key string) (string, error)
弹出List最后条记录
func (*RedisModule) RPushList ¶
func (m *RedisModule) RPushList(args ...interface{}) error
func (*RedisModule) RPushListJSON ¶
func (m *RedisModule) RPushListJSON(key interface{}, value ...interface{}) error
func (*RedisModule) ScanMatchKeys ¶
func (*RedisModule) SetHash ¶
func (m *RedisModule) SetHash(redisKey, hashKey, value interface{}) error
func (*RedisModule) SetHashMapJSON ¶
func (m *RedisModule) SetHashMapJSON(redisKey string, mapFieldValue map[interface{}]interface{}) error
func (*RedisModule) SetMuchStringExpire ¶
func (m *RedisModule) SetMuchStringExpire(mapInfo map[interface{}]interface{}, ex string) (err error)
func (*RedisModule) SetString ¶
func (m *RedisModule) SetString(key, value interface{}) (err error)
func (*RedisModule) SetStringExpire ¶
func (m *RedisModule) SetStringExpire(key, value, expire string) (err error)
func (*RedisModule) SetStringJSON ¶
func (m *RedisModule) SetStringJSON(key interface{}, val interface{}) (err error)
func (*RedisModule) SetStringJSONExpire ¶
func (m *RedisModule) SetStringJSONExpire(key interface{}, val interface{}, expire string) (err error)
func (*RedisModule) SetStringMap ¶
func (m *RedisModule) SetStringMap(mapInfo map[interface{}]interface{}) (err error)
func (*RedisModule) TestPingRedis ¶
func (m *RedisModule) TestPingRedis() error
func (*RedisModule) ZADDInsert ¶
func (m *RedisModule) ZADDInsert(key string, score float64, Data interface{}) error
有序集合插入
func (*RedisModule) ZADDInsertJson ¶
func (m *RedisModule) ZADDInsertJson(key string, score float64, value interface{}) error
有序集合插入Json
func (*RedisModule) ZREMMulti ¶
func (m *RedisModule) ZREMMulti(key string, member ...interface{}) (int, error)
func (*RedisModule) ZREMRANGEBYSCORE ¶
func (m *RedisModule) ZREMRANGEBYSCORE(key string, start, stop interface{}) error
func (*RedisModule) ZRange ¶
func (m *RedisModule) ZRange(key string, start, stop int, ascend bool, withScores bool) ([]byte, error)
取有序set指定排名 ascend=true表示按升序遍历 否则按降序遍历
func (*RedisModule) ZRangeByScore ¶
func (*RedisModule) ZRangeByScoreJSON ¶
func (*RedisModule) ZRangeJSON ¶
func (*RedisModule) ZRank ¶
func (m *RedisModule) ZRank(key string, member interface{}, ascend bool) (int, error)
获取指定member的排名
func (*RedisModule) ZScore ¶
func (m *RedisModule) ZScore(key string, member interface{}) (float64, error)
获取指定member的排名
func (*RedisModule) Zremrangebyrank ¶
func (m *RedisModule) Zremrangebyrank(redisKey string, start, end interface{}) (int, error)
type RetMapString ¶
type RetMapString struct {
// contains filtered or unexported fields
}
type ZSetDataWithScore ¶
type ZSetDataWithScore struct { Data json.RawMessage `json:"data"` Score float64 `json:"score"` }
Click to show internal directories.
Click to hide internal directories.