Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct {
// AppEnv is the application environment that determines `configs/<APP_ENV>.env` to load.
AppEnv string `env:"APP_ENV" envDefault:"development"`
// PrimaryDBUri is the primary database URI.
PrimaryDBUri string `env:"PRIMARY_DB_URI"`
// ServiceName is the application's service name.
ServiceName string `env:"SERVICE_NAME" envDefault:"golang-rest-api"`
// TracerCollectorAddress is the OpenTelemetry trace collector address.
TracerCollectorAddress string `env:"TRACER_COLLECTOR_ADDRESS"`
// NewRelicLicenseKey is the license key for New relic instrumentations
NewRelicLicenseKey string `env:"NEWRELIC_LICENSE_KEY"`
HTTPConfig struct {
// Address is the HTTP server's address.
Address string `env:"HTTP_ADDRESS"`
// Enabled is the feature flag
Enabled bool `env:"HTTP_ENABLED"`
}
HTTPSConfig struct {
// Address is the HTTPS server's address.
Address string `env:"HTTPS_ADDRESS"`
// Enabled is the feature flag
Enabled bool `env:"HTTPS_ENABLED"`
}
}
AppConfig maps the environment variables into a struct.
Click to show internal directories.
Click to hide internal directories.