diff --git a/internal/config/config.go b/internal/config/config.go index 3862235..bd1ffbf 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,32 +8,24 @@ import ( ) type Config struct { - ServiceName string Host string Port string AllowedOrigins []string Env Environment DSN string - ICN string - Tracing string // url to tracing server, e.g. zipkin - Metrics bool // enable prometheus metrics } func New() Config { host := getEnvDefault("HOST", "0.0.0.0") port := getEnvDefault("PORT", "8080") return Config{ - ServiceName: "ttz-app", - Host: host, - Port: port, + Host: host, + Port: port, AllowedOrigins: strings.Split( getEnvDefault("ALLOWED_ORIGINS", fmt.Sprintf("http://%s:%s,https://%s:%s", host, port, host, port)), ",", ), - Env: Environment(getEnvDefault("ENV", "prod")), - DSN: os.Getenv("DSN"), - ICN: os.Getenv("ICN"), - Tracing: os.Getenv("TRACING"), - Metrics: os.Getenv("METRICS") == "true", + Env: Environment(getEnvDefault("ENV", "prod")), + DSN: os.Getenv("DSN"), } }