db

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Connection types
	REDIX string = "redix"
)

db-wide constants

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Close() error
	DBType() string
}

DB ...

func New

func New(cfg *config.Config) (DB, error)

New dispatches the creation of a specific DB connection type

type RedixConnector

type RedixConnector struct {
	ConnType string
	Options  *redis.Options
	Conn     *redis.Client
}

RedixConnector ...

func NewRedixConnection

func NewRedixConnection(cfg *config.Config) (*RedixConnector, error)

NewRedixConnection is for use with unit tests

func (*RedixConnector) Close

func (c *RedixConnector) Close() error

Close closes the connection to the database

func (*RedixConnector) DBType

func (c *RedixConnector) DBType() string

DBType returns the database type

Jump to

Keyboard shortcuts

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