rasconfig

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvironmentVariableOrDefault

func GetEnvironmentVariableOrDefault(key string, defaultValue string) string

func GetEnvironmentVariableOrDefaultDuration

func GetEnvironmentVariableOrDefaultDuration(key string, defaultValue string) time.Duration

func GetEnvironmentVariableOrDefaultInt

func GetEnvironmentVariableOrDefaultInt(key string, defaultValue int) int

func GetEnvironmentVariableOrPanic

func GetEnvironmentVariableOrPanic(key string, panicMessage string) string

func InitDbPool

func InitDbPool(ctx context.Context, cfg *DBConfig) (*pgxpool.Pool, error)

func InitReadOnlyDbPool

func InitReadOnlyDbPool(ctx context.Context, cfg *DBConfig) (*pgxpool.Pool, error)

Types

type DBConfig

type DBConfig struct {
	Host                  string
	ReadOnlyHost          string
	Port                  string
	DatabaseName          string
	User                  string
	Password              string
	MaxConnections        int
	MinConnections        int
	MaxConnectionLifetime time.Duration
	MaxConnectionIdleTime time.Duration
	ConnectionTimeout     time.Duration
}

Jump to

Keyboard shortcuts

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