mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 03:33:53 +08:00
模块化定时任务,方便在插件中注册任务;增加日志分组
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package model
|
||||
|
||||
// 后台配置.
|
||||
|
||||
// BasicConfig 基础配置
|
||||
type BasicConfig struct {
|
||||
CaptchaSwitch int `json:"basicCaptchaSwitch"`
|
||||
@@ -170,123 +172,3 @@ type LoginConfig struct {
|
||||
AutoOpenId int `json:"loginAutoOpenId"`
|
||||
ForceInvite int `json:"loginForceInvite"`
|
||||
}
|
||||
|
||||
///////////// 以下是本地配置
|
||||
|
||||
// SSLConfig https配置
|
||||
type SSLConfig struct {
|
||||
Switch bool `json:"switch"`
|
||||
CrtPath string `json:"crtPath"`
|
||||
KeyPath string `json:"keyPath"`
|
||||
}
|
||||
|
||||
// LogConfig 日志配置
|
||||
type LogConfig struct {
|
||||
Switch bool `json:"switch"`
|
||||
Queue bool `json:"queue"`
|
||||
Module []string `json:"module"`
|
||||
SkipCode []string `json:"skipCode"`
|
||||
}
|
||||
|
||||
// ServeLogConfig 服务日志配置
|
||||
type ServeLogConfig struct {
|
||||
Switch bool `json:"switch"`
|
||||
Queue bool `json:"queue"`
|
||||
LevelFormat []string `json:"levelFormat"`
|
||||
}
|
||||
|
||||
// GenerateAppCrudTemplate curd模板
|
||||
type GenerateAppCrudTemplate struct {
|
||||
Group string `json:"group"`
|
||||
IsAddon bool `json:"isAddon"`
|
||||
MasterPackage string `json:"masterPackage"`
|
||||
TemplatePath string `json:"templatePath"`
|
||||
ApiPath string `json:"apiPath"`
|
||||
InputPath string `json:"inputPath"`
|
||||
ControllerPath string `json:"controllerPath"`
|
||||
LogicPath string `json:"logicPath"`
|
||||
RouterPath string `json:"routerPath"`
|
||||
SqlPath string `json:"sqlPath"`
|
||||
WebApiPath string `json:"webApiPath"`
|
||||
WebViewsPath string `json:"webViewsPath"`
|
||||
}
|
||||
|
||||
// GenerateAppQueueTemplate 消息队列模板
|
||||
type GenerateAppQueueTemplate struct {
|
||||
Group string `json:"group"`
|
||||
TemplatePath string `json:"templatePath"`
|
||||
}
|
||||
|
||||
// GenerateAppTreeTemplate 关系树列表模板
|
||||
type GenerateAppTreeTemplate struct {
|
||||
Group string `json:"group"`
|
||||
TemplatePath string `json:"templatePath"`
|
||||
}
|
||||
|
||||
// GenerateConfig 生成代码配置
|
||||
type GenerateConfig struct {
|
||||
AllowedIPs []string `json:"allowedIPs"`
|
||||
Application struct {
|
||||
Crud struct {
|
||||
Templates []*GenerateAppCrudTemplate `json:"templates"`
|
||||
} `json:"crud"`
|
||||
Queue struct {
|
||||
Templates []*GenerateAppQueueTemplate `json:"templates"`
|
||||
} `json:"queue"`
|
||||
Tree struct {
|
||||
Templates []*GenerateAppTreeTemplate `json:"templates"`
|
||||
} `json:"tree"`
|
||||
} `json:"application"`
|
||||
Delimiters []string `json:"delimiters"`
|
||||
DevPath string `json:"devPath"`
|
||||
DisableTables []string `json:"disableTables"`
|
||||
SelectDbs []string `json:"selectDbs"`
|
||||
Addon *BuildAddonConfig `json:"addon"`
|
||||
}
|
||||
|
||||
// BuildAddonConfig 构建插件模块配置
|
||||
type BuildAddonConfig struct {
|
||||
SrcPath string `json:"srcPath"`
|
||||
TemplatePath string `json:"templatePath"`
|
||||
WebApiPath string `json:"webApiPath"`
|
||||
WebViewsPath string `json:"webViewsPath"`
|
||||
}
|
||||
|
||||
// CacheConfig 缓存配置
|
||||
type CacheConfig struct {
|
||||
Adapter string `json:"adapter"`
|
||||
FileDir string `json:"fileDir"`
|
||||
}
|
||||
|
||||
type TCPServerConfig struct {
|
||||
Address string `json:"address"`
|
||||
}
|
||||
|
||||
type TCPClientConfig struct {
|
||||
Cron *TCPClientConnConfig `json:"cron"`
|
||||
Auth *TCPClientConnConfig `json:"auth"`
|
||||
}
|
||||
|
||||
type TCPClientConnConfig struct {
|
||||
Group string `json:"group"`
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
AppId string `json:"appId"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}
|
||||
|
||||
// TCPConfig tcp服务器配置
|
||||
type TCPConfig struct {
|
||||
Server *TCPServerConfig `json:"server"`
|
||||
Client *TCPClientConfig `json:"client"`
|
||||
}
|
||||
|
||||
// TokenConfig 登录令牌配置
|
||||
type TokenConfig struct {
|
||||
SecretKey string `json:"secretKey"`
|
||||
Expires int64 `json:"expires"`
|
||||
AutoRefresh bool `json:"autoRefresh"`
|
||||
RefreshInterval int64 `json:"refreshInterval"`
|
||||
MaxRefreshTimes int64 `json:"maxRefreshTimes"`
|
||||
MultiLogin bool `json:"multiLogin"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user