Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidConfig = errors.New("config: invalid format")
ErrInvalidConfig when decoding fails.
View Source
var Module = fx.Options( fx.Provide(NewConfig[Config]), fx.Provide(aesConfig), fx.Provide(ed25519Config), fx.Provide(hmacConfig), fx.Provide(rsaConfig), fx.Provide(sshConfig), fx.Provide(tokenConfig), fx.Provide(environmentConfig), fx.Provide(debugConfig), fx.Provide(featureConfig), fx.Provide(hooksConfig), fx.Provide(timeConfig), fx.Provide(pgConfig), fx.Provide(redisConfig), fx.Provide(loggerConfig), fx.Provide(tracerConfig), fx.Provide(metricsConfig), fx.Provide(grpcConfig), fx.Provide(httpConfig), fx.Provide(limiterConfig), )
Module for fx.
Functions ¶
func NewConfig ¶ added in v1.178.0
func NewConfig[T comparable](i *cmd.InputConfig) (*T, error)
NewConfig will decode and check its validity.
Types ¶
type Config ¶
type Config struct { Debug *debug.Config `yaml:"debug,omitempty" json:"debug,omitempty" toml:"debug,omitempty"` Cache *cache.Config `yaml:"cache,omitempty" json:"cache,omitempty" toml:"cache,omitempty"` Crypto *crypto.Config `yaml:"crypto,omitempty" json:"crypto,omitempty" toml:"crypto,omitempty"` Feature *feature.Config `yaml:"feature,omitempty" json:"feature,omitempty" toml:"feature,omitempty"` Hooks *hooks.Config `yaml:"hooks,omitempty" json:"hooks,omitempty" toml:"hooks,omitempty"` Limiter *limiter.Config `yaml:"limiter,omitempty" json:"limiter,omitempty" toml:"limiter,omitempty"` SQL *sql.Config `yaml:"sql,omitempty" json:"sql,omitempty" toml:"sql,omitempty"` Telemetry *telemetry.Config `yaml:"telemetry,omitempty" json:"telemetry,omitempty" toml:"telemetry,omitempty"` Time *time.Config `yaml:"time,omitempty" json:"time,omitempty" toml:"time,omitempty"` Token *token.Config `yaml:"token,omitempty" json:"token,omitempty" toml:"token,omitempty"` Transport *transport.Config `yaml:"transport,omitempty" json:"transport,omitempty" toml:"transport,omitempty"` Environment env.Environment `yaml:"environment,omitempty" json:"environment,omitempty" toml:"environment,omitempty"` }
Config for the service.
Click to show internal directories.
Click to hide internal directories.