@daocloud-proto/mcamel-redis 0.4.0-33 → 0.4.0-331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,78 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
8
+ import * as CommonCommon from "./common.pb"
9
+ import * as fm from "./fetch.pb"
10
+
11
+ export enum CreateCloudShellRequestType {
12
+ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
13
+ bash = "bash",
14
+ exec = "exec",
15
+ logs = "logs",
16
+ upload = "upload",
17
+ download = "download",
18
+ }
19
+
20
+ export type ObjectMeta = {
21
+ name?: string
22
+ namespace?: string
23
+ uid?: string
24
+ resourceVersion?: string
25
+ creationTimestamp?: string
26
+ deletionTimestamp?: string
27
+ labels?: {[key: string]: string}
28
+ annotations?: {[key: string]: string}
29
+ ownerReferences?: CommonCommon.OwnerReference[]
30
+ cluster?: string
31
+ workspaceAlias?: string
32
+ }
33
+
34
+ export type CloudShell = {
35
+ metadata?: ObjectMeta
36
+ spec?: CloudShellSpec
37
+ status?: CloudShellStatus
38
+ }
39
+
40
+ export type CloudShellSpec = {
41
+ configMapName?: string
42
+ once?: boolean
43
+ commandAction?: string
44
+ ttl?: number
45
+ cleanup?: boolean
46
+ }
47
+
48
+ export type CloudShellStatus = {
49
+ phase?: string
50
+ accessUrl?: string
51
+ }
52
+
53
+ export type CreateCloudShellRequest = {
54
+ type?: CreateCloudShellRequestType
55
+ cluster?: string
56
+ namespace?: string
57
+ podName?: string
58
+ filePath?: string
59
+ container?: string
60
+ logCount?: number
61
+ data?: CloudShell
62
+ }
63
+
64
+ export type GetorDeleteCloudShellRequest = {
65
+ name?: string
66
+ }
67
+
68
+ export class CloudShellService {
69
+ static CreateCloudShell(req: CreateCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
70
+ return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/redis/v1alpha1/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
71
+ }
72
+ static GetCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
73
+ return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/redis/v1alpha1/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
74
+ }
75
+ static DeleteCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
76
+ return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/redis/v1alpha1/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
77
+ }
78
+ }
package/cluster.pb.ts CHANGED
@@ -13,6 +13,11 @@ export enum EventType {
13
13
  Warning = "Warning",
14
14
  }
15
15
 
16
+ export enum GetAllEventListReqSortDir {
17
+ ASC = "ASC",
18
+ DESC = "DESC",
19
+ }
20
+
16
21
  export enum GetEventListReqKind {
17
22
  KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
18
23
  Pod = "Pod",
@@ -28,6 +33,70 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
28
33
  Install = "Install",
29
34
  }
30
35
 
36
+ export type GetAllEventKindsListResp = {
37
+ data?: string[]
38
+ }
39
+
40
+ export type GetAllEventKindsListReq = {
41
+ cluster?: string
42
+ }
43
+
44
+ export type GetAllEventListReq = {
45
+ page?: number
46
+ pageSize?: number
47
+ sortDir?: GetAllEventListReqSortDir
48
+ sortBy?: string
49
+ searchKey?: string
50
+ cluster?: string
51
+ namespace?: string
52
+ name?: string
53
+ eventType?: EventType
54
+ kindName?: string
55
+ }
56
+
57
+ export type GetAllEventListRespItemsSource = {
58
+ component?: string
59
+ }
60
+
61
+ export type GetAllEventListRespItemsMetadata = {
62
+ uid?: string
63
+ name?: string
64
+ namespace?: string
65
+ annotations?: {[key: string]: string}
66
+ resourceVersion?: string
67
+ creationTimestamp?: string
68
+ }
69
+
70
+ export type GetAllEventListRespItemsInvolvedObject = {
71
+ uid?: string
72
+ kind?: string
73
+ name?: string
74
+ namespace?: string
75
+ apiVersion?: string
76
+ resourceVersion?: string
77
+ }
78
+
79
+ export type GetAllEventListRespItems = {
80
+ kind?: string
81
+ type?: string
82
+ count?: number
83
+ reason?: string
84
+ source?: GetAllEventListRespItemsSource
85
+ message?: string
86
+ metadata?: GetAllEventListRespItemsMetadata
87
+ apiVersion?: string
88
+ lastTimestamp?: string
89
+ firstTimestamp?: string
90
+ involvedObject?: GetAllEventListRespItemsInvolvedObject
91
+ reportingInstance?: string
92
+ reportingComponent?: string
93
+ }
94
+
95
+ export type GetAllEventListResp = {
96
+ items?: GetAllEventListRespItems[]
97
+ pagination?: CommonCommon.Pagination
98
+ }
99
+
31
100
  export type GetClusterNodeLabelListReq = {
32
101
  cluster?: string
33
102
  }
