forked from IceWhaleTech/CasaOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sys_common.go
94 lines (84 loc) · 1.91 KB
/
sys_common.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
* @Author: LinkLeong [email protected]
* @Date: 2022-05-13 18:15:46
* @LastEditors: LinkLeong
* @LastEditTime: 2022-06-16 17:50:56
* @FilePath: /CasaOS/model/sys_common.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package model
import "time"
//系统配置
type SysInfoModel struct {
Name string //系统名称
}
//用户相关
type UserModel struct {
UserName string
PWD string
Token string
Head string
Email string
Description string
Initialized bool
Avatar string
NickName string
Public string
}
//服务配置
type ServerModel struct {
HttpPort string
RunMode string
ServerApi string
LockAccount bool
Handshake string
Token string
UDPPort string
USBAutoMount string
SocketPort string
}
//服务配置
type APPModel struct {
LogPath string
LogSaveName string
LogFileExt string
DateStrFormat string
DateTimeFormat string
UserDataPath string
TimeFormat string
DateFormat string
DBPath string
ShellPath string
TempPath string
}
//公共返回模型
type Result struct {
Success int `json:"success" example:"200"`
Message string `json:"message" example:"ok"`
Data interface{} `json:"data" example:"返回结果"`
}
//redis配置文件
type RedisModel struct {
Host string
Password string
MaxIdle int
MaxActive int
IdleTimeout time.Duration
}
type SystemConfig struct {
ConfigStr string `json:"config_str"`
WidgetList string `json:"widget_list"`
ConfigPath string `json:"config_path"`
SyncPort string `json:"sync_port"`
SyncKey string `json:"sync_key"`
Analyse string `json:"analyse"`
}
type CasaOSGlobalVariables struct {
AppChange bool
}
type FileSetting struct {
ShareDir []string `json:"share_dir" delim:"|"`
DownloadDir string `json:"download_dir"`
}