db

package
v0.0.0-...-9831a62 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, db *sql.DB, logger logger) error

Migrate prepares database scheme.

func New

func New(cfg *Config, logger logger) (*sql.DB, error)

New returns a database instance.

Types

type Config

type Config struct {
	Addr               string `yaml:"addr"`
	MaxOpenConnections int    `yaml:"max_open_connections"`
}

Config contains database configuration.

Jump to

Keyboard shortcuts

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