@@ -42,6 +111,23 @@ export type GetClusterNodeLabelListResp = {
42
111
  pagination?: CommonCommon.Pagination
43
112
  }
44
113
 
114
+ export type GetClusterPodLabelListReq = {
115
+ page?: number
116
+ pageSize?: number
117
+ searchKey?: string
118
+ cluster?: string
119
+ }
120
+
121
+ export type GetClusterPodLabelListRespLabel = {
122
+ key?: string
123
+ value?: string[]
124
+ }
125
+
126
+ export type GetClusterPodLabelListResp = {
127
+ items?: GetClusterPodLabelListRespLabel[]
128
+ pagination?: CommonCommon.Pagination
129
+ }
130
+
45
131
  export type GetClusterNodePortListReq = {
46
132
  cluster?: string
47
133
  }
@@ -56,6 +142,24 @@ export type EventSource = {
56
142
  host?: string
57
143
  }
58
144
 
145
+ export type GetMetallbIPAddressPoolsListReq = {
146
+ cluster?: string
147
+ }
148
+
149
+ export type GetMetallbIPAddressPoolsListRespItem = {
150
+ name?: string
151
+ addresses?: string[]
152
+ autoAssign?: boolean
153
+ avoidBuggyIPs?: boolean
154
+ }
155
+
156
+ export type GetMetallbIPAddressPoolsListResp = {
157
+ items?: GetMetallbIPAddressPoolsListRespItem[]
158
+ isSupportLb?: boolean
159
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy[]
160
+ lbTyp?: CommonCommon.LBTyp[]
161
+ }
162
+
59
163
  export type GetEventListReq = {
60
164
  cluster?: string
61
165
  namespace?: string
@@ -143,6 +247,9 @@ export class Cluster {
143
247
  static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
144
248
  return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
145
249
  }
250
+ static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
251
+ return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
252
+ }
146
253
  static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
147
254
  return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/redis/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
148
255
  }
@@ -152,4 +259,13 @@ export class Cluster {
152
259
  static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
153
260
  return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
154
261
  }
262
+ static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
263
+ return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
264
+ }
265
+ static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
266
+ return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
267
+ }
268
+ static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
269
+ return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
270
+ }
155
271
  }
