db

package
v0.0.0-...-b14eccf Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URI           string
	MigrationsDir string
}

Config configures the database.

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags adds the flags required to configure this to the given FlagSet.

type DB

type DB interface {
	GetConfig(userID string) (configs.View, error)
	SetConfig(userID string, cfg configs.Config) error

	GetAllConfigs() (map[string]configs.View, error)
	GetConfigs(since configs.ID) (map[string]configs.View, error)

	Close() error
}

DB is the interface for the database.

func New

func New(cfg Config) (DB, error)

New creates a new database.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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