2022-09-16 18:53:45 +08:00
|
|
|
package dto
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type BackupOperate struct {
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Bucket string `json:"bucket"`
|
|
|
|
Credential string `json:"credential"`
|
|
|
|
Vars string `json:"vars" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BackupInfo struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Bucket string `json:"bucket"`
|
|
|
|
Vars string `json:"vars"`
|
|
|
|
}
|
|
|
|
|
2022-10-27 23:09:39 +08:00
|
|
|
type BackupSearch struct {
|
|
|
|
PageInfo
|
|
|
|
Type string `json:"type" validate:"required,oneof=website mysql"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
}
|
|
|
|
|
2022-11-29 17:39:10 +08:00
|
|
|
type RecordSearch struct {
|
|
|
|
PageInfo
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
}
|
|
|
|
|
2022-10-27 23:09:39 +08:00
|
|
|
type BackupRecords struct {
|
2022-10-31 17:26:15 +08:00
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
Source string `json:"source"`
|
|
|
|
BackupType string `json:"backupType"`
|
|
|
|
FileDir string `json:"fileDir"`
|
|
|
|
FileName string `json:"fileName"`
|
2022-10-27 23:09:39 +08:00
|
|
|
}
|
|
|
|
|
2022-10-28 11:02:47 +08:00
|
|
|
type DownloadRecord struct {
|
|
|
|
Source string `json:"source" validate:"required,oneof=OSS S3 SFTP MINIO LOCAL"`
|
|
|
|
FileDir string `json:"fileDir" validate:"required"`
|
|
|
|
FileName string `json:"fileName" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2022-09-16 18:53:45 +08:00
|
|
|
type ForBuckets struct {
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Credential string `json:"credential" validate:"required"`
|
|
|
|
Vars string `json:"vars" validate:"required"`
|
|
|
|
}
|