config

package
v1.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package config provides functionality to load and manage application configuration from environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Database
	DatabaseURL        string
	RedisAddr          string
	RedisPassword      string
	PasetoSecretKey    string
	SMTPHost           string
	SMTPUser           string
	SMTPPassword       string
	EmailFrom          string
	HTTPPort           string
	LogLevel           string
	LogFormat          string
	SysadminEmail      string
	SysadminTenantName string

	// Time/Numeric
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
	ShutdownTimeout time.Duration
	TokenTTL        time.Duration
	SMTPPort        int
}

Config holds all the configuration values for the application.

func Load

func Load() *Config

Load reads environment variables and returns a populated Config. It panics if any required variable is missing or malformed.

func (*Config) Log

func (c *Config) Log(ctx context.Context)

Log outputs the current configuration values at the info level.

Jump to

Keyboard shortcuts

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