db

package
v0.0.0-...-ef346fd Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresConnection

func NewPostgresConnection(logger *logrus.Logger, cfgPostgres config.PostgresConfig) (*sqlx.DB, error)

func RunMigrations

func RunMigrations(conn *sqlx.DB, cfg config.Config, logger *logrus.Logger) error

Types

type Session

type Session interface {
	GetDB() *sqlx.DB
	Close() error
}

func NewForkedSession

func NewForkedSession(logger *logrus.Logger, cfg config.Config) Session

func NewSession

func NewSession(logger *logrus.Logger, cfg config.Config) (Session, error)

NewSession will return a ready-to-use db session that already performs migration-up.

Jump to

Keyboard shortcuts

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