Documentation ¶
Index ¶
- Constants
- type ConfigRedis
- type DBExecute
- type DBModule
- func (slf *DBModule) AsyncExec(call SyncDBResultExCallBack, queryHas int, query string, args ...interface{}) error
- func (slf *DBModule) AsyncQuery(call SyncDBResultExCallBack, queryHas int, query string, args ...interface{}) error
- func (slf *DBModule) Begin() (*Tx, error)
- func (slf *DBModule) CheckArgs(args ...interface{}) error
- func (slf *DBModule) Connect(maxConn int) error
- func (slf *DBModule) Exec(query string, args ...interface{}) (*DBResultEx, error)
- func (slf *DBModule) Init(maxConn, executeNum int, url string, userName string, password string, ...) error
- func (slf *DBModule) IsPrintTimeLog(Time time.Duration) bool
- func (slf *DBModule) OnInit() error
- func (slf *DBModule) OnRelease()
- func (slf *DBModule) Query(query string, args ...interface{}) DBResult
- func (slf *DBModule) QueryEx(query string, args ...interface{}) (*DataSetList, error)
- func (slf *DBModule) RunExecuteDBCoroutine(has int)
- func (slf *DBModule) RunPing()
- func (slf *DBModule) SetQuerySlowTime(Time time.Duration)
- func (slf *DBModule) SyncExec(queryHas int, query string, args ...interface{}) *SyncExecuteDBResult
- func (slf *DBModule) SyncQuery(queryHas int, query string, args ...interface{}) SyncQueryDBResultEx
- type DBResult
- type DBResultEx
- type DataSetList
- type ErrorMapStringBool
- type Func
- type HttpClientPoolModule
- func (slf *HttpClientPoolModule) Init(maxpool int, proxyUrl string)
- func (slf *HttpClientPoolModule) Request(method string, url string, body []byte, header http.Header) HttpRespone
- func (slf *HttpClientPoolModule) SyncRequest(method string, url string, body []byte, header http.Header) SyncHttpRespone
- type HttpRespone
- type PingExecute
- type RedisModule
- func (slf *RedisModule) DelHash(redisKey string, hsahKey string) error
- func (slf *RedisModule) DelMuchHash(redisKey string, hsahKey []string) error
- func (slf *RedisModule) DelMuchString(keys []string) (map[string]bool, error)
- func (slf *RedisModule) DelString(key string) error
- func (slf *RedisModule) EXPlREInsert(key string, TTl int) error
- func (slf *RedisModule) ExistsKey(key string) (bool, error)
- func (slf *RedisModule) GetAllHashJSON(redisKey string) (map[string]string, error)
- func (slf *RedisModule) GetHashValueByHashKeyList(fieldKey ...interface{}) ([]string, error)
- func (slf *RedisModule) GetHashValueByKey(redisKey string, fieldKey string) (string, error)
- func (slf *RedisModule) GetListLen(key string) (int, error)
- func (slf *RedisModule) GetMuchString(keys []string) (retMap map[string]string, err error)
- func (slf *RedisModule) GetMuchStringJSON(keys map[string]interface{}) error
- func (slf *RedisModule) GetString(key string) (string, error)
- func (slf *RedisModule) GetStringJSON(key string, st interface{}) error
- func (slf *RedisModule) GoDelHash(redisKey string, hsahKey string, err *RetError)
- func (slf *RedisModule) GoDelMuchHash(redisKey string, hsahKey []string, err *RetError)
- func (slf *RedisModule) GoDelMuchString(keys []string, retMapString *RetMapString)
- func (slf *RedisModule) GoDelString(key string, err *RetError)
- func (slf *RedisModule) GoSetHash(redisKey, hashKey, value string, err *RetError)
- func (slf *RedisModule) GoSetHashJSON(redisKey, hsahKey string, value interface{}, err *RetError)
- func (slf *RedisModule) GoSetListJSONLpush(key string, value interface{}, retErr *RetError)
- func (slf *RedisModule) GoSetListJSONRpush(key string, value interface{}, retErr *RetError)
- func (slf *RedisModule) GoSetListLpush(key, value string, err *RetError)
- func (slf *RedisModule) GoSetListRpush(key, value string, retErr *RetError)
- func (slf *RedisModule) GoSetMuchHashJSON(redisKey string, value map[string][]interface{}, err *RetError)
- func (slf *RedisModule) GoSetMuchListJSONLpush(key string, value []interface{}, retErr *RetError)
- func (slf *RedisModule) GoSetMuchListJSONRpush(key string, value []interface{}, retErr *RetError)
- func (slf *RedisModule) GoSetMuchListLpush(key string, value []string, err *RetError)
- func (slf *RedisModule) GoSetMuchListRpush(key string, value []string, retErr *RetError)
- func (slf *RedisModule) GoSetMuchString(mapInfo map[string]string, retErr *RetError)
- func (slf *RedisModule) GoSetMuchStringExpire(mapInfo map[string]string, expire string, err *RetError)
- func (slf *RedisModule) GoSetString(key, value string, err *RetError)
- func (slf *RedisModule) GoSetStringExpire(key, value string, expire string, err *RetError) error
- func (slf *RedisModule) GoSetStringJSON(key string, val interface{}, err *RetError)
- func (slf *RedisModule) GoSetStringJSONExpire(key string, val interface{}, expire string, retErr *RetError) error
- func (slf *RedisModule) GoTask(fc Func) error
- func (slf *RedisModule) HincrbyHashInt(redisKey, hashKey string, value int) error
- func (slf *RedisModule) Init(redisCfg *ConfigRedis)
- func (slf *RedisModule) Keys(key string) ([]string, error)
- func (slf *RedisModule) LRange(key string, start, stop int) ([]byte, error)
- func (slf *RedisModule) LRangeJSON(key string, start, stop int, data interface{}) error
- func (slf *RedisModule) ListPop(key string, fromLeft, block bool, timeout int) ([]byte, error)
- func (slf *RedisModule) ListPopJson(key string, fromLeft, block bool, timeout int, out interface{}) error
- func (slf *RedisModule) Lrange(key string, start, end int) ([]string, error)
- func (slf *RedisModule) LtrimList(key string, start, end int) error
- func (slf *RedisModule) RPOPListValue(key string) error
- func (slf *RedisModule) RunAnsyTask()
- func (slf *RedisModule) ScanMatchKeys(cursorValue int, redisKey string, count int) (int, []string, error)
- func (slf *RedisModule) SetHash(redisKey, hashKey, value string) error
- func (slf *RedisModule) SetHashJSON(redisKey, hsahKey string, value interface{}) error
- func (slf *RedisModule) SetListJSONLpush(key string, value interface{}) error
- func (slf *RedisModule) SetListJSONRpush(key string, value interface{}) error
- func (slf *RedisModule) SetListLpush(key, value string) error
- func (slf *RedisModule) SetListRpush(key, value string) error
- func (slf *RedisModule) SetMuchHashJSON(redisKey string, value map[string][]interface{}) error
- func (slf *RedisModule) SetMuchListJSONLpush(key string, value []interface{}) error
- func (slf *RedisModule) SetMuchListJSONRpush(key string, value []interface{}) error
- func (slf *RedisModule) SetMuchListLpush(key string, value []string) error
- func (slf *RedisModule) SetMuchListRpush(key string, value []string) error
- func (slf *RedisModule) SetMuchString(mapInfo map[string]string) (err error)
- func (slf *RedisModule) SetMuchStringExpire(mapInfo map[string]string, ex string) (err error)
- func (slf *RedisModule) SetString(key, value string) (err error)
- func (slf *RedisModule) SetStringExpire(key, value, expire string) (err error)
- func (slf *RedisModule) SetStringJSON(key string, val interface{}) (err error)
- func (slf *RedisModule) SetStringJSONExpire(key string, val interface{}, expire string) (err error)
- func (slf *RedisModule) TestPingRedis() error
- func (slf *RedisModule) ZADDInsert(key string, score float64, Data interface{}) error
- func (slf *RedisModule) ZADDInsertJson(key string, score float64, value interface{}) error
- func (slf *RedisModule) ZREM(key string, member interface{}) (int, error)
- func (slf *RedisModule) ZREMMulti(key string, member ...interface{}) (int, error)
- func (slf *RedisModule) ZREMRANGEBYSCORE(key string, start, stop interface{}) error
- func (slf *RedisModule) ZRange(key string, start, stop int, ascend bool, withScores bool) ([]byte, error)
- func (slf *RedisModule) ZRangeByScore(key string, start, stop float64, ascend bool, withScores bool) ([]byte, error)
- func (slf *RedisModule) ZRangeByScoreJSON(key string, start, stop float64, ascend bool, withScores bool, ...) error
- func (slf *RedisModule) ZRangeJSON(key string, start, stop int, ascend bool, withScores bool, data interface{}) error
- func (slf *RedisModule) ZRank(key string, member interface{}, ascend bool) (int, error)
- func (slf *RedisModule) ZScore(key string, member interface{}) (float64, error)
- func (slf *RedisModule) Zcard(key string) (int, error)
- func (slf *RedisModule) Zremrangebyrank(redisKey string, start, end interface{}) (int, error)
- type RetError
- type RetMapString
- type SyncDBResult
- type SyncDBResultExCallBack
- type SyncExecuteDBResult
- type SyncFun
- type SyncHttpRespone
- type SyncQueryDBResultEx
- type Tx
- func (slf *Tx) CheckArgs(args ...interface{}) error
- func (slf *Tx) Commit() error
- func (slf *Tx) Exec(query string, args ...interface{}) (*DBResultEx, error)
- func (slf *Tx) IsPrintTimeLog(Time time.Duration) bool
- func (slf *Tx) Query(query string, args ...interface{}) DBResult
- func (slf *Tx) QueryEx(query string, args ...interface{}) (*DataSetList, error)
- func (slf *Tx) Rollback() error
- type ZSetDataWithScore
Constants ¶
const (
MAX_EXECUTE_FUN = 10000
)
const (
MAX_TASK_CHANNEL = 10240
)
最大redis信道任务量
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigRedis ¶
type ConfigRedis struct { IP string Port string Password string DbIndex int MaxIdle int //最大的空闲连接数,表示即使没有redis连接时依然可以保持N个空闲的连接,而不被清除,随时处于待命状态。 MaxActive int //最大的激活连接数,表示同时最多有N个连接 IdleTimeout int //最大的空闲连接等待时间,超过此时间后,空闲连接将被关闭 SyncRouterNum int //异步执行Router数量 }
ConfigRedis 服务器配置
type DBModule ¶
type DBModule struct { service.Module PrintTime time.Duration // contains filtered or unexported fields }
DBModule ...
func (*DBModule) AsyncExec ¶
func (slf *DBModule) AsyncExec(call SyncDBResultExCallBack, queryHas int, query string, args ...interface{}) error
func (*DBModule) AsyncQuery ¶
func (slf *DBModule) AsyncQuery(call SyncDBResultExCallBack, queryHas int, query string, args ...interface{}) error
func (*DBModule) Exec ¶
func (slf *DBModule) Exec(query string, args ...interface{}) (*DBResultEx, error)
Exec ...
func (*DBModule) QueryEx ¶
func (slf *DBModule) QueryEx(query string, args ...interface{}) (*DataSetList, error)
func (*DBModule) RunExecuteDBCoroutine ¶
func (*DBModule) SetQuerySlowTime ¶
type DBResult ¶
type DBResult struct { Err error LastInsertID int64 RowsAffected int64 // contains filtered or unexported fields }
DBResult ...
func (*DBResult) SetBlurMode ¶
SetBlurMode ...
func (*DBResult) SetSpecificTag ¶
SetSpecificTag ...
type DBResultEx ¶
type DBResultEx struct { LastInsertID int64 RowsAffected int64 RowInfo map[string][]interface{} //map[fieldname][row]sql.NullString // contains filtered or unexported fields }
DBResult ...
type DataSetList ¶
type DataSetList struct {
// contains filtered or unexported fields
}
func (*DataSetList) UnMarshal ¶
func (slf *DataSetList) UnMarshal(args ...interface{}) error
type ErrorMapStringBool ¶
type ErrorMapStringBool struct {
// contains filtered or unexported fields
}
type HttpClientPoolModule ¶
func (*HttpClientPoolModule) Init ¶
func (slf *HttpClientPoolModule) Init(maxpool int, proxyUrl string)
func (*HttpClientPoolModule) Request ¶
func (slf *HttpClientPoolModule) Request(method string, url string, body []byte, header http.Header) HttpRespone
func (*HttpClientPoolModule) SyncRequest ¶
func (slf *HttpClientPoolModule) SyncRequest(method string, url string, body []byte, header http.Header) SyncHttpRespone
type HttpRespone ¶
type PingExecute ¶
type PingExecute struct {
// contains filtered or unexported fields
}
type RedisModule ¶
func (*RedisModule) DelHash ¶
func (slf *RedisModule) DelHash(redisKey string, hsahKey string) error
DelRedisHash ...
func (*RedisModule) DelMuchHash ¶
func (slf *RedisModule) DelMuchHash(redisKey string, hsahKey []string) error
DelMuchRedisHash ...
func (*RedisModule) DelMuchString ¶
func (slf *RedisModule) DelMuchString(keys []string) (map[string]bool, error)
DelMuchRedisString redis删除string类型数据 示例:DelMuchRedisString([]string{"AAAABTEST1",""AAAABTEST2})
func (*RedisModule) DelString ¶
func (slf *RedisModule) DelString(key string) error
DelRedisString redis删除string类型数据 示例:DelRedisString("AAAABTEST1")
func (*RedisModule) EXPlREInsert ¶
func (slf *RedisModule) EXPlREInsert(key string, TTl int) error
func (*RedisModule) ExistsKey ¶
func (slf *RedisModule) ExistsKey(key string) (bool, error)
判断一个Key是否存在
func (*RedisModule) GetAllHashJSON ¶
func (slf *RedisModule) GetAllHashJSON(redisKey string) (map[string]string, error)
GetRedisAllHashJSON ...
func (*RedisModule) GetHashValueByHashKeyList ¶
func (slf *RedisModule) GetHashValueByHashKeyList(fieldKey ...interface{}) ([]string, error)
GetHashValueByHashKeyList ...
func (*RedisModule) GetHashValueByKey ¶
func (slf *RedisModule) GetHashValueByKey(redisKey string, fieldKey string) (string, error)
GetRedisHashValueByKey ...
func (*RedisModule) GetListLen ¶
func (slf *RedisModule) GetListLen(key string) (int, error)
获取List的长度
func (*RedisModule) GetMuchString ¶
func (slf *RedisModule) GetMuchString(keys []string) (retMap map[string]string, err error)
GetMuchRedisString redis获取string类型数据 Pipeline实现的原理是队列,而队列的原理是先进先出 示例:GetMuchRedisString(&[]string{"AAAABTEST1", "AAAABTEST2"})
func (*RedisModule) GetMuchStringJSON ¶
func (slf *RedisModule) GetMuchStringJSON(keys map[string]interface{}) error
GetMuchRedisStringJSON redis获取string类型数据Json Pipeline实现的原理是队列,而队列的原理是先进先出 示例:temp := make(map[string]interface{}) temp["AAAABTEST1"] = &eagleconfig.ServerConfig{} temp["AAAABTEST2"] = &eagleconfig.ServerConfig{} GetMuchRedisStringJSON(&temp)
func (*RedisModule) GetString ¶
func (slf *RedisModule) GetString(key string) (string, error)
GetRedisString redis获取string类型数据 示例:GetRedisString("TestKey")
func (*RedisModule) GetStringJSON ¶
func (slf *RedisModule) GetStringJSON(key string, st interface{}) error
GetRedisStringJSON redis获取string类型数据的Json 示例:GetRedisString("TestKey")
func (*RedisModule) GoDelHash ¶
func (slf *RedisModule) GoDelHash(redisKey string, hsahKey string, err *RetError)
GoDelRedisHash
func (*RedisModule) GoDelMuchHash ¶
func (slf *RedisModule) GoDelMuchHash(redisKey string, hsahKey []string, err *RetError)
GoDelMuchRedisHash
func (*RedisModule) GoDelMuchString ¶
func (slf *RedisModule) GoDelMuchString(keys []string, retMapString *RetMapString)
func (*RedisModule) GoDelString ¶
func (slf *RedisModule) GoDelString(key string, err *RetError)
func (*RedisModule) GoSetHash ¶
func (slf *RedisModule) GoSetHash(redisKey, hashKey, value string, err *RetError)
func (*RedisModule) GoSetHashJSON ¶
func (slf *RedisModule) GoSetHashJSON(redisKey, hsahKey string, value interface{}, err *RetError)
func (*RedisModule) GoSetListJSONLpush ¶
func (slf *RedisModule) GoSetListJSONLpush(key string, value interface{}, retErr *RetError)
GoSetRedisListJSONLpush ...
func (*RedisModule) GoSetListJSONRpush ¶
func (slf *RedisModule) GoSetListJSONRpush(key string, value interface{}, retErr *RetError)
GoSetRedisListJSONRpush ...
func (*RedisModule) GoSetListLpush ¶
func (slf *RedisModule) GoSetListLpush(key, value string, err *RetError)
GoSetRedisListLpush...
func (*RedisModule) GoSetListRpush ¶
func (slf *RedisModule) GoSetListRpush(key, value string, retErr *RetError)
GoSetListRpush ...
func (*RedisModule) GoSetMuchHashJSON ¶
func (slf *RedisModule) GoSetMuchHashJSON(redisKey string, value map[string][]interface{}, err *RetError)
func (*RedisModule) GoSetMuchListJSONLpush ¶
func (slf *RedisModule) GoSetMuchListJSONLpush(key string, value []interface{}, retErr *RetError)
GoSetMuchListJSONLpush ...
func (*RedisModule) GoSetMuchListJSONRpush ¶
func (slf *RedisModule) GoSetMuchListJSONRpush(key string, value []interface{}, retErr *RetError)
GoSetMuchRedisListJSONRpush ...
func (*RedisModule) GoSetMuchListLpush ¶
func (slf *RedisModule) GoSetMuchListLpush(key string, value []string, err *RetError)
GoSetMuchListLpush ...
func (*RedisModule) GoSetMuchListRpush ¶
func (slf *RedisModule) GoSetMuchListRpush(key string, value []string, retErr *RetError)
GoSetMuchRedisListRpush ...
func (*RedisModule) GoSetMuchString ¶
func (slf *RedisModule) GoSetMuchString(mapInfo map[string]string, retErr *RetError)
func (*RedisModule) GoSetMuchStringExpire ¶
func (slf *RedisModule) GoSetMuchStringExpire(mapInfo map[string]string, expire string, err *RetError)
func (*RedisModule) GoSetString ¶
func (slf *RedisModule) GoSetString(key, value string, err *RetError)
func (*RedisModule) GoSetStringExpire ¶
func (slf *RedisModule) GoSetStringExpire(key, value string, expire string, err *RetError) error
func (*RedisModule) GoSetStringJSON ¶
func (slf *RedisModule) GoSetStringJSON(key string, val interface{}, err *RetError)
func (*RedisModule) GoSetStringJSONExpire ¶
func (slf *RedisModule) GoSetStringJSONExpire(key string, val interface{}, expire string, retErr *RetError) error
func (*RedisModule) GoTask ¶
func (slf *RedisModule) GoTask(fc Func) error
func (*RedisModule) HincrbyHashInt ¶
func (slf *RedisModule) HincrbyHashInt(redisKey, hashKey string, value int) error
func (*RedisModule) Init ¶
func (slf *RedisModule) Init(redisCfg *ConfigRedis)
func (*RedisModule) LRange ¶
func (slf *RedisModule) LRange(key string, start, stop int) ([]byte, error)
func (*RedisModule) LRangeJSON ¶
func (slf *RedisModule) LRangeJSON(key string, start, stop int, data interface{}) error
func (*RedisModule) ListPopJson ¶
func (slf *RedisModule) ListPopJson(key string, fromLeft, block bool, timeout int, out interface{}) error
弹出list(消息队列)数据,数据放入out fromLeft表示是否从左侧弹出 block表示是否阻塞 timeout表示阻塞超时
func (*RedisModule) Lrange ¶
func (slf *RedisModule) Lrange(key string, start, end int) ([]string, error)
Lrange ...
func (*RedisModule) LtrimList ¶
func (slf *RedisModule) LtrimList(key string, start, end int) error
弹出List最后条记录
func (*RedisModule) RPOPListValue ¶
func (slf *RedisModule) RPOPListValue(key string) error
弹出List最后条记录
func (*RedisModule) RunAnsyTask ¶
func (slf *RedisModule) RunAnsyTask()
func (*RedisModule) ScanMatchKeys ¶
func (*RedisModule) SetHash ¶
func (slf *RedisModule) SetHash(redisKey, hashKey, value string) error
SetRedisHash ... 如果 hsahKey 是哈希表中的一个新建域,并且值设置成功,返回 1 如果哈希表中域 hsahKey 已经存在且旧值已被新值覆盖,返回 0
func (*RedisModule) SetHashJSON ¶
func (slf *RedisModule) SetHashJSON(redisKey, hsahKey string, value interface{}) error
SetRedisHashJSON ...
func (*RedisModule) SetListJSONLpush ¶
func (slf *RedisModule) SetListJSONLpush(key string, value interface{}) error
SetRedisListJSONLpush ...
func (*RedisModule) SetListJSONRpush ¶
func (slf *RedisModule) SetListJSONRpush(key string, value interface{}) error
SetRedisListJSONRpush ...
func (*RedisModule) SetListLpush ¶
func (slf *RedisModule) SetListLpush(key, value string) error
SetRedisListLpush ...
func (*RedisModule) SetListRpush ¶
func (slf *RedisModule) SetListRpush(key, value string) error
SetListRpush ...
func (*RedisModule) SetMuchHashJSON ¶
func (slf *RedisModule) SetMuchHashJSON(redisKey string, value map[string][]interface{}) error
SetMuchRedisHashJSON ... value : hashkey -> value
func (*RedisModule) SetMuchListJSONLpush ¶
func (slf *RedisModule) SetMuchListJSONLpush(key string, value []interface{}) error
SetMuchListJSONLpush ...
func (*RedisModule) SetMuchListJSONRpush ¶
func (slf *RedisModule) SetMuchListJSONRpush(key string, value []interface{}) error
SetMuchRedisListJSONRpush ...
func (*RedisModule) SetMuchListLpush ¶
func (slf *RedisModule) SetMuchListLpush(key string, value []string) error
SetMuchRedisListLpush ...
func (*RedisModule) SetMuchListRpush ¶
func (slf *RedisModule) SetMuchListRpush(key string, value []string) error
SetMuchRedisListRpush ...
func (*RedisModule) SetMuchString ¶
func (slf *RedisModule) SetMuchString(mapInfo map[string]string) (err error)
SetMuchRedisString redis添加多条string类型数据 示例:SetMuchRedisString(map[string]string{"Test1": "C语言", "Test2": "Go语言", "Test3": "Python", "Test4": "C++"})
func (*RedisModule) SetMuchStringExpire ¶
func (slf *RedisModule) SetMuchStringExpire(mapInfo map[string]string, ex string) (err error)
SetMuchRedisStringSameEx redis添加多条string类型数据 具有相同的过期时间 ex过期时间 整数 示例:SetMuchRedisStringSameEx(map[string]string{"Test1": "C语言", "Test2": "Go语言", "Test3": "Python", "Test4": "C++"},"300")
func (*RedisModule) SetString ¶
func (slf *RedisModule) SetString(key, value string) (err error)
SetRedisString redis添加string类型数据 无过期时间 示例:SetRedisString("TestKey", "Hell World!")
func (*RedisModule) SetStringExpire ¶
func (slf *RedisModule) SetStringExpire(key, value, expire string) (err error)
SetRedisExString redis添加string类型数据 有过期时间 ex过期时间,单位秒,必须是整数 示例:SetRedisExString("TestKey", "Hell World!","60")
func (*RedisModule) SetStringJSON ¶
func (slf *RedisModule) SetStringJSON(key string, val interface{}) (err error)
SetRedisStringJSON redis添加JSON数据 无过期时间 示例:SetRedisStringJSON("AAAABTEST1", eagleconfig.Cfg)
func (*RedisModule) SetStringJSONExpire ¶
func (slf *RedisModule) SetStringJSONExpire(key string, val interface{}, expire string) (err error)
SetRedisExStringJSON redis添加JSON数据 有过期时间 ex过期时间,单位秒,必须是整数 示例:SetRedisStringJSON("AAAABTEST1", eagleconfig.Cfg,"60")
func (*RedisModule) TestPingRedis ¶
func (slf *RedisModule) TestPingRedis() error
TestPingRedis 测试连接Redis
func (*RedisModule) ZADDInsert ¶
func (slf *RedisModule) ZADDInsert(key string, score float64, Data interface{}) error
有序集合插入
func (*RedisModule) ZADDInsertJson ¶
func (slf *RedisModule) ZADDInsertJson(key string, score float64, value interface{}) error
有序集合插入Json
func (*RedisModule) ZREM ¶
func (slf *RedisModule) ZREM(key string, member interface{}) (int, error)
func (*RedisModule) ZREMMulti ¶
func (slf *RedisModule) ZREMMulti(key string, member ...interface{}) (int, error)
func (*RedisModule) ZREMRANGEBYSCORE ¶
func (slf *RedisModule) ZREMRANGEBYSCORE(key string, start, stop interface{}) error
func (*RedisModule) ZRange ¶
func (slf *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 (slf *RedisModule) ZRank(key string, member interface{}, ascend bool) (int, error)
获取指定member的排名
func (*RedisModule) ZScore ¶
func (slf *RedisModule) ZScore(key string, member interface{}) (float64, error)
获取指定member的排名
func (*RedisModule) Zremrangebyrank ¶
func (slf *RedisModule) Zremrangebyrank(redisKey string, start, end interface{}) (int, error)
type RetMapString ¶
type RetMapString struct {
// contains filtered or unexported fields
}
type SyncDBResult ¶
type SyncDBResult struct {
// contains filtered or unexported fields
}
SyncDBResult ...
type SyncDBResultExCallBack ¶
type SyncDBResultExCallBack func(dataList *DataSetList, err error)
type SyncExecuteDBResult ¶
type SyncExecuteDBResult struct {
// contains filtered or unexported fields
}
func (*SyncExecuteDBResult) Get ¶
func (slf *SyncExecuteDBResult) Get(timeoutMs int) (*DBResultEx, error)
type SyncHttpRespone ¶
type SyncHttpRespone struct {
// contains filtered or unexported fields
}
func (*SyncHttpRespone) Get ¶
func (slf *SyncHttpRespone) Get(timeoutMs int) HttpRespone
type SyncQueryDBResultEx ¶
type SyncQueryDBResultEx struct {
// contains filtered or unexported fields
}
func (*SyncQueryDBResultEx) Get ¶
func (slf *SyncQueryDBResultEx) Get(timeoutMs int) (*DataSetList, error)
type Tx ¶
Tx ...
func (*Tx) Exec ¶
func (slf *Tx) Exec(query string, args ...interface{}) (*DBResultEx, error)
Exec executes a query that doesn't return rows.
func (*Tx) IsPrintTimeLog ¶
IsPrintTimeLog...
type ZSetDataWithScore ¶
type ZSetDataWithScore struct { Data json.RawMessage `json:"data"` Score float64 `json:"score"` }