@daocloud-proto/mcamel-mysql 0.9.0-rc1-8 → 0.10.2-1
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 +72 -0
- package/common.pb.ts +45 -1
- package/mysql.pb.ts +11 -0
- package/package.json +1 -1
- package/template.pb.ts +129 -0
package/cluster.pb.ts
CHANGED
|
@@ -7,6 +7,26 @@
|
|
|
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
|
+
}
|
|
29
|
+
|
|
10
30
|
export enum EventType {
|
|
11
31
|
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
12
32
|
Normal = "Normal",
|
|
@@ -33,6 +53,34 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
|
33
53
|
Install = "Install",
|
|
34
54
|
}
|
|
35
55
|
|
|
56
|
+
export type GetPermissionsListReq = {
|
|
57
|
+
workspaceId?: number
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type GetPermissionsListRespPermissions = {
|
|
61
|
+
getInstance?: boolean
|
|
62
|
+
createInstance?: boolean
|
|
63
|
+
updateInstance?: boolean
|
|
64
|
+
deleteInstance?: boolean
|
|
65
|
+
getMetric?: boolean
|
|
66
|
+
getInstanceLog?: boolean
|
|
67
|
+
getConfig?: boolean
|
|
68
|
+
updateConfig?: boolean
|
|
69
|
+
getBackup?: boolean
|
|
70
|
+
createBackup?: boolean
|
|
71
|
+
updateBackup?: boolean
|
|
72
|
+
deleteBackup?: boolean
|
|
73
|
+
getBackupConf?: boolean
|
|
74
|
+
createBackupConf?: boolean
|
|
75
|
+
updateBackupConf?: boolean
|
|
76
|
+
deleteBackupConf?: boolean
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type GetPermissionsListResp = {
|
|
80
|
+
permissionsBool?: GetPermissionsListRespPermissions
|
|
81
|
+
permissions?: PermissionsType[]
|
|
82
|
+
}
|
|
83
|
+
|
|
36
84
|
export type GetAllEventKindsListResp = {
|
|
37
85
|
data?: string[]
|
|
38
86
|
}
|
|
@@ -111,6 +159,24 @@ export type GetClusterNodeLabelListResp = {
|
|
|
111
159
|
pagination?: CommonCommon.Pagination
|
|
112
160
|
}
|
|
113
161
|
|
|
162
|
+
export type GetClusterPodLabelListReq = {
|
|
163
|
+
page?: number
|
|
164
|
+
pageSize?: number
|
|
165
|
+
searchKey?: string
|
|
166
|
+
filterNamespace?: string
|
|
167
|
+
cluster?: string
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type GetClusterPodLabelListRespLabel = {
|
|
171
|
+
key?: string
|
|
172
|
+
value?: string[]
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type GetClusterPodLabelListResp = {
|
|
176
|
+
items?: GetClusterPodLabelListRespLabel[]
|
|
177
|
+
pagination?: CommonCommon.Pagination
|
|
178
|
+
}
|
|
179
|
+
|
|
114
180
|
export type GetClusterNodePortListReq = {
|
|
115
181
|
cluster?: string
|
|
116
182
|
}
|
|
@@ -230,6 +296,9 @@ export class Cluster {
|
|
|
230
296
|
static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
|
|
231
297
|
return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
232
298
|
}
|
|
299
|
+
static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
|
|
300
|
+
return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
301
|
+
}
|
|
233
302
|
static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
|
|
234
303
|
return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/mysql/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
235
304
|
}
|
|
@@ -248,4 +317,7 @@ export class Cluster {
|
|
|
248
317
|
static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
|
|
249
318
|
return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
250
319
|
}
|
|
320
|
+
static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
|
|
321
|
+
return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
322
|
+
}
|
|
251
323
|
}
|
package/common.pb.ts
CHANGED
|
@@ -151,6 +151,7 @@ export type PodCommon = {
|
|
|
151
151
|
containersName?: string[]
|
|
152
152
|
ownerReference?: OwnerReference[]
|
|
153
153
|
initContainersName?: string[]
|
|
154
|
+
initContainersStatuses?: ContainerStatus[]
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
export type OwnerReference = {
|
|
@@ -164,7 +165,50 @@ export type CommonItemStatus = {
|
|
|
164
165
|
serviceAddresses?: string[]
|
|
165
166
|
webManagerAddress?: string
|
|
166
167
|
webLogAddress?: string
|
|
167
|
-
isHwameistorSc?: boolean
|
|
168
168
|
avgPvAllocatedInGb?: number
|
|
169
169
|
avgPvUsedInGb?: number
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type AccessWhitelistInternal = {
|
|
173
|
+
namespace?: string
|
|
174
|
+
podSelector?: {[key: string]: string}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type AccessWhitelistExternal = {
|
|
178
|
+
cidr?: string
|
|
179
|
+
ip?: string
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export type AccessWhitelist = {
|
|
183
|
+
internals?: AccessWhitelistInternal[]
|
|
184
|
+
externals?: AccessWhitelistExternal[]
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type ContainerStatus = {
|
|
188
|
+
name?: string
|
|
189
|
+
state?: ContainerState
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export type ContainerState = {
|
|
193
|
+
waiting?: ContainerStateWaiting
|
|
194
|
+
running?: ContainerStateRunning
|
|
195
|
+
terminated?: ContainerStateTerminated
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export type ContainerStateWaiting = {
|
|
199
|
+
reason?: string
|
|
200
|
+
message?: string
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export type ContainerStateRunning = {
|
|
204
|
+
startedAt?: string
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export type ContainerStateTerminated = {
|
|
208
|
+
exitCode?: number
|
|
209
|
+
signal?: number
|
|
210
|
+
reason?: string
|
|
211
|
+
message?: string
|
|
212
|
+
startedAt?: string
|
|
213
|
+
finishedAt?: string
|
|
170
214
|
}
|
package/mysql.pb.ts
CHANGED
|
@@ -113,6 +113,13 @@ export enum GetMysqlConfRespItemsParamType {
|
|
|
113
113
|
conf = "conf",
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
export enum MysqlClusterItemStatusRestoreInitialStatus {
|
|
117
|
+
Unknown = "Unknown",
|
|
118
|
+
Running = "Running",
|
|
119
|
+
Failed = "Failed",
|
|
120
|
+
Succeeded = "Succeeded",
|
|
121
|
+
}
|
|
122
|
+
|
|
116
123
|
export type GetMinioListReq = {
|
|
117
124
|
page?: number
|
|
118
125
|
pageSize?: number
|
|
@@ -383,6 +390,7 @@ export type CreateMysqlReq = {
|
|
|
383
390
|
memoryRequest?: string
|
|
384
391
|
memoryLimit?: string
|
|
385
392
|
conf?: string
|
|
393
|
+
confTemplateName?: string
|
|
386
394
|
backupSchedule?: string
|
|
387
395
|
backupSecretName?: string
|
|
388
396
|
backupBucket?: string
|
|
@@ -546,6 +554,8 @@ export type GetMysqlGrafanaAddrReq = {
|
|
|
546
554
|
cluster?: string
|
|
547
555
|
namespace?: string
|
|
548
556
|
name?: string
|
|
557
|
+
from?: string
|
|
558
|
+
to?: string
|
|
549
559
|
}
|
|
550
560
|
|
|
551
561
|
export type GetMysqlGrafanaAddrResp = {
|
|
@@ -591,6 +601,7 @@ export type MysqlClusterItemStatus = {
|
|
|
591
601
|
secondsBehindMaster?: number
|
|
592
602
|
cpuUtilization?: number
|
|
593
603
|
memoryUtilization?: number
|
|
604
|
+
restoreInitialStatus?: MysqlClusterItemStatusRestoreInitialStatus
|
|
594
605
|
}
|
|
595
606
|
|
|
596
607
|
export type MysqlClusterItemMetadata = {
|
package/package.json
CHANGED
package/template.pb.ts
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
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 fm from "./fetch.pb"
|
|
8
|
+
|
|
9
|
+
export enum GetTemplateConfigReqSortDir {
|
|
10
|
+
ASC = "ASC",
|
|
11
|
+
DESC = "DESC",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum GetTemplateConfigListReqSortDir {
|
|
15
|
+
ASC = "ASC",
|
|
16
|
+
DESC = "DESC",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export enum TemplateConfigItemValueType {
|
|
20
|
+
String = "String",
|
|
21
|
+
SingleSelection = "SingleSelection",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type GetTemplateConfigStringResp = {
|
|
25
|
+
conf?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type DeleteTemplateReq = {
|
|
29
|
+
workspaceId?: number
|
|
30
|
+
name?: string
|
|
31
|
+
version?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type DeleteTemplateConfigResp = {
|
|
35
|
+
message?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type CreateOrUpdateTemplateConfigResp = {
|
|
39
|
+
message?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type GetTemplateConfigReq = {
|
|
43
|
+
page?: number
|
|
44
|
+
pageSize?: number
|
|
45
|
+
sortDir?: GetTemplateConfigReqSortDir
|
|
46
|
+
sortBy?: string
|
|
47
|
+
searchKey?: string
|
|
48
|
+
workspaceId?: number
|
|
49
|
+
name?: string
|
|
50
|
+
version?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type CreateTemplateConfigResp = {
|
|
54
|
+
message?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type UpdateTemplateConfigResp = {
|
|
58
|
+
message?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type CreateTemplateConfigReq = {
|
|
62
|
+
workspaceId?: number
|
|
63
|
+
targetName?: string
|
|
64
|
+
targetVersion?: string
|
|
65
|
+
targetType?: string
|
|
66
|
+
targetTemplateType?: string
|
|
67
|
+
targetConf?: string
|
|
68
|
+
fromTemplateName?: string
|
|
69
|
+
targetWorkspaceId?: number
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type UpdateTemplateConfigReq = {
|
|
73
|
+
workspaceId?: number
|
|
74
|
+
name?: string
|
|
75
|
+
version?: string
|
|
76
|
+
type?: string
|
|
77
|
+
templateType?: string
|
|
78
|
+
items?: TemplateConfigItem[]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type GetTemplateConfigResp = {
|
|
82
|
+
data?: UpdateTemplateConfigReq
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type GetTemplateConfigListReq = {
|
|
86
|
+
page?: number
|
|
87
|
+
pageSize?: number
|
|
88
|
+
sortDir?: GetTemplateConfigListReqSortDir
|
|
89
|
+
sortBy?: string
|
|
90
|
+
searchKey?: string
|
|
91
|
+
workspaceId?: number
|
|
92
|
+
version?: string
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type TemplateConfigItem = {
|
|
96
|
+
name?: string
|
|
97
|
+
default?: string
|
|
98
|
+
current?: string
|
|
99
|
+
value?: string
|
|
100
|
+
isNeedRestart?: boolean
|
|
101
|
+
valueType?: TemplateConfigItemValueType
|
|
102
|
+
valueRemarksZh?: string
|
|
103
|
+
valueRemarksEn?: string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type GetTemplateConfigListResp = {
|
|
107
|
+
items?: GetTemplateConfigReq[]
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export class Template {
|
|
111
|
+
static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
|
|
112
|
+
return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
113
|
+
}
|
|
114
|
+
static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
|
|
115
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
116
|
+
}
|
|
117
|
+
static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
|
|
118
|
+
return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
|
|
119
|
+
}
|
|
120
|
+
static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
|
|
121
|
+
return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
122
|
+
}
|
|
123
|
+
static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
|
|
124
|
+
return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
125
|
+
}
|
|
126
|
+
static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
|
|
127
|
+
return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
128
|
+
}
|
|
129
|
+
}
|