Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFromYaml ¶
LoadConfigFromToml 从Toml文件中加载
Types ¶
type Config ¶
type Config struct { Apps *App `mapstructure:"server"` Log *Log `mapstructure:"log"` MySQL *MySQL `mapstructure:"mysql" ` Oss *Oss `mapstructure:"oss"` }
Config 应用配置
type Log ¶
type Log struct { Level string `mapstructure:"level"` InfoFilename string `mapstructure:"infoFilename"` ErrFilename string `mapstructure:"errFilename"` MaxSize int `mapstructure:"max_size"` MaxAge int `mapstructure:"max_age"` MaxBackups int `mapstructure:"max_backups"` }
Log todo
type MySQL ¶
type MySQL struct { Host string `mapstructure:"host"` Port string `mapstructure:"port"` User string `mapstructure:"user"` Password string `mapstructure:"password"` Dbname string `mapstructure:"dbname"` MaxIdleConns int `mapstructure:"max_idle_conns"` MaxOpenConns int `mapstructure:"max_open_conns"` }
MySQL todo
type Oss ¶
type Oss struct { AccessKeyId string `mapstructure:"ALI_AK"` AccessKeySecret string `mapstructure:"ALI_SK"` OssEndpoint string `mapstructure:"ALI_OSS_ENDPOINT"` BucketName string `mapstructure:"ALI_BUCKET_NAME"` OssVideoDir string `mapstructure:" OSS_VIDEO_DIR"` PlayUrlPrefix string `mapstructure:"PLAY_URL_PREFIX"` }
Click to show internal directories.
Click to hide internal directories.