@daocloud-proto/mcamel-minio 0.2.0-39 → 0.2.0-391

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/cloudshell.pb.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
8
+ import * as CommonCommon from "./common.pb"
8
9
  import * as fm from "./fetch.pb"
9
10
 
10
11
  export enum CreateCloudShellRequestType {
@@ -12,13 +13,8 @@ export enum CreateCloudShellRequestType {
12
13
  bash = "bash",
13
14
  exec = "exec",
14
15
  logs = "logs",
15
- }
16
-
17
- export type OwnerReference = {
18
- uid?: string
19
- controller?: boolean
20
- name?: string
21
- kind?: string
16
+ upload = "upload",
17
+ download = "download",
22
18
  }
23
19
 
24
20
  export type ObjectMeta = {
@@ -30,7 +26,7 @@ export type ObjectMeta = {
30
26
  deletionTimestamp?: string
31
27
  labels?: {[key: string]: string}
32
28
  annotations?: {[key: string]: string}
33
- ownerReferences?: OwnerReference[]
29
+ ownerReferences?: CommonCommon.OwnerReference[]
34
30
  cluster?: string
35
31
  workspaceAlias?: string
36
32
  }
@@ -59,6 +55,9 @@ export type CreateCloudShellRequest = {
59
55
  cluster?: string
60
56
  namespace?: string
61
57
  podName?: string
58
+ filePath?: string
59
+ container?: string
60
+ logCount?: number
62
61
  data?: CloudShell
63
62
  }
64
63
 
package/cluster.pb.ts CHANGED
@@ -7,12 +7,41 @@
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",
13
37
  Warning = "Warning",
14
38
  }
15
39
 
40
+ export enum GetAllEventListReqSortDir {
41
+ ASC = "ASC",
42
+ DESC = "DESC",
43
+ }
44
+
16
45
  export enum GetEventListReqKind {
17
46
  KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
18
47
  Pod = "Pod",
@@ -23,11 +52,144 @@ export enum GetWorkspaceListReqSortDir {
23
52
  DESC = "DESC",
24
53
  }
25
54
 
55
+ export enum ClusterItemNetworkMode {
56
+ Unknown = "Unknown",
57
+ Flannel = "Flannel",
58
+ Calico = "Calico",
59
+ }
60
+
26
61
  export enum GetInsightAgentStatusRespInsightAgentStatus {
27
62
  NotInstall = "NotInstall",
28
63
  Install = "Install",
29
64
  }
30
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
+ }
92
+
93
+ export type RestartInstanceResp = {
94
+ message?: string
95
+ }
96
+
97
+ export type GetPermissionsListReq = {
98
+ workspaceId?: number
99
+ }
100
+
101
+ export type GetPermissionsListRespPermissions = {
102
+ getInstance?: boolean
103
+ createInstance?: boolean
104
+ updateInstance?: boolean
105
+ deleteInstance?: boolean
106
+ getMetric?: boolean
107
+ getInstanceLog?: boolean
108
+ getConfig?: boolean
109
+ updateConfig?: boolean
110
+ getBackup?: boolean
111
+ createBackup?: boolean
112
+ updateBackup?: boolean
113
+ deleteBackup?: boolean
114
+ getBackupConf?: boolean
115
+ createBackupConf?: boolean
116
+ updateBackupConf?: boolean
117
+ deleteBackupConf?: boolean
118
+ getTemplate?: boolean
119
+ createTemplate?: boolean
120
+ updateTemplate?: boolean
121
+ deleteTemplate?: boolean
122
+ }
123
+
124
+ export type GetPermissionsListResp = {
125
+ permissionsBool?: GetPermissionsListRespPermissions
126
+ permissions?: PermissionsType[]
127
+ }
128
+
129
+ export type GetAllEventKindsListResp = {
130
+ data?: string[]
131
+ }
132
+
133
+ export type GetAllEventKindsListReq = {
134
+ cluster?: string
135
+ }
136
+
137
+ export type GetAllEventListReq = {
138
+ page?: number
139
+ pageSize?: number
140
+ sortDir?: GetAllEventListReqSortDir
141
+ sortBy?: string
142
+ searchKey?: string
143
+ cluster?: string
144
+ namespace?: string
145
+ name?: string
146
+ eventType?: EventType
147
+ kindName?: string
148
+ }
149
+
150
+ export type GetAllEventListRespItemsSource = {
151
+ component?: string
152
+ }
153
+
154
+ export type GetAllEventListRespItemsMetadata = {
155
+ uid?: string
156
+ name?: string
157
+ namespace?: string
158
+ annotations?: {[key: string]: string}
159
+ resourceVersion?: string
160
+ creationTimestamp?: string
161
+ }
162
+
163
+ export type GetAllEventListRespItemsInvolvedObject = {
164
+ uid?: string
165
+ kind?: string
166
+ name?: string
167
+ namespace?: string
168
+ apiVersion?: string
169
+ resourceVersion?: string
170
+ }
171
+
172
+ export type GetAllEventListRespItems = {
173
+ kind?: string
174
+ type?: string
175
+ count?: number
176
+ reason?: string
177
+ source?: GetAllEventListRespItemsSource
178
+ message?: string
179
+ metadata?: GetAllEventListRespItemsMetadata
180
+ apiVersion?: string
181
+ lastTimestamp?: string
182
+ firstTimestamp?: string
183
+ involvedObject?: GetAllEventListRespItemsInvolvedObject
184
+ reportingInstance?: string
185
+ reportingComponent?: string
186
+ }
187
+
188
+ export type GetAllEventListResp = {
189
+ items?: GetAllEventListRespItems[]
190
+ pagination?: CommonCommon.Pagination
191
+ }
192
+
31
193
  export type GetClusterNodeLabelListReq = {
32
194
  cluster?: string
33
195
  }
@@ -42,6 +204,24 @@ export type GetClusterNodeLabelListResp = {
42
204
  pagination?: CommonCommon.Pagination
43
205
  }
44
206
 
207
+ export type GetClusterPodLabelListReq = {
208
+ page?: number
209
+ pageSize?: number
210
+ searchKey?: string
211
+ filterNamespace?: string
212
+ cluster?: string
213
+ }
214
+
215
+ export type GetClusterPodLabelListRespLabel = {
216
+ key?: string
217
+ value?: string[]
218
+ }
219
+
220
+ export type GetClusterPodLabelListResp = {
221
+ items?: GetClusterPodLabelListRespLabel[]
222
+ pagination?: CommonCommon.Pagination
223
+ }
224
+
45
225
  export type GetClusterNodePortListReq = {
46
226
  cluster?: string
47
227
  }
@@ -56,6 +236,24 @@ export type EventSource = {
56
236
  host?: string
57
237
  }
58
238
 
239
+ export type GetMetallbIPAddressPoolsListReq = {
240
+ cluster?: string
241
+ }
242
+
243
+ export type GetMetallbIPAddressPoolsListRespItem = {
244
+ name?: string
245
+ addresses?: string[]
246
+ autoAssign?: boolean
247
+ avoidBuggyIPs?: boolean
248
+ }
249
+
250
+ export type GetMetallbIPAddressPoolsListResp = {
251
+ items?: GetMetallbIPAddressPoolsListRespItem[]
252
+ isSupportLb?: boolean
253
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy[]
254
+ lbTyp?: CommonCommon.LBTyp[]
255
+ }
256
+
59
257
  export type GetEventListReq = {
60
258
  cluster?: string
61
259
  namespace?: string
@@ -96,6 +294,7 @@ export type GetWorkspaceListReq = {
96
294
  export type GetWorkspaceListRespItem = {
97
295
  workspaceId?: number
98
296
  alias?: string
297
+ visible?: boolean
99
298
  }
100
299
 
101
300
  export type GetWorkspaceListResp = {
@@ -105,13 +304,28 @@ export type GetWorkspaceListResp = {
105
304
 
106
305
  export type GetClusterListReq = {
107
306
  workspaceId?: number
307
+ searchKey?: string
108
308
  }
109
309
 
110
310
  export type GetClusterListResp = {
111
311
  items?: string[]
312
+ clusters?: ClusterItem[]
112
313
  pagination?: CommonCommon.Pagination
113
314
  }
114
315
 
316
+ export type ClusterItemMetadata = {
317
+ name?: string
318
+ }
319
+
320
+ export type ClusterItemStatus = {
321
+ networkMode?: ClusterItemNetworkMode[]
322
+ }
323
+
324
+ export type ClusterItem = {
325
+ metadata?: ClusterItemMetadata
326
+ status?: ClusterItemStatus
327
+ }
328
+
115
329
  export type GetClusterNamespaceListReq = {
116
330
  workspaceId?: number
117
331
  cluster?: string
@@ -143,6 +357,9 @@ export class Cluster {
143
357
  static GetClusterNodeLabelList(req: GetClusterNodeLabelListReq, initReq?: fm.InitReq): Promise<GetClusterNodeLabelListResp> {
144
358
  return fm.fetchReq<GetClusterNodeLabelListReq, GetClusterNodeLabelListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["cluster"]}/nodelabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
145
359
  }
360
+ static GetClusterPodLabelList(req: GetClusterPodLabelListReq, initReq?: fm.InitReq): Promise<GetClusterPodLabelListResp> {
361
+ return fm.fetchReq<GetClusterPodLabelListReq, GetClusterPodLabelListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["cluster"]}/podlabels?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
362
+ }
146
363
  static GetWorkspaceList(req: GetWorkspaceListReq, initReq?: fm.InitReq): Promise<GetWorkspaceListResp> {
147
364
  return fm.fetchReq<GetWorkspaceListReq, GetWorkspaceListResp>(`/apis/mcamel.io/minio/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
148
365
  }
@@ -152,4 +369,22 @@ export class Cluster {
152
369
  static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
153
370
  return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
154
371
  }
372
+ static GetAllEventList(req: GetAllEventListReq, initReq?: fm.InitReq): Promise<GetAllEventListResp> {
373
+ return fm.fetchReq<GetAllEventListReq, GetAllEventListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["cluster"]}/${req["namespace"]}/${req["name"]}/all-events?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
374
+ }
375
+ static GetAllEventKindsList(req: GetAllEventKindsListReq, initReq?: fm.InitReq): Promise<GetAllEventKindsListResp> {
376
+ return fm.fetchReq<GetAllEventKindsListReq, GetAllEventKindsListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["cluster"]}/all-events-kinds?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
377
+ }
378
+ static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
379
+ return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
380
+ }
381
+ static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
382
+ return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
383
+ }
384
+ static RestartInstance(req: RestartInstanceReq, initReq?: fm.InitReq): Promise<RestartInstanceResp> {
385
+ return fm.fetchReq<RestartInstanceReq, RestartInstanceResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/restart`, {...initReq, method: "POST", body: JSON.stringify(req)})
386
+ }
387
+ static GetInstallVersion(req: GetInstallVersionReq, initReq?: fm.InitReq): Promise<GetInstallVersionResp> {
388
+ return fm.fetchReq<GetInstallVersionReq, GetInstallVersionResp>(`/apis/mcamel.io/minio/v1alpha1/${req["cluster"]}/install-version?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
389
+ }
155
390
  }
package/common.pb.ts CHANGED
@@ -4,6 +4,22 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ export enum ExternalTrafficPolicy {
8
+ Cluster = "Cluster",
9
+ Local = "Local",
10
+ }
11
+
12
+ export enum LBTyp {
13
+ MetalLB = "MetalLB",
14
+ Others = "Others",
15
+ }
16
+
17
+ export enum ServiceType {
18
+ ClusterIP = "ClusterIP",
19
+ NodePort = "NodePort",
20
+ LoadBalancer = "LoadBalancer",
21
+ }
22
+
7
23
  export enum PageInfoReqSortDir {
8
24
  ASC = "ASC",
9
25
  DESC = "DESC",
@@ -129,10 +145,73 @@ export type PodCommon = {
129
145
  cpuLimit?: number
130
146
  memoryUsage?: number
131
147
  memoryLimit?: number
148
+ pvUsedInGb?: number
149
+ pvAllocatedInGb?: number
132
150
  conditions?: PodCommonCondition[]
151
+ containersName?: string[]
152
+ ownerReference?: OwnerReference[]
153
+ initContainersName?: string[]
154
+ initContainersStatuses?: ContainerStatus[]
155
+ containersStatuses?: ContainerStatus[]
156
+ }
157
+
158
+ export type OwnerReference = {
159
+ uid?: string
160
+ controller?: boolean
161
+ name?: string
162
+ kind?: string
133
163
  }
134
164
 
135
165
  export type CommonItemStatus = {
136
166
  serviceAddresses?: string[]
137
167
  webManagerAddress?: string
168
+ webLogAddress?: string
169
+ avgPvAllocatedInGb?: number
170
+ avgPvUsedInGb?: number
171
+ cpuUtilization?: number
172
+ memoryUtilization?: number
173
+ }
174
+
175
+ export type AccessWhitelistInternal = {
176
+ namespace?: string
177
+ podSelector?: {[key: string]: string}
178
+ }
179
+
180
+ export type AccessWhitelistExternal = {
181
+ cidr?: string
182
+ ip?: string
183
+ }
184
+
185
+ export type AccessWhitelist = {
186
+ internals?: AccessWhitelistInternal[]
187
+ externals?: AccessWhitelistExternal[]
188
+ }
189
+
190
+ export type ContainerStatus = {
191
+ name?: string
192
+ state?: ContainerState
193
+ }
194
+
195
+ export type ContainerState = {
196
+ waiting?: ContainerStateWaiting
197
+ running?: ContainerStateRunning
198
+ terminated?: ContainerStateTerminated
199
+ }
200
+
201
+ export type ContainerStateWaiting = {
202
+ reason?: string
203
+ message?: string
204
+ }
205
+
206
+ export type ContainerStateRunning = {
207
+ startedAt?: string
208
+ }
209
+
210
+ export type ContainerStateTerminated = {
211
+ exitCode?: number
212
+ signal?: number
213
+ reason?: string
214
+ message?: string
215
+ startedAt?: string
216
+ finishedAt?: string
138
217
  }
package/insight.pb.ts CHANGED
@@ -20,27 +20,23 @@ export enum TargetType {
20
20
  DEPLOYMENT = "DEPLOYMENT",
21
21
  STATEFULSET = "STATEFULSET",
22
22
  DAEMONSET = "DAEMONSET",
23
- CRONJOB = "CRONJOB",
24
23
  POD = "POD",
25
24
  }
26
25
 
27
- export enum AlertStatus {
28
- ALERT_STATUS_UNSPECIFIED = "ALERT_STATUS_UNSPECIFIED",
29
- ALERT_STATUS_FIRING = "ALERT_STATUS_FIRING",
30
- ALERT_STATUS_RESOLVED = "ALERT_STATUS_RESOLVED",
31
- }
32
-
33
26
  export type AlertSummary = {
34
- alertId?: string
27
+ id?: string
28
+ groupName?: string
29
+ groupId?: string
35
30
  ruleName?: string
36
- severity?: Severity
31
+ ruleId?: string
37
32
  clusterName?: string
38
33
  namespace?: string
39
34
  targetType?: TargetType
40
- targetName?: string
41
- status?: AlertStatus
35
+ target?: string
36
+ severity?: Severity
37
+ value?: string
38
+ notifyResponse?: string
42
39
  description?: string
43
40
  startAt?: string
44
41
  updateAt?: string
45
- notifyResponse?: string
46
42
  }
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/minio.pb.ts CHANGED
@@ -32,12 +32,6 @@ export enum GetMinioConfReqSortDir {
32
32
  DESC = "DESC",
33
33
  }
34
34
 
35
- export enum CreateMinioReqServiceType {
36
- ClusterIP = "ClusterIP",
37
- NodePort = "NodePort",
38
- LoadBalancer = "LoadBalancer",
39
- }
40
-
41
35
  export enum CreateMinioReqInstanceType {
42
36
  HighAvailable = "HighAvailable",
43
37
  Single = "Single",
@@ -128,7 +122,7 @@ export type CreateMinioReq = {
128
122
  volumesPerServer?: number
129
123
  storageClassName?: string
130
124
  storageCapacity?: string
131
- serviceType?: CreateMinioReqServiceType
125
+ serviceType?: CommonCommon.ServiceType
132
126
  serviceAnnotations?: {[key: string]: string}
133
127
  ports?: CreateMinioReqPorts[]
134
128
  cpuRequest?: string
@@ -138,13 +132,17 @@ export type CreateMinioReq = {
138
132
  instanceType?: CreateMinioReqInstanceType
139
133
  consoleAccessKey?: string
140
134
  consoleSecretKey?: string
141
- consoleServiceType?: CreateMinioReqServiceType
135
+ consoleServiceType?: CommonCommon.ServiceType
142
136
  consoleNodePort?: number
143
137
  consoleServiceAnnotations?: {[key: string]: string}
144
138
  minioRootUser?: string
145
139
  minioRootPassword?: string
146
140
  buckets?: CreateMinioReqBucket[]
147
141
  affinity?: CommonCommon.Affinity
142
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
143
+ lbTyp?: CommonCommon.LBTyp
144
+ lbPoolName?: string
145
+ lbAddress?: string
148
146
  }
149
147
 
150
148
  export type UpdateMinioConfReq = {
@@ -272,6 +270,8 @@ export type GetMinioGrafanaAddrReq = {
272
270
  cluster?: string
273
271
  namespace?: string
274
272
  name?: string
273
+ from?: string
274
+ to?: string
275
275
  }
276
276
 
277
277
  export type GetMinioGrafanaAddrResp = {
@@ -311,6 +311,8 @@ export type TenantItemStatus = {
311
311
  webManagerAddr?: string
312
312
  clusterIPs?: string[]
313
313
  serviceAddr?: string
314
+ isControl?: boolean
315
+ consoleAccessToken?: string
314
316
  common?: CommonCommon.CommonItemStatus
315
317
  }
316
318
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-minio",
3
- "version":"0.2.0-39",
3
+ "version":"0.2.0-391",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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/minio/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/minio/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/minio/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/minio/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/minio/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/minio/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/minio/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/minio/v1alpha1/${req["workspaceId"]}/storage-configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
187
+ }
188
+ }
package/template.pb.ts ADDED
@@ -0,0 +1,169 @@
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
+ }
17
+
18
+ export enum GetTemplateConfigReqSortDir {
19
+ ASC = "ASC",
20
+ DESC = "DESC",
21
+ }
22
+
23
+ export enum GetTemplateConfigListReqSortDir {
24
+ ASC = "ASC",
25
+ DESC = "DESC",
26
+ }
27
+
28
+ export enum TemplateConfigItemValueType {
29
+ String = "String",
30
+ SingleSelection = "SingleSelection",
31
+ MultiString = "MultiString",
32
+ }
33
+
34
+ export type GetTemplateConfigVersionsReq = {
35
+ workspaceId?: number
36
+ }
37
+
38
+ export type GetTemplateConfigVersionsResp = {
39
+ versions?: string[]
40
+ }
41
+
42
+ export type GetTemplateConfigStringResp = {
43
+ conf?: string
44
+ }
45
+
46
+ export type DeleteTemplateReq = {
47
+ workspaceId?: number
48
+ name?: string
49
+ version?: string
50
+ }
51
+
52
+ export type DeleteTemplateConfigResp = {
53
+ message?: string
54
+ }
55
+
56
+ export type CreateOrUpdateTemplateConfigResp = {
57
+ message?: string
58
+ }
59
+
60
+ export type GetTemplateConfigReq = {
61
+ page?: number
62
+ pageSize?: number
63
+ sortDir?: GetTemplateConfigReqSortDir
64
+ sortBy?: string
65
+ searchKey?: string
66
+ workspaceId?: number
67
+ name?: string
68
+ version?: string
69
+ templateType?: string
70
+ type?: string
71
+ createTimestamp?: string
72
+ templateInstanceType?: TemplateInstanceType
73
+ }
74
+
75
+ export type CreateTemplateConfigResp = {
76
+ message?: string
77
+ }
78
+
79
+ export type UpdateTemplateConfigResp = {
80
+ message?: string
81
+ }
82
+
83
+ export type CreateTemplateConfigReq = {
84
+ workspaceId?: number
85
+ targetName?: string
86
+ targetVersion?: string
87
+ targetType?: string
88
+ targetTemplateType?: string
89
+ targetConf?: string
90
+ fromTemplateName?: string
91
+ }
92
+
93
+ export type UpdateTemplateConfigReq = {
94
+ workspaceId?: number
95
+ name?: string
96
+ version?: string
97
+ type?: string
98
+ templateType?: string
99
+ items?: TemplateConfigItem[]
100
+ conf?: string
101
+ }
102
+
103
+ export type GetTemplateConfigResp = {
104
+ data?: UpdateTemplateConfigReq
105
+ pagination?: CommonCommon.Pagination
106
+ }
107
+
108
+ export type GetTemplateConfigListReq = {
109
+ page?: number
110
+ pageSize?: number
111
+ sortDir?: GetTemplateConfigListReqSortDir
112
+ sortBy?: string
113
+ searchKey?: string
114
+ workspaceId?: number
115
+ version?: string
116
+ templateInstanceType?: TemplateInstanceType
117
+ }
118
+
119
+ export type TemplateConfigItem = {
120
+ name?: string
121
+ default?: string
122
+ current?: string
123
+ value?: string
124
+ isNeedRestart?: boolean
125
+ valueType?: TemplateConfigItemValueType
126
+ valueRemarksZh?: string
127
+ valueRemarksEn?: string
128
+ updateTimestamp?: string
129
+ }
130
+
131
+ export type GetTemplateConfigListResp = {
132
+ items?: GetTemplateConfigReq[]
133
+ pagination?: CommonCommon.Pagination
134
+ }
135
+
136
+ export type GetTemplateInstanceTypeListReq = {
137
+ workspaceId?: number
138
+ }
139
+
140
+ export type GetTemplateInstanceTypeListResp = {
141
+ type?: TemplateInstanceType[]
142
+ }
143
+
144
+ export class Template {
145
+ static GetTemplateConfigList(req: GetTemplateConfigListReq, initReq?: fm.InitReq): Promise<GetTemplateConfigListResp> {
146
+ return fm.fetchReq<GetTemplateConfigListReq, GetTemplateConfigListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_config?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
147
+ }
148
+ static GetTemplateInstanceTypeList(req: GetTemplateInstanceTypeListReq, initReq?: fm.InitReq): Promise<GetTemplateInstanceTypeListResp> {
149
+ return fm.fetchReq<GetTemplateInstanceTypeListReq, GetTemplateInstanceTypeListResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_instance_type?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
150
+ }
151
+ static GetTemplateConfig(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigResp> {
152
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
153
+ }
154
+ static DeleteTemplateConfig(req: DeleteTemplateReq, initReq?: fm.InitReq): Promise<DeleteTemplateConfigResp> {
155
+ return fm.fetchReq<DeleteTemplateReq, DeleteTemplateConfigResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/${req["version"]}`, {...initReq, method: "DELETE"})
156
+ }
157
+ static CreateTemplateConfig(req: CreateTemplateConfigReq, initReq?: fm.InitReq): Promise<CreateTemplateConfigResp> {
158
+ return fm.fetchReq<CreateTemplateConfigReq, CreateTemplateConfigResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "POST", body: JSON.stringify(req)})
159
+ }
160
+ static UpdateTemplateConfig(req: UpdateTemplateConfigReq, initReq?: fm.InitReq): Promise<UpdateTemplateConfigResp> {
161
+ return fm.fetchReq<UpdateTemplateConfigReq, UpdateTemplateConfigResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
162
+ }
163
+ static GetTemplateConfigString(req: GetTemplateConfigReq, initReq?: fm.InitReq): Promise<GetTemplateConfigStringResp> {
164
+ return fm.fetchReq<GetTemplateConfigReq, GetTemplateConfigStringResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_config/${req["name"]}/to_string?${fm.renderURLSearchParams(req, ["workspaceId", "name"])}`, {...initReq, method: "GET"})
165
+ }
166
+ static GetTemplateConfigVersions(req: GetTemplateConfigVersionsReq, initReq?: fm.InitReq): Promise<GetTemplateConfigVersionsResp> {
167
+ return fm.fetchReq<GetTemplateConfigVersionsReq, GetTemplateConfigVersionsResp>(`/apis/mcamel.io/minio/v1alpha1/${req["workspaceId"]}/template_config/versions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
168
+ }
169
+ }