storage

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(db *pg.DB) error

Migrate updates database schema to new version.

func New

func New(config *config.Settings) (*pg.DB, error)

New returns newly created database connection.

Types

type Base added in v0.1.2

type Base interface {
	Healthy() bool
	Update(model interface{}) error
	Insert(model interface{}) error
	Select(
		model interface{},
		limit int,
		condition string,
		params ...interface{},
	) error
}

Base interface makes handlers testable.

Jump to

Keyboard shortcuts

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