config

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

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

	// Redis
	RedisAddr     string
	RedisPassword string

	// PASETO
	PasetoSecretKey string // 32-byte hex-encoded symmetric key

	// SMTP / Mailer
	SMTPHost     string
	SMTPUser     string
	SMTPPassword string
	EmailFrom    string

	// Logging
	LogLevel  string // debug | info | warn | error
	LogFormat string // json | text

	// Server
	HTTPPort        string
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
	ShutdownTimeout time.Duration

	// PASETO TTL
	TokenTTL time.Duration

	// Mailer Port
	SMTPPort int
}

func Load

func Load() *Config

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

Jump to

Keyboard shortcuts

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