Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SslModes = []string{
"disable",
"allow",
"prefer",
"require",
"verify-ca",
"verify-full",
}
SslModes makes it easier to check the sslmode option
Functions ¶
This section is empty.
Types ¶
type PostgresServiceGroup ¶
type PostgresServiceGroup struct {
Category map[string]postgresService
}
PostgresServiceGroup is the object that holds all of the service definitions found in a pg_service.conf file. It's basically the parsed version of that file
No public methods are exposed, so you can just get any of the details you'd like by accessing PostgresServiceGroup's map of postgresService objects, each of which contains all of the necessary pg connection data
func New ¶
func New( bufReader io.Reader, ) *PostgresServiceGroup
New function for creating PostgresServiceGroup objects. This is just handy since we need to make sure we initialize the map contained in the struct during creation and this function does that for us.
func ParsePgServices ¶
func ParsePgServices( bufReader io.Reader, ) (*PostgresServiceGroup, error)
ParsePgServices parses the pg_services.conf file contents by reading the supplied io.Reader object. Results are dropped into the PostgresServiceGroup object pointer and returned