storage

package
v0.0.0-...-9da61a2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 10 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Type string
	URI  string
}

Config holds all storage configuration settings

type Storage

type Storage interface {
	Get() *sql.DB
	Transaction(context context.Context, operation func(context context.Context, tx *sql.Tx) error) error
	Close() error
}

func New

func New(cfg Config) (Storage, error)

New creates a Storage object and updates the database with the latest migrations

Jump to

Keyboard shortcuts

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