Documentation ¶
Index ¶
- func Decr(key string, expiration ...time.Duration) int
- func Del(key string)
- func Get(key string) string
- func Incr(key string, expiration ...time.Duration) int
- func RegConnCreator(typeName string, creator ConnCreator)
- func Set(key, value string, expiration ...time.Duration)
- func SetNX(key, value string, expiration ...time.Duration) bool
- type ConnCreator
- type Connection
- type RedisConnection
- func (o *RedisConnection) Decr(key string, expiration ...time.Duration) int
- func (o *RedisConnection) Del(key string)
- func (o *RedisConnection) Get(key string) string
- func (o *RedisConnection) Incr(key string, expiration ...time.Duration) int
- func (o *RedisConnection) Set(key, value string, expiration ...time.Duration)
- func (o *RedisConnection) SetNX(key, value string, expiration ...time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegConnCreator ¶
func RegConnCreator(typeName string, creator ConnCreator)
Types ¶
type ConnCreator ¶
type ConnCreator func(configName string) (Connection, error)
type Connection ¶
type Connection interface { Set(key, value string, expiration ...time.Duration) SetNX(key, value string, expiration ...time.Duration) bool Get(key string) string Incr(key string, expiration ...time.Duration) int Decr(key string, expiration ...time.Duration) int Del(key string) }
func Conn ¶
func Conn(name ...string) Connection
type RedisConnection ¶
type RedisConnection struct {
// contains filtered or unexported fields
}
func (*RedisConnection) Decr ¶
func (o *RedisConnection) Decr(key string, expiration ...time.Duration) int
func (*RedisConnection) Del ¶
func (o *RedisConnection) Del(key string)
func (*RedisConnection) Get ¶
func (o *RedisConnection) Get(key string) string
func (*RedisConnection) Incr ¶
func (o *RedisConnection) Incr(key string, expiration ...time.Duration) int
Click to show internal directories.
Click to hide internal directories.