infra

package
v0.1.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideFiber

func ProvideFiber() *fiber.App

func ProvidePostgres

func ProvidePostgres(config *config.Config) (*bun.DB, error)

Types

type Repo

type Repo struct {

	// DB is for normal database operations.
	DB bun.IDB
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(db *bun.DB) Repo

func (*Repo) BeginTx

func (r *Repo) BeginTx(ctx context.Context) (err error)

func (*Repo) Commit

func (r *Repo) Commit() error

func (*Repo) EndTx

func (r *Repo) EndTx(err error) error

func (*Repo) Rollback

func (r *Repo) Rollback() error

Jump to

Keyboard shortcuts

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