2022-06-08 18:19:45 +08:00
|
|
|
/*
|
|
|
|
* @Author: LinkLeong link@icewhale.com
|
|
|
|
* @Date: 2022-05-13 18:15:46
|
|
|
|
* @LastEditors: LinkLeong
|
2022-09-06 14:28:49 +08:00
|
|
|
* @LastEditTime: 2022-09-02 22:12:34
|
2022-06-08 18:19:45 +08:00
|
|
|
* @FilePath: /CasaOS/model/sys_common.go
|
|
|
|
* @Description:
|
|
|
|
* @Website: https://www.casaos.io
|
|
|
|
* Copyright (c) 2022 by icewhale, All Rights Reserved.
|
|
|
|
*/
|
2021-09-26 10:35:02 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
2022-09-28 16:13:42 +01:00
|
|
|
// 系统配置
|
2021-09-26 10:35:02 +08:00
|
|
|
type SysInfoModel struct {
|
|
|
|
Name string //系统名称
|
|
|
|
}
|
|
|
|
|
2022-09-28 16:13:42 +01:00
|
|
|
// 服务配置
|
2021-09-26 10:35:02 +08:00
|
|
|
type ServerModel struct {
|
2022-04-06 12:10:51 +08:00
|
|
|
HttpPort string
|
|
|
|
RunMode string
|
|
|
|
ServerApi string
|
|
|
|
LockAccount bool
|
|
|
|
Token string
|
|
|
|
USBAutoMount string
|
2022-06-08 18:19:45 +08:00
|
|
|
SocketPort string
|
2022-10-17 06:53:23 +01:00
|
|
|
UpdateUrl string
|
2021-09-26 10:35:02 +08:00
|
|
|
}
|
|
|
|
|
2022-09-28 16:13:42 +01:00
|
|
|
// 服务配置
|
2021-09-26 10:35:02 +08:00
|
|
|
type APPModel struct {
|
2022-06-29 11:09:58 +08:00
|
|
|
LogPath string
|
2021-09-26 10:35:02 +08:00
|
|
|
LogSaveName string
|
|
|
|
LogFileExt string
|
|
|
|
DateStrFormat string
|
|
|
|
DateTimeFormat string
|
2022-06-29 11:09:58 +08:00
|
|
|
UserDataPath string
|
2021-09-26 10:35:02 +08:00
|
|
|
TimeFormat string
|
|
|
|
DateFormat string
|
2022-06-29 11:09:58 +08:00
|
|
|
DBPath string
|
|
|
|
ShellPath string
|
2021-09-26 10:35:02 +08:00
|
|
|
}
|
2022-09-06 14:28:49 +08:00
|
|
|
type CommonModel struct {
|
|
|
|
RuntimePath string
|
|
|
|
}
|
2021-09-26 10:35:02 +08:00
|
|
|
|
2022-09-28 16:13:42 +01:00
|
|
|
// 公共返回模型
|
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:"返回结果"`
|
|
|
|
}
|
|
|
|
|
2022-09-28 16:13:42 +01:00
|
|
|
// redis配置文件
|
2021-09-26 10:35:02 +08:00
|
|
|
type RedisModel struct {
|
|
|
|
Host string
|
|
|
|
Password string
|
|
|
|
MaxIdle int
|
|
|
|
MaxActive int
|
|
|
|
IdleTimeout time.Duration
|
|
|
|
}
|
|
|
|
|
|
|
|
type SystemConfig struct {
|
2021-10-22 16:49:09 +08:00
|
|
|
ConfigPath string `json:"config_path"`
|
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"`
|
|
|
|
}
|