Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(path string)
Types ¶
type AdminConfig ¶
type AdminConfig struct { Debug bool `json:"debug"` Logger *LoggerConfig `json:"logger"` Gin *GinConfig `json:"gin` MySql []*MySqlConfig `json:"mysql"` Redis []*RedisConfig `json:"redis"` }
func Get ¶
func Get() *AdminConfig
func (*AdminConfig) IsDebug ¶
func (a *AdminConfig) IsDebug() bool
type LoggerConfig ¶
type LoggerConfig struct { Path string `json:"path"` Suffix string `json:"suffix"` Level string `json:"level"` IsWriteFile bool `json:"isWriteFile"` MaxAge int `json:"maxAge"` RotationHour int `json:"rotationHour"` }
func (*LoggerConfig) GetFileName ¶
func (l *LoggerConfig) GetFileName() string
func (*LoggerConfig) GetLevel ¶
func (l *LoggerConfig) GetLevel() zapcore.Level
type MySqlConfig ¶
type MySqlConfig struct { Enable bool `json:"enable"` GroupId string `json:"groupId"` Id string `json:"id"` DbName string `json:"dbName"` Host string `json:"host"` UserName string `json:"userName"` Password string `json:"password"` MaxIdleConnect int `json:"maxIdleConnect"` MaXOpenConnect int `json:"maxOpenConnect"` LogMode bool `json:"logMode"` }
Click to show internal directories.
Click to hide internal directories.