config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	SMTP      SMTPConfig `json:"smtp"`
	RateLimit int        `json:"rate_limit"` // emails you can send per second
	TimeoutMs int        `json:"timeout_ms"` // smtp timeout
}

func LoadConfig

func LoadConfig(path string) (*AppConfig, error)

LoadConfig reads JSON config from disk and returns a parsed AppConfig. It never terminates the process; callers should handle returned errors.

type SMTPConfig

type SMTPConfig struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	From     string `json:"from"`
}

Jump to

Keyboard shortcuts

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