config

package
v0.0.1-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 1 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL