2021-09-26 10:35:02 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
//系统配置
|
|
|
|
type SysInfoModel struct {
|
|
|
|
Name string //系统名称
|
|
|
|
}
|
|
|
|
|
|
|
|
//用户相关
|
|
|
|
type UserModel struct {
|
|
|
|
UserName string
|
|
|
|
PWD string
|
|
|
|
Token string
|
|
|
|
Head string
|
|
|
|
Email string
|
|
|
|
Description string
|
2021-10-22 17:57:22 +08:00
|
|
|
Initialized bool
|
2022-03-11 18:01:09 +08:00
|
|
|
Avatar string
|
2021-09-26 10:35:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//服务配置
|
|
|
|
type ServerModel struct {
|
2021-12-01 16:25:56 +08:00
|
|
|
HttpPort string
|
|
|
|
RunMode string
|
|
|
|
ServerApi string
|
|
|
|
LockAccount bool
|
2022-02-17 18:43:25 +08:00
|
|
|
Handshake string
|
|
|
|
Token string
|
2021-09-26 10:35:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//服务配置
|
|
|
|
type APPModel struct {
|
|
|
|
LogSavePath string
|
|
|
|
LogSaveName string
|
|
|
|
LogFileExt string
|
|
|
|
DateStrFormat string
|
|
|
|
DateTimeFormat string
|
|
|
|
TimeFormat string
|
|
|
|
DateFormat string
|
|
|
|
ProjectPath string
|
2022-03-16 15:41:14 +08:00
|
|
|
RootPath string
|
2021-09-26 10:35:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//公共返回模型
|
|
|
|
type Result struct {
|
|
|
|
Success int `json:"success" example:"200"`
|
|
|
|
Message string `json:"message" example:"ok"`
|
|
|
|
Data interface{} `json:"data" example:"返回结果"`
|
|
|
|
}
|
|
|
|
|
|
|
|
//zeritier相关
|
|
|
|
type ZeroTierModel struct {
|
|
|
|
UserName string
|
|
|
|
PWD string
|
|
|
|
Token string
|
|
|
|
}
|
|
|
|
|
|
|
|
//redis配置文件
|
|
|
|
type RedisModel struct {
|
|
|
|
Host string
|
|
|
|
Password string
|
|
|
|
MaxIdle int
|
|
|
|
MaxActive int
|
|
|
|
IdleTimeout time.Duration
|
|
|
|
}
|
|
|
|
|
|
|
|
type SystemConfig struct {
|
2021-10-15 11:43:41 +08:00
|
|
|
ConfigStr string `json:"config_str"`
|
|
|
|
WidgetList string `json:"widget_list"`
|
2021-10-22 16:49:09 +08:00
|
|
|
ConfigPath string `json:"config_path"`
|
2021-11-09 18:57:50 +08:00
|
|
|
SyncPort string `json:"sync_port"`
|
|
|
|
SyncKey string `json:"sync_key"`
|
2022-03-09 16:37:03 +08:00
|
|
|
Analyse string `json:"analyse"`
|
2021-09-26 10:35:02 +08:00
|
|
|
}
|
2021-12-09 19:02:41 +08:00
|
|
|
|
|
|
|
type CasaOSGlobalVariables struct {
|
2021-12-10 14:17:36 +08:00
|
|
|
AppChange bool
|
2021-12-09 19:02:41 +08:00
|
|
|
}
|
2022-03-16 15:41:14 +08:00
|
|
|
|
|
|
|
type FileSetting struct {
|
|
|
|
ShareDir []string `json:"share_dir" delim:"|"`
|
|
|
|
DownloadDir string `json:"download_dir"`
|
|
|
|
}
|