1Panel/backend/app/dto/setting.go

91 lines
2.7 KiB
Go
Raw Normal View History

2022-09-15 10:44:43 +08:00
package dto
2023-01-06 18:53:25 +08:00
import "time"
2022-09-15 10:44:43 +08:00
type SettingInfo struct {
UserName string `json:"userName"`
Email string `json:"email"`
SystemVersion string `json:"systemVersion"`
2022-09-15 10:44:43 +08:00
2022-12-22 18:06:49 +08:00
SessionTimeout string `json:"sessionTimeout"`
LocalTime string `json:"localTime"`
2022-09-15 10:44:43 +08:00
Port string `json:"port"`
2022-09-15 10:44:43 +08:00
PanelName string `json:"panelName"`
Theme string `json:"theme"`
Language string `json:"language"`
2022-12-22 18:06:49 +08:00
ServerPort string `json:"serverPort"`
2022-09-15 10:44:43 +08:00
SecurityEntrance string `json:"securityEntrance"`
2022-12-22 18:06:49 +08:00
ExpirationDays string `json:"expirationDays"`
ExpirationTime string `json:"expirationTime"`
2022-09-15 10:44:43 +08:00
ComplexityVerification string `json:"complexityVerification"`
MFAStatus string `json:"mfaStatus"`
2022-09-14 23:27:17 +08:00
MFASecret string `json:"mfaSecret"`
2022-09-15 10:44:43 +08:00
MonitorStatus string `json:"monitorStatus"`
2022-12-22 18:06:49 +08:00
MonitorStoreDays string `json:"monitorStoreDays"`
2022-09-15 10:44:43 +08:00
MessageType string `json:"messageType"`
EmailVars string `json:"emailVars"`
WeChatVars string `json:"weChatVars"`
DingVars string `json:"dingVars"`
AppStoreVersion string `json:"appStoreVersion"`
2022-09-15 10:44:43 +08:00
}
type SettingUpdate struct {
Key string `json:"key" validate:"required"`
Value string `json:"value"`
}
2022-09-08 18:47:15 +08:00
type PasswordUpdate struct {
OldPassword string `json:"oldPassword" validate:"required"`
NewPassword string `json:"newPassword" validate:"required"`
}
2023-01-06 18:53:25 +08:00
type PortUpdate struct {
ServerPort uint `json:"serverPort" validate:"required,number,max=65535,min=1"`
}
2023-01-06 18:53:25 +08:00
type SnapshotCreate struct {
From string `json:"from" validate:"required,oneof=OSS S3 SFTP MINIO"`
2023-01-06 18:53:25 +08:00
Description string `json:"description"`
}
type SnapshotRecover struct {
IsNew bool `json:"isNew"`
ReDownload bool `json:"reDownload"`
ID uint `json:"id" validate:"required"`
}
2023-02-13 15:48:18 +08:00
type SnapshotImport struct {
From string `json:"from"`
Names []string `json:"names"`
Description string `json:"description"`
}
2023-01-06 18:53:25 +08:00
type SnapshotInfo struct {
ID uint `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
From string `json:"from"`
2023-01-06 18:53:25 +08:00
Status string `json:"status"`
Message string `json:"message"`
CreatedAt time.Time `json:"createdAt"`
Version string `json:"version"`
InterruptStep string `json:"interruptStep"`
RecoverStatus string `json:"recoverStatus"`
RecoverMessage string `json:"recoverMessage"`
LastRecoveredAt string `json:"lastRecoveredAt"`
RollbackStatus string `json:"rollbackStatus"`
RollbackMessage string `json:"rollbackMessage"`
LastRollbackedAt string `json:"lastRollbackedAt"`
}
type UpgradeInfo struct {
NewVersion string `json:"newVersion"`
ReleaseNote string `json:"releaseNote"`
2023-01-30 21:05:20 +08:00
}
type Upgrade struct {
Version string `json:"version"`
2023-01-06 18:53:25 +08:00
}