database

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverMySQL    = "mysql"
	DriverPostgres = "postgres"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DSN                   string
	MaxOpenConn           int
	MaxIdleConn           int
	ConnectionMaxLifetime time.Duration

	TimeoutExceededInMinutes int
}

type Store

type Store struct {
	Master *sqlx.DB
	Slave  *sqlx.DB
}

func New

func New(cfg *config.DBConfig, dbDriver string) (*Store, error)

Jump to

Keyboard shortcuts

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