image-storage/config/config.go

26 lines
421 B
Go
Raw Normal View History

2025-10-20 18:23:53 +03:00
package config
type Config struct {
App AppConfig
}
type AppConfig struct {
2025-10-20 22:21:55 +03:00
Host string
HttpPort string
2025-10-20 18:23:53 +03:00
GrpcPort string
2025-10-20 22:21:55 +03:00
Domain string
2025-10-20 18:23:53 +03:00
LogLevel string
}
func NewConfig() *Config {
return &Config{
App: AppConfig{
2025-10-20 22:21:55 +03:00
Host: getEnv("HOST", ""),
HttpPort: getEnv("HTTP_PORT", ""),
2025-10-20 18:23:53 +03:00
GrpcPort: getEnv("GRPC_PORT", ""),
2025-10-20 22:21:55 +03:00
Domain: getEnv("DOMAIN", ""),
2025-10-20 18:23:53 +03:00
LogLevel: getEnv("LOG_LEVEL", ""),
},
}
}