alloydb

package module
v0.0.0-...-b77ff69 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogTime

func LogTime(s string)

func MapRow

func MapRow(rows *sql.Rows) (map[string]string, error)

func ReadRow

func ReadRow[T any](ptr *T, rows *sql.Rows) (*T, error)

Types

type ConfigDB

type ConfigDB struct {
	Host, User, Password, Dbname, Sslmode, Source string
	SetConnMaxLifetime, SetConnMaxIdleTime        time.Duration
	Port, SetMaxOpenConns, SetMaxIdleConns        int
}

type DB

type DB struct {
	Once   *sync.Once
	Client *sql.DB
	Errx   error
	Ctx    *context.Context
	Config ConfigDB
}

func New

func New(ctx *context.Context, conf ...ConfigDB) *DB

Jump to

Keyboard shortcuts

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