Documentation
¶
Overview ¶
Package config provides configuration structures for the mapbot-shared library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresDatabase ¶
type PostgresDatabase struct {
Host string
Port int
Database string
User string
Password string
SSLMode string
MaxOpenConns int
MaxIdleConns int
ConnMaxLifetime int // in minutes
ConnMaxIdleTime int // in seconds
PingTimeout int // in seconds
}
PostgresDatabase configuration structure for PostgreSQL connections
func NewPostgresDatabase ¶
func NewPostgresDatabase(host string, port int, database, user, password string) *PostgresDatabase
NewPostgresDatabase creates a PostgresDatabase config with sensible defaults
func (*PostgresDatabase) ConnectionString ¶
func (p *PostgresDatabase) ConnectionString() string
ConnectionString returns the PostgreSQL connection string
func (*PostgresDatabase) PublicConnectionString ¶
func (p *PostgresDatabase) PublicConnectionString() string
PublicConnectionString returns the connection string without password for logging
Click to show internal directories.
Click to hide internal directories.