CasaOS/model/sys_common.go
link 6f98995e7d
0.3.4 (#385)
* delete connect

* update user

* change branch

* API feedback (#341)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* change branch

* update route

* change branch

* Update route.go

* 0.3.4 Function development completed

* Update system.go

* update ui

* Completed v0.3.4 and released alpha

Co-authored-by: Tiger Wang (王豫) <tigerwang@outlook.com>
2022-07-22 11:02:11 +08:00

87 lines
1.7 KiB
Go

/*
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-05-13 18:15:46
* @LastEditors: LinkLeong
* @LastEditTime: 2022-07-14 11:02:06
* @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
Token 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 {
ConfigPath string `json:"config_path"`
}
type CasaOSGlobalVariables struct {
AppChange bool
}
type FileSetting struct {
ShareDir []string `json:"share_dir" delim:"|"`
DownloadDir string `json:"download_dir"`
}