Documentation
¶
Overview ¶
Package pgpassfile is a parser PostgreSQL .pgpass files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Passfile ¶
type Passfile struct {
Entries []*Entry
}
Passfile is the in memory data structure representing a PG passfile.
func ParsePassfile ¶
ParsePassfile reads r and parses it into a Passfile.
func ReadPassfile ¶
ReadPassfile reads the file at path and parses it into a Passfile.
func (*Passfile) FindPassword ¶
FindPassword finds the password for the provided hostname, port, database, and username. For a Unix domain socket hostname must be set to "localhost". An empty string will be returned if no match is found.
See https://www.postgresql.org/docs/current/libpq-pgpass.html for more password file information.
Click to show internal directories.
Click to hide internal directories.