Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { ReadKeys(match string) ([]string, error) ReadEntry(key string) ([]byte, error) ReadAllEntries(match string) (map[string]string, error) InsertEntry(key string, entry []byte) error DeleteEntry(key string) (int, error) Expire(key string, ttl time.Duration) error }
Database functions to manage data stored in an external database
func NewMockDB ¶ added in v0.4.0
func NewMockDB() Database
NewMockDB returns an instance of a mock database
func NewRedisDB ¶
NewRedisDB returns an instance of a Redis database
func NewRedisDBWithConn ¶
NewRedisDBWithConn returns an instance of a Redis database using an existing connection
func NewRedisDBWithPool ¶
NewRedisDBWithPool returns an instance of a Redis database using an existing connection pool
Click to show internal directories.
Click to hide internal directories.