mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-06-15 21:45:31 +00:00
* add send notify function * add shell script * add system notiry * remove disk and test common package * update http status * add share function to common * remove temp path * remove /DATA directory initialization - moved to local-storage (#578) * update goreleaser configuration * wip * change service type to notify for systemd so its status is OK only when service is initialized successfully * update CasaOS-Common to fix runtime error * wip * add send notify function * add shell script * add system notiry * remove disk and test common package * update http status * add share function to common * remove temp path * remove /DATA directory initialization - moved to local-storage (#578) * update goreleaser configuration * wip * change service type to notify for systemd so its status is OK only when service is initialized successfully * update CasaOS-Common to fix runtime error * wip * wip * wip * wip * wip * Utilization interface to supplement disk information * fix upload file * wip * wip * add update url * wip * wip * add change log * update changelog Co-authored-by: LinkLeong <a624669980@163.com>
77 lines
1.5 KiB
Go
77 lines
1.5 KiB
Go
/*
|
|
* @Author: LinkLeong link@icewhale.com
|
|
* @Date: 2022-05-13 18:15:46
|
|
* @LastEditors: LinkLeong
|
|
* @LastEditTime: 2022-09-02 22:12:34
|
|
* @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 ServerModel struct {
|
|
HttpPort string
|
|
RunMode string
|
|
ServerApi string
|
|
LockAccount bool
|
|
Token string
|
|
USBAutoMount string
|
|
SocketPort string
|
|
UpdateUrl string
|
|
}
|
|
|
|
// 服务配置
|
|
type APPModel struct {
|
|
LogPath string
|
|
LogSaveName string
|
|
LogFileExt string
|
|
DateStrFormat string
|
|
DateTimeFormat string
|
|
UserDataPath string
|
|
TimeFormat string
|
|
DateFormat string
|
|
DBPath string
|
|
ShellPath string
|
|
}
|
|
type CommonModel struct {
|
|
RuntimePath 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"`
|
|
}
|