db

package
v0.0.0-...-3235916 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(databaseURL string) error

Types

type Database

type Database interface {
	io.Closer
	// no time todo repository
	DB() *pgxpool.Pool
}

Database - interface

func Initialize

func Initialize(ctx context.Context, databaseURL string, log *zap.Logger) (Database, error)

Initialize - returns Database

# Example URL
postgres://jack:secret@pg.example.com:5432/mydb?sslmode=verify-ca&pool_max_conns=10&pool_max_conn_lifetime=1h

Jump to

Keyboard shortcuts

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