package/common.pb.ts CHANGED
@@ -4,6 +4,22 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ export enum ExternalTrafficPolicy {
8
+ Cluster = "Cluster",
9
+ Local = "Local",
10
+ }
11
+
12
+ export enum LBTyp {
13
+ MetalLB = "MetalLB",
14
+ Others = "Others",
15
+ }
16
+
17
+ export enum ServiceType {
18
+ ClusterIP = "ClusterIP",
19
+ NodePort = "NodePort",
20
+ LoadBalancer = "LoadBalancer",
21
+ }
22
+
7
23
  export enum PageInfoReqSortDir {
8
24
  ASC = "ASC",
9
25
  DESC = "DESC",
@@ -129,10 +145,26 @@ export type PodCommon = {
129
145
  cpuLimit?: number
130
146
  memoryUsage?: number
131
147
  memoryLimit?: number
148
+ pvUsedInGb?: number
149
+ pvAllocatedInGb?: number
132
150
  conditions?: PodCommonCondition[]
151
+ containersName?: string[]
152
+ ownerReference?: OwnerReference[]
153
+ initContainersName?: string[]
154
+ }
155
+
156
+ export type OwnerReference = {
157
+ uid?: string
158
+ controller?: boolean
159
+ name?: string
160
+ kind?: string
133
161
  }
134
162
 
135
163
  export type CommonItemStatus = {
136
164
  serviceAddresses?: string[]
137
165
  webManagerAddress?: string
166
+ webLogAddress?: string
167
+ isHwameistorSc?: boolean
168
+ avgPvAllocatedInGb?: number
169
+ avgPvUsedInGb?: number
138
170
  }
package/insight.pb.ts CHANGED
@@ -20,27 +20,23 @@ export enum TargetType {
20
20
  DEPLOYMENT = "DEPLOYMENT",
21
21
  STATEFULSET = "STATEFULSET",
22
22
  DAEMONSET = "DAEMONSET",
23
- CRONJOB = "CRONJOB",
24
23
  POD = "POD",
25
24
  }
26
25
 
27
- export enum AlertStatus {
28
- ALERT_STATUS_UNSPECIFIED = "ALERT_STATUS_UNSPECIFIED",
29
- ALERT_STATUS_FIRING = "ALERT_STATUS_FIRING",
30
- ALERT_STATUS_RESOLVED = "ALERT_STATUS_RESOLVED",
31
- }
32
-
33
26
  export type AlertSummary = {
34
- alertId?: string
27
+ id?: string
28
+ groupName?: string
29
+ groupId?: string
35
30
  ruleName?: string
36
- severity?: Severity
31
+ ruleId?: string
37
32
  clusterName?: string
38
33
  namespace?: string
39
34
  targetType?: TargetType
40
- targetName?: string
41
- status?: AlertStatus
35
+ target?: string
36
+ severity?: Severity
37
+ value?: string
38
+ notifyResponse?: string
42
39
  description?: string
43
40
  startAt?: string
44
41
  updateAt?: string
45
- notifyResponse?: string
46
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-redis",
3
- "version":"0.4.0-33",
3
+ "version":"0.4.0-331",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/redis.pb.ts CHANGED
@@ -34,6 +34,34 @@ export enum RedisPodType {
34
34
  Sentinel = "Sentinel",
35
35
  LeaderRedis = "LeaderRedis",
36
36
  FollowerRedis = "FollowerRedis",
37
+ SentinelRedisMaster = "SentinelRedisMaster",
38
+ SentinelRedisReplica = "SentinelRedisReplica",
39
+ }
40
+
41
+ export enum GetRedisBackupListReqSortDir {
42
+ ASC = "ASC",
43
+ DESC = "DESC",
44
+ }
45
+
46
+ export enum GetMinioListReqSortDir {
47
+ ASC = "ASC",
48
+ DESC = "DESC",
49
+ }
50
+
51
+ export enum GetRedisBackupListRespRedisBackupItemStatusStatus {
52
+ Running = "Running",
53
+ Failed = "Failed",
54
+ Succeeded = "Succeeded",
55
+ }
56
+
57
+ export enum CreateRedisBackupReqProvider {
58
+ Minio = "Minio",
59
+ Other = "Other",
60
+ }
61
+
62
+ export enum UpdateRedisAutoBackupReqProvider {
63
+ Minio = "Minio",
64
+ Other = "Other",
37
65
  }
38
66
 
39
67
  export enum GetRedisListReqSortDir {
@@ -46,10 +74,9 @@ export enum GetRedisConfReqSortDir {
46
74
  DESC = "DESC",
47
75
  }
48
76
 
49
- export enum CreateRedisReqServiceType {
50
- ClusterIP = "ClusterIP",
51
- NodePort = "NodePort",
52
- LoadBalancer = "LoadBalancer",
77
+ export enum CreateRedisReqRestoreProvider {
78
+ Minio = "Minio",
79
+ Other = "Other",
53
80
  }
54
81
 
55
82
  export enum GetRedisParamRespSelectSelectType {
@@ -76,6 +103,150 @@ export enum GetRedisConfRespItemsParamType {
76
103
  conf = "conf",
77
104
  }
78
105
 
106
+ export type CreateRedisRecoverReq = {
107
+ workspaceId?: number
108
+ cluster?: string
109
+ namespace?: string
110
+ name?: string
111
+ backupName?: string
112
+ targetRedisName?: string
113
+ instanceType?: InstanceType
114
+ }
115
+
116
+ export type CreateRedisRecoverResp = {
117
+ message?: string
118
+ }
119
+
120
+ export type DeleteRedisBackupReq = {
121
+ cluster?: string
122
+ namespace?: string
123
+ backupName?: string
124
+ isOpenAutoBackup?: boolean
125
+ instanceType?: InstanceType
126
+ }
127
+
128
+ export type DeleteRedisBackupResp = {
129
+ message?: string
130
+ }
131
+
132
+ export type GetRedisBackupListReq = {
133
+ page?: number
134
+ pageSize?: number
135
+ sortDir?: GetRedisBackupListReqSortDir
136
+ sortBy?: string
137
+ searchKey?: string
138
+ cluster?: string
139
+ namespace?: string
140
+ name?: string
141
+ }
142
+
143
+ export type GetMinioListReq = {
144
+ page?: number
145
+ pageSize?: number
146
+ sortDir?: GetMinioListReqSortDir
147
+ sortBy?: string
148
+ searchKey?: string
149
+ workspaceId?: number
150
+ }
151
+
152
+ export type GetMinioListResp = {
153
+ items?: TenantItem[]
154
+ pagination?: CommonCommon.Pagination
155
+ }
156
+
157
+ export type TenantItemCreateMinioReq = {
158
+ name?: string
159
+ namespace?: string
160
+ cluster?: string
161
+ }
162
+
163
+ export type TenantItem = {
164
+ apiVersion?: string
165
+ kind?: string
166
+ spec?: TenantItemCreateMinioReq
167
+ status?: TenantItemStatus
168
+ }
169
+
170
+ export type TenantItemStatus = {
171
+ common?: CommonCommon.CommonItemStatus
172
+ }
173
+
174
+ export type GetRedisBackupListRespRedisBackupItemMetadata = {
175
+ creationTimestamp?: string
176
+ name?: string
177
+ namespace?: string
178
+ }
179
+
180
+ export type GetRedisBackupListRespRedisBackupItemStatusJobCondition = {
181
+ type?: string
182
+ status?: string
183
+ reason?: string
184
+ message?: string
185
+ }
186
+
187
+ export type GetRedisBackupListRespRedisBackupItemStatus = {
188
+ completionTime?: string
189
+ startTime?: string
190
+ active?: number
191
+ succeeded?: number
192
+ failed?: number
193
+ conditions?: GetRedisBackupListRespRedisBackupItemStatusJobCondition[]
194
+ isAutoBackup?: boolean
195
+ status?: GetRedisBackupListRespRedisBackupItemStatusStatus
196
+ }
197
+
198
+ export type GetRedisBackupListRespRedisBackupItem = {
199
+ metadata?: GetRedisBackupListRespRedisBackupItemMetadata
200
+ spec?: CreateRedisBackupReq
201
+ status?: GetRedisBackupListRespRedisBackupItemStatus
202
+ }
203
+
204
+ export type GetRedisBackupListResp = {
205
+ items?: GetRedisBackupListRespRedisBackupItem[]
206
+ pagination?: CommonCommon.Pagination
207
+ }
208
+
209
+ export type CreateRedisBackupReq = {
210
+ cluster?: string
211
+ namespace?: string
212
+ name?: string
213
+ instanceType?: InstanceType
214
+ backupName?: string
215
+ accessKeyId?: string
216
+ accessKeySecret?: string
217
+ endpoint?: string
218
+ provider?: CreateRedisBackupReqProvider
219
+ storePath?: string
220
+ genCreateTime?: string
221
+ }
222
+
223
+ export type UpdateRedisAutoBackupReq = {
224
+ workspaceId?: number
225
+ cluster?: string
226
+ namespace?: string
227
+ name?: string
228
+ instanceType?: InstanceType
229
+ accessKeyId?: string
230
+ accessKeySecret?: string
231
+ endpoint?: string
232
+ provider?: UpdateRedisAutoBackupReqProvider
233
+ storePath?: string
234
+ isOpenAutoBackup?: boolean
235
+ backupSchedule?: string
236
+ backupHistoryLimit?: number
237
+ storageConfigName?: string
238
+ storageConfigNamespace?: string
239
+ storageConfigCluster?: string
240
+ }
241
+
242
+ export type UpdateRedisAutoBackupResp = {
243
+ message?: string
244
+ }
245
+
246
+ export type CreateRedisBackupResp = {
247
+ message?: string
248
+ }
249
+
79
250
  export type GetRedisUsersReq = {
80
251
  cluster?: string
81
252
  namespace?: string
@@ -99,6 +270,8 @@ export type GetRedisListReq = {
99
270
  sortBy?: string
100
271
  searchKey?: string
101
272
  workspaceId?: number
273
+ filterCluster?: string
274
+ filterNamespace?: string
102
275
  }
103
276
 
104
277
  export type GetRedisConfReq = {
@@ -126,6 +299,18 @@ export type CreateRedisReqPorts = {
126
299
  nodePort?: number
127
300
  }
128
301
 
302
+ export type CreateRedisReqRestore = {
303
+ enable?: boolean
304
+ accessKeyId?: string
305
+ accessKeySecret?: string
306
+ endpoint?: string
307
+ provider?: CreateRedisReqRestoreProvider
308
+ storePath?: string
309
+ backupName?: string
310
+ targetRedisName?: string
311
+ instanceType?: InstanceType
312
+ }
313
+
129
314
  export type CreateRedisReq = {
130
315
  cluster?: string
131
316
  namespace?: string
@@ -136,7 +321,7 @@ export type CreateRedisReq = {
136
321
  storageCapacity?: string
137
322
  instanceType?: InstanceType
138
323
  authPass?: string
139
- serviceType?: CreateRedisReqServiceType
324
+ serviceType?: CommonCommon.ServiceType
140
325
  serviceAnnotations?: {[key: string]: string}
141
326
  ports?: CreateRedisReqPorts[]
142
327
  cpuRequest?: string
@@ -147,6 +332,13 @@ export type CreateRedisReq = {
147
332
  version?: string
148
333
  followerReplicas?: number
149
334
  affinity?: CommonCommon.Affinity
335
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
336
+ lbTyp?: CommonCommon.LBTyp
337
+ lbPoolName?: string
338
+ lbAddress?: string
339
+ restore?: CreateRedisReqRestore
340
+ autoBackupConfig?: UpdateRedisAutoBackupReq
341
+ serviceMonitorInterval?: string
150
342
  }
151
343
 
152
344
  export type UpdateRedisConfReq = {
@@ -324,6 +516,7 @@ export type RedisItemStatus = {
324
516
  clusterIPs?: string[]
325
517
  serviceAddr?: string
326
518
  common?: CommonCommon.CommonItemStatus
519
+ isControl?: boolean
327
520
  }
328
521
 
329
522
  export type RedisItemMetadata = {
@@ -381,4 +574,22 @@ export class Redis {
381
574
  static GetRedisUsers(req: GetRedisUsersReq, initReq?: fm.InitReq): Promise<GetRedisUsersResp> {
382
575
  return fm.fetchReq<GetRedisUsersReq, GetRedisUsersResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["instanceType"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["instanceType", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
383
576
  }
577
+ static CreateRedisBackup(req: CreateRedisBackupReq, initReq?: fm.InitReq): Promise<CreateRedisBackupResp> {
578
+ return fm.fetchReq<CreateRedisBackupReq, CreateRedisBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
579
+ }
580
+ static UpdateRedisAutoBackup(req: UpdateRedisAutoBackupReq, initReq?: fm.InitReq): Promise<UpdateRedisAutoBackupResp> {
581
+ return fm.fetchReq<UpdateRedisAutoBackupReq, UpdateRedisAutoBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["cluster"]}/${req["namespace"]}/${req["name"]}/auto-backup`, {...initReq, method: "PUT", body: JSON.stringify(req)})
582
+ }
583
+ static GetRedisBackupList(req: GetRedisBackupListReq, initReq?: fm.InitReq): Promise<GetRedisBackupListResp> {
584
+ return fm.fetchReq<GetRedisBackupListReq, GetRedisBackupListResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
585
+ }
586
+ static DeleteRedisBackup(req: DeleteRedisBackupReq, initReq?: fm.InitReq): Promise<DeleteRedisBackupResp> {
587
+ return fm.fetchReq<DeleteRedisBackupReq, DeleteRedisBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backups/${req["cluster"]}/${req["namespace"]}/${req["backupName"]}`, {...initReq, method: "DELETE"})
588
+ }
589
+ static GetMinioList(req: GetMinioListReq, initReq?: fm.InitReq): Promise<GetMinioListResp> {
590
+ return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
591
+ }
592
+ static CreateRedisRecover(req: CreateRedisRecoverReq, initReq?: fm.InitReq): Promise<CreateRedisRecoverResp> {
593
+ return fm.fetchReq<CreateRedisRecoverReq, CreateRedisRecoverResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["cluster"]}/${req["namespace"]}/${req["name"]}/recover`, {...initReq, method: "POST", body: JSON.stringify(req)})
594
+ }
384
595
  }
@@ -0,0 +1,188 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as CommonCommon from "./common.pb"
8
+ import * as fm from "./fetch.pb"
9
+
10
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
+ type OneOf<T> =
12
+ | { [k in keyof T]?: undefined }
13
+ | (
14
+ keyof T extends infer K ?
15
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
16
+ : never)
17
+ : never);
18
+
19
+ export enum GetStorageConfigParamRespSelectSelectType {
20
+ Single = "Single",
21
+ Multiple = "Multiple",
22
+ }
23
+
24
+ export enum GetStorageConfigConsumersRespStorageConfigConsumerType {
25
+ STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED = "STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED",
26
+ STORAGE_CONFIG_CONSUMER_TYPE_MYSQL = "STORAGE_CONFIG_CONSUMER_TYPE_MYSQL",
27
+ STORAGE_CONFIG_CONSUMER_TYPE_REDIS = "STORAGE_CONFIG_CONSUMER_TYPE_REDIS",
28
+ }
29
+
30
+ export enum GetStorageConfigListReqSortDir {
31
+ ASC = "ASC",
32
+ DESC = "DESC",
33
+ }
34
+
35
+ export type GetStorageConfigParamReq = {
36
+ }
37
+
38
+ export type GetStorageConfigParamRespSelectDataStringValue = {
39
+ value?: string
40
+ }
41
+
42
+ export type GetStorageConfigParamRespSelectDataIntValue = {
43
+ value?: number
44
+ }
45
+
46
+
47
+ type BaseGetStorageConfigParamRespSelectData = {
48
+ }
49
+
50
+ export type GetStorageConfigParamRespSelectData = BaseGetStorageConfigParamRespSelectData
51
+ & OneOf<{ sValue: GetStorageConfigParamRespSelectDataStringValue; iValue: GetStorageConfigParamRespSelectDataIntValue }>
52
+
53
+ export type GetStorageConfigParamRespSelect = {
54
+ selectType?: GetStorageConfigParamRespSelectSelectType
55
+ data?: GetStorageConfigParamRespSelectData[]
56
+ }
57
+
58
+ export type GetStorageConfigParamResp = {
59
+ storageType?: GetStorageConfigParamRespSelect
60
+ }
61
+
62
+ export type CreateStorageConfigBucketCheckJobReq = {
63
+ storageType?: string
64
+ endpoint?: string
65
+ accessKey?: string
66
+ secretKey?: string
67
+ bucket?: string
68
+ cluster?: string
69
+ namespace?: string
70
+ name?: string
71
+ }
72
+
73
+ export type CreateStorageConfigBucketCheckJobResp = {
74
+ message?: string
75
+ }
76
+
77
+ export type CreateStorageConfigReq = {
78
+ workspaceId?: number
79
+ cluster?: string
80
+ namespace?: string
81
+ name?: string
82
+ storageType?: string
83
+ accessKey?: string
84
+ secretKey?: string
85
+ bucket?: string
86
+ endpoint?: string
87
+ minioCluster?: string
88
+ minioNamespace?: string
89
+ minioName?: string
90
+ description?: string
91
+ }
92
+
93
+ export type CreateStorageConfigResp = {
94
+ message?: string
95
+ }
96
+
97
+ export type GetStorageConfigConsumersReq = {
98
+ workspaceId?: number
99
+ name?: string
100
+ }
101
+
102
+ export type GetStorageConfigConsumersRespConsumer = {
103
+ type?: GetStorageConfigConsumersRespStorageConfigConsumerType
104
+ cluster?: string
105
+ namespace?: string
106
+ name?: string
107
+ }
108
+
109
+ export type GetStorageConfigConsumersResp = {
110
+ consumers?: GetStorageConfigConsumersRespConsumer[]
111
+ }
112
+
113
+ export type DeleteStorageConfigReq = {
114
+ workspaceId?: number
115
+ name?: string
116
+ cluster?: string
117
+ namespace?: string
118
+ }
119
+
120
+ export type DeleteStorageConfigResp = {
121
+ message?: string
122
+ }
123
+
124
+ export type UpdateStorageConfigResp = {
125
+ message?: string
126
+ }
127
+
128
+ export type StorageConfigItemStorageConfigStatus = {
129
+ lastUpdateTimestamp?: string
130
+ createTimestamp?: string
131
+ }
132
+
133
+ export type StorageConfigItem = {
134
+ spec?: CreateStorageConfigReq
135
+ status?: StorageConfigItemStorageConfigStatus
136
+ }
137
+
138
+ export type GetStorageConfigReq = {
139
+ workspaceId?: number
140
+ name?: string
141
+ namespace?: string
142
+ cluster?: string
143
+ }
144
+
145
+ export type GetStorageConfigResp = {
146
+ item?: StorageConfigItem
147
+ }
148
+
149
+ export type GetStorageConfigListReq = {
150
+ page?: number
151
+ pageSize?: number
152
+ sortDir?: GetStorageConfigListReqSortDir
153
+ sortBy?: string
154
+ searchKey?: string
155
+ workspaceId?: number
156
+ }
157
+
158
+ export type GetStorageConfigListResp = {
159
+ items?: StorageConfigItem[]
160
+ pagination?: CommonCommon.Pagination
161
+ }
162
+
163
+ export class StorageConfig {
164
+ static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
165
+ return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/redis/v1alpha1/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
166
+ }
167
+ static CreateStorageConfigBucketCheckJob(req: CreateStorageConfigBucketCheckJobReq, initReq?: fm.InitReq): Promise<CreateStorageConfigBucketCheckJobResp> {
168
+ return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/redis/v1alpha1/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
169
+ }
170
+ static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
171
+ return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
172
+ }
173
+ static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
174
+ return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
175
+ }
176
+ static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
177
+ return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
178
+ }
179
+ static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
180
+ return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
181
+ }
182
+ static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
183
+ return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
184
+ }
185
+ static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
186
+ return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
187
+ }
188
+ }