@daocloud-proto/mcamel-redis 0.4.0-12 → 0.4.0-121

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.
@@ -0,0 +1,78 @@
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 GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
8
+ import * as CommonCommon from "./common.pb"
9
+ import * as fm from "./fetch.pb"
10
+
11
+ export enum CreateCloudShellRequestType {
12
+ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
13
+ bash = "bash",
14
+ exec = "exec",
15
+ logs = "logs",
16
+ upload = "upload",
17
+ download = "download",
18
+ }
19
+
20
+ export type ObjectMeta = {
21
+ name?: string
22
+ namespace?: string
23
+ uid?: string
24
+ resourceVersion?: string
25
+ creationTimestamp?: string
26
+ deletionTimestamp?: string
27
+ labels?: {[key: string]: string}
28
+ annotations?: {[key: string]: string}
29
+ ownerReferences?: CommonCommon.OwnerReference[]
30
+ cluster?: string
31
+ workspaceAlias?: string
32
+ }
33
+
34
+ export type CloudShell = {
35
+ metadata?: ObjectMeta
36
+ spec?: CloudShellSpec
37
+ status?: CloudShellStatus
38
+ }
39
+
40
+ export type CloudShellSpec = {
41
+ configMapName?: string
42
+ once?: boolean
43
+ commandAction?: string
44
+ ttl?: number
45
+ cleanup?: boolean
46
+ }
47
+
48
+ export type CloudShellStatus = {
49
+ phase?: string
50
+ accessUrl?: string
51
+ }
52
+
53
+ export type CreateCloudShellRequest = {
54
+ type?: CreateCloudShellRequestType
55
+ cluster?: string
56
+ namespace?: string
57
+ podName?: string
58
+ filePath?: string
59
+ container?: string
60
+ logCount?: number
61
+ data?: CloudShell
62
+ }
63
+
64
+ export type GetorDeleteCloudShellRequest = {
65
+ name?: string
66
+ }
67
+
68
+ export class CloudShellService {
69
+ static CreateCloudShell(req: CreateCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
70
+ return fm.fetchReq<CreateCloudShellRequest, CloudShell>(`/apis/mcamel.io/redis/v1alpha1/cloudshells`, {...initReq, method: "POST", body: JSON.stringify(req)})
71
+ }
72
+ static GetCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<CloudShell> {
73
+ return fm.fetchReq<GetorDeleteCloudShellRequest, CloudShell>(`/apis/mcamel.io/redis/v1alpha1/cloudshells/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
74
+ }
75
+ static DeleteCloudShell(req: GetorDeleteCloudShellRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
76
+ return fm.fetchReq<GetorDeleteCloudShellRequest, GoogleProtobufEmpty.Empty>(`/apis/mcamel.io/redis/v1alpha1/cloudshells/${req["name"]}`, {...initReq, method: "DELETE"})
77
+ }
78
+ }
package/cluster.pb.ts CHANGED
@@ -56,6 +56,24 @@ export type EventSource = {
56
56
  host?: string
57
57
  }
58
58
 
59
+ export type GetMetallbIPAddressPoolsListReq = {
60
+ cluster?: string
61
+ }
62
+
63
+ export type GetMetallbIPAddressPoolsListRespItem = {
64
+ name?: string
65
+ addresses?: string[]
66
+ autoAssign?: boolean
67
+ avoidBuggyIPs?: boolean
68
+ }
69
+
70
+ export type GetMetallbIPAddressPoolsListResp = {
71
+ items?: GetMetallbIPAddressPoolsListRespItem[]
72
+ isSupportLb?: boolean
73
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy[]
74
+ lbTyp?: CommonCommon.LBTyp[]
75
+ }
76
+
59
77
  export type GetEventListReq = {
60
78
  cluster?: string
61
79
  namespace?: string
@@ -152,4 +170,7 @@ export class Cluster {
152
170
  static GetEventList(req: GetEventListReq, initReq?: fm.InitReq): Promise<GetEventListResp> {
153
171
  return fm.fetchReq<GetEventListReq, GetEventListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/${req["namespace"]}/events?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
154
172
  }
173
+ static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
174
+ return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/redis/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
175
+ }
155
176
  }
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",
@@ -130,9 +146,20 @@ export type PodCommon = {
130
146
  memoryUsage?: number
131
147
  memoryLimit?: number
132
148
  conditions?: PodCommonCondition[]
149
+ containersName?: string[]
150
+ ownerReference?: OwnerReference[]
151
+ initContainersName?: string[]
152
+ }
153
+
154
+ export type OwnerReference = {
155
+ uid?: string
156
+ controller?: boolean
157
+ name?: string
158
+ kind?: string
133
159
  }
134
160
 
135
161
  export type CommonItemStatus = {
136
162
  serviceAddresses?: string[]
137
163
  webManagerAddress?: string
164
+ webLogAddress?: string
138
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-redis",
3
- "version":"0.4.0-12",
3
+ "version":"0.4.0-121",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/redis.pb.ts CHANGED
@@ -36,6 +36,11 @@ export enum RedisPodType {
36
36
  FollowerRedis = "FollowerRedis",
37
37
  }
38
38
 
39
+ export enum CreateRedisBackupReqProvider {
40
+ Minio = "Minio",
41
+ Other = "Other",
42
+ }
43
+
39
44
  export enum GetRedisListReqSortDir {
40
45
  ASC = "ASC",
41
46
  DESC = "DESC",
@@ -46,10 +51,9 @@ export enum GetRedisConfReqSortDir {
46
51
  DESC = "DESC",
47
52
  }
48
53
 
49
- export enum CreateRedisReqServiceType {
50
- ClusterIP = "ClusterIP",
51
- NodePort = "NodePort",
52
- LoadBalancer = "LoadBalancer",
54
+ export enum CreateRedisReqRestoreProvider {
55
+ Minio = "Minio",
56
+ Other = "Other",
53
57
  }
54
58
 
55
59
  export enum GetRedisParamRespSelectSelectType {
@@ -76,6 +80,22 @@ export enum GetRedisConfRespItemsParamType {
76
80
  conf = "conf",
77
81
  }
78
82
 
83
+ export type CreateRedisBackupReq = {
84
+ cluster?: string
85
+ namespace?: string
86
+ name?: string
87
+ instanceType?: InstanceType
88
+ accessKeyId?: string
89
+ accessKeySecret?: string
90
+ endpoint?: string
91
+ provider?: CreateRedisBackupReqProvider
92
+ storePath?: string
93
+ }
94
+
95
+ export type CreateRedisBackupResp = {
96
+ message?: string
97
+ }
98
+
79
99
  export type GetRedisUsersReq = {
80
100
  cluster?: string
81
101
  namespace?: string
@@ -126,6 +146,15 @@ export type CreateRedisReqPorts = {
126
146
  nodePort?: number
127
147
  }
128
148
 
149
+ export type CreateRedisReqRestore = {
150
+ enable?: boolean
151
+ accessKeyId?: string
152
+ accessKeySecret?: string
153
+ endpoint?: string
154
+ provider?: CreateRedisReqRestoreProvider
155
+ storePath?: string
156
+ }
157
+
129
158
  export type CreateRedisReq = {
130
159
  cluster?: string
131
160
  namespace?: string
@@ -136,7 +165,7 @@ export type CreateRedisReq = {
136
165
  storageCapacity?: string
137
166
  instanceType?: InstanceType
138
167
  authPass?: string
139
- serviceType?: CreateRedisReqServiceType
168
+ serviceType?: CommonCommon.ServiceType
140
169
  serviceAnnotations?: {[key: string]: string}
141
170
  ports?: CreateRedisReqPorts[]
142
171
  cpuRequest?: string
@@ -147,6 +176,11 @@ export type CreateRedisReq = {
147
176
  version?: string
148
177
  followerReplicas?: number
149
178
  affinity?: CommonCommon.Affinity
179
+ externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
180
+ lbTyp?: CommonCommon.LBTyp
181
+ lbPoolName?: string
182
+ lbAddress?: string
183
+ restore?: CreateRedisReqRestore
150
184
  }
151
185
 
152
186
  export type UpdateRedisConfReq = {
@@ -324,6 +358,7 @@ export type RedisItemStatus = {
324
358
  clusterIPs?: string[]
325
359
  serviceAddr?: string
326
360
  common?: CommonCommon.CommonItemStatus
361
+ isControl?: boolean
327
362
  }
328
363
 
329
364
  export type RedisItemMetadata = {
@@ -381,4 +416,7 @@ export class Redis {
381
416
  static GetRedisUsers(req: GetRedisUsersReq, initReq?: fm.InitReq): Promise<GetRedisUsersResp> {
382
417
  return fm.fetchReq<GetRedisUsersReq, GetRedisUsersResp>(`/apis/mcamel.io/redis/v1alpha1/redis/${req["instanceType"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["instanceType", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
383
418
  }
419
+ static CreateRedisBackup(req: CreateRedisBackupReq, initReq?: fm.InitReq): Promise<CreateRedisBackupResp> {
420
+ return fm.fetchReq<CreateRedisBackupReq, CreateRedisBackupResp>(`/apis/mcamel.io/redis/v1alpha1/redis/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
421
+ }
384
422
  }