config

package
v0.0.0-...-ce0d072 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Port                    string `env:"PG_PORT,default=5432"`
	User                    string `env:"PG_USER,required"`
	Password                string `env:"PG_PASSWORD,required"`
	Server                  string `env:"PG_HOST,required"`
	Name                    string `env:"PG_DATABASE,required"`
	Params                  string `env:"PG_PARAMS,default=sslmode=disable"`
	ConnMaxLifeTimeSeconds  int
	MaxOpenConnections      int
	LockTimeoutSeconds      int
	StatementTimeoutSeconds int
}

func (*Database) Dialect

func (config *Database) Dialect() string

Dialect returns sql-dialect as string.

func (*Database) String

func (config *Database) String() string

String returns postgres based connection string.

Jump to

Keyboard shortcuts

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