2022-09-16 10:53:45 +00:00
|
|
|
package dto
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type BackupOperate struct {
|
2022-12-13 10:54:28 +00:00
|
|
|
ID uint `json:"id"`
|
2022-09-16 10:53:45 +00:00
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Bucket string `json:"bucket"`
|
2022-12-22 07:03:43 +00:00
|
|
|
AccessKey string `json:"accessKey"`
|
2022-09-16 10:53:45 +00:00
|
|
|
Credential string `json:"credential"`
|
2023-06-23 15:06:13 +00:00
|
|
|
BackupPath string `json:"backupPath"`
|
2022-09-16 10:53:45 +00:00
|
|
|
Vars string `json:"vars" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BackupInfo struct {
|
2023-06-23 15:06:13 +00:00
|
|
|
ID uint `json:"id"`
|
|
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Bucket string `json:"bucket"`
|
|
|
|
BackupPath string `json:"backupPath"`
|
|
|
|
Vars string `json:"vars"`
|
2022-09-16 10:53:45 +00:00
|
|
|
}
|
|
|
|
|
2024-01-19 15:06:41 +00:00
|
|
|
type OneDriveInfo struct {
|
|
|
|
ClientID string `json:"client_id"`
|
|
|
|
ClientSecret string `json:"client_secret"`
|
|
|
|
RedirectUri string `json:"redirect_uri"`
|
|
|
|
}
|
|
|
|
|
2023-02-13 07:48:18 +00:00
|
|
|
type BackupSearchFile struct {
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2023-02-21 11:06:24 +00:00
|
|
|
type CommonBackup struct {
|
2023-12-28 08:29:18 +00:00
|
|
|
Type string `json:"type" validate:"required,oneof=app mysql mariadb redis website postgresql"`
|
2023-02-21 11:06:24 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
DetailName string `json:"detailName"`
|
2024-06-04 08:48:31 +00:00
|
|
|
Secret string `json:"secret"`
|
2023-02-21 11:06:24 +00:00
|
|
|
}
|
|
|
|
type CommonRecover struct {
|
2023-11-30 13:50:08 +00:00
|
|
|
Source string `json:"source" validate:"required,oneof=OSS S3 SFTP MINIO LOCAL COS KODO OneDrive WebDAV"`
|
2023-12-28 08:29:18 +00:00
|
|
|
Type string `json:"type" validate:"required,oneof=app mysql mariadb redis website postgresql"`
|
2023-02-21 11:06:24 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
File string `json:"file"`
|
2024-06-04 08:48:31 +00:00
|
|
|
Secret string `json:"secret"`
|
2023-02-21 11:06:24 +00:00
|
|
|
}
|
|
|
|
|
2022-11-29 09:39:10 +00:00
|
|
|
type RecordSearch struct {
|
|
|
|
PageInfo
|
|
|
|
Type string `json:"type" validate:"required"`
|
2023-10-27 09:19:04 +00:00
|
|
|
Name string `json:"name"`
|
2022-11-29 09:39:10 +00:00
|
|
|
DetailName string `json:"detailName"`
|
|
|
|
}
|
|
|
|
|
2024-01-24 09:41:56 +00:00
|
|
|
type RecordSearchByCronjob struct {
|
|
|
|
PageInfo
|
|
|
|
CronjobID uint `json:"cronjobID" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2022-10-27 15:09:39 +00:00
|
|
|
type BackupRecords struct {
|
2022-10-31 09:26:15 +00: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"`
|
2023-12-01 09:50:09 +00:00
|
|
|
Size int64 `json:"size"`
|
2022-10-27 15:09:39 +00:00
|
|
|
}
|
|
|
|
|
2022-10-28 03:02:47 +00:00
|
|
|
type DownloadRecord struct {
|
2023-11-30 13:50:08 +00:00
|
|
|
Source string `json:"source" validate:"required,oneof=OSS S3 SFTP MINIO LOCAL COS KODO OneDrive WebDAV"`
|
2022-10-28 03:02:47 +00:00
|
|
|
FileDir string `json:"fileDir" validate:"required"`
|
|
|
|
FileName string `json:"fileName" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2022-09-16 10:53:45 +00:00
|
|
|
type ForBuckets struct {
|
|
|
|
Type string `json:"type" validate:"required"`
|
2022-12-22 07:03:43 +00:00
|
|
|
AccessKey string `json:"accessKey"`
|
2022-09-16 10:53:45 +00:00
|
|
|
Credential string `json:"credential" validate:"required"`
|
|
|
|
Vars string `json:"vars" validate:"required"`
|
|
|
|
}
|