@daocloud-proto/mcamel-redis 0.4.0-139 → 0.4.0-140
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/package.json +1 -1
- package/storage_config.pb.ts +187 -0
package/package.json
CHANGED
|
@@ -0,0 +1,187 @@
|
|
|
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 CreateStorageConfigBucketCheckJobReq = {
|
|
62
|
+
storageType?: string
|
|
63
|
+
endpoint?: string
|
|
64
|
+
accessKey?: string
|
|
65
|
+
secretKey?: string
|
|
66
|
+
bucket?: string
|
|
67
|
+
cluster?: string
|
|
68
|
+
namespace?: string
|
|
69
|
+
name?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type CreateStorageConfigBucketCheckJobResp = {
|
|
73
|
+
message?: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type CreateStorageConfigReq = {
|
|
77
|
+
workspaceId?: number
|
|
78
|
+
cluster?: string
|
|
79
|
+
namespace?: string
|
|
80
|
+
name?: string
|
|
81
|
+
storageType?: string
|
|
82
|
+
accessKey?: string
|
|
83
|
+
secretKey?: string
|
|
84
|
+
bucket?: string
|
|
85
|
+
endpoint?: string
|
|
86
|
+
minioCluster?: string
|
|
87
|
+
minioNamespace?: string
|
|
88
|
+
minioName?: string
|
|
89
|
+
description?: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type CreateStorageConfigResp = {
|
|
93
|
+
message?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type GetStorageConfigConsumersReq = {
|
|
97
|
+
workspaceId?: number
|
|
98
|
+
name?: string
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type GetStorageConfigConsumersRespConsumer = {
|
|
102
|
+
type?: GetStorageConfigConsumersRespStorageConfigConsumerType
|
|
103
|
+
cluster?: string
|
|
104
|
+
namespace?: string
|
|
105
|
+
name?: string
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type GetStorageConfigConsumersResp = {
|
|
109
|
+
consumers?: GetStorageConfigConsumersRespConsumer[]
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type DeleteStorageConfigReq = {
|
|
113
|
+
workspaceId?: number
|
|
114
|
+
name?: string
|
|
115
|
+
cluster?: string
|
|
116
|
+
namespace?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type DeleteStorageConfigResp = {
|
|
120
|
+
message?: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type UpdateStorageConfigResp = {
|
|
124
|
+
message?: string
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type StorageConfigItemStorageConfigStatus = {
|
|
128
|
+
lastUpdateTimestamp?: string
|
|
129
|
+
createTimestamp?: string
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type StorageConfigItem = {
|
|
133
|
+
spec?: CreateStorageConfigReq
|
|
134
|
+
status?: StorageConfigItemStorageConfigStatus
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type GetStorageConfigReq = {
|
|
138
|
+
workspaceId?: number
|
|
139
|
+
name?: string
|
|
140
|
+
namespace?: string
|
|
141
|
+
cluster?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type GetStorageConfigResp = {
|
|
145
|
+
item?: StorageConfigItem
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type GetStorageConfigListReq = {
|
|
149
|
+
page?: number
|
|
150
|
+
pageSize?: number
|
|
151
|
+
sortDir?: GetStorageConfigListReqSortDir
|
|
152
|
+
sortBy?: string
|
|
153
|
+
searchKey?: string
|
|
154
|
+
workspaceId?: number
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type GetStorageConfigListResp = {
|
|
158
|
+
items?: StorageConfigItem[]
|
|
159
|
+
pagination?: CommonCommon.Pagination
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export class StorageConfig {
|
|
163
|
+
static GetStorageConfigParam(req: GetStorageConfigParamReq, initReq?: fm.InitReq): Promise<GetStorageConfigParamResp> {
|
|
164
|
+
return fm.fetchReq<GetStorageConfigParamReq, GetStorageConfigParamResp>(`/apis/mcamel.io/redis/v1alpha1/storage-config/param?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
165
|
+
}
|
|
166
|
+
static CreateStorageConfigBucketCheckJob(req: CreateStorageConfigBucketCheckJobReq, initReq?: fm.InitReq): Promise<CreateStorageConfigBucketCheckJobResp> {
|
|
167
|
+
return fm.fetchReq<CreateStorageConfigBucketCheckJobReq, CreateStorageConfigBucketCheckJobResp>(`/apis/mcamel.io/redis/v1alpha1/storage-config/bucket/check-job`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
168
|
+
}
|
|
169
|
+
static CreateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<CreateStorageConfigResp> {
|
|
170
|
+
return fm.fetchReq<CreateStorageConfigReq, CreateStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
171
|
+
}
|
|
172
|
+
static GetStorageConfigConsumers(req: GetStorageConfigConsumersReq, initReq?: fm.InitReq): Promise<GetStorageConfigConsumersResp> {
|
|
173
|
+
return fm.fetchReq<GetStorageConfigConsumersReq, GetStorageConfigConsumersResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}/consumers?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
174
|
+
}
|
|
175
|
+
static DeleteStorageConfig(req: DeleteStorageConfigReq, initReq?: fm.InitReq): Promise<DeleteStorageConfigResp> {
|
|
176
|
+
return fm.fetchReq<DeleteStorageConfigReq, DeleteStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["cluster"]}/${req["namespace"]}/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
177
|
+
}
|
|
178
|
+
static UpdateStorageConfig(req: CreateStorageConfigReq, initReq?: fm.InitReq): Promise<UpdateStorageConfigResp> {
|
|
179
|
+
return fm.fetchReq<CreateStorageConfigReq, UpdateStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
180
|
+
}
|
|
181
|
+
static GetStorageConfig(req: GetStorageConfigReq, initReq?: fm.InitReq): Promise<GetStorageConfigResp> {
|
|
182
|
+
return fm.fetchReq<GetStorageConfigReq, GetStorageConfigResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
|
|
183
|
+
}
|
|
184
|
+
static GetStorageConfigList(req: GetStorageConfigListReq, initReq?: fm.InitReq): Promise<GetStorageConfigListResp> {
|
|
185
|
+
return fm.fetchReq<GetStorageConfigListReq, GetStorageConfigListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
186
|
+
}
|
|
187
|
+
}
|