@daocloud-proto/mcamel-mysql 0.3.1-7 → 0.3.1-81
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 +48 -1
- package/common.pb.ts +37 -0
- package/mysql.pb.ts +26 -3
- package/package.json +1 -1
- package/storage_config.pb.ts +164 -0
package/cluster.pb.ts
CHANGED
|
@@ -7,6 +7,17 @@
|
|
|
7
7
|
import * as CommonCommon from "./common.pb"
|
|
8
8
|
import * as fm from "./fetch.pb"
|
|
9
9
|
|
|
10
|
+
export enum EventType {
|
|
11
|
+
EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
|
|
12
|
+
Normal = "Normal",
|
|
13
|
+
Warning = "Warning",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum GetEventListReqKind {
|
|
17
|
+
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
18
|
+
Pod = "Pod",
|
|
19
|
+
}
|
|
20
|
+
|
|
10
21
|
export enum GetWorkspaceListReqSortDir {
|
|
11
22
|
ASC = "ASC",
|
|
12
23
|
DESC = "DESC",
|
|
@@ -17,6 +28,40 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
|
|
|
17
28
|
Install = "Install",
|
|
18
29
|
}
|
|
19
30
|
|
|
31
|
+
export type EventSource = {
|
|
32
|
+
component?: string
|
|
33
|
+
host?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type GetEventListReq = {
|
|
37
|
+
cluster?: string
|
|
38
|
+
namespace?: string
|
|
39
|
+
kind?: GetEventListReqKind
|
|
40
|
+
kindName?: string
|
|
41
|
+
page?: number
|
|
42
|
+
pageSize?: number
|
|
43
|
+
type?: EventType[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type ObjectReference = {
|
|
47
|
+
kind?: string
|
|
48
|
+
name?: string
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type GetEventListRespItem = {
|
|
52
|
+
involvedObject?: ObjectReference
|
|
53
|
+
reason?: string
|
|
54
|
+
message?: string
|
|
55
|
+
source?: EventSource
|
|
56
|
+
lastTimestamp?: string
|
|
57
|
+
type?: EventType
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type GetEventListResp = {
|
|
61
|
+
items?: GetEventListRespItem[]
|
|
62
|
+
pagination?: CommonCommon.Pagination
|
|
63
|
+
}
|
|
64
|
+
|
|
20
65
|
export type GetWorkspaceListReq = {
|
|
21
66
|
page?: number
|
|
22
67
|
pageSize?: number
|
|
@@ -56,7 +101,6 @@ export type GetClusterNamespaceListResp = {
|
|
|
56
101
|
|
|
57
102
|
export type GetInsightAgentStatusReq = {
|
|
58
103
|
cluster?: string
|
|
59
|
-
mcamelType?: string
|
|
60
104
|
}
|
|
61
105
|
|
|
62
106
|
export type GetInsightAgentStatusResp = {
|
|
@@ -76,4 +120,7 @@ export class Cluster {
|
|
|
76
120
|
static GetInsightAgentStatus(req: GetInsightAgentStatusReq, initReq?: fm.InitReq): Promise<GetInsightAgentStatusResp> {
|
|
77
121
|
return fm.fetchReq<GetInsightAgentStatusReq, GetInsightAgentStatusResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/insight/status?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
78
122
|
}
|
|
123
|
+
static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
|
|
124
|
+
return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
125
|
+
}
|
|
79
126
|
}
|
package/common.pb.ts
CHANGED
|
@@ -9,6 +9,21 @@ export enum PageInfoReqSortDir {
|
|
|
9
9
|
DESC = "DESC",
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export enum PodCommonPodPhase {
|
|
13
|
+
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
14
|
+
Unknown = "Unknown",
|
|
15
|
+
Pending = "Pending",
|
|
16
|
+
Running = "Running",
|
|
17
|
+
Succeeded = "Succeeded",
|
|
18
|
+
Failed = "Failed",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum PodCommonConditionStatus {
|
|
22
|
+
PodConditionStatusUnknown = "PodConditionStatusUnknown",
|
|
23
|
+
PodConditionStatusTrue = "PodConditionStatusTrue",
|
|
24
|
+
PodConditionStatusFalse = "PodConditionStatusFalse",
|
|
25
|
+
}
|
|
26
|
+
|
|
12
27
|
export type Pagination = {
|
|
13
28
|
total?: number
|
|
14
29
|
page?: number
|
|
@@ -21,4 +36,26 @@ export type PageInfoReq = {
|
|
|
21
36
|
pageSize?: number
|
|
22
37
|
sortDir?: PageInfoReqSortDir
|
|
23
38
|
sortBy?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type PodCommonCondition = {
|
|
42
|
+
lastTransitionTime?: string
|
|
43
|
+
lastUpdateTime?: string
|
|
44
|
+
message?: string
|
|
45
|
+
reason?: string
|
|
46
|
+
status?: PodCommonConditionStatus
|
|
47
|
+
type?: string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type PodCommon = {
|
|
51
|
+
name?: string
|
|
52
|
+
phase?: PodCommonPodPhase
|
|
53
|
+
ip?: string
|
|
54
|
+
restartCount?: number
|
|
55
|
+
createTimestamp?: string
|
|
56
|
+
cpuUsage?: number
|
|
57
|
+
cpuLimit?: number
|
|
58
|
+
memoryUsage?: number
|
|
59
|
+
memoryLimit?: number
|
|
60
|
+
conditions?: PodCommonCondition[]
|
|
24
61
|
}
|
package/mysql.pb.ts
CHANGED
|
@@ -114,6 +114,21 @@ export enum GetMysqlConfRespItemsParamType {
|
|
|
114
114
|
conf = "conf",
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
export type GetMysqlUsersReq = {
|
|
118
|
+
cluster?: string
|
|
119
|
+
namespace?: string
|
|
120
|
+
name?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type GetMysqlUsersRespUserItem = {
|
|
124
|
+
username?: string
|
|
125
|
+
password?: string
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type GetMysqlUsersResp = {
|
|
129
|
+
users?: GetMysqlUsersRespUserItem[]
|
|
130
|
+
}
|
|
131
|
+
|
|
117
132
|
export type UpdateMysqlBackupConfigReq = {
|
|
118
133
|
workspaceId?: number
|
|
119
134
|
cluster?: string
|
|
@@ -124,6 +139,7 @@ export type UpdateMysqlBackupConfigReq = {
|
|
|
124
139
|
backupHistoryLimit?: number
|
|
125
140
|
backupBucketSubPath?: string
|
|
126
141
|
isOpenAutoBackup?: boolean
|
|
142
|
+
storageConfigName?: string
|
|
127
143
|
}
|
|
128
144
|
|
|
129
145
|
export type UpdateMysqlBackupConfigResp = {
|
|
@@ -168,8 +184,6 @@ export type GetMysqlBackupJobListReq = {
|
|
|
168
184
|
|
|
169
185
|
export type GetMysqlBackupSecretReq = {
|
|
170
186
|
workspaceId?: number
|
|
171
|
-
cluster?: string
|
|
172
|
-
namespace?: string
|
|
173
187
|
}
|
|
174
188
|
|
|
175
189
|
export type GetMysqlBackupProviderListReq = {
|
|
@@ -384,12 +398,17 @@ export type GetMysqlParamRespSelectDataIntValue = {
|
|
|
384
398
|
value?: number
|
|
385
399
|
}
|
|
386
400
|
|
|
401
|
+
export type GetMysqlParamRespSelectDataStorageClassValue = {
|
|
402
|
+
name?: string
|
|
403
|
+
allowVolumeExpansion?: boolean
|
|
404
|
+
}
|
|
405
|
+
|
|
387
406
|
|
|
388
407
|
type BaseGetMysqlParamRespSelectData = {
|
|
389
408
|
}
|
|
390
409
|
|
|
391
410
|
export type GetMysqlParamRespSelectData = BaseGetMysqlParamRespSelectData
|
|
392
|
-
& OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; rValue: GetMysqlParamRespSelectDataResourceValue; iValue: GetMysqlParamRespSelectDataIntValue }>
|
|
411
|
+
& OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; rValue: GetMysqlParamRespSelectDataResourceValue; iValue: GetMysqlParamRespSelectDataIntValue; scValue: GetMysqlParamRespSelectDataStorageClassValue }>
|
|
393
412
|
|
|
394
413
|
export type GetMysqlParamRespSelect = {
|
|
395
414
|
selectType?: GetMysqlParamRespSelectSelectType
|
|
@@ -467,6 +486,7 @@ export type GetMysqlNodeListRespData = {
|
|
|
467
486
|
createTimestamp?: string
|
|
468
487
|
nodeType?: GetMysqlNodeListRespNodeType
|
|
469
488
|
healthStatus?: GetMysqlNodeListRespHealthStatus
|
|
489
|
+
common?: CommonCommon.PodCommon
|
|
470
490
|
}
|
|
471
491
|
|
|
472
492
|
export type GetMysqlNodeListResp = {
|
|
@@ -599,4 +619,7 @@ export class Mysql {
|
|
|
599
619
|
static UpdateMysqlBackupConfig(req: UpdateMysqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdateMysqlBackupConfigResp> {
|
|
600
620
|
return fm.fetchReq<UpdateMysqlBackupConfigReq, UpdateMysqlBackupConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
601
621
|
}
|
|
622
|
+
static GetMysqlUsers(req: GetMysqlUsersReq, initReq?: fm.InitReq): Promise<GetMysqlUsersResp> {
|
|
623
|
+
return fm.fetchReq<GetMysqlUsersReq, GetMysqlUsersResp>(`/apis/mcamel.io/mysql/v1alpha1/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
624
|
+
}
|
|
602
625
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,164 @@
|
|
|
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 StorageType {
|
|
20
|
+
STORAGE_TYPE_UNSPECIFIED = "STORAGE_TYPE_UNSPECIFIED",
|
|
21
|
+
STORAGE_TYPE_MINIO = "STORAGE_TYPE_MINIO",
|
|
22
|
+
STORAGE_TYPE_AWS_S3 = "STORAGE_TYPE_AWS_S3",
|
|
23
|
+
STORAGE_TYPE_MINIO_WILD = "STORAGE_TYPE_MINIO_WILD",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum GetStorageConfigParamRespSelectSelectType {
|
|
27
|
+
Single = "Single",
|
|
28
|
+
Multiple = "Multiple",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum GetStorageConfigConsumersRespStorageConfigConsumerType {
|
|
32
|
+
STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED = "STORAGE_CONFIG_CONSUMER_TYPE_UNSPECIFIED",
|
|
33
|
+
STORAGE_CONFIG_CONSUMER_TYPE_MYSQL = "STORAGE_CONFIG_CONSUMER_TYPE_MYSQL",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type GetStorageConfigParamReq = {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type GetStorageConfigParamRespSelectDataStringValue = {
|
|
40
|
+
value?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type GetStorageConfigParamRespSelectDataIntValue = {
|
|
44
|
+
value?: number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
type BaseGetStorageConfigParamRespSelectData = {
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type GetStorageConfigParamRespSelectData = BaseGetStorageConfigParamRespSelectData
|
|
52
|
+
& OneOf<{ sValue: GetStorageConfigParamRespSelectDataStringValue; iValue: GetStorageConfigParamRespSelectDataIntValue }>
|
|
53
|
+
|
|
54
|
+
export type GetStorageConfigParamRespSelect = {
|
|
55
|
+
selectType?: GetStorageConfigParamRespSelectSelectType
|
|
56
|
+
data?: GetStorageConfigParamRespSelectData[]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type GetStorageConfigParamResp = {
|
|
60
|
+
storageType?: GetStorageConfigParamRespSelect
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type CreateStorageConfigReq = {
|
|
64
|
+
workspaceId?: number
|
|
65
|
+
cluster?: string
|
|
66
|
+
namespace?: string
|
|
67
|
+
name?: string
|
|
68
|
+
storageType?: StorageType
|
|
69
|
+
minioCluster?: string
|
|
70
|
+
minioNamespace?: string
|
|
71
|
+
minioName?: string
|
|
72
|
+
accessKey?: string
|
|
73
|
+
secretKey?: string
|
|
74
|
+
endpoint?: string
|
|
75
|
+
description?: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type CreateStorageConfigResp = {
|
|
79
|
+
message?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type GetStorageConfigConsumersReq = {
|
|
83
|
+
workspaceId?: number
|
|
84
|
+
name?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type GetStorageConfigConsumersRespConsumer = {
|
|
88
|
+
type?: GetStorageConfigConsumersRespStorageConfigConsumerType
|
|
89
|
+
cluster?: string
|
|
90
|
+
namespace?: string
|
|
91
|
+
name?: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type GetStorageConfigConsumersResp = {
|
|
95
|
+
consumers?: GetStorageConfigConsumersRespConsumer[]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type DeleteStorageConfigReq = {
|
|
99
|
+
workspaceId?: number
|
|
100
|
+
name?: string
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type DeleteStorageConfigResp = {
|
|
104
|
+
message?: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type UpdateStorageConfigResp = {
|
|
108
|
+
message?: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type StorageConfigItemStorageConfigStatus = {
|
|
112
|
+
lastUpdateTimestamp?: string
|
|
113
|
+
createTimestamp?: string
|
|
114
|
+
status?: string
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type StorageConfigItem = {
|
|
118
|
+
spec?: CreateStorageConfigReq
|
|
119
|
+
status?: StorageConfigItemStorageConfigStatus
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export type GetStorageConfigReq = {
|
|
123
|
+
workspaceId?: number
|
|
124
|
+
name?: string
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type GetStorageConfigResp = {
|
|
128
|
+
item?: StorageConfigItem
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type GetStorageConfigListReq = {
|
|
132
|
+
workspaceId?: number
|
|
133
|
+
pageInfoReq?: CommonCommon.PageInfoReq
|
|
134
|
+
searchKey?: string
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type GetStorageConfigListResp = {
|
|
138
|
+
items?: StorageConfigItem[]
|
|
139
|
+
pagination?: CommonCommon.Pagination
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export class StorageConfig {
|
|
143
|
+
static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
|
|
144
|
+
return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/mysql/v1alpha1/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
145
|
+
}
|
|
146
|
+
static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
|
|
147
|
+
return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST"})
|
|
148
|
+
}
|
|
149
|
+
static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
|
|
150
|
+
return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
151
|
+
}
|
|
152
|
+
static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
|
|
153
|
+
return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
154
|
+
}
|
|
155
|
+
static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
|
|
156
|
+
return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT"})
|
|
157
|
+
}
|
|
158
|
+
static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
|
|
159
|
+
return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
160
|
+
}
|
|
161
|
+
static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
|
|
162
|
+
return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/mysql/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
163
|
+
}
|
|
164
|
+
}
|