Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthOptionVerifyCA string = "clientcert=verify-ca" AuthOptionVerifyFull string = "clientcert=verify-full" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthMethod ¶
type AuthMethod string
const ( AuthMethodTrust AuthMethod = "trust" AuthMethodReject AuthMethod = "reject" AuthMethodMD5 AuthMethod = "md5" AuthMethodScramSHA256 AuthMethod = "scram-sha-256" AuthMethodPassword AuthMethod = "password" AuthMethodGSS AuthMethod = "gss" AuthMethodSSPI AuthMethod = "sspi" AuthMethodIdent AuthMethod = "ident" AuthMethodPeer AuthMethod = "peer" AuthMethodLDAP AuthMethod = "ldap" AuthMethodRadius AuthMethod = "radius" AuthMethodCert AuthMethod = "cert" AuthMethodPAM AuthMethod = "pam" AuthMethodBSD AuthMethod = "bsd" )
type Entry ¶
type Entry struct {
Type EntryType
Database string
User string
Address string
Mask string
AuthMethod AuthMethod
AuthOptions string
IncludePath string
}
func ParseEntry ¶ added in v0.9.0
ParseEntry parses a single pg_hba.conf rule line into an Entry. The line must contain a rule; callers should skip blank and comment lines (see IsComment). The auth method is captured verbatim and NOT validated against a known set.
type EntryType ¶
type EntryType string
const ( EntryTypeLocal EntryType = "local" EntryTypeHost EntryType = "host" EntryTypeHostSSL EntryType = "hostssl" EntryTypeHostNoSSL EntryType = "hostnossl" EntryTypeHostGSSEnc EntryType = "hostgssenc" EntryTypeHostNoGSSEnc EntryType = "hostnogssenc" EntryTypeInclude EntryType = "include" EntryTypeIncludeIfExists EntryType = "include_if_exists" EntryTypeIncludeDir EntryType = "include_dir" )
type IdentEntry ¶ added in v0.9.0
type IdentEntry struct {
MapName string
SystemUsername string
PostgresUsername string
// Include and IncludePath are set instead of the mapping fields when the
// line is an include directive.
Include EntryType
IncludePath string
}
IdentEntry is a single pg_ident.conf user-name-map line: a mapping of map-name + system-username to a PostgreSQL username, or an include directive.
func ParseIdent ¶ added in v0.9.0
func ParseIdent(line string) (IdentEntry, error)
ParseIdent parses a single pg_ident.conf line. The line must contain a mapping or an include directive; callers should skip blank and comment lines (see IsComment). A mapping is always exactly three fields.
func (IdentEntry) String ¶ added in v0.9.0
func (e IdentEntry) String() string
Click to show internal directories.
Click to hide internal directories.