Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnConfig ¶
ConnConfig holds the connection parameters shared by all PostgreSQL connectors.
func ParseConnConfig ¶
func ParseConnConfig(config map[string]string) (ConnConfig, string, error)
ParseConnConfig parses host, port, username, and password from the "location" URI and from standalone config keys. Standalone keys override URI components. The path component of the URI (i.e. the database name) is returned separately so callers can handle it as appropriate (use it, reject it, or ignore it).
func (ConnConfig) Args ¶
func (c ConnConfig) Args() []string
Args returns the common connection flags shared by all PostgreSQL client tools: -h host -p port -w, plus -U username when one is configured.
func (ConnConfig) Env ¶
func (c ConnConfig) Env() []string
Env returns the current process environment with PGPASSWORD injected when a password is configured.