@daocloud-proto/mcamel-mongodb 0.3.0-rc1-12 → 0.7.0-rc1-3
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.
- package/cluster.pb.ts +67 -0
- package/common.pb.ts +1 -0
- package/metric.pb.ts +11 -0
- package/mongodb.pb.ts +199 -0
- package/package.json +1 -1
- package/storage_config.pb.ts +188 -0
- package/template.pb.ts +172 -0
package/cluster.pb.ts
CHANGED
|
@@ -37,6 +37,11 @@ export enum EventType {
|
|
|
37
37
|
Warning = "Warning",
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
export enum InstallFileReqGVR {
|
|
41
|
+
None = "None",
|
|
42
|
+
CustomResourceDefinition = "CustomResourceDefinition",
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
export enum GetAllEventListReqSortDir {
|
|
41
46
|
ASC = "ASC",
|
|
42
47
|
DESC = "DESC",
|
|
@@ -63,6 +68,47 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
|
63
68
|
Install = "Install",
|
|
64
69
|
}
|
|
65
70
|
|
|
71
|
+
export type InstallFileReq = {
|
|
72
|
+
cluster?: string
|
|
73
|
+
path?: string
|
|
74
|
+
gvr?: InstallFileReqGVR
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type InstallFileResp = {
|
|
78
|
+
message?: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type GetInstallVersionReq = {
|
|
82
|
+
cluster?: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type GetInstallVersionRespSupportVersion = {
|
|
86
|
+
minVersion?: string
|
|
87
|
+
maxVersion?: string
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type GetInstallVersionRespStatus = {
|
|
91
|
+
inRange?: boolean
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type GetInstallVersionResp = {
|
|
95
|
+
clusterVersion?: string
|
|
96
|
+
supportVersion?: GetInstallVersionRespSupportVersion
|
|
97
|
+
status?: GetInstallVersionRespStatus
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type RestartInstanceReq = {
|
|
101
|
+
workspaceId?: number
|
|
102
|
+
cluster?: string
|
|
103
|
+
namespace?: string
|
|
104
|
+
name?: string
|
|
105
|
+
extra?: string
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type RestartInstanceResp = {
|
|
109
|
+
message?: string
|
|
110
|
+
}
|
|
111
|
+
|
|
66
112
|
export type GetPermissionsListReq = {
|
|
67
113
|
workspaceId?: number
|
|
68
114
|
}
|
|
@@ -271,11 +317,20 @@ export type GetWorkspaceListResp = {
|
|
|
271
317
|
pagination?: CommonCommon.Pagination
|
|
272
318
|
}
|
|
273
319
|
|
|
320
|
+
export type GetClusterHostnetworkPortsReq = {
|
|
321
|
+
workspaceId?: number
|
|
322
|
+
cluster?: string
|
|
323
|
+
}
|
|
324
|
+
|
|
274
325
|
export type GetClusterListReq = {
|
|
275
326
|
workspaceId?: number
|
|
276
327
|
searchKey?: string
|
|
277
328
|
}
|
|
278
329
|
|
|
330
|
+
export type GetClusterHostnetworkPortsResp = {
|
|
331
|
+
items?: string[]
|
|
332
|
+
}
|
|
333
|
+
|
|
279
334
|
export type GetClusterListResp = {
|
|
280
335
|
items?: string[]
|
|
281
336
|
clusters?: ClusterItem[]
|
|
@@ -317,6 +372,9 @@ export class Cluster {
|
|
|
317
372
|
static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
|
|
318
373
|
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
319
374
|
}
|
|
375
|
+
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
376
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/hostnetwork_ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
377
|
+
}
|
|
320
378
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
321
379
|
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
322
380
|
}
|
|
@@ -350,4 +408,13 @@ export class Cluster {
|
|
|
350
408
|
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
351
409
|
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
352
410
|
}
|
|
411
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
412
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
413
|
+
}
|
|
414
|
+
static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
|
|
415
|
+
return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
416
|
+
}
|
|
417
|
+
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
418
|
+
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
419
|
+
}
|
|
353
420
|
}
|
package/common.pb.ts
CHANGED
package/metric.pb.ts
CHANGED
|
@@ -7,7 +7,18 @@
|
|
|
7
7
|
import * as CommonCommon from "./common.pb"
|
|
8
8
|
import * as fm from "./fetch.pb"
|
|
9
9
|
import * as InsightIoApiInsightV1alpha1Insight from "./insight.pb"
|
|
10
|
+
|
|
11
|
+
export enum GetAlertsListReqSortDir {
|
|
12
|
+
ASC = "ASC",
|
|
13
|
+
DESC = "DESC",
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
export type GetAlertsListReq = {
|
|
17
|
+
page?: number
|
|
18
|
+
pageSize?: number
|
|
19
|
+
sortDir?: GetAlertsListReqSortDir
|
|
20
|
+
sortBy?: string
|
|
21
|
+
searchKey?: string
|
|
11
22
|
cluster?: string
|
|
12
23
|
namespace?: string
|
|
13
24
|
name?: string
|
package/mongodb.pb.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as CommonCommon from "./common.pb"
|
|
8
8
|
import * as fm from "./fetch.pb"
|
|
9
|
+
import * as TemplateTemplate from "./template.pb"
|
|
9
10
|
|
|
10
11
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
11
12
|
type OneOf<T> =
|
|
@@ -22,6 +23,11 @@ export enum Status {
|
|
|
22
23
|
Creating = "Creating",
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
export enum GetMinioListReqSortDir {
|
|
27
|
+
ASC = "ASC",
|
|
28
|
+
DESC = "DESC",
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
export enum GetMongodbListReqSortDir {
|
|
26
32
|
ASC = "ASC",
|
|
27
33
|
DESC = "DESC",
|
|
@@ -36,6 +42,27 @@ export enum CreateMongodbReqMode {
|
|
|
36
42
|
REPLICASET = "REPLICASET",
|
|
37
43
|
}
|
|
38
44
|
|
|
45
|
+
export enum GetMongodbBackupListReqSortDir {
|
|
46
|
+
ASC = "ASC",
|
|
47
|
+
DESC = "DESC",
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export enum MongodbBackupItemStatusStatus {
|
|
51
|
+
Running = "Running",
|
|
52
|
+
Failed = "Failed",
|
|
53
|
+
Succeeded = "Succeeded",
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export enum MongodbBackupItemStatusBackupType {
|
|
57
|
+
Full = "Full",
|
|
58
|
+
Incremental = "Incremental",
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export enum MongodbBackupItemStatusBackupMethod {
|
|
62
|
+
Manual = "Manual",
|
|
63
|
+
Auto = "Auto",
|
|
64
|
+
}
|
|
65
|
+
|
|
39
66
|
export enum GetMongodbParamRespSelectSelectType {
|
|
40
67
|
Single = "Single",
|
|
41
68
|
Multiple = "Multiple",
|
|
@@ -59,12 +86,44 @@ export enum GetMongodbPodListRespPodType {
|
|
|
59
86
|
PodTypeUnknown = "PodTypeUnknown",
|
|
60
87
|
PodTypePrimary = "PodTypePrimary",
|
|
61
88
|
PodTypeSecondary = "PodTypeSecondary",
|
|
89
|
+
PodTypeExpress = "PodTypeExpress",
|
|
62
90
|
}
|
|
63
91
|
|
|
64
92
|
export enum GetMongodbConfRespItemsParamType {
|
|
65
93
|
conf = "conf",
|
|
66
94
|
}
|
|
67
95
|
|
|
96
|
+
export type GetMinioListResp = {
|
|
97
|
+
items?: TenantItem[]
|
|
98
|
+
pagination?: CommonCommon.Pagination
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type GetMinioListReq = {
|
|
102
|
+
page?: number
|
|
103
|
+
pageSize?: number
|
|
104
|
+
sortDir?: GetMinioListReqSortDir
|
|
105
|
+
sortBy?: string
|
|
106
|
+
searchKey?: string
|
|
107
|
+
workspaceId?: number
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type TenantItemCreateMinioReq = {
|
|
111
|
+
name?: string
|
|
112
|
+
namespace?: string
|
|
113
|
+
cluster?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type TenantItem = {
|
|
117
|
+
apiVersion?: string
|
|
118
|
+
kind?: string
|
|
119
|
+
spec?: TenantItemCreateMinioReq
|
|
120
|
+
status?: TenantItemStatus
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type TenantItemStatus = {
|
|
124
|
+
common?: CommonCommon.CommonItemStatus
|
|
125
|
+
}
|
|
126
|
+
|
|
68
127
|
export type GetMongodbUsersReq = {
|
|
69
128
|
cluster?: string
|
|
70
129
|
namespace?: string
|
|
@@ -144,6 +203,92 @@ export type CreateMongodbReq = {
|
|
|
144
203
|
lbTyp?: CommonCommon.LBTyp
|
|
145
204
|
lbPoolName?: string
|
|
146
205
|
lbAddress?: string
|
|
206
|
+
isOpenExpress?: boolean
|
|
207
|
+
expressServiceType?: CommonCommon.ServiceType
|
|
208
|
+
expressNodePort?: number
|
|
209
|
+
expressCpuRequest?: string
|
|
210
|
+
expressCpuLimit?: string
|
|
211
|
+
expressMemoryRequest?: string
|
|
212
|
+
expressMemoryLimit?: string
|
|
213
|
+
expressExternalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
214
|
+
expressLbTyp?: CommonCommon.LBTyp
|
|
215
|
+
expressLbPoolName?: string
|
|
216
|
+
expressLbAddress?: string
|
|
217
|
+
storageConfigName?: string
|
|
218
|
+
storageConfigNamespace?: string
|
|
219
|
+
storageConfigCluster?: string
|
|
220
|
+
isOpenAutoBackup?: boolean
|
|
221
|
+
initSourceMysqlClusterName?: string
|
|
222
|
+
initSourceBackupName?: string
|
|
223
|
+
backupSchedule?: string
|
|
224
|
+
backupBucket?: string
|
|
225
|
+
backupBucketSubPath?: string
|
|
226
|
+
backupHistoryLimit?: number
|
|
227
|
+
confTemplateName?: string
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export type DeleteMongodbBackupReq = {
|
|
231
|
+
cluster?: string
|
|
232
|
+
namespace?: string
|
|
233
|
+
backupName?: string
|
|
234
|
+
isOpenAutoBackup?: boolean
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export type DeleteMongodbBackupResp = {
|
|
238
|
+
message?: string
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export type CreateMongodbRecoverReq = {
|
|
242
|
+
workspaceId?: number
|
|
243
|
+
cluster?: string
|
|
244
|
+
namespace?: string
|
|
245
|
+
name?: string
|
|
246
|
+
backupName?: string
|
|
247
|
+
targetMongodbName?: string
|
|
248
|
+
targetMongodbNamespace?: string
|
|
249
|
+
targetMongodbCluster?: string
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export type CreateMongodbRecoverResp = {
|
|
253
|
+
message?: string
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export type GetMongodbBackupListReq = {
|
|
257
|
+
page?: number
|
|
258
|
+
pageSize?: number
|
|
259
|
+
sortDir?: GetMongodbBackupListReqSortDir
|
|
260
|
+
sortBy?: string
|
|
261
|
+
searchKey?: string
|
|
262
|
+
cluster?: string
|
|
263
|
+
namespace?: string
|
|
264
|
+
name?: string
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export type GetMongodbBackupListResp = {
|
|
268
|
+
items?: MongodbBackupItem[]
|
|
269
|
+
pagination?: CommonCommon.Pagination
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export type MongodbBackupItemMetadata = {
|
|
273
|
+
creationTimestamp?: string
|
|
274
|
+
name?: string
|
|
275
|
+
namespace?: string
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export type MongodbBackupItem = {
|
|
279
|
+
metadata?: MongodbBackupItemMetadata
|
|
280
|
+
spec?: CreateMongodbBackupReq
|
|
281
|
+
status?: MongodbBackupItemStatus
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export type MongodbBackupItemStatus = {
|
|
285
|
+
status?: MongodbBackupItemStatusStatus
|
|
286
|
+
message?: string
|
|
287
|
+
backupUrl?: string
|
|
288
|
+
backupType?: MongodbBackupItemStatusBackupType
|
|
289
|
+
backupMethod?: MongodbBackupItemStatusBackupMethod
|
|
290
|
+
completionTimestamp?: string
|
|
291
|
+
startTimestamp?: string
|
|
147
292
|
}
|
|
148
293
|
|
|
149
294
|
export type UpdateMongodbConfReq = {
|
|
@@ -151,6 +296,8 @@ export type UpdateMongodbConfReq = {
|
|
|
151
296
|
namespace?: string
|
|
152
297
|
name?: string
|
|
153
298
|
conf?: string
|
|
299
|
+
confItems?: TemplateTemplate.TemplateConfigItem[]
|
|
300
|
+
reloadFromConfTemplateName?: string
|
|
154
301
|
}
|
|
155
302
|
|
|
156
303
|
export type UpdateMongodbParamsResp = {
|
|
@@ -325,6 +472,7 @@ export type MongodbItemMetadata = {
|
|
|
325
472
|
creationTimestamp?: string
|
|
326
473
|
name?: string
|
|
327
474
|
namespace?: string
|
|
475
|
+
uid?: string
|
|
328
476
|
}
|
|
329
477
|
|
|
330
478
|
export type MongodbItem = {
|
|
@@ -335,6 +483,39 @@ export type MongodbItem = {
|
|
|
335
483
|
status?: MongodbItemStatus
|
|
336
484
|
}
|
|
337
485
|
|
|
486
|
+
export type UpdateMongodbBackupConfigReq = {
|
|
487
|
+
workspaceId?: number
|
|
488
|
+
cluster?: string
|
|
489
|
+
namespace?: string
|
|
490
|
+
name?: string
|
|
491
|
+
backupSchedule?: string
|
|
492
|
+
backupBucket?: string
|
|
493
|
+
backupHistoryLimit?: number
|
|
494
|
+
backupBucketSubPath?: string
|
|
495
|
+
isOpenAutoBackup?: boolean
|
|
496
|
+
storageConfigName?: string
|
|
497
|
+
storageConfigNamespace?: string
|
|
498
|
+
storageConfigCluster?: string
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export type UpdateMongodbBackupConfigResp = {
|
|
502
|
+
message?: string
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export type CreateMongodbBackupReq = {
|
|
506
|
+
workspaceId?: number
|
|
507
|
+
cluster?: string
|
|
508
|
+
namespace?: string
|
|
509
|
+
name?: string
|
|
510
|
+
backupName?: string
|
|
511
|
+
backupBucket?: string
|
|
512
|
+
backupBucketSubPath?: string
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export type CreateMongodbBackupResp = {
|
|
516
|
+
message?: string
|
|
517
|
+
}
|
|
518
|
+
|
|
338
519
|
export class Mongodb {
|
|
339
520
|
static GetMongodbList(req: GetMongodbListReq, initReq?: fm.InitReq): Promise<GetMongodbListResp> {
|
|
340
521
|
return fm.fetchReq<GetMongodbListReq, GetMongodbListResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/mongodbs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
@@ -375,4 +556,22 @@ export class Mongodb {
|
|
|
375
556
|
static GetMongodbUsers(req: GetMongodbUsersReq, initReq?: fm.InitReq): Promise<GetMongodbUsersResp> {
|
|
376
557
|
return fm.fetchReq<GetMongodbUsersReq, GetMongodbUsersResp>(`/apis/mcamel.io/mongodb/v1alpha1/mongodb/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
377
558
|
}
|
|
559
|
+
static GetMinioList(req: GetMinioListReq, initReq?: fm.InitReq): Promise<GetMinioListResp> {
|
|
560
|
+
return fm.fetchReq<GetMinioListReq, GetMinioListResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/minios?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
561
|
+
}
|
|
562
|
+
static UpdateMongodbBackupConfig(req: UpdateMongodbBackupConfigReq, initReq?: fm.InitReq): Promise<UpdateMongodbBackupConfigResp> {
|
|
563
|
+
return fm.fetchReq<UpdateMongodbBackupConfigReq, UpdateMongodbBackupConfigResp>(`/apis/mcamel.io/mongodb/v1alpha1/mongodb/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
564
|
+
}
|
|
565
|
+
static CreateMongodbBackup(req: CreateMongodbBackupReq, initReq?: fm.InitReq): Promise<CreateMongodbBackupResp> {
|
|
566
|
+
return fm.fetchReq<CreateMongodbBackupReq, CreateMongodbBackupResp>(`/apis/mcamel.io/mongodb/v1alpha1/mongodb/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
567
|
+
}
|
|
568
|
+
static GetMongodbBackupList(req: GetMongodbBackupListReq, initReq?: fm.InitReq): Promise<GetMongodbBackupListResp> {
|
|
569
|
+
return fm.fetchReq<GetMongodbBackupListReq, GetMongodbBackupListResp>(`/apis/mcamel.io/mongodb/v1alpha1/mongodb/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
570
|
+
}
|
|
571
|
+
static DeleteMongodbBackup(req: DeleteMongodbBackupReq, initReq?: fm.InitReq): Promise<DeleteMongodbBackupResp> {
|
|
572
|
+
return fm.fetchReq<DeleteMongodbBackupReq, DeleteMongodbBackupResp>(`/apis/mcamel.io/mongodb/v1alpha1/mongodb/backups/${req["cluster"]}/${req["namespace"]}/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
573
|
+
}
|
|
574
|
+
static CreateMongodbRecover(req: CreateMongodbRecoverReq, initReq?: fm.InitReq): Promise<CreateMongodbRecoverResp> {
|
|
575
|
+
return fm.fetchReq<CreateMongodbRecoverReq, CreateMongodbRecoverResp>(`/apis/mcamel.io/mongodb/v1alpha1/mongodb/${req["cluster"]}/${req["namespace"]}/${req["name"]}/recover`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
576
|
+
}
|
|
378
577
|
}
|
package/package.json
CHANGED
|
@@ -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/mongodb/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/mongodb/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/mongodb/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/mongodb/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/mongodb/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/mongodb/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/mongodb/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/mongodb/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
187
|
+
}
|
|
188
|
+
}
|
package/template.pb.ts
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
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
|
+
export enum TemplateInstanceType {
|
|
11
|
+
MysqlMasterReplica = "MysqlMasterReplica",
|
|
12
|
+
RedisStandalone = "RedisStandalone",
|
|
13
|
+
RedisFailover = "RedisFailover",
|
|
14
|
+
RedisCluster = "RedisCluster",
|
|
15
|
+
KafkaConfig = "KafkaConfig",
|
|
16
|
+
MysqlMgrConfig = "MysqlMgrConfig",
|
|
17
|
+
MongodbConfig = "MongodbConfig",
|
|
18
|
+
PostgresqlConfig = "PostgresqlConfig",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum GetTemplateConfigReqSortDir {
|
|
22
|
+
ASC = "ASC",
|
|
23
|
+
DESC = "DESC",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum GetTemplateConfigListReqSortDir {
|
|
27
|
+
ASC = "ASC",
|
|
28
|
+
DESC = "DESC",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum TemplateConfigItemValueType {
|
|
32
|
+
String = "String",
|
|
33
|
+
SingleSelection = "SingleSelection",
|
|
34
|
+
MultiString = "MultiString",
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type GetTemplateConfigVersionsReq = {
|
|
38
|
+
workspaceId?: number
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type GetTemplateConfigVersionsResp = {
|
|
42
|
+
versions?: string[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type GetTemplateConfigStringResp = {
|
|
46
|
+
conf?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type DeleteTemplateReq = {
|
|
50
|
+
workspaceId?: number
|
|
51
|
+
name?: string
|
|
52
|
+
version?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type DeleteTemplateConfigResp = {
|
|
56
|
+
message?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type CreateOrUpdateTemplateConfigResp = {
|
|
60
|
+
message?: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type GetTemplateConfigReq = {
|
|
64
|
+
page?: number
|
|
65
|
+
pageSize?: number
|
|
66
|
+
sortDir?: GetTemplateConfigReqSortDir
|
|
67
|
+
sortBy?: string
|
|
68
|
+
searchKey?: string
|
|
69
|
+
workspaceId?: number
|
|
70
|
+
name?: string
|
|
71
|
+
version?: string
|
|
72
|
+
templateType?: string
|
|
73
|
+
type?: string
|
|
74
|
+
createTimestamp?: string
|
|
75
|
+
templateInstanceType?: TemplateInstanceType
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type CreateTemplateConfigResp = {
|
|
79
|
+
message?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type UpdateTemplateConfigResp = {
|
|
83
|
+
message?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type CreateTemplateConfigReq = {
|
|
87
|
+
workspaceId?: number
|
|
88
|
+
targetName?: string
|
|
89
|
+
targetVersion?: string
|
|
90
|
+
targetType?: string
|
|
91
|
+
targetTemplateType?: string
|
|
92
|
+
targetConf?: string
|
|
93
|
+
fromTemplateName?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type UpdateTemplateConfigReq = {
|
|
97
|
+
workspaceId?: number
|
|
98
|
+
name?: string
|
|
99
|
+
version?: string
|
|
100
|
+
type?: string
|
|
101
|
+
templateType?: string
|
|
102
|
+
items?: TemplateConfigItem[]
|
|
103
|
+
conf?: string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type GetTemplateConfigResp = {
|
|
107
|
+
data?: UpdateTemplateConfigReq
|
|
108
|
+
pagination?: CommonCommon.Pagination
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type GetTemplateConfigListReq = {
|
|
112
|
+
page?: number
|
|
113
|
+
pageSize?: number
|
|
114
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
115
|
+
sortBy?: string
|
|
116
|
+
searchKey?: string
|
|
117
|
+
workspaceId?: number
|
|
118
|
+
version?: string
|
|
119
|
+
templateInstanceType?: TemplateInstanceType
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export type TemplateConfigItem = {
|
|
123
|
+
name?: string
|
|
124
|
+
default?: string
|
|
125
|
+
current?: string
|
|
126
|
+
value?: string
|
|
127
|
+
isNeedRestart?: boolean
|
|
128
|
+
valueType?: TemplateConfigItemValueType
|
|
129
|
+
valueRemarksZh?: string
|
|
130
|
+
valueRemarksEn?: string
|
|
131
|
+
updateTimestamp?: string
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type GetTemplateConfigListResp = {
|
|
135
|
+
items?: GetTemplateConfigReq[]
|
|
136
|
+
pagination?: CommonCommon.Pagination
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type GetTemplateInstanceTypeListReq = {
|
|
140
|
+
workspaceId?: number
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type GetTemplateInstanceTypeListResp = {
|
|
144
|
+
type?: TemplateInstanceType[]
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export class Template {
|
|
148
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
149
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
150
|
+
}
|
|
151
|
+
static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
|
|
152
|
+
return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
153
|
+
}
|
|
154
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
155
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
156
|
+
}
|
|
157
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
158
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
159
|
+
}
|
|
160
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
161
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
162
|
+
}
|
|
163
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
164
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
165
|
+
}
|
|
166
|
+
static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
167
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
168
|
+
}
|
|
169
|
+
static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
|
|
170
|
+
return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/mongodb/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
171
|
+
}
|
|
172
|
+
}
|