mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
refactor: 重命名备份存储
This commit is contained in:
@@ -7,9 +7,9 @@ type BackupList struct {
|
||||
}
|
||||
|
||||
type BackupCreate struct {
|
||||
Type string `uri:"type" form:"type" validate:"required|in:website,mysql,postgres,redis,panel"`
|
||||
Target string `json:"target" form:"target" validate:"required|regex:^[a-zA-Z0-9_-]+$"`
|
||||
AccountID uint `form:"account_id" json:"account_id" validate:"required|exists:backup_accounts,id"`
|
||||
Type string `uri:"type" form:"type" validate:"required|in:website,mysql,postgres,redis,panel"`
|
||||
Target string `json:"target" form:"target" validate:"required|regex:^[a-zA-Z0-9_-]+$"`
|
||||
Storage uint `form:"storage" json:"storage" validate:"required|exists:backup_storages,id"`
|
||||
}
|
||||
|
||||
type BackupUpload struct {
|
||||
|
||||
@@ -2,15 +2,15 @@ package request
|
||||
|
||||
import "github.com/acepanel/panel/pkg/types"
|
||||
|
||||
type BackupAccountCreate struct {
|
||||
type BackupStorageCreate struct {
|
||||
Type string `form:"type" json:"type" validate:"required|in:s3,sftp,webdav"`
|
||||
Name string `form:"name" json:"name" validate:"required"`
|
||||
Info types.BackupAccountInfo `form:"info" json:"info"`
|
||||
Info types.BackupStorageInfo `form:"info" json:"info"`
|
||||
}
|
||||
|
||||
type BackupAccountUpdate struct {
|
||||
ID uint `form:"id" json:"id" validate:"required|exists:backup_accounts,id"`
|
||||
type BackupStorageUpdate struct {
|
||||
ID uint `form:"id" json:"id" validate:"required|exists:backup_storages,id"`
|
||||
Type string `form:"type" json:"type" validate:"required|in:s3,sftp,webdav"`
|
||||
Name string `form:"name" json:"name" validate:"required"`
|
||||
Info types.BackupAccountInfo `form:"info" json:"info"`
|
||||
Info types.BackupStorageInfo `form:"info" json:"info"`
|
||||
}
|
||||
@@ -6,9 +6,9 @@ type CronCreate struct {
|
||||
Time string `form:"time" json:"time" validate:"required|cron"`
|
||||
Script string `form:"script" json:"script"`
|
||||
BackupType string `form:"backup_type" json:"backup_type" validate:"requiredIf:Type,backup"`
|
||||
BackupAccount uint `form:"backup_account" json:"backup_account"`
|
||||
BackupStorage uint `form:"backup_storage" json:"backup_storage"`
|
||||
Target string `form:"target" json:"target" validate:"requiredIf:Type,backup,cutoff"`
|
||||
Save int `form:"save" json:"save" validate:"required"`
|
||||
Keep uint `form:"keep" json:"keep" validate:"required"`
|
||||
}
|
||||
|
||||
type CronUpdate struct {
|
||||
|
||||
Reference in New Issue
Block a user