sql

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

README

sql

Delete this folder if you don't need it. Or remember to hook it up if you're using it.

You could modify this to work with eg. sqlite or MySql, which is also supported by sqlc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBConnectionString string        `envconfig:"DB_CONNECTION_STRING" required:"true"`
	MaxDBConnections   int32         `envconfig:"DB_MAX_CONNECTIONS" default:"10"`
	PingInterval       time.Duration `envconfig:"DB_PING_INTERVAL" default:"3s"`
	PingTimeout        time.Duration `envconfig:"DB_PING_TIMEOUT" default:"15s"`
}

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func NewPostgres

func NewPostgres(ctx context.Context, conf Config) (*Postgres, error)

func (*Postgres) Close

func (p *Postgres) Close()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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