wip
This commit is contained in:
@@ -62,6 +62,16 @@ type SecurityConfig struct {
|
||||
Burst int `json:"Burst" default:"60" envconfig:"BURST_LIMIT"`
|
||||
} `json:"RateLimits"`
|
||||
}
|
||||
|
||||
type CompanyConfig struct {
|
||||
Name string `json:"Name" envconfig:"COMPANY_NAME"`
|
||||
Address string `json:"Address" envconfig:"COMPANY_ADDRESS"`
|
||||
City string `json:"City" envconfig:"COMPANY_CITY"`
|
||||
ZipCode string `json:"ZipCode" envconfig:"COMPANY_ZIPCODE"`
|
||||
Country string `json:"Country" envconfig:"COMPANY_COUNTRY"`
|
||||
SepaPrefix string `json:"SepaPrefix" envconfig:"COMPANY_SEPA_PREFIX"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Auth AuthenticationConfig `json:"auth"`
|
||||
Site SiteConfig `json:"site"`
|
||||
@@ -72,6 +82,7 @@ type Config struct {
|
||||
DB DatabaseConfig `json:"db"`
|
||||
SMTP SMTPConfig `json:"smtp"`
|
||||
Security SecurityConfig `json:"security"`
|
||||
Company CompanyConfig `json:"company"`
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -85,7 +96,9 @@ var (
|
||||
Recipients RecipientsConfig
|
||||
Env string
|
||||
Security SecurityConfig
|
||||
Company CompanyConfig
|
||||
)
|
||||
|
||||
var environmentOptions map[string]bool = map[string]bool{
|
||||
"development": true,
|
||||
"production": true,
|
||||
@@ -124,6 +137,7 @@ func LoadConfig() {
|
||||
Security = CFG.Security
|
||||
Env = CFG.Env
|
||||
Site = CFG.Site
|
||||
Company = CFG.Company
|
||||
logger.Info.Printf("Config loaded: %#v", CFG)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user