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 ¶
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
Click to show internal directories.
Click to hide internal directories.