@daocloud-proto/mcamel-postgresql 0.0.2-37 → 0.0.2-373
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 +152 -0
- package/common.pb.ts +51 -0
- package/metric.pb.ts +11 -0
- package/package.json +1 -1
- package/postgresql.pb.ts +214 -0
- package/storage_config.pb.ts +188 -0
- package/template.pb.ts +170 -0
package/cluster.pb.ts
CHANGED
|
@@ -7,6 +7,30 @@
|
|
|
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",
|
|
@@ -28,11 +52,81 @@ export enum GetWorkspaceListReqSortDir {
|
|
|
28
52
|
DESC = "DESC",
|
|
29
53
|
}
|
|
30
54
|
|
|
55
|
+
export enum ClusterItemNetworkMode {
|
|
56
|
+
Unknown = "Unknown",
|
|
57
|
+
Flannel = "Flannel",
|
|
58
|
+
Calico = "Calico",
|
|
59
|
+
}
|
|
60
|
+
|
|
31
61
|
export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
32
62
|
NotInstall = "NotInstall",
|
|
33
63
|
Install = "Install",
|
|
34
64
|
}
|
|
35
65
|
|
|
66
|
+
export type GetInstallVersionReq = {
|
|
67
|
+
cluster?: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type GetInstallVersionRespSupportVersion = {
|
|
71
|
+
minVersion?: string
|
|
72
|
+
maxVersion?: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type GetInstallVersionRespStatus = {
|
|
76
|
+
inRange?: boolean
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type GetInstallVersionResp = {
|
|
80
|
+
clusterVersion?: string
|
|
81
|
+
supportVersion?: GetInstallVersionRespSupportVersion
|
|
82
|
+
status?: GetInstallVersionRespStatus
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type RestartInstanceReq = {
|
|
86
|
+
workspaceId?: number
|
|
87
|
+
cluster?: string
|
|
88
|
+
namespace?: string
|
|
89
|
+
name?: string
|
|
90
|
+
extra?: string
|
|
91
|
+
instanceType?: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type RestartInstanceResp = {
|
|
95
|
+
message?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type GetPermissionsListReq = {
|
|
99
|
+
workspaceId?: number
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type GetPermissionsListRespPermissions = {
|
|
103
|
+
getInstance?: boolean
|
|
104
|
+
createInstance?: boolean
|
|
105
|
+
updateInstance?: boolean
|
|
106
|
+
deleteInstance?: boolean
|
|
107
|
+
getMetric?: boolean
|
|
108
|
+
getInstanceLog?: boolean
|
|
109
|
+
getConfig?: boolean
|
|
110
|
+
updateConfig?: boolean
|
|
111
|
+
getBackup?: boolean
|
|
112
|
+
createBackup?: boolean
|
|
113
|
+
updateBackup?: boolean
|
|
114
|
+
deleteBackup?: boolean
|
|
115
|
+
getBackupConf?: boolean
|
|
116
|
+
createBackupConf?: boolean
|
|
117
|
+
updateBackupConf?: boolean
|
|
118
|
+
deleteBackupConf?: boolean
|
|
119
|
+
getTemplate?: boolean
|
|
120
|
+
createTemplate?: boolean
|
|
121
|
+
updateTemplate?: boolean
|
|
122
|
+
deleteTemplate?: boolean
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type GetPermissionsListResp = {
|
|
126
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
127
|
+
permissions?: PermissionsType[]
|
|
128
|
+
}
|
|
129
|
+
|
|
36
130
|
export type GetAllEventKindsListResp = {
|
|
37
131
|
data?: string[]
|
|
38
132
|
}
|
|
@@ -111,6 +205,24 @@ export type GetClusterNodeLabelListResp = {
|
|
|
111
205
|
pagination?: CommonCommon.Pagination
|
|
112
206
|
}
|
|
113
207
|
|
|
208
|
+
export type GetClusterPodLabelListReq = {
|
|
209
|
+
page?: number
|
|
210
|
+
pageSize?: number
|
|
211
|
+
searchKey?: string
|
|
212
|
+
filterNamespace?: string
|
|
213
|
+
cluster?: string
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
217
|
+
key?: string
|
|
218
|
+
value?: string[]
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type GetClusterPodLabelListResp = {
|
|
222
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
223
|
+
pagination?: CommonCommon.Pagination
|
|
224
|
+
}
|
|
225
|
+
|
|
114
226
|
export type GetClusterNodePortListReq = {
|
|
115
227
|
cluster?: string
|
|
116
228
|
}
|
|
@@ -183,6 +295,7 @@ export type GetWorkspaceListReq = {
|
|
|
183
295
|
export type GetWorkspaceListRespItem = {
|
|
184
296
|
workspaceId?: number
|
|
185
297
|
alias?: string
|
|
298
|
+
visible?: boolean
|
|
186
299
|
}
|
|
187
300
|
|
|
188
301
|
export type GetWorkspaceListResp = {
|
|
@@ -190,15 +303,39 @@ export type GetWorkspaceListResp = {
|
|
|
190
303
|
pagination?: CommonCommon.Pagination
|
|
191
304
|
}
|
|
192
305
|
|
|
306
|
+
export type GetClusterHostnetworkPortsReq = {
|
|
307
|
+
workspaceId?: number
|
|
308
|
+
cluster?: string
|
|
309
|
+
}
|
|
310
|
+
|
|
193
311
|
export type GetClusterListReq = {
|
|
194
312
|
workspaceId?: number
|
|
313
|
+
searchKey?: string
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export type GetClusterHostnetworkPortsResp = {
|
|
317
|
+
items?: string[]
|
|
195
318
|
}
|
|
196
319
|
|
|
197
320
|
export type GetClusterListResp = {
|
|
198
321
|
items?: string[]
|
|
322
|
+
clusters?: ClusterItem[]
|
|
199
323
|
pagination?: CommonCommon.Pagination
|
|
200
324
|
}
|
|
201
325
|
|
|
326
|
+
export type ClusterItemMetadata = {
|
|
327
|
+
name?: string
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export type ClusterItemStatus = {
|
|
331
|
+
networkMode?: ClusterItemNetworkMode[]
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export type ClusterItem = {
|
|
335
|
+
metadata?: ClusterItemMetadata
|
|
336
|
+
status?: ClusterItemStatus
|
|
337
|
+
}
|
|
338
|
+
|
|
202
339
|
export type GetClusterNamespaceListReq = {
|
|
203
340
|
workspaceId?: number
|
|
204
341
|
cluster?: string
|
|
@@ -221,6 +358,9 @@ export class Cluster {
|
|
|
221
358
|
static GetClusterList(req: GetClusterListReq, initReq?: fm.InitReq): Promise<GetClusterListResp> {
|
|
222
359
|
return fm.fetchReq<GetClusterListReq, GetClusterListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/clusters?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
223
360
|
}
|
|
361
|
+
static GetClusterHostnetworkPorts(req: GetClusterHostnetworkPortsReq, initReq?: fm.InitReq): Promise<GetClusterHostnetworkPortsResp> {
|
|
362
|
+
return fm.fetchReq<GetClusterHostnetworkPortsReq, GetClusterHostnetworkPortsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/hostnetwork_ports?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
363
|
+
}
|
|
224
364
|
static GetClusterNamespaceList(req: GetClusterNamespaceListReq, initReq?: fm.InitReq): Promise<GetClusterNamespaceListResp> {
|
|
225
365
|
return fm.fetchReq<GetClusterNamespaceListReq, GetClusterNamespaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "cluster"])}`, {...initReq, method: "GET"})
|
|
226
366
|
}
|
|
@@ -230,6 +370,9 @@ export class Cluster {
|
|
|
230
370
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
231
371
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
232
372
|
}
|
|
373
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
374
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
375
|
+
}
|
|
233
376
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
234
377
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/postgresql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
235
378
|
}
|
|
@@ -248,4 +391,13 @@ export class Cluster {
|
|
|
248
391
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
249
392
|
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
250
393
|
}
|
|
394
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
395
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
396
|
+
}
|
|
397
|
+
static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
|
|
398
|
+
return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
399
|
+
}
|
|
400
|
+
static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
|
|
401
|
+
return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
402
|
+
}
|
|
251
403
|
}
|
package/common.pb.ts
CHANGED
|
@@ -151,6 +151,8 @@ export type PodCommon = {
|
|
|
151
151
|
containersName?: string[]
|
|
152
152
|
ownerReference?: OwnerReference[]
|
|
153
153
|
initContainersName?: string[]
|
|
154
|
+
initContainersStatuses?: ContainerStatus[]
|
|
155
|
+
containersStatuses?: ContainerStatus[]
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
export type OwnerReference = {
|
|
@@ -164,4 +166,53 @@ export type CommonItemStatus = {
|
|
|
164
166
|
serviceAddresses?: string[]
|
|
165
167
|
webManagerAddress?: string
|
|
166
168
|
webLogAddress?: string
|
|
169
|
+
avgPvAllocatedInGb?: number
|
|
170
|
+
avgPvUsedInGb?: number
|
|
171
|
+
cpuUtilization?: number
|
|
172
|
+
memoryUtilization?: number
|
|
173
|
+
isClusterUnknown?: boolean
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type AccessWhitelistInternal = {
|
|
177
|
+
namespace?: string
|
|
178
|
+
podSelector?: {[key: string]: string}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export type AccessWhitelistExternal = {
|
|
182
|
+
cidr?: string
|
|
183
|
+
ip?: string
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export type AccessWhitelist = {
|
|
187
|
+
internals?: AccessWhitelistInternal[]
|
|
188
|
+
externals?: AccessWhitelistExternal[]
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type ContainerStatus = {
|
|
192
|
+
name?: string
|
|
193
|
+
state?: ContainerState
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type ContainerState = {
|
|
197
|
+
waiting?: ContainerStateWaiting
|
|
198
|
+
running?: ContainerStateRunning
|
|
199
|
+
terminated?: ContainerStateTerminated
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export type ContainerStateWaiting = {
|
|
203
|
+
reason?: string
|
|
204
|
+
message?: string
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export type ContainerStateRunning = {
|
|
208
|
+
startedAt?: string
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type ContainerStateTerminated = {
|
|
212
|
+
exitCode?: number
|
|
213
|
+
signal?: number
|
|
214
|
+
reason?: string
|
|
215
|
+
message?: string
|
|
216
|
+
startedAt?: string
|
|
217
|
+
finishedAt?: string
|
|
167
218
|
}
|
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
|
@@ -22,6 +22,48 @@ export enum Status {
|
|
|
22
22
|
Creating = "Creating",
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export enum GetPostgresqlS3ConfigListReqSortDir {
|
|
26
|
+
ASC = "ASC",
|
|
27
|
+
DESC = "DESC",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum GetPostgresqlBackupListReqSortDir {
|
|
31
|
+
ASC = "ASC",
|
|
32
|
+
DESC = "DESC",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
|
|
36
|
+
Running = "Running",
|
|
37
|
+
Failed = "Failed",
|
|
38
|
+
Succeeded = "Succeeded",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
|
|
42
|
+
Full = "Full",
|
|
43
|
+
Incremental = "Incremental",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
|
|
47
|
+
Manual = "Manual",
|
|
48
|
+
Auto = "Auto",
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export enum PostgresqlBackupItemStatusStatus {
|
|
52
|
+
Running = "Running",
|
|
53
|
+
Failed = "Failed",
|
|
54
|
+
Succeeded = "Succeeded",
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export enum PostgresqlBackupItemStatusBackupType {
|
|
58
|
+
Full = "Full",
|
|
59
|
+
Incremental = "Incremental",
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export enum PostgresqlBackupItemStatusBackupMethod {
|
|
63
|
+
Manual = "Manual",
|
|
64
|
+
Auto = "Auto",
|
|
65
|
+
}
|
|
66
|
+
|
|
25
67
|
export enum GetPostgresqlListReqSortDir {
|
|
26
68
|
ASC = "ASC",
|
|
27
69
|
DESC = "DESC",
|
|
@@ -67,6 +109,150 @@ export enum GetPostgresqlConfRespItemsParamType {
|
|
|
67
109
|
conf = "conf",
|
|
68
110
|
}
|
|
69
111
|
|
|
112
|
+
export type DeletePostgresqlBackupReq = {
|
|
113
|
+
cluster?: string
|
|
114
|
+
namespace?: string
|
|
115
|
+
name?: string
|
|
116
|
+
backupName?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type DeletePostgresqlBackupResp = {
|
|
120
|
+
message?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type CreateBucketExistCheckingReq = {
|
|
124
|
+
endpoint?: string
|
|
125
|
+
accessKey?: string
|
|
126
|
+
secretKey?: string
|
|
127
|
+
bucket?: string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type CreateBucketExistCheckingResp = {
|
|
131
|
+
message?: string
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export type UpdatePostgresqlS3ConfigReq = {
|
|
135
|
+
cluster?: string
|
|
136
|
+
namespace?: string
|
|
137
|
+
name?: string
|
|
138
|
+
description?: string
|
|
139
|
+
endpoint?: string
|
|
140
|
+
accessKey?: string
|
|
141
|
+
secretKey?: string
|
|
142
|
+
bucket?: string
|
|
143
|
+
retentionTime?: string
|
|
144
|
+
provider?: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type UpdatePostgresqlS3ConfigResp = {
|
|
148
|
+
message?: string
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type GetPostgresqlS3ConfigListReq = {
|
|
152
|
+
page?: number
|
|
153
|
+
pageSize?: number
|
|
154
|
+
sortDir?: GetPostgresqlS3ConfigListReqSortDir
|
|
155
|
+
sortBy?: string
|
|
156
|
+
searchKey?: string
|
|
157
|
+
workspaceId?: number
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
|
|
161
|
+
createTimestamp?: string
|
|
162
|
+
updateTimestamp?: string
|
|
163
|
+
backupPath?: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
|
|
167
|
+
spec?: UpdatePostgresqlS3ConfigReq
|
|
168
|
+
status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type GetPostgresqlS3ConfigListResp = {
|
|
172
|
+
items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
|
|
173
|
+
pagination?: CommonCommon.Pagination
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type UpdatePostgresqlBackupConfigReq = {
|
|
177
|
+
cluster?: string
|
|
178
|
+
namespace?: string
|
|
179
|
+
name?: string
|
|
180
|
+
isOpenAutoBackup?: boolean
|
|
181
|
+
backupSchedule?: string
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type UpdatePostgresqlBackupConfigResp = {
|
|
185
|
+
message?: string
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type GetPostgresqlBackupListReq = {
|
|
189
|
+
page?: number
|
|
190
|
+
pageSize?: number
|
|
191
|
+
sortDir?: GetPostgresqlBackupListReqSortDir
|
|
192
|
+
sortBy?: string
|
|
193
|
+
searchKey?: string
|
|
194
|
+
cluster?: string
|
|
195
|
+
namespace?: string
|
|
196
|
+
name?: string
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
|
|
200
|
+
creationTimestamp?: string
|
|
201
|
+
name?: string
|
|
202
|
+
namespace?: string
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
|
|
206
|
+
type?: string
|
|
207
|
+
status?: string
|
|
208
|
+
reason?: string
|
|
209
|
+
message?: string
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
|
|
213
|
+
completionTimestamp?: string
|
|
214
|
+
startTime?: string
|
|
215
|
+
active?: number
|
|
216
|
+
succeeded?: number
|
|
217
|
+
failed?: number
|
|
218
|
+
conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
|
|
219
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
|
|
220
|
+
backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
|
|
221
|
+
backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
|
|
222
|
+
storePath?: string
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
|
|
226
|
+
metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
|
|
227
|
+
spec?: CreatePostgresqlBackupReq
|
|
228
|
+
status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export type GetPostgresqlBackupListResp = {
|
|
232
|
+
items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
|
|
233
|
+
pagination?: CommonCommon.Pagination
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type CreatePostgresqlBackupReq = {
|
|
237
|
+
cluster?: string
|
|
238
|
+
namespace?: string
|
|
239
|
+
name?: string
|
|
240
|
+
backupName?: string
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export type CreatePostgresqlBackupResp = {
|
|
244
|
+
message?: string
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export type PostgresqlBackupItemStatus = {
|
|
248
|
+
status?: PostgresqlBackupItemStatusStatus
|
|
249
|
+
message?: string
|
|
250
|
+
backupUrl?: string
|
|
251
|
+
backupType?: PostgresqlBackupItemStatusBackupType
|
|
252
|
+
backupMethod?: PostgresqlBackupItemStatusBackupMethod
|
|
253
|
+
completionTimestamp?: string
|
|
254
|
+
}
|
|
255
|
+
|
|
70
256
|
export type GetPostgresqlUsersReq = {
|
|
71
257
|
cluster?: string
|
|
72
258
|
namespace?: string
|
|
@@ -89,6 +275,8 @@ export type GetPostgresqlListReq = {
|
|
|
89
275
|
sortBy?: string
|
|
90
276
|
searchKey?: string
|
|
91
277
|
workspaceId?: number
|
|
278
|
+
filterCluster?: string
|
|
279
|
+
filterNamespace?: string
|
|
92
280
|
}
|
|
93
281
|
|
|
94
282
|
export type GetPostgresqlConfReq = {
|
|
@@ -147,6 +335,8 @@ export type CreatePostgresqlReq = {
|
|
|
147
335
|
pgAdminDefaultEmail?: string
|
|
148
336
|
pgAdminDefaultPassword?: string
|
|
149
337
|
affinity?: CommonCommon.Affinity
|
|
338
|
+
backupConfig?: UpdatePostgresqlBackupConfigReq
|
|
339
|
+
accessWhitelist?: CommonCommon.AccessWhitelist
|
|
150
340
|
externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
|
|
151
341
|
lbTyp?: CommonCommon.LBTyp
|
|
152
342
|
lbPoolName?: string
|
|
@@ -288,6 +478,8 @@ export type GetPostgresqlGrafanaAddrReq = {
|
|
|
288
478
|
cluster?: string
|
|
289
479
|
namespace?: string
|
|
290
480
|
name?: string
|
|
481
|
+
from?: string
|
|
482
|
+
to?: string
|
|
291
483
|
}
|
|
292
484
|
|
|
293
485
|
export type GetPostgresqlGrafanaAddrResp = {
|
|
@@ -327,6 +519,7 @@ export type PostgresqlItemStatus = {
|
|
|
327
519
|
clusterIPs?: string[]
|
|
328
520
|
avgReplicationLagInBytes?: string
|
|
329
521
|
common?: CommonCommon.CommonItemStatus
|
|
522
|
+
isControl?: boolean
|
|
330
523
|
}
|
|
331
524
|
|
|
332
525
|
export type PostgresqlItemMetadata = {
|
|
@@ -384,4 +577,25 @@ export class Postgresql {
|
|
|
384
577
|
static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
|
|
385
578
|
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"})
|
|
386
579
|
}
|
|
580
|
+
static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
|
|
581
|
+
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"})
|
|
582
|
+
}
|
|
583
|
+
static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
|
|
584
|
+
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)})
|
|
585
|
+
}
|
|
586
|
+
static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
|
|
587
|
+
return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
|
|
588
|
+
}
|
|
589
|
+
static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
|
|
590
|
+
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)})
|
|
591
|
+
}
|
|
592
|
+
static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
|
|
593
|
+
return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
594
|
+
}
|
|
595
|
+
static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
|
|
596
|
+
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)})
|
|
597
|
+
}
|
|
598
|
+
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
599
|
+
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
600
|
+
}
|
|
387
601
|
}
|
|
@@ -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,170 @@
|
|
|
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
|
+
}
|
|
18
|
+
|
|
19
|
+
export enum GetTemplateConfigReqSortDir {
|
|
20
|
+
ASC = "ASC",
|
|
21
|
+
DESC = "DESC",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum GetTemplateConfigListReqSortDir {
|
|
25
|
+
ASC = "ASC",
|
|
26
|
+
DESC = "DESC",
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export enum TemplateConfigItemValueType {
|
|
30
|
+
String = "String",
|
|
31
|
+
SingleSelection = "SingleSelection",
|
|
32
|
+
MultiString = "MultiString",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type GetTemplateConfigVersionsReq = {
|
|
36
|
+
workspaceId?: number
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type GetTemplateConfigVersionsResp = {
|
|
40
|
+
versions?: string[]
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type GetTemplateConfigStringResp = {
|
|
44
|
+
conf?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type DeleteTemplateReq = {
|
|
48
|
+
workspaceId?: number
|
|
49
|
+
name?: string
|
|
50
|
+
version?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type DeleteTemplateConfigResp = {
|
|
54
|
+
message?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type CreateOrUpdateTemplateConfigResp = {
|
|
58
|
+
message?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type GetTemplateConfigReq = {
|
|
62
|
+
page?: number
|
|
63
|
+
pageSize?: number
|
|
64
|
+
sortDir?: GetTemplateConfigReqSortDir
|
|
65
|
+
sortBy?: string
|
|
66
|
+
searchKey?: string
|
|
67
|
+
workspaceId?: number
|
|
68
|
+
name?: string
|
|
69
|
+
version?: string
|
|
70
|
+
templateType?: string
|
|
71
|
+
type?: string
|
|
72
|
+
createTimestamp?: string
|
|
73
|
+
templateInstanceType?: TemplateInstanceType
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type CreateTemplateConfigResp = {
|
|
77
|
+
message?: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type UpdateTemplateConfigResp = {
|
|
81
|
+
message?: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type CreateTemplateConfigReq = {
|
|
85
|
+
workspaceId?: number
|
|
86
|
+
targetName?: string
|
|
87
|
+
targetVersion?: string
|
|
88
|
+
targetType?: string
|
|
89
|
+
targetTemplateType?: string
|
|
90
|
+
targetConf?: string
|
|
91
|
+
fromTemplateName?: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type UpdateTemplateConfigReq = {
|
|
95
|
+
workspaceId?: number
|
|
96
|
+
name?: string
|
|
97
|
+
version?: string
|
|
98
|
+
type?: string
|
|
99
|
+
templateType?: string
|
|
100
|
+
items?: TemplateConfigItem[]
|
|
101
|
+
conf?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type GetTemplateConfigResp = {
|
|
105
|
+
data?: UpdateTemplateConfigReq
|
|
106
|
+
pagination?: CommonCommon.Pagination
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type GetTemplateConfigListReq = {
|
|
110
|
+
page?: number
|
|
111
|
+
pageSize?: number
|
|
112
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
113
|
+
sortBy?: string
|
|
114
|
+
searchKey?: string
|
|
115
|
+
workspaceId?: number
|
|
116
|
+
version?: string
|
|
117
|
+
templateInstanceType?: TemplateInstanceType
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type TemplateConfigItem = {
|
|
121
|
+
name?: string
|
|
122
|
+
default?: string
|
|
123
|
+
current?: string
|
|
124
|
+
value?: string
|
|
125
|
+
isNeedRestart?: boolean
|
|
126
|
+
valueType?: TemplateConfigItemValueType
|
|
127
|
+
valueRemarksZh?: string
|
|
128
|
+
valueRemarksEn?: string
|
|
129
|
+
updateTimestamp?: string
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type GetTemplateConfigListResp = {
|
|
133
|
+
items?: GetTemplateConfigReq[]
|
|
134
|
+
pagination?: CommonCommon.Pagination
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type GetTemplateInstanceTypeListReq = {
|
|
138
|
+
workspaceId?: number
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type GetTemplateInstanceTypeListResp = {
|
|
142
|
+
type?: TemplateInstanceType[]
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export class Template {
|
|
146
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
147
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
148
|
+
}
|
|
149
|
+
static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
|
|
150
|
+
return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
151
|
+
}
|
|
152
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
153
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
154
|
+
}
|
|
155
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
156
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
157
|
+
}
|
|
158
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
159
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
160
|
+
}
|
|
161
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
162
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
163
|
+
}
|
|
164
|
+
static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
165
|
+
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"})
|
|
166
|
+
}
|
|
167
|
+
static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
|
|
168
|
+
return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
169
|
+
}
|
|
170
|
+
}
|