/
backup_account.go
38 lines (32 loc) · 1.36 KB
/
backup_account.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package dto
import "github.com/KubeOperator/KubeOperator/pkg/model"
type BackupAccount struct {
model.BackupAccount
CredentialVars interface{} `json:"credentialVars"`
Projects string `json:"projects"`
Clusters string `json:"clusters"`
}
type BackupAccountOp struct {
Operation string `json:"operation" validate:"required"`
Items []BackupAccount `json:"items" validate:"required"`
}
type BackupAccountRequest struct {
Name string `json:"name" validate:"required"`
CredentialVars interface{} `json:"credentialVars" validate:"required"`
Bucket string `json:"bucket" validate:"required"`
Type string `json:"type" validate:"required"`
Projects []string `json:"projects"`
Clusters []string `json:"clusters"`
}
type BackupAccountUpdate struct {
ID string `json:"id" validate:"required"`
Name string `json:"name" validate:"required"`
CredentialVars interface{} `json:"credentialVars" validate:"required"`
Bucket string `json:"bucket" validate:"required"`
Type string `json:"type" validate:"required"`
Projects []string `json:"projects"`
}
type CloudStorageRequest struct {
CredentialVars interface{} `json:"credentialVars" validate:"required"`
Type string `json:"type" validate:"required"`
}