config

package
v0.0.0-...-574e995 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerModule = fx.Module("config", fx.Provide(NewServerConfig))
View Source
var WorkerModule = fx.Module("config", fx.Provide(NewWorkerConfig))

Functions

func InitConfig

func InitConfig(configFile string)

Types

type MigrateConfig

type MigrateConfig struct {
	Db db.Config `mapstructure:"db" yaml:"db" validate:"required"`
}

func NewMigrateConfig

func NewMigrateConfig() (MigrateConfig, error)

func (*MigrateConfig) Validate

func (a *MigrateConfig) Validate() error

type ServerConfig

type ServerConfig struct {
	fx.Out
	Logger *logger.Config        `mapstructure:"logger" yaml:"logger" validate:"required"`
	Http   *transport.Config     `mapstructure:"http" yaml:"http" validate:"required"`
	Grpc   *transport.GrpcConfig `mapstructure:"grpc" yaml:"grpc" validate:"required"`
	Db     *db.Config            `mapstructure:"db" yaml:"db" validate:"required"`
}

func NewServerConfig

func NewServerConfig() (ServerConfig, error)

func (*ServerConfig) Validate

func (a *ServerConfig) Validate() error

type WorkerConfig

type WorkerConfig struct {
	fx.Out
	Logger *logger.Config `mapstructure:"logger" yaml:"logger" validate:"required"`
}

func NewWorkerConfig

func NewWorkerConfig() (WorkerConfig, error)

func (*WorkerConfig) Validate

func (a *WorkerConfig) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