Documentation ¶
Index ¶
- type Configuration
- type DBInterface
- type RedisClient
- type RedisClientInterface
- type RedisDB
- func (db *RedisDB) Delete(prefix string, key string) error
- func (db *RedisDB) Exist(prefix string, key string) (bool, error)
- func (db *RedisDB) FindHashSets(min int, max int) ([]string, error)
- func (db *RedisDB) Get(prefix string, key string) (string, error)
- func (db *RedisDB) GetHashSet(prefix string, key string) ([]interface{}, error)
- func (db *RedisDB) HashSet(prefix string, key string, valueMap map[string]interface{}) error
- func (db *RedisDB) Set(prefix string, key string, value string) error
- func (db *RedisDB) SetScore(prefix string, key string, score int) error
- func (db *RedisDB) UpdateScore(prefix string, key string, score int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type DBInterface ¶
type DBInterface interface { Set(prefix string, key string, value string) error HashSet(prefix string, key string, valueMap map[string]interface{}) error Get(prefix string, key string) (string, error) GetHashSet(prefix string, key string) ([]interface{}, error) Exist(prefix string, key string) (bool, error) Delete(prefix string, key string) error FindHashSets(min int, max int) ([]string, error) SetScore(prefix string, key string, score int) error UpdateScore(prefix string, key string, score int) error }
func NewRedisDB ¶
func NewRedisDB(client RedisClientInterface) (DBInterface, error)
type RedisClient ¶
func NewRedisClient ¶
func NewRedisClient(config Configuration) (*RedisClient, error)
func (*RedisClient) Close ¶
func (client *RedisClient) Close() error
func (*RedisClient) GetConnection ¶
func (client *RedisClient) GetConnection() redis.Conn
func (*RedisClient) TestConnection ¶
func (client *RedisClient) TestConnection() (redis.Conn, error)
type RedisClientInterface ¶
Click to show internal directories.
Click to hide internal directories.