Documentation ¶
Index ¶
- type HBAs
- type HostBasedAuthentication
- func (hba *HostBasedAuthentication) AllDatabases() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) AllNetworks() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) AllUsers() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) Database(name string) *HostBasedAuthentication
- func (hba *HostBasedAuthentication) Local() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) Method(name string) *HostBasedAuthentication
- func (hba *HostBasedAuthentication) Network(block string) *HostBasedAuthentication
- func (hba *HostBasedAuthentication) NoSSL() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) Options(opts map[string]string) *HostBasedAuthentication
- func (hba *HostBasedAuthentication) Replication() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) Role(name string) *HostBasedAuthentication
- func (hba *HostBasedAuthentication) SameNetwork() *HostBasedAuthentication
- func (hba HostBasedAuthentication) String() string
- func (hba *HostBasedAuthentication) TCP() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) TLS() *HostBasedAuthentication
- func (hba *HostBasedAuthentication) User(name string) *HostBasedAuthentication
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HBAs ¶
type HBAs struct{ Mandatory, Default []HostBasedAuthentication }
HBAs is a pairing of HostBasedAuthentication records.
type HostBasedAuthentication ¶
type HostBasedAuthentication struct {
// contains filtered or unexported fields
}
HostBasedAuthentication represents a single record for pg_hba.conf. - https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
func NewHBA ¶
func NewHBA() *HostBasedAuthentication
NewHBA returns an HBA record that matches all databases, networks, and users.
func (*HostBasedAuthentication) AllDatabases ¶
func (hba *HostBasedAuthentication) AllDatabases() *HostBasedAuthentication
AllDatabases makes hba match connections made to any database.
func (*HostBasedAuthentication) AllNetworks ¶
func (hba *HostBasedAuthentication) AllNetworks() *HostBasedAuthentication
AllNetworks makes hba match connection attempts made from any IP address.
func (*HostBasedAuthentication) AllUsers ¶
func (hba *HostBasedAuthentication) AllUsers() *HostBasedAuthentication
AllUsers makes hba match connections made by any user.
func (*HostBasedAuthentication) Database ¶
func (hba *HostBasedAuthentication) Database(name string) *HostBasedAuthentication
Database makes hba match connections made to a specific database.
func (*HostBasedAuthentication) Local ¶
func (hba *HostBasedAuthentication) Local() *HostBasedAuthentication
Local makes hba match connection attempts using Unix-domain sockets.
func (*HostBasedAuthentication) Method ¶
func (hba *HostBasedAuthentication) Method(name string) *HostBasedAuthentication
Method specifies the authentication method to use when a connection matches hba.
func (*HostBasedAuthentication) Network ¶
func (hba *HostBasedAuthentication) Network(block string) *HostBasedAuthentication
Network makes hba match connection attempts from a block of IP addresses in CIDR notation.
func (*HostBasedAuthentication) NoSSL ¶
func (hba *HostBasedAuthentication) NoSSL() *HostBasedAuthentication
NoSSL makes hba match connection attempts made over TCP/IP without SSL.
func (*HostBasedAuthentication) Options ¶
func (hba *HostBasedAuthentication) Options(opts map[string]string) *HostBasedAuthentication
Options specifies any options for the authentication method.
func (*HostBasedAuthentication) Replication ¶
func (hba *HostBasedAuthentication) Replication() *HostBasedAuthentication
Replication makes hba match physical replication connections.
func (*HostBasedAuthentication) Role ¶
func (hba *HostBasedAuthentication) Role(name string) *HostBasedAuthentication
Role makes hba match connections by users that are members of a specific role.
func (*HostBasedAuthentication) SameNetwork ¶
func (hba *HostBasedAuthentication) SameNetwork() *HostBasedAuthentication
SameNetwork makes hba match connection attempts from IP addresses in any subnet to which the server is directly connected.
func (HostBasedAuthentication) String ¶
func (hba HostBasedAuthentication) String() string
String returns hba formatted for the pg_hba.conf file without a newline.
func (*HostBasedAuthentication) TCP ¶
func (hba *HostBasedAuthentication) TCP() *HostBasedAuthentication
TCP makes hba match connection attempts made using TCP/IP, with or without SSL.
func (*HostBasedAuthentication) TLS ¶
func (hba *HostBasedAuthentication) TLS() *HostBasedAuthentication
TLS makes hba match connection attempts made using TCP/IP with TLS.
func (*HostBasedAuthentication) User ¶
func (hba *HostBasedAuthentication) User(name string) *HostBasedAuthentication
User makes hba match connections by a specific user.