config

package
v1.332.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 28 Imported by: 15

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 Validity](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.

func (Config) Valid added in v1.329.0

func (c Config) Valid() error

Valid or error.

type Validity added in v1.329.0

type Validity interface {
	Valid() error
}

Validity of config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL