add: email delivery test; baseURL config

This commit is contained in:
$(pass /github/name)
2024-08-13 20:22:08 +02:00
parent c02b96e538
commit 9cbe3d005b
10 changed files with 155 additions and 36 deletions

View File

@@ -45,6 +45,7 @@ type TemplateConfig struct {
type Config struct {
ConfigFilePath string `json:"config_file_path" envconfig:"CONFIG_FILE_PATH"`
BaseURL string `json:"base_url" envconfig:"BASE_URL"`
Auth AuthenticationConfig `json:"auth"`
DB DatabaseConfig `json:"db"`
Templates TemplateConfig `json:"templates"`
@@ -52,6 +53,7 @@ type Config struct {
}
var (
BaseURL string
CFGPath string
CFG Config
Auth AuthenticationConfig
@@ -83,6 +85,7 @@ func LoadConfig() {
DB = CFG.DB
Templates = CFG.Templates
SMTP = CFG.SMTP
BaseURL = CFG.BaseURL
}
// readFile reads the configuration from the specified file path into the provided Config struct.