config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	SecretKey string
}

AuthConfig holds authentication configuration

type Config

type Config struct {
	Database DatabaseConfig
	Logger   LoggerConfig
	Auth     AuthConfig
}

Config holds all application configuration

func Get

func Get() *Config

Get returns the singleton config instance

type DatabaseConfig

type DatabaseConfig struct {
	Host     string
	Port     int
	Username string
	Password string
	Name     string
	SSLMode  string
	TimeZone string
}

DatabaseConfig holds database connection settings

func (*DatabaseConfig) DSN

func (d *DatabaseConfig) DSN() string

DSN constructs a PostgreSQL connection string

type LogLevel

type LogLevel int

LogLevel represents logging verbosity levels

const (
	LogTrace LogLevel = iota
	LogDebug
	LogInfo
	LogWarn
	LogError
	LogCritical
)

type LoggerConfig

type LoggerConfig struct {
	Level       LogLevel
	Output      io.Writer
	ErrorOutput io.Writer
}

LoggerConfig holds logging configuration

Jump to

Keyboard shortcuts

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