Documentation ¶
Index ¶
- Constants
- func Decr(RConn *redigo.Conn, key string) (int64, error)
- func DecrBy(RConn *redigo.Conn, key string, decrBy int64) (int64, error)
- func DecrByFloat(RConn *redigo.Conn, key string, decrBy float64) (float64, error)
- func Delete(RConn *redigo.Conn, key string) (interface{}, error)
- func Exists(RConn *redigo.Conn, key string) (bool, error)
- func Expire(RConn *redigo.Conn, key string, ttl int) (interface{}, error)
- func Get(RConn *redigo.Conn, key string) (interface{}, error)
- func GetInt(RConn *redigo.Conn, key string) (int, error)
- func GetString(RConn *redigo.Conn, key string) (string, error)
- func GetStringLength(RConn *redigo.Conn, key string) (int, error)
- func GetTTL(RConn *redigo.Conn, key string) (time.Duration, error)
- func HDel(RConn *redigo.Conn, key string, HKey string) (interface{}, error)
- func HGet(RConn *redigo.Conn, key string, HKey string) (interface{}, error)
- func HGetAll(RConn *redigo.Conn, key string) (interface{}, error)
- func HGetAllString(RConn *redigo.Conn, key string) ([]string, error)
- func HGetAllValues(RConn *redigo.Conn, key string) ([]interface{}, error)
- func HGetBool(RConn *redigo.Conn, key string, HKey string) (bool, error)
- func HGetFloat(RConn *redigo.Conn, key string, HKey string) (float64, error)
- func HGetInt(RConn *redigo.Conn, key string, HKey string) (int, error)
- func HGetInt64(RConn *redigo.Conn, key string, HKey string) (int64, error)
- func HGetString(RConn *redigo.Conn, key string, HKey string) (string, error)
- func HKeys(RConn *redigo.Conn, key string) ([]string, error)
- func HMGet(RConn *redigo.Conn, key string, hashKeys ...string) ([]interface{}, error)
- func HMSet(RConn *redigo.Conn, key string, hashKeys []string, vals []interface{}) (interface{}, error)
- func HSet(RConn *redigo.Conn, key string, HKey string, data interface{}) (interface{}, error)
- func Incr(RConn *redigo.Conn, key string) (int64, error)
- func IncrBy(RConn *redigo.Conn, key string, incBy int64) (int64, error)
- func IncrByFloat(RConn *redigo.Conn, key string, incBy float64) (float64, error)
- func Keys(RConn *redigo.Conn, pattern string) ([]string, error)
- func NewRConnectionPool(c Config) *redigo.Pool
- func ParseKey(key string, vars []string) (string, error)
- func Persist(RConn *redigo.Conn, key string) (interface{}, error)
- func SAdd(RConn *redigo.Conn, setName string, data interface{}) (interface{}, error)
- func SCard(RConn *redigo.Conn, setName string) (int64, error)
- func SIsMember(RConn *redigo.Conn, setName string, data interface{}) (bool, error)
- func SMembers(RConn *redigo.Conn, setName string) ([]string, error)
- func SRem(RConn *redigo.Conn, setName string, data interface{}) (interface{}, error)
- func Scan(RConn *redigo.Conn, cursor int64, pattern string, count int64) (int64, []string, error)
- func Set(RConn *redigo.Conn, key string, data interface{}) (interface{}, error)
- func SetEx(RConn *redigo.Conn, key string, ttl int, data interface{}) (interface{}, error)
- func SetNX(RConn *redigo.Conn, key string, data interface{}) (interface{}, error)
- func SplitKey(key string) []string
- func StripEnvKey(key string) string
- func ZAdd(RConn *redigo.Conn, key string, score float64, data interface{}) (interface{}, error)
- func ZRange(RConn *redigo.Conn, key string, start int, end int, withScores bool) ([]interface{}, error)
- func ZRem(RConn *redigo.Conn, key string, data interface{}) (interface{}, error)
- type Config
Constants ¶
View Source
const ( REDIS_KEYWORD_SADD = "SADD" REDIS_KEYWORD_SCARD = "SCARD" REDIS_KEYWORD_SISMEMBER = "SISMEMBER" REDIS_KEYWORD_SMEMBERS = "SMEMBERS" REDIS_KEYWORD_SREM = "SREM" REDIS_KEYWORD_HSET = "HSET" REDIS_KEYWORD_HGET = "HGET" REDIS_KEYWORD_HMSET = "HMSET" REDIS_KEYWORD_HMGET = "HMGET" REDIS_KEYWORD_HDEL = "HDEL" REDIS_KEYWORD_HGETALL = "HGETALL" REDIS_KEYWORD_SET = "SET" REDIS_KEYWORD_SETNX = "SETNX" REDIS_KEYWORD_SETEX = "SETEX" REDIS_KEYWORD_GET = "GET" REDIS_KEYWORD_TTL = "TTL" REDIS_KEYWORD_STRLEN = "STRLEN" REDIS_KEYWORD_EXPIRE = "EXPIRE" REDIS_KEYWORD_DELETE = "DEL" REDIS_KEYWORD_KEYS = "KEYS" REDIS_KEYWORD_HKEYS = "HKEYS" REDIS_KEYWORD_EXISTS = "EXISTS" REDIS_KEYWORD_PERSIST = "PERSIST" REDIS_KEYWORD_ZADD = "ZADD" REDIS_KEYWORD_ZREM = "ZREM" REDIS_KEYWORD_ZRANGE = "ZRANGE" REDIS_KEYWORD_ZRANGE_BY_SCORE = "ZRANGEBYSCORE" REDIS_KEYWORD_WITHSCORES = "WITHSCORES" REDIS_KEYWORD_INCR = "INCR" REDIS_KEYWORD_DECR = "DECR" REDIS_KEYWORD_INCRBY = "INCRBY" REDIS_KEYWORD_DECRBY = "DECRBY" REDIS_KEYWORD_INCRBYFLOAT = "INCRBYFLOAT" REDIS_KEYWORD_DECRBYFLOAT = "DECRBYFLOAT" )
Variables ¶
This section is empty.
Functions ¶
func DecrByFloat ¶
func Keys ¶
NOTE: Use this in production environment with extreme care. Read more here:https://redis.io/commands/keys
func NewRConnectionPool ¶
func StripEnvKey ¶
Types ¶
type Config ¶
type Config struct { Server string Password string MaxIdle int // Maximum number of idle connections in the pool. // Maximum number of connections allocated by the pool at a given time. // When zero, there is no limit on the number of connections in the pool. MaxActive int // Close connections after remaining idle for this duration. If the value // is zero, then idle connections are not closed. Applications should set // the timeout to a value less than the server's timeout. IdleTimeout time.Duration // If Wait is true and the pool is at the MaxActive limit, then Get() waits // for a connection to be returned to the pool before returning. Wait bool KEY_PREFIX string // prefix to all keys; example is "dev environment name" KEY_DELIMITER string // delimiter to be used while appending keys; example is ":" KEY_VAR_PLACEHOLDER string // placeholder to be parsed using given arguments to obtain a final key; example is "?" }
Click to show internal directories.
Click to hide internal directories.