/
multi_cluster_repository.go
50 lines (41 loc) · 1.46 KB
/
multi_cluster_repository.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
39
40
41
42
43
44
45
46
47
48
49
50
package dto
import "github.com/KubeOperator/KubeOperator/pkg/model"
type MultiClusterRepository struct {
model.MultiClusterRepository
}
type MultiClusterRepositoryCreateRequest struct {
Name string `json:"name"`
Source string `json:"source"`
Branch string `json:"branch"`
Username string `json:"username"`
Password string `json:"password"`
}
type MultiClusterRepositoryUpdateRequest struct {
GitTimeout int64 `json:"gitTimeout"`
SyncInterval int64 `json:"syncInterval"`
SyncEnable bool `json:"syncEnable"`
}
type UpdateRelationRequest struct {
ClusterNames []string `json:"clusterNames"`
Delete bool `json:"delete"`
}
type ClusterRelation struct {
model.ClusterMultiClusterRepository
ClusterName string `json:"clusterName"`
}
type MultiClusterSyncClusterLog struct {
model.MultiClusterSyncClusterLog
MultiClusterSyncClusterResourceLogs []model.MultiClusterSyncClusterResourceLog `json:"multiClusterSyncClusterResourceLogs"`
ClusterName string `json:"clusterName"`
}
type MultiClusterSyncLogDetail struct {
model.MultiClusterSyncLog
MultiClusterSyncClusterLogs []MultiClusterSyncClusterLog `json:"multiClusterSyncClusterLogs"`
}
type MultiClusterSyncLog struct {
model.MultiClusterSyncLog
}
type MultiClusterRepositoryBatch struct {
Operation string `json:"operation" validate:"required"`
Items []MultiClusterRepository `json:"items" validate:"required"`
}