@daocloud-proto/mcamel-mysql 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.pb.ts +5 -0
- package/mysql.pb.ts +8 -1
- package/package.json +1 -1
- package/storage_config.pb.ts +164 -0
package/common.pb.ts
CHANGED
package/mysql.pb.ts
CHANGED
|
@@ -139,6 +139,7 @@ export type UpdateMysqlBackupConfigReq = {
|
|
|
139
139
|
backupHistoryLimit?: number
|
|
140
140
|
backupBucketSubPath?: string
|
|
141
141
|
isOpenAutoBackup?: boolean
|
|
142
|
+
storageConfigName?: string
|
|
142
143
|
}
|
|
143
144
|
|
|
144
145
|
export type UpdateMysqlBackupConfigResp = {
|
|
@@ -365,6 +366,7 @@ export type CreateMysqlReq = {
|
|
|
365
366
|
isOpenAutoBackup?: boolean
|
|
366
367
|
initSourceMysqlClusterName?: string
|
|
367
368
|
initSourceBackupName?: string
|
|
369
|
+
storageConfigName?: string
|
|
368
370
|
}
|
|
369
371
|
|
|
370
372
|
export type UpdateMysqlConfReq = {
|
|
@@ -397,12 +399,17 @@ export type GetMysqlParamRespSelectDataIntValue = {
|
|
|
397
399
|
value?: number
|
|
398
400
|
}
|
|
399
401
|
|
|
402
|
+
export type GetMysqlParamRespSelectDataStorageClassValue = {
|
|
403
|
+
name?: string
|
|
404
|
+
allowVolumeExpansion?: boolean
|
|
405
|
+
}
|
|
406
|
+
|
|
400
407
|
|
|
401
408
|
type BaseGetMysqlParamRespSelectData = {
|
|
402
409
|
}
|
|
403
410
|
|
|
404
411
|
export type GetMysqlParamRespSelectData = BaseGetMysqlParamRespSelectData
|
|
405
|
-
& OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; rValue: GetMysqlParamRespSelectDataResourceValue; iValue: GetMysqlParamRespSelectDataIntValue }>
|
|
412
|
+
& OneOf<{ sValue: GetMysqlParamRespSelectDataStringValue; rValue: GetMysqlParamRespSelectDataResourceValue; iValue: GetMysqlParamRespSelectDataIntValue; scValue: GetMysqlParamRespSelectDataStorageClassValue }>
|
|
406
413
|
|
|
407
414
|
export type GetMysqlParamRespSelect = {
|
|
408
415
|
selectType?: GetMysqlParamRespSelectSelectType
|
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 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
|
+
}
|
|
28
|
+
|
|
29
|
+
export enum GetStorageConfigListReqSortDir {
|
|
30
|
+
ASC = "ASC",
|
|
31
|
+
DESC = "DESC",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type GetStorageConfigParamReq = {
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type GetStorageConfigParamRespSelectDataStringValue = {
|
|
38
|
+
value?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type GetStorageConfigParamRespSelectDataIntValue = {
|
|
42
|
+
value?: number
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
type BaseGetStorageConfigParamRespSelectData = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type GetStorageConfigParamRespSelectData = BaseGetStorageConfigParamRespSelectData
|
|
50
|
+
& OneOf<{ sValue: GetStorageConfigParamRespSelectDataStringValue; iValue: GetStorageConfigParamRespSelectDataIntValue }>
|
|
51
|
+
|
|
52
|
+
export type GetStorageConfigParamRespSelect = {
|
|
53
|
+
selectType?: GetStorageConfigParamRespSelectSelectType
|
|
54
|
+
data?: GetStorageConfigParamRespSelectData[]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type GetStorageConfigParamResp = {
|
|
58
|
+
storageType?: GetStorageConfigParamRespSelect
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type CreateStorageConfigReq = {
|
|
62
|
+
workspaceId?: number
|
|
63
|
+
cluster?: string
|
|
64
|
+
namespace?: string
|
|
65
|
+
name?: string
|
|
66
|
+
storageType?: string
|
|
67
|
+
endpoint?: string
|
|
68
|
+
minioCluster?: string
|
|
69
|
+
minioNamespace?: string
|
|
70
|
+
minioName?: string
|
|
71
|
+
accessKey?: string
|
|
72
|
+
secretKey?: string
|
|
73
|
+
description?: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type CreateStorageConfigResp = {
|
|
77
|
+
message?: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type GetStorageConfigConsumersReq = {
|
|
81
|
+
workspaceId?: number
|
|
82
|
+
name?: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type GetStorageConfigConsumersRespConsumer = {
|
|
86
|
+
type?: GetStorageConfigConsumersRespStorageConfigConsumerType
|
|
87
|
+
cluster?: string
|
|
88
|
+
namespace?: string
|
|
89
|
+
name?: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type GetStorageConfigConsumersResp = {
|
|
93
|
+
consumers?: GetStorageConfigConsumersRespConsumer[]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type DeleteStorageConfigReq = {
|
|
97
|
+
workspaceId?: number
|
|
98
|
+
name?: string
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type DeleteStorageConfigResp = {
|
|
102
|
+
message?: string
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type UpdateStorageConfigResp = {
|
|
106
|
+
message?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type StorageConfigItemStorageConfigStatus = {
|
|
110
|
+
lastUpdateTimestamp?: string
|
|
111
|
+
createTimestamp?: string
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type StorageConfigItem = {
|
|
115
|
+
spec?: CreateStorageConfigReq
|
|
116
|
+
status?: StorageConfigItemStorageConfigStatus
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type GetStorageConfigReq = {
|
|
120
|
+
workspaceId?: number
|
|
121
|
+
name?: string
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type GetStorageConfigResp = {
|
|
125
|
+
item?: StorageConfigItem
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type GetStorageConfigListReq = {
|
|
129
|
+
page?: number
|
|
130
|
+
pageSize?: number
|
|
131
|
+
sortDir?: GetStorageConfigListReqSortDir
|
|
132
|
+
sortBy?: string
|
|
133
|
+
searchKey?: string
|
|
134
|
+
workspaceId?: number
|
|
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", body: JSON.stringify(req)})
|
|
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", body: JSON.stringify(req)})
|
|
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
|
+
}
|