@daocloud-proto/mcamel-postgresql 0.0.2-42 → 0.0.2-421
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 +209 -0
- package/common.pb.ts +61 -0
- package/metric.pb.ts +11 -0
- package/package.json +1 -1
- package/postgresql.pb.ts +235 -9
- package/storage_config.pb.ts +188 -0
- package/template.pb.ts +172 -0
package/cluster.pb.ts
CHANGED
|
@@ -7,12 +7,41 @@
|
|
|
7
7
|
import * as CommonCommon from "./common.pb"
|
|
8
8
|
import * as fm from "./fetch.pb"
|
|
9
9
|
|
|
10
|
+
export enum PermissionsType {
|
|
11
|
+
None = "None",
|
|
12
|
+
GetInstance = "GetInstance",
|
|
13
|
+
CreateInstance = "CreateInstance",
|
|
14
|
+
UpdateInstance = "UpdateInstance",
|
|
15
|
+
DeleteInstance = "DeleteInstance",
|
|
16
|
+
GetMetric = "GetMetric",
|
|
17
|
+
GetInstanceLog = "GetInstanceLog",
|
|
18
|
+
GetConfig = "GetConfig",
|
|
19
|
+
UpdateConfig = "UpdateConfig",
|
|
20
|
+
GetBackup = "GetBackup",
|
|
21
|
+
CreateBackup = "CreateBackup",
|
|
22
|
+
UpdateBackup = "UpdateBackup",
|
|
23
|
+
DeleteBackup = "DeleteBackup",
|
|
24
|
+
GetBackupConf = "GetBackupConf",
|
|
25
|
+
CreateBackupConf = "CreateBackupConf",
|
|
26
|
+
UpdateBackupConf = "UpdateBackupConf",
|
|
27
|
+
DeleteBackupConf = "DeleteBackupConf",
|
|
28
|
+
GetTemplate = "GetTemplate",
|
|
29
|
+
CreateTemplate = "CreateTemplate",
|
|
30
|
+
UpdateTemplate = "UpdateTemplate",
|
|
31
|
+
DeleteTemplate = "DeleteTemplate",
|
|
32
|
+
}
|
|
33
|
+
|
|
10
34
|
export enum EventType {
|
|
11
35
|
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
12
36
|
Normal = "Normal",
|
|
13
37
|
Warning = "Warning",
|
|
14
38
|
}
|
|
15
39
|
|
|
40
|
+
export enum InstallFileReqGVR {
|
|
41
|
+
None = "None",
|
|
42
|
+
CustomResourceDefinition = "CustomResourceDefinition",
|
|
43
|
+
}
|
|
44
|
+
|
|
16
45
|
export enum GetAllEventListReqSortDir {
|
|
17
46
|
ASC = "ASC",
|
|
18
47
|
DESC = "DESC",
|
|
@@ -28,11 +57,90 @@ export enum GetWorkspaceListReqSortDir {
|
|
|
28
57
|
DESC = "DESC",
|
|
29
58
|
}
|
|
30
59
|
|
|
60
|
+
export enum ClusterItemNetworkMode {
|
|
61
|
+
Unknown = "Unknown",
|
|
62
|
+
Flannel = "Flannel",
|
|
63
|
+
Calico = "Calico",
|
|
64
|
+
}
|
|
65
|
+
|
|
31
66
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
32
67
|
NotInstall = "NotInstall",
|
|
33
68
|
Install = "Install",
|
|
34
69
|
}
|
|
35
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
|
+
|
|
112
|
+
export type GetPermissionsListReq = {
|
|
113
|
+
workspaceId?: number
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type GetPermissionsListRespPermissions = {
|
|
117
|
+
getInstance?: boolean
|
|
118
|
+
createInstance?: boolean
|
|
119
|
+
updateInstance?: boolean
|
|
120
|
+
deleteInstance?: boolean
|
|
121
|
+
getMetric?: boolean
|
|
122
|
+
getInstanceLog?: boolean
|
|
123
|
+
getConfig?: boolean
|
|
124
|
+
updateConfig?: boolean
|
|
125
|
+
getBackup?: boolean
|
|
126
|
+
createBackup?: boolean
|
|
127
|
+
updateBackup?: boolean
|
|
128
|
+
deleteBackup?: boolean
|
|
129
|
+
getBackupConf?: boolean
|
|
130
|
+
createBackupConf?: boolean
|
|
131
|
+
updateBackupConf?: boolean
|
|
132
|
+
deleteBackupConf?: boolean
|
|
133
|
+
getTemplate?: boolean
|
|
134
|
+
createTemplate?: boolean
|
|
135
|
+
updateTemplate?: boolean
|
|
136
|
+
deleteTemplate?: boolean
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type GetPermissionsListResp = {
|
|
140
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
141
|
+
permissions?: PermissionsType[]
|
|
142
|
+
}
|
|
143
|
+
|
|
36
144
|
export type GetAllEventKindsListResp = {
|
|
37
145
|
data?: string[]
|
|
38
146
|
}
|
|
@@ -106,8 +214,32 @@ export type GetClusterNodeLabelListRespLabel = {
|
|
|
106
214
|
value?: string[]
|
|
107
215
|
}
|
|
108
216
|
|
|
217
|
+
export type GetClusterNodeLabelListRespNode2Label = {
|
|
218
|
+
nodeName?: string
|
|
219
|
+
label?: GetClusterNodeLabelListRespLabel[]
|
|
220
|
+
}
|
|
221
|
+
|
|
109
222
|
export type GetClusterNodeLabelListResp = {
|
|
110
223
|
items?: GetClusterNodeLabelListRespLabel[]
|
|
224
|
+
items1?: GetClusterNodeLabelListRespNode2Label[]
|
|
225
|
+
pagination?: CommonCommon.Pagination
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type GetClusterPodLabelListReq = {
|
|
229
|
+
page?: number
|
|
230
|
+
pageSize?: number
|
|
231
|
+
searchKey?: string
|
|
232
|
+
filterNamespace?: string
|
|
233
|
+
cluster?: string
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
237
|
+
key?: string
|
|
238
|
+
value?: string[]
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export type GetClusterPodLabelListResp = {
|
|
242
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
111
243
|
pagination?: CommonCommon.Pagination
|
|
112
244
|
}
|
|
113
245
|
|
|
@@ -183,6 +315,7 @@ export type GetWorkspaceListReq = {
|
|
|
183
315
|
export type GetWorkspaceListRespItem = {
|
|
184
316
|
workspaceId?: number
|
|
185
317
|
alias?: string
|
|
318
|
+
visible?: boolean
|
|
186
319
|
}
|
|
187
320
|
|
|
188
321
|
export type GetWorkspaceListResp = {
|
|
@@ -190,15 +323,39 @@ export type GetWorkspaceListResp = {
|
|
|
190
323
|
pagination?: CommonCommon.Pagination
|
|
191
324
|
}
|
|
192
325
|
|
|
326
|
+
export type GetClusterHostnetworkPortsReq = {
|
|
327
|
+
workspaceId?: number
|
|
328
|
+
cluster?: string
|
|
329
|
+
}
|
|
330
|
+
|
|
193
331
|
export type GetClusterListReq = {
|
|
194
332
|
workspaceId?: number
|
|
333
|
+
searchKey?: string
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export type GetClusterHostnetworkPortsResp = {
|
|
337
|
+
items?: number[]
|
|
195
338
|
}
|
|
196
339
|
|
|
197
340
|
export type GetClusterListResp = {
|
|
198
341
|
items?: string[]
|
|
342
|
+
clusters?: ClusterItem[]
|
|
199
343
|
pagination?: CommonCommon.Pagination
|
|
200
344
|
}
|
|
201
345
|
|
|
346
|
+
export type ClusterItemMetadata = {
|
|
347
|
+
name?: string
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export type ClusterItemStatus = {
|
|
351
|
+
networkMode?: ClusterItemNetworkMode[]
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export type ClusterItem = {
|
|
355
|
+
metadata?: ClusterItemMetadata
|
|
356
|
+
status?: ClusterItemStatus
|
|
357
|
+
}
|
|
358
|
+
|
|
202
359
|
export type GetClusterNamespaceListReq = {
|
|
203
360
|
workspaceId?: number
|
|
204
361
|
cluster?: string
|
|
@@ -206,6 +363,7 @@ export type GetClusterNamespaceListReq = {
|
|
|
206
363
|
|
|
207
364
|
export type GetClusterNamespaceListResp = {
|
|
208
365
|
items?: string[]
|
|
366
|
+
disableItems?: string[]
|
|
209
367
|
pagination?: CommonCommon.Pagination
|
|
210
368
|
}
|
|
211
369
|
|
|
@@ -215,12 +373,45 @@ export type GetInsightAgentStatusReq = {
|
|
|
215
373
|
|
|
216
374
|
export type GetInsightAgentStatusResp = {
|
|
217
375
|
status?: GetInsightAgentStatusRespInsightAgentStatus
|
|
376
|
+
clusterStatus?: CommonCommon.ClusterStatus
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export type GetResourceQuotaReq = {
|
|
380
|
+
cluster?: string
|
|
381
|
+
namespace?: string
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export type GetResourceQuotaRespMetadata = {
|
|
385
|
+
uid?: string
|
|
386
|
+
name?: string
|
|
387
|
+
namespace?: string
|
|
388
|
+
annotations?: {[key: string]: string}
|
|
389
|
+
resourceVersion?: string
|
|
390
|
+
creationTimestamp?: string
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export type GetResourceQuotaRespSpec = {
|
|
394
|
+
hard?: {[key: string]: string}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export type GetResourceQuotaRespStatus = {
|
|
398
|
+
hard?: {[key: string]: string}
|
|
399
|
+
used?: {[key: string]: string}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export type GetResourceQuotaResp = {
|
|
403
|
+
metadata?: GetResourceQuotaRespMetadata
|
|
404
|
+
spec?: GetResourceQuotaRespSpec
|
|
405
|
+
status?: GetResourceQuotaRespStatus
|
|
218
406
|
}
|
|
219
407
|
|
|
220
408
|
export class Cluster {
|
|
221
409
|
static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
|
|
222
410
|
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
223
411
|
}
|
|
412
|
+
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
413
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/hostnetwork-ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
414
|
+
}
|
|
224
415
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
225
416
|
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
226
417
|
}
|
|
@@ -230,6 +421,9 @@ export class Cluster {
|
|
|
230
421
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
231
422
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
232
423
|
}
|
|
424
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
425
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
426
|
+
}
|
|
233
427
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
234
428
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
235
429
|
}
|
|
@@ -248,4 +442,19 @@ export class Cluster {
|
|
|
248
442
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
249
443
|
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
250
444
|
}
|
|
445
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
446
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
447
|
+
}
|
|
448
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
449
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
450
|
+
}
|
|
451
|
+
static InstallFile(req: InstallFileReq, initReq?: fm.InitReq): Promise<InstallFileResp> {
|
|
452
|
+
return fm.fetchReq<InstallFileReq, InstallFileResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-file`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
453
|
+
}
|
|
454
|
+
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
455
|
+
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
456
|
+
}
|
|
457
|
+
static GetResourceQuota(req: GetResourceQuotaReq, initReq?: fm.InitReq): Promise<GetResourceQuotaResp> {
|
|
458
|
+
return fm.fetchReq<GetResourceQuotaReq, GetResourceQuotaResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/${req["namespace"]}/resourcequota?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
459
|
+
}
|
|
251
460
|
}
|
package/common.pb.ts
CHANGED
|
@@ -20,6 +20,16 @@ export enum ServiceType {
|
|
|
20
20
|
LoadBalancer = "LoadBalancer",
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export enum ClusterStatus {
|
|
24
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
25
|
+
Unknown = "Unknown",
|
|
26
|
+
Creating = "Creating",
|
|
27
|
+
Running = "Running",
|
|
28
|
+
Updating = "Updating",
|
|
29
|
+
Deleting = "Deleting",
|
|
30
|
+
Failed = "Failed",
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
export enum PageInfoReqSortDir {
|
|
24
34
|
ASC = "ASC",
|
|
25
35
|
DESC = "DESC",
|
|
@@ -151,6 +161,8 @@ export type PodCommon = {
|
|
|
151
161
|
containersName?: string[]
|
|
152
162
|
ownerReference?: OwnerReference[]
|
|
153
163
|
initContainersName?: string[]
|
|
164
|
+
initContainersStatuses?: ContainerStatus[]
|
|
165
|
+
containersStatuses?: ContainerStatus[]
|
|
154
166
|
}
|
|
155
167
|
|
|
156
168
|
export type OwnerReference = {
|
|
@@ -164,4 +176,53 @@ export type CommonItemStatus = {
|
|
|
164
176
|
serviceAddresses?: string[]
|
|
165
177
|
webManagerAddress?: string
|
|
166
178
|
webLogAddress?: string
|
|
179
|
+
avgPvAllocatedInGb?: number
|
|
180
|
+
avgPvUsedInGb?: number
|
|
181
|
+
cpuUtilization?: number
|
|
182
|
+
memoryUtilization?: number
|
|
183
|
+
clusterStatus?: ClusterStatus
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type AccessWhitelistInternal = {
|
|
187
|
+
namespace?: string
|
|
188
|
+
podSelector?: {[key: string]: string}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type AccessWhitelistExternal = {
|
|
192
|
+
cidr?: string
|
|
193
|
+
ip?: string
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type AccessWhitelist = {
|
|
197
|
+
internals?: AccessWhitelistInternal[]
|
|
198
|
+
externals?: AccessWhitelistExternal[]
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type ContainerStatus = {
|
|
202
|
+
name?: string
|
|
203
|
+
state?: ContainerState
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type ContainerState = {
|
|
207
|
+
waiting?: ContainerStateWaiting
|
|
208
|
+
running?: ContainerStateRunning
|
|
209
|
+
terminated?: ContainerStateTerminated
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type ContainerStateWaiting = {
|
|
213
|
+
reason?: string
|
|
214
|
+
message?: string
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export type ContainerStateRunning = {
|
|
218
|
+
startedAt?: string
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type ContainerStateTerminated = {
|
|
222
|
+
exitCode?: number
|
|
223
|
+
signal?: number
|
|
224
|
+
reason?: string
|
|
225
|
+
message?: string
|
|
226
|
+
startedAt?: string
|
|
227
|
+
finishedAt?: string
|
|
167
228
|
}
|
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/package.json
CHANGED
package/postgresql.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,48 @@ export enum Status {
|
|
|
22
23
|
Creating = "Creating",
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
export enum GetPostgresqlS3ConfigListReqSortDir {
|
|
27
|
+
ASC = "ASC",
|
|
28
|
+
DESC = "DESC",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum GetPostgresqlBackupListReqSortDir {
|
|
32
|
+
ASC = "ASC",
|
|
33
|
+
DESC = "DESC",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
|
|
37
|
+
Running = "Running",
|
|
38
|
+
Failed = "Failed",
|
|
39
|
+
Succeeded = "Succeeded",
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
|
|
43
|
+
Full = "Full",
|
|
44
|
+
Incremental = "Incremental",
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
|
|
48
|
+
Manual = "Manual",
|
|
49
|
+
Auto = "Auto",
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export enum PostgresqlBackupItemStatusStatus {
|
|
53
|
+
Running = "Running",
|
|
54
|
+
Failed = "Failed",
|
|
55
|
+
Succeeded = "Succeeded",
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export enum PostgresqlBackupItemStatusBackupType {
|
|
59
|
+
Full = "Full",
|
|
60
|
+
Incremental = "Incremental",
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export enum PostgresqlBackupItemStatusBackupMethod {
|
|
64
|
+
Manual = "Manual",
|
|
65
|
+
Auto = "Auto",
|
|
66
|
+
}
|
|
67
|
+
|
|
25
68
|
export enum GetPostgresqlListReqSortDir {
|
|
26
69
|
ASC = "ASC",
|
|
27
70
|
DESC = "DESC",
|
|
@@ -67,6 +110,164 @@ export enum GetPostgresqlConfRespItemsParamType {
|
|
|
67
110
|
conf = "conf",
|
|
68
111
|
}
|
|
69
112
|
|
|
113
|
+
export type CreatePostgresqlRestoreReq = {
|
|
114
|
+
cluster?: string
|
|
115
|
+
namespace?: string
|
|
116
|
+
name?: string
|
|
117
|
+
backupName?: string
|
|
118
|
+
targetPostgresqlName?: string
|
|
119
|
+
targetPostgresqlNamespace?: string
|
|
120
|
+
targetPostgresqlCluster?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type CreatePostgresqlRestoreResp = {
|
|
124
|
+
message?: string
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type DeletePostgresqlBackupReq = {
|
|
128
|
+
cluster?: string
|
|
129
|
+
namespace?: string
|
|
130
|
+
name?: string
|
|
131
|
+
backupName?: string
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type DeletePostgresqlBackupResp = {
|
|
135
|
+
message?: string
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export type CreateBucketExistCheckingReq = {
|
|
139
|
+
endpoint?: string
|
|
140
|
+
accessKey?: string
|
|
141
|
+
secretKey?: string
|
|
142
|
+
bucket?: string
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export type CreateBucketExistCheckingResp = {
|
|
146
|
+
message?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type UpdatePostgresqlS3ConfigReq = {
|
|
150
|
+
cluster?: string
|
|
151
|
+
namespace?: string
|
|
152
|
+
name?: string
|
|
153
|
+
description?: string
|
|
154
|
+
endpoint?: string
|
|
155
|
+
accessKey?: string
|
|
156
|
+
secretKey?: string
|
|
157
|
+
bucket?: string
|
|
158
|
+
retentionTime?: string
|
|
159
|
+
provider?: string
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export type UpdatePostgresqlS3ConfigResp = {
|
|
163
|
+
message?: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type GetPostgresqlS3ConfigListReq = {
|
|
167
|
+
page?: number
|
|
168
|
+
pageSize?: number
|
|
169
|
+
sortDir?: GetPostgresqlS3ConfigListReqSortDir
|
|
170
|
+
sortBy?: string
|
|
171
|
+
searchKey?: string
|
|
172
|
+
workspaceId?: number
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
|
|
176
|
+
createTimestamp?: string
|
|
177
|
+
updateTimestamp?: string
|
|
178
|
+
backupPath?: string
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
|
|
182
|
+
spec?: UpdatePostgresqlS3ConfigReq
|
|
183
|
+
status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type GetPostgresqlS3ConfigListResp = {
|
|
187
|
+
items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
|
|
188
|
+
pagination?: CommonCommon.Pagination
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type UpdatePostgresqlBackupConfigReq = {
|
|
192
|
+
cluster?: string
|
|
193
|
+
namespace?: string
|
|
194
|
+
name?: string
|
|
195
|
+
isOpenAutoBackup?: boolean
|
|
196
|
+
backupSchedule?: string
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type UpdatePostgresqlBackupConfigResp = {
|
|
200
|
+
message?: string
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export type GetPostgresqlBackupListReq = {
|
|
204
|
+
page?: number
|
|
205
|
+
pageSize?: number
|
|
206
|
+
sortDir?: GetPostgresqlBackupListReqSortDir
|
|
207
|
+
sortBy?: string
|
|
208
|
+
searchKey?: string
|
|
209
|
+
cluster?: string
|
|
210
|
+
namespace?: string
|
|
211
|
+
name?: string
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
|
|
215
|
+
creationTimestamp?: string
|
|
216
|
+
name?: string
|
|
217
|
+
namespace?: string
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
|
|
221
|
+
type?: string
|
|
222
|
+
status?: string
|
|
223
|
+
reason?: string
|
|
224
|
+
message?: string
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
|
|
228
|
+
completionTimestamp?: string
|
|
229
|
+
startTime?: string
|
|
230
|
+
active?: number
|
|
231
|
+
succeeded?: number
|
|
232
|
+
failed?: number
|
|
233
|
+
conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
|
|
234
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
|
|
235
|
+
backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
|
|
236
|
+
backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
|
|
237
|
+
storePath?: string
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
|
|
241
|
+
metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
|
|
242
|
+
spec?: CreatePostgresqlBackupReq
|
|
243
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export type GetPostgresqlBackupListResp = {
|
|
247
|
+
items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
|
|
248
|
+
pagination?: CommonCommon.Pagination
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type CreatePostgresqlBackupReq = {
|
|
252
|
+
cluster?: string
|
|
253
|
+
namespace?: string
|
|
254
|
+
name?: string
|
|
255
|
+
backupName?: string
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export type CreatePostgresqlBackupResp = {
|
|
259
|
+
message?: string
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export type PostgresqlBackupItemStatus = {
|
|
263
|
+
status?: PostgresqlBackupItemStatusStatus
|
|
264
|
+
message?: string
|
|
265
|
+
backupUrl?: string
|
|
266
|
+
backupType?: PostgresqlBackupItemStatusBackupType
|
|
267
|
+
backupMethod?: PostgresqlBackupItemStatusBackupMethod
|
|
268
|
+
completionTimestamp?: string
|
|
269
|
+
}
|
|
270
|
+
|
|
70
271
|
export type GetPostgresqlUsersReq = {
|
|
71
272
|
cluster?: string
|
|
72
273
|
namespace?: string
|
|
@@ -138,6 +339,7 @@ export type CreatePostgresqlReq = {
|
|
|
138
339
|
memoryRequest?: string
|
|
139
340
|
memoryLimit?: string
|
|
140
341
|
conf?: string
|
|
342
|
+
confTemplateName?: string
|
|
141
343
|
isOpenPgAdmin?: boolean
|
|
142
344
|
pgAdminServiceType?: CommonCommon.ServiceType
|
|
143
345
|
pgAdminNodePort?: number
|
|
@@ -149,6 +351,8 @@ export type CreatePostgresqlReq = {
|
|
|
149
351
|
pgAdminDefaultEmail?: string
|
|
150
352
|
pgAdminDefaultPassword?: string
|
|
151
353
|
affinity?: CommonCommon.Affinity
|
|
354
|
+
backupConfig?: UpdatePostgresqlBackupConfigReq
|
|
355
|
+
accessWhitelist?: CommonCommon.AccessWhitelist
|
|
152
356
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
153
357
|
lbTyp?: CommonCommon.LBTyp
|
|
154
358
|
lbPoolName?: string
|
|
@@ -164,6 +368,8 @@ export type UpdatePostgresqlConfReq = {
|
|
|
164
368
|
namespace?: string
|
|
165
369
|
name?: string
|
|
166
370
|
conf?: string
|
|
371
|
+
confItems?: TemplateTemplate.TemplateConfigItem[]
|
|
372
|
+
reloadFromConfTemplateName?: string
|
|
167
373
|
}
|
|
168
374
|
|
|
169
375
|
export type UpdatePostgresqlParamsResp = {
|
|
@@ -178,13 +384,6 @@ export type GetPostgresqlParamRespSelectDataStringValue = {
|
|
|
178
384
|
value?: string
|
|
179
385
|
}
|
|
180
386
|
|
|
181
|
-
export type GetPostgresqlParamRespSelectDataResourceValue = {
|
|
182
|
-
cpuRequest?: string
|
|
183
|
-
cpuLimit?: string
|
|
184
|
-
memoryRequest?: string
|
|
185
|
-
memoryLimit?: string
|
|
186
|
-
}
|
|
187
|
-
|
|
188
387
|
export type GetPostgresqlParamRespSelectDataIntValue = {
|
|
189
388
|
value?: number
|
|
190
389
|
}
|
|
@@ -199,7 +398,7 @@ type BaseGetPostgresqlParamRespSelectData = {
|
|
|
199
398
|
}
|
|
200
399
|
|
|
201
400
|
export type GetPostgresqlParamRespSelectData = BaseGetPostgresqlParamRespSelectData
|
|
202
|
-
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue;
|
|
401
|
+
& OneOf<{ sValue: GetPostgresqlParamRespSelectDataStringValue; iValue: GetPostgresqlParamRespSelectDataIntValue; scValue: GetPostgresqlParamRespSelectDataStorageClassValue }>
|
|
203
402
|
|
|
204
403
|
export type GetPostgresqlParamRespSelect = {
|
|
205
404
|
selectType?: GetPostgresqlParamRespSelectSelectType
|
|
@@ -210,7 +409,6 @@ export type GetPostgresqlParamResp = {
|
|
|
210
409
|
version?: GetPostgresqlParamRespSelect
|
|
211
410
|
conf?: GetPostgresqlParamRespSelect
|
|
212
411
|
replicas?: GetPostgresqlParamRespSelect
|
|
213
|
-
resource?: GetPostgresqlParamRespSelect
|
|
214
412
|
storage?: GetPostgresqlParamRespSelect
|
|
215
413
|
}
|
|
216
414
|
|
|
@@ -290,6 +488,8 @@ export type GetPostgresqlGrafanaAddrReq = {
|
|
|
290
488
|
cluster?: string
|
|
291
489
|
namespace?: string
|
|
292
490
|
name?: string
|
|
491
|
+
from?: string
|
|
492
|
+
to?: string
|
|
293
493
|
}
|
|
294
494
|
|
|
295
495
|
export type GetPostgresqlGrafanaAddrResp = {
|
|
@@ -329,6 +529,7 @@ export type PostgresqlItemStatus = {
|
|
|
329
529
|
clusterIPs?: string[]
|
|
330
530
|
avgReplicationLagInBytes?: string
|
|
331
531
|
common?: CommonCommon.CommonItemStatus
|
|
532
|
+
isControl?: boolean
|
|
332
533
|
}
|
|
333
534
|
|
|
334
535
|
export type PostgresqlItemMetadata = {
|
|
@@ -336,6 +537,7 @@ export type PostgresqlItemMetadata = {
|
|
|
336
537
|
creationTimestamp?: string
|
|
337
538
|
name?: string
|
|
338
539
|
namespace?: string
|
|
540
|
+
uid?: string
|
|
339
541
|
}
|
|
340
542
|
|
|
341
543
|
export type PostgresqlItem = {
|
|
@@ -386,4 +588,28 @@ export class Postgresql {
|
|
|
386
588
|
static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
|
|
387
589
|
return fm.fetchReq<GetPostgresqlUsersReq, GetPostgresqlUsersResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
388
590
|
}
|
|
591
|
+
static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
|
|
592
|
+
return fm.fetchReq<GetPostgresqlBackupListReq, GetPostgresqlBackupListResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
593
|
+
}
|
|
594
|
+
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
595
|
+
return fm.fetchReq<CreatePostgresqlBackupReq, CreatePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
596
|
+
}
|
|
597
|
+
static CreatePostgresqlRestore(req: CreatePostgresqlRestoreReq, initReq?: fm.InitReq): Promise<CreatePostgresqlRestoreResp> {
|
|
598
|
+
return fm.fetchReq<CreatePostgresqlRestoreReq, CreatePostgresqlRestoreResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/restore`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
599
|
+
}
|
|
600
|
+
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
601
|
+
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
602
|
+
}
|
|
603
|
+
static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
|
|
604
|
+
return fm.fetchReq<UpdatePostgresqlBackupConfigReq, UpdatePostgresqlBackupConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
605
|
+
}
|
|
606
|
+
static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
|
|
607
|
+
return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
608
|
+
}
|
|
609
|
+
static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
|
|
610
|
+
return fm.fetchReq<UpdatePostgresqlS3ConfigReq, UpdatePostgresqlS3ConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/s3/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
611
|
+
}
|
|
612
|
+
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
613
|
+
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
614
|
+
}
|
|
389
615
|
}
|
|
@@ -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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/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/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
171
|
+
}
|
|
172
|
+
}
|