Documentation ¶
Index ¶
- func ExtractSections(cfg RootConfig) extractSectionsResult
- type LoggingConfig
- type LoggingSlogLoggerConfig
- type LoggingZapLoggerConfig
- type MetricConfig
- type MetricExporterConfig
- type RootConfig
- type SecureConfig
- type SecureTokenConfig
- type ServerConfig
- type ServerDBConfig
- type ServerHTTPConfig
- type ServerMinIOConfig
- type ServerNATSConfig
- type ServerRedisConfig
- type SnowflakeConfig
- type TraceConfig
- type TraceExporterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSections ¶
func ExtractSections(cfg RootConfig) extractSectionsResult
ExtractSections extracts sections from RootConfig. It is used for dependency injection.
Types ¶
type LoggingConfig ¶
type LoggingConfig interface { GetZapLogger() LoggingZapLoggerConfig GetSlogLogger() LoggingSlogLoggerConfig }
type LoggingSlogLoggerConfig ¶
type LoggingZapLoggerConfig ¶
type LoggingZapLoggerConfig interface {
GetPreset() string
}
type MetricConfig ¶
type MetricConfig interface {
GetExporterConfig() MetricExporterConfig
}
type MetricExporterConfig ¶
type RootConfig ¶
type RootConfig interface { GetServerConfig() ServerConfig GetSnowflakeConfig() SnowflakeConfig GetLoggingConfig() LoggingConfig GetTraceConfig() TraceConfig GetMetricConfig() MetricConfig GetSecureConfig() SecureConfig }
func LoadYamlConfig ¶
func LoadYamlConfig() (RootConfig, error)
LoadYamlConfig loads RootConfig from file. The path of the file is specified by environment variable GOMMERCE_CONFIG_PATH, If the environment variable is not set, it defaults to "./config/app-deploy.yaml".
type SecureConfig ¶
type SecureConfig interface {
GetToken() SecureTokenConfig
}
type SecureTokenConfig ¶
type ServerConfig ¶
type ServerConfig interface { GetDebug() bool GetName() string GetVersion() string GetInstanceId() string GetHTTPConfig() ServerHTTPConfig GetDBConfig() ServerDBConfig GetRedisConfig() ServerRedisConfig GetMinIOConfig() ServerMinIOConfig GetNATSConfig() ServerNATSConfig }
type ServerDBConfig ¶
type ServerHTTPConfig ¶
type ServerMinIOConfig ¶
type ServerNATSConfig ¶
type ServerRedisConfig ¶
type SnowflakeConfig ¶
type TraceConfig ¶
type TraceConfig interface {
GetExporterConfig() TraceExporterConfig
}
type TraceExporterConfig ¶
Click to show internal directories.
Click to hide internal directories.