Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Database string `envconfig:"PG_DB_NAME"`
Host string `envconfig:"PG_HOST"`
Password string `envconfig:"PG_PASSWORD"`
Port int `envconfig:"PG_PORT" default:"5432"`
SslMode string `envconfig:"PG_SSL_MODE" default:"disable"`
User string `envconfig:"PG_USER"`
}
Config represents configuration for PostgreSQL connection
func FromContext ¶ added in v0.1.12
FromContext will return the Config carried in the provided Context.
It panics if config is not available on the current context.
Click to show internal directories.
Click to hide internal directories.