Discover Packages
gitee.com/eiah32/fansgo
pkg
setting
package
Version:
v0.0.0-...-61dbfe3
Opens a new window with list of versions in this module.
Published: Nov 26, 2021
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Setup initialize the configuration instance
type App struct {
JwtSecret string `yaml:"jwtSecret"`
PageSize int `yaml:"pageSize"`
PrefixUrl string `yaml:"prefixUrl"`
RuntimeRootPath string `yaml:"runtimeRootPath"`
ImageSavePath string `yaml:"imageSavePath"`
ImageMaxSize int `yaml:"imageMaxSize"`
ImageAllowExts []string `yaml:"imageAllowExts"`
ExportSavePath string `yaml:"exportSavePath"`
QrCodeSavePath string `yaml:"qrCodeSavePath"`
FontSavePath string `yaml:"fontSavePath"`
LogSavePath string `yaml:"logSavePath"`
LogSaveName string `yaml:"logSaveName"`
LogFileExt string `yaml:"logFileExt"`
TimeFormat string `yaml:"timeFormat"`
LuaSeckillPath string `yaml:"luaSeckillPath"`
}
type AppConfig struct {
App App `yaml:"app"`
Server Server `yaml:"server"`
Casbin Casbin `yaml:"casbin"`
Database Database `yaml:"database"`
}
type Casbin struct {
ModelPath string `yaml:"modelPath"`
}
type Database struct {
Mysql Mysql `yaml:"mysql"`
Redis Redis `yaml:"redis"`
}
type Mysql struct {
Type string `yaml:"type"`
User string `yaml:"user"`
Password string `yaml:"password"`
DbName string `yaml:"dbName"`
Host string `yaml:"host"`
MaxIdle int `yaml:"maxIdle"`
MaxOpen int `yaml:"maxOpen"`
}
type Redis struct {
Host string `yaml:"host"`
Network string `yaml:"network"`
Password string `yaml:"password"`
Database int `yaml:"database"`
MaxIdle int `yaml:"maxIdle"`
MaxActive int `yaml:"maxActive"`
IdleTimeout time .Duration `yaml:"idelTimeout"`
}
type Server struct {
RunMode string `yaml:"runMode"`
HttpPort int `yaml:"httpPort"`
ReadTimeout time .Duration `yaml:"readTimeout"`
WriteTimeout time .Duration `yaml:"writeTimeout"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.