Documentation ¶
Index ¶
- Variables
- func NewPostgresPool(config Config) (*pool.ConnectionPool, error)
- func PostgresConnStringFromConfig(config Config) string
- func PostgresPool(options ...Option) (*pool.ConnectionPool, error)
- type Config
- type Option
- func DatabaseName(name string) Option
- func Host(host string) Option
- func Password(password string) Option
- func Port(port int) Option
- func PostgresExtraConnArgs(extraArgs string) Option
- func PostgresSSLModeOption(sslMode PostgresSSLMode) Option
- func PostgresType() Option
- func Username(username string) Option
- type PostgresSSLMode
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPostgresConfig = Config{ // contains filtered or unexported fields }
Functions ¶
func NewPostgresPool ¶
func NewPostgresPool(config Config) (*pool.ConnectionPool, error)
func PostgresPool ¶
func PostgresPool(options ...Option) (*pool.ConnectionPool, error)
Types ¶
type Option ¶
func DatabaseName ¶
func PostgresExtraConnArgs ¶
func PostgresSSLModeOption ¶
func PostgresSSLModeOption(sslMode PostgresSSLMode) Option
func PostgresType ¶
func PostgresType() Option
type PostgresSSLMode ¶
type PostgresSSLMode int
PostgresSSLMode defines the modes for postgress ssl.
const ( PostgresSSLDisable PostgresSSLMode PostgresSSLAllow PostgresSSLPrefer PostgresSSLRequire PostgresSSLVerifyCA PostgresSSLVerifyFull )
This defines the modes for requiring ssl in a postgres database. See: https://www.postgresql.org/docs/current/libpq-ssl.html
func (PostgresSSLMode) String ¶
func (self PostgresSSLMode) String() string
Click to show internal directories.
Click to hide internal directories.