Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
2026-04-30 09:13:47 +02:00
parent 74f7266632
commit d4c08467cb
9 changed files with 857 additions and 26 deletions
+11 -3
View File
@@ -6,9 +6,10 @@ import (
)
type Config struct {
Server ServerConfig
Auth AuthConfig
DB DBConfig
Server ServerConfig
Auth AuthConfig
DB DBConfig
Charger ChargerConfig
}
type ServerConfig struct {
@@ -25,6 +26,10 @@ type DBConfig struct {
DSN string
}
type ChargerConfig struct {
Host string
}
func Load() *Config {
return &Config{
Server: ServerConfig{
@@ -38,6 +43,9 @@ func Load() *Config {
DB: DBConfig{
DSN: getEnv("ENERGY_DB_DSN", "postgres://energy:changeme@localhost:5433/energy"),
},
Charger: ChargerConfig{
Host: getEnv("ENERGY_CHARGER_HOST", ""),
},
}
}