db

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

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgDb

type PgDb struct {
	Url url.URL
	// contains filtered or unexported fields
}

func NewPgDb

func NewPgDb(logger *zap.Logger, cfg config.Config) (*PgDb, func() error, error)

Get New Postgres Database

func (*PgDb) GetConn

func (db *PgDb) GetConn(ctx context.Context) (*sqlx.Conn, func() error, error)

Get Conection, with a cancel func

func (*PgDb) RunInTx

func (db *PgDb) RunInTx(ctx context.Context, fn func(*sqlx.Tx) error) error

Jump to

Keyboard shortcuts

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