This commit is contained in:
nquidox 2026-02-18 15:53:29 +03:00
commit 25439eab5b
10 changed files with 185 additions and 0 deletions

41
config/config.go Normal file
View file

@ -0,0 +1,41 @@
package config
type Config struct {
App App
Http Http
TasksSource TasksSource
}
type App struct {
Mode string
LogLvl string
}
type Http struct {
Host string
Port string
}
type TasksSource struct {
Host string
Port string
}
func NewConfig() Config {
return Config{
App: App{
Mode: getEnv("APP_MODE", "dev"),
LogLvl: getEnv("APP_LOG_LVL", "debug"),
},
Http: Http{
Host: getEnv("HOST", "0.0.0.0"),
Port: getEnv("PORT", "41082"),
},
TasksSource: TasksSource{
Host: getEnv("TASK_API_HOST", ""),
Port: getEnv("TASK_API_PORT", ""),
},
}
}