Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide( func() (*Config, error) { var cfg Config if envutils.GetEnvBoolWithDefault("API_LOCAL", false) { if err := godotenv.Load(); err != nil { return nil, err } } if err := configor.New(&configor.Config{ErrorOnUnmatchedKeys: true}).Load(&cfg, "cmd/api/configuration/default.json"); err != nil { return nil, err } return &cfg, nil }, func(cfg *Config) *httpserver.Config { return cfg.APIHTTP }, func(cfg *Config) *fxpostgres.Config { return cfg.APIDataStore }, func(cfg *Config) *fxlogger.Config { return cfg.APILogger }, func(cfg *Config) *fxrf.Config { return cfg.APIResponseFactory }, func(cfg *Config) *smtp.SenderConfig { return cfg.APISMTPSender }, ), )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { APILocal bool `default:"true"` APILogger *fxlogger.Config APIHTTP *httpserver.Config APIDataStore *fxpostgres.Config APIResponseFactory *fxrf.Config APISMTPSender *smtp.SenderConfig }
Click to show internal directories.
Click to hide internal directories.