Documentation
¶
Index ¶
- func InitConfig() (err error)
- func InitConfigEmbed(fs embed.FS) (err error)
- func NewConfig[T any](conf *T) (config *T, err error)
- func SetConfigPath(confPath string)
- func SetConfigType(confType string)
- func Unmarshal(rawVal interface{}, opts ...DecoderConfigOption) error
- type Api
- type App
- type Config
- func (c *Config) GetEs() *ves.Options
- func (c *Config) GetHttpServer() HttpServer
- func (c *Config) GetLog() *vlog.Options
- func (c *Config) GetMetric() *vmetric.Options
- func (c *Config) GetMongodb() *vmongodb.Options
- func (c *Config) GetMysql() *vmysql.Options
- func (c *Config) GetRedis() *redis.UniversalOptions
- func (c *Config) GetTcpServer() vtcp.Server
- func (c *Config) GetWebsocketServer() vwebsocket.Server
- type DecoderConfigOption
- type HttpServer
- type IConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unmarshal ¶
func Unmarshal(rawVal interface{}, opts ...DecoderConfigOption) error
Types ¶
type Config ¶
type Config struct {
Api Api
App App
Es *ves.Options
HttpServer HttpServer
Log *vlog.Options
Metric *vmetric.Options
Mongodb *vmongodb.Options
Mysql *vmysql.Options
Redis *redis.UniversalOptions
TcpServer vtcp.Server
WebsocketServer vwebsocket.Server
}
func (*Config) GetHttpServer ¶
func (c *Config) GetHttpServer() HttpServer
func (*Config) GetMongodb ¶
func (*Config) GetRedis ¶
func (c *Config) GetRedis() *redis.UniversalOptions
func (*Config) GetTcpServer ¶
func (*Config) GetWebsocketServer ¶
func (c *Config) GetWebsocketServer() vwebsocket.Server
type DecoderConfigOption ¶
type DecoderConfigOption = viper.DecoderConfigOption
type HttpServer ¶
Click to show internal directories.
Click to hide internal directories.