config

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Unlicense Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Module for fx.
	Module = fx.Options(ConfiguratorModule, UnmarshalModule, ConfigModule)

	// ConfiguratorModule for fx.
	ConfiguratorModule = fx.Provide(NewConfigurator)

	// UnmarshalModule for fx.
	UnmarshalModule = fx.Invoke(Unmarshal)

	// ConfigModule for fx.
	ConfigModule = fx.Options(
		fx.Provide(redisConfig), fx.Provide(ristrettoConfig),
		fx.Provide(auth0Config),
		fx.Provide(pgConfig),
		fx.Provide(datadogConfig), fx.Provide(jaegerConfig),
		fx.Provide(grpcConfig), fx.Provide(httpConfig), fx.Provide(nsqConfig),
	)
)
View Source
var (
	// ErrMissingConfigFile for config.
	ErrMissingConfigFile = errors.New("missing config file")
)

Functions

func Unmarshal added in v1.27.0

func Unmarshal(cfg Configurator) error

Unmarshal the config.

Types

type Config

type Config struct {
	Cache     cache.Config     `yaml:"cache"`
	Security  security.Config  `yaml:"security"`
	SQL       sql.Config       `yaml:"sql"`
	Trace     trace.Config     `yaml:"trace"`
	Transport transport.Config `yaml:"transport"`
}

Config for the service.

func (*Config) Auth0Config added in v1.27.0

func (cfg *Config) Auth0Config() *auth0.Config

func (*Config) DatadogConfig added in v1.27.0

func (cfg *Config) DatadogConfig() *datadog.Config

func (*Config) GRPCConfig added in v1.27.0

func (cfg *Config) GRPCConfig() *grpc.Config

func (*Config) HTTPConfig added in v1.27.0

func (cfg *Config) HTTPConfig() *http.Config

func (*Config) JaegerConfig added in v1.27.0

func (cfg *Config) JaegerConfig() *jaeger.Config

func (*Config) NSQConfig added in v1.27.0

func (cfg *Config) NSQConfig() *nsq.Config

func (*Config) PGConfig added in v1.27.0

func (cfg *Config) PGConfig() *pg.Config

func (*Config) RedisConfig added in v1.27.0

func (cfg *Config) RedisConfig() *redis.Config

func (*Config) RistrettoConfig added in v1.27.0

func (cfg *Config) RistrettoConfig() *ristretto.Config

func (*Config) Unmarshal added in v1.27.0

func (cfg *Config) Unmarshal(bytes []byte) error

type Configurator added in v1.27.0

type Configurator interface {
	Unmarshal(in []byte) error
	RedisConfig() *redis.Config
	RistrettoConfig() *ristretto.Config
	Auth0Config() *auth0.Config
	PGConfig() *pg.Config
	DatadogConfig() *datadog.Config
	JaegerConfig() *jaeger.Config
	GRPCConfig() *grpc.Config
	HTTPConfig() *http.Config
	NSQConfig() *nsq.Config
}

Configurator for config.

func NewConfigurator added in v1.27.0

func NewConfigurator() Configurator

NewConfigurator for config.

Jump to

Keyboard shortcuts

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