db

package
v0.0.0-...-97b7911 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresql

func NewPostgresql(username string, database string, options ...OptionFunc) (*gorm.DB, error)

Types

type OptionFunc

type OptionFunc func(options *Options)

func WithHost

func WithHost(host string) OptionFunc

func WithMaxConnectionLifeTime

func WithMaxConnectionLifeTime(maxConnectionLifeTime time.Duration) OptionFunc

func WithMaxIdleConnections

func WithMaxIdleConnections(maxIdleConnections int) OptionFunc

func WithMaxOpenConnections

func WithMaxOpenConnections(maxOpenConnections int) OptionFunc

func WithPassword

func WithPassword(password string) OptionFunc

func WithPort

func WithPort(port int) OptionFunc

func WithTimeZone

func WithTimeZone(timezone string) OptionFunc

type Options

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

type PGConfigs

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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