2024-07-23 14:48:37 +08:00
|
|
|
package dto
|
|
|
|
|
2024-08-09 18:30:39 +08:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
2024-07-23 14:48:37 +08:00
|
|
|
|
2025-01-14 14:27:51 +08:00
|
|
|
type BackupOperate struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
IsPublic bool `json:"isPublic"`
|
|
|
|
Bucket string `json:"bucket"`
|
|
|
|
AccessKey string `json:"accessKey"`
|
|
|
|
Credential string `json:"credential"`
|
|
|
|
BackupPath string `json:"backupPath"`
|
|
|
|
Vars string `json:"vars" validate:"required"`
|
|
|
|
|
|
|
|
RememberAuth bool `json:"rememberAuth"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BackupInfo struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
IsPublic bool `json:"isPublic"`
|
|
|
|
Bucket string `json:"bucket"`
|
|
|
|
AccessKey string `json:"accessKey"`
|
|
|
|
Credential string `json:"credential"`
|
|
|
|
BackupPath string `json:"backupPath"`
|
|
|
|
Vars string `json:"vars"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
|
|
|
|
RememberAuth bool `json:"rememberAuth"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ForBuckets struct {
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
AccessKey string `json:"accessKey"`
|
|
|
|
Credential string `json:"credential" validate:"required"`
|
|
|
|
Vars string `json:"vars" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2024-12-26 14:13:41 +08:00
|
|
|
type SyncFromMaster struct {
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Operation string `json:"operation" validate:"required,oneof=create delete update"`
|
|
|
|
Data string `json:"data"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BackupOption struct {
|
2025-01-14 14:27:51 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
IsPublic bool `json:"isPublic"`
|
2024-12-26 14:13:41 +08:00
|
|
|
}
|
|
|
|
|
2024-07-23 14:48:37 +08:00
|
|
|
type CommonBackup struct {
|
|
|
|
Type string `json:"type" validate:"required,oneof=app mysql mariadb redis website postgresql"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
Secret string `json:"secret"`
|
2024-09-27 22:23:38 +08:00
|
|
|
TaskID string `json:"taskID"`
|
2024-11-30 19:42:10 +08:00
|
|
|
FileName string `json:"fileName"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
type CommonRecover struct {
|
2024-08-14 10:15:55 +08:00
|
|
|
DownloadAccountID uint `json:"downloadAccountID" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required,oneof=app mysql mariadb redis website postgresql"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
File string `json:"file"`
|
|
|
|
Secret string `json:"secret"`
|
2024-09-27 22:23:38 +08:00
|
|
|
TaskID string `json:"taskID"`
|
|
|
|
BackupRecordID uint `json:"backupRecordID"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type RecordSearch struct {
|
|
|
|
PageInfo
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type RecordSearchByCronjob struct {
|
|
|
|
PageInfo
|
|
|
|
CronjobID uint `json:"cronjobID" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BackupRecords struct {
|
2024-08-14 10:15:55 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
AccountType string `json:"accountType"`
|
|
|
|
AccountName string `json:"accountName"`
|
|
|
|
DownloadAccountID uint `json:"downloadAccountID"`
|
|
|
|
FileDir string `json:"fileDir"`
|
|
|
|
FileName string `json:"fileName"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type DownloadRecord struct {
|
2024-08-13 15:33:34 +08:00
|
|
|
DownloadAccountID uint `json:"downloadAccountID" validate:"required"`
|
|
|
|
FileDir string `json:"fileDir" validate:"required"`
|
|
|
|
FileName string `json:"fileName" validate:"required"`
|
2024-07-23 14:48:37 +08:00
|
|
|
}
|
2025-01-14 14:27:51 +08:00
|
|
|
|
|
|
|
type SearchForSize struct {
|
|
|
|
PageInfo
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
Info string `json:"info"`
|
|
|
|
CronjobID uint `json:"cronjobID"`
|
|
|
|
}
|
|
|
|
type RecordFileSize struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Size int64 `json:"size"`
|
|
|
|
}
|