config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDuration

func ParseDuration(value string, defaultValue time.Duration) time.Duration

func ParseInt

func ParseInt(value string, defaultValue int) int

Types

type Config

type Config struct {
	Database DatabaseConfig
}

func Load

func Load() (*Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	// ─── Connection ─────────────────────────
	Host         string
	Port         int
	Username     string
	Password     string
	DatabaseName string
	URL          string // optional full database URL

	// ─── SQL (GORM) Specific ─────────────────
	Driver          string // postgres | mysql | sqlite
	SSLMode         string // disable | require
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime time.Duration
}

Jump to

Keyboard shortcuts

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