Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigYml c.IYmlConfig = c.ConfigYml
View Source
var Server = &Config.Server
Functions ¶
Types ¶
type ApplicationSetting ¶
type ApplicationSetting struct { Debug bool `json:"debug"` PageSize int `json:"pageSize" yaml:"pageSize"` PrefixUrl string `json:"prefixUrl" yaml:"prefixUrl"` RuntimeRootPath string ImageSavePath string ImageMaxSize int ImageAllowExts []string ExportSavePath string QrCodeSavePath string FontSavePath string LogSavePath string LogSaveName string LogFileExt string TimeFormat string }
var Application *ApplicationSetting = &ApplicationSetting{}
type Configuration ¶
type Configuration struct { Server ServerSetting `json:"server"` FileUpload FileUploadSetting `json:"fileUpload" yaml:"fileUpload"` }
*
- 全局配置
var Config *Configuration = &Configuration{}
type FileUploadSetting ¶
type FileUploadSetting struct { Size int `json:"size"` UploadFileField string `json:"uploadFileField" yaml:"uploadFileField"` UploadFileSavePath string `json:"uploadFileSavePath" yaml:"uploadFileSavePath"` UploadFileReturnPath string `json:"uploadFileReturnPath" yaml:"uploadFileReturnPath"` AllowMimeType []string `json:"allowMimeType" yaml:"allowMimeType"` }
*
- 文件上传配置
var FileUpload *FileUploadSetting = &Config.FileUpload
type ServerSetting ¶
type ServerSetting struct { BindAddr string `json:"bindAddr" yaml:"bindAddr"` Port int `json:"port"` ReadTimeout time.Duration `json:"readTimeout" yaml:"readTimeout"` WriteTimeout time.Duration `json:"wirteTimeout" yaml:"writeTimeout"` AllowCrossDomain bool `json:"allowCrossDomain" yaml:"allowCrossDomain"` }
*
- 服务配置:地址/端口
Click to show internal directories.
Click to hide internal directories.