package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Aug 15, 2023
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func SetConfigPath(path string)
type App struct {
Server Server `json:"server" yaml:"server"`
Env pkg.Env `json:"env" yaml:"env"`
Data Data `json:"data" yaml:"data"`
Logger logger.Config `json:"logger" yaml:"logger"`
MQ pkg.MQ `json:"rabbitmq" yaml:"rabbitmq"`
Oss oss.Oss `json:"oss" yaml:"oss"`
Jwt jwt.Jwt `json:"jwt" yaml:"jwt"`
Wechat wechat.Config `json:"wechat" yaml:"wechat"`
WithCronJob bool `json:"-"`
WithOutMQ bool `json:"-"`
}
type Data struct {
Db mysql.DB `json:"db" yaml:"db"`
Redis redis.Redis `json:"redis" yaml:"redis"`
}
type Grpc struct {
Network string `json:"network" yaml:"network"`
Addr string `json:"addr" yaml:"addr"`
Port string `json:"port" yaml:"port"`
Timeout time.Duration `json:"timeout" yaml:"timeout"`
}
type Http struct {
Network string `json:"network" yaml:"network"`
Addr string `json:"addr" yaml:"addr"`
Port int `json:"port" yaml:"port"`
Timeout time.Duration `json:"timeout" yaml:"timeout"`
}
type Server struct {
Http Http `json:"http" yaml:"http"`
Grpc Grpc `json:"grpc" yaml:"grpc"`
WS WS `json:"ws" yaml:"ws"`
}
type WS struct {
Network string `json:"network" yaml:"network"`
Addr string `json:"addr" yaml:"addr"`
Port int `json:"port" yaml:"port"`
PingTimeout time.Duration `json:"pingTimeout" yaml:"pingTimeout"`
PingInterval time.Duration `json:"pingInterval" yaml:"pingInterval"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.