Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Addr string `env:"API_ADDR"` // host:port|:port
DatabaseURL string `env:"DATABASE_URL"` // required
LogLevel string `env:"LOG_LEVEL"` // debug|info|warn|error
MigrateOnStart bool `env:"MIGRATE_ON_START"` // true|false
MigrationsDir string `env:"MIGRATIONS_DIR"` // plain - means use embedded
Env string `env:"ENV"` // development|staging|production
// Optional rate-limit bypass for test/dev environments.
RateLimitSkipEnabled bool `env:"RATE_LIMIT_SKIP_ENABLED"` // true|false
RateLimitSkipHeader string `env:"RATE_LIMIT_SKIP_HEADER"` // header name
}
func MustLoadFromEnv ¶
func MustLoadFromEnv() Config
MustLoadFromEnv loads config or panics if required values are missing.
Click to show internal directories.
Click to hide internal directories.