Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module( "config", fx.Provide( NewConfig, GetConfigHttp, GetConfigLog, GetConfigCache, GetConfigGrpcAccountService, GetConfigAuth, GetConfigAuthToken, ), )
Functions ¶
This section is empty.
Types ¶
type AccountService ¶
func GetConfigGrpcAccountService ¶
func GetConfigGrpcAccountService(c Config) AccountService
type Auth ¶
func GetConfigAuth ¶
type Cache ¶
type Cache struct {
Type CacheType `yaml:"type"`
Address string `yaml:"address"`
Port string `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
}
func GetConfigCache ¶
type Config ¶
type Config struct {
Http Http `yaml:"http"`
Auth Auth `yaml:"auth"`
Log Log `yaml:"log"`
Cache Cache `yaml:"cache"`
Grpc Grpc `yaml:"grpc"`
}
func NewConfig ¶
func NewConfig(filePath ConfigFilePath) (Config, error)
Creates a new config instance by reading from a given YAML file. If the filePath is empty, it uses the default embedded configuration.
type ConfigFilePath ¶
type ConfigFilePath string
type Grpc ¶
type Grpc struct {
AccountService AccountService `yaml:"account_service"`
}
type Http ¶
func GetConfigHttp ¶
Click to show internal directories.
Click to hide internal directories.