database

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	ReadKeys(hashname string) ([]string, error)
	ReadEntry(hashname string, key string) ([]byte, error)
	ReadAllEntries(hashname string) (map[string]string, error)
	ReadAllMatchingEntries(hashname string, match string) (map[string][]byte, error)
	InsertEntry(hashname string, key string, entry []byte) error
	DeleteEntry(hashname string, key string) (int, error)
}

Database functions to manage data stored in an external database

func NewRedisDB

func NewRedisDB(address string, password string) Database

NewRedisDB returns an instance of a Redis database

func NewRedisDBWithConn

func NewRedisDBWithConn(conn redis.Conn, address string, password string) Database

NewRedisDBWithConn returns an instance of a Redis database using an existing connection

func NewRedisDBWithPool

func NewRedisDBWithPool(pool *redis.Pool) Database

NewRedisDBWithPool returns an instance of a Redis database using an existing connection pool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL