Documentation
¶
Overview ¶
Package config loads and parses the application's runtime configuration.
Index ¶
Constants ¶
View Source
const ( LogFormatJSON = "JSON" LogFormatText = "TEXT" )
LogFormat enumerates the allowed values for the LogFormat field.
View Source
const ( LogLevelTrace = "Trace" LogLevelDebug = "Debug" LogLevelInfo = "Info" LogLevelWarn = "Warn" LogLevelError = "Error" LogLevelFatal = "Fatal" LogLevelPanic = "Panic" )
LogLevel enumerates the allowed values for the LogLevel field.
Variables ¶
View Source
var ErrAlreadyLoaded = rerrors.New("config already loaded")
ErrAlreadyLoaded is returned by Init when the process-wide default config has already been loaded by an earlier call.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
AppInfo matreshka.AppInfo
Servers ServersConfig
DataSources DataSourcesConfig
Environment EnvironmentConfig
Overrides matreshka.ServiceDiscovery
MatreshkaConfig matreshka.AppConfig
}
Config is the application's fully parsed runtime configuration.
type DataSourcesConfig ¶
DataSourcesConfig holds parsed configuration values for this section.
type EnvironmentConfig ¶
type EnvironmentConfig struct {
AllowedOrigins string
CookieSecure bool
CredsEncryptionKey string
GoogleAPIKey string
GoogleClientID string
GoogleClientSecret string
LogFormat string
LogLevel string
NoAuthEnabled bool
OtelEndpoint string
SubscriptionsEnabled bool
TelegramClientID string
}
EnvironmentConfig holds parsed configuration values for this section.
type ServersConfig ¶
ServersConfig holds parsed configuration values for this section.
Click to show internal directories.
Click to hide internal directories.