Discover Packages
github.com/menggggggg/go-web-template
internal
app
config
package
Version:
v0.0.0-...-28a21d3
Opens a new window with list of versions in this module.
Published: Sep 26, 2021
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type CORS struct {
Enable bool `yaml:"enable"`
AllowOrigins []string `yaml:"allowOrigins"`
AllowMethods []string `yaml:"allowMethods"`
AllowCredentials bool `yaml:"allowCredentials"`
MaxAge int `yaml:"maxAge"`
}
type Config struct {
RunMode string `yaml:"runMode"`
Swagger bool `yaml:"swagger"`
Log Log `yaml:"log"`
HTTP HTTP `yaml:"http"`
MySQL MySQL `yaml:"mysql"`
Monitor Monitor `yaml:"monitor"`
CORS CORS `yaml:"cores"`
GZIP GZIP `yaml:"gzip"`
}
type GZIP struct {
Enable bool `yaml:"enable"`
}
type HTTP struct {
Addr string `yaml:"addr"`
CertFile string `yaml:"certFile"`
KeyFile string `yaml:"keyFile"`
ShutdownTimeout int `yaml:"shutdownTimeout"`
}
type Log struct {
Level string `yaml:"level"`
Format string `yaml:"format"`
}
type Monitor struct {
Enable bool `yaml:"enable"`
Addr string `yaml:"addr"`
ConfigDir string `yaml:"configDir"`
}
type MySQL struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
User string `yaml:"user"`
Password string `yaml:"password"`
DBName string `yaml:"dbName"`
Parameters string `yaml:"parameters"`
MaxLifetime int `yaml:"maxLifetime"`
MaxOpenConns int `yaml:"maxOpenConns"`
MaxIdleConns int `yaml:"maxIdleConns"`
}
MySQL mysql配置参数
Source Files
¶
Click to show internal directories.
Click to hide internal directories.