Documentation ¶
Overview ¶
Package pgpass allows the user to generate a PostgreSQL .pgpass file See: https://www.postgresql.org/docs/current/libpq-pgpass.html
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct {
// contains filtered or unexported fields
}
ConnectionInfo contains the information identifying a PostgreSQL server whom credentials need to be included in a pgpass file
func NewConnectionInfo ¶
func NewConnectionInfo( connectionParameters map[string]string, password string, ) (result ConnectionInfo)
NewConnectionInfo builds a new NewConnectionInfo from a set of connection parameters and the corresponding password
func (ConnectionInfo) BuildLine ¶
func (info ConnectionInfo) BuildLine() string
BuildLine builds a pgPass configuration file line
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data represents the contents of a pgpass file
func From ¶
func From(lines ...ConnectionInfo) *Data
From creates a new pgpass file content with the specified lines
func (*Data) WithLine ¶
func (data *Data) WithLine(line ConnectionInfo) *Data
WithLine appends a line to an existing pgpass file content
Click to show internal directories.
Click to hide internal directories.