Documentation ¶
Index ¶
- Constants
- func AddSortedSet(conn *redis2.Conn, key string, data interface{}, score int64) error
- func CreateRedisConn(url string, connTimeout time.Duration, readTimeout time.Duration, ...) (redis2.Conn, error)
- func DeleteSortSetItem(conn *redis2.Conn, key string, data interface{}) error
- func GetSortSet(conn *redis2.Conn, key string, pageNo int, pageRow int, max, min int64, ...) ([]string, error)
- func GetSortedSetCount(conn *redis2.Conn, key string, max, min int64) (int, error)
- func GetString(conn *redis2.Conn, key string, data interface{}) error
- func GetStrings(conn *redis2.Conn, keys []string) (interface{}, error)
- func RangeScoreDeleteSortedSet(conn *redis2.Conn, key string, max, min int64) (int, error)
- func SetString(conn *redis2.Conn, key string, data interface{}, expiredSeconds int) error
Constants ¶
View Source
const ( // ZRANGEBYSCORE command ZRANGEBYSCORE = "ZRANGEBYSCORE" // ZREVRANGEBYSCORE command ZREVRANGEBYSCORE = "ZREVRANGEBYSCORE" // ZCOUNT command ZCOUNT = "ZCOUNT" // SETEX command SETEX = "SETEX" // ZADD command ZADD = "ZADD" // LIMIT command LIMIT = "LIMIT" // ZREM command ZREM = "ZREM" // GET command GET = "GET" // MGET command MGET = "MGET" // ZRANGE command ZRANGE = "ZRANGE" // ZCARD command ZCARD = "ZCARD" // ZREMRANGEBYSCORE command ZREMRANGEBYSCORE = "ZREMRANGEBYSCORE" // MaxInfinite is +inf MaxInfinite = "+inf" // MinInfinite is -inf MinInfinite = "-inf" )
Variables ¶
This section is empty.
Functions ¶
func AddSortedSet ¶
AddSortedSet add a data into a sorted set
func CreateRedisConn ¶
func CreateRedisConn(url string, connTimeout time.Duration, readTimeout time.Duration, writeTimeout time.Duration) (redis2.Conn, error)
CreateRedisConn create a connection to redis
func DeleteSortSetItem ¶
DeleteSortSetItem delete the item from a sorted set
func GetSortSet ¶
func GetSortSet(conn *redis2.Conn, key string, pageNo int, pageRow int, max, min int64, isDESC bool) ([]string, error)
GetSortSet get a range data from sorted set key if you need sort all items without range, set max = min = 0
func GetSortedSetCount ¶
GetSortedSetCount get sorted set count in range if no range limited, set max = min = 0
func GetStrings ¶
GetStrings get multi-values
func RangeScoreDeleteSortedSet ¶
RangeScoreDeleteSortedSet delete a rangable items
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.