@daocloud-proto/mcamel-postgresql 0.3.0-rc2-2 → 0.4.0-rc2-2

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 CHANGED
@@ -7,6 +7,26 @@
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
+ }
29
+
10
30
  export enum EventType {
11
31
  EVENT_TYPE_UNSPECIFIED = "EVENT_TYPE_UNSPECIFIED",
12
32
  Normal = "Normal",
@@ -33,6 +53,34 @@ export enum GetInsightAgentStatusRespInsightAgentStatus {
33
53
  Install = "Install",
34
54
  }
35
55
 
56
+ export type GetPermissionsListReq = {
57
+ workspaceId?: number
58
+ }
59
+
60
+ export type GetPermissionsListRespPermissions = {
61
+ getInstance?: boolean
62
+ createInstance?: boolean
63
+ updateInstance?: boolean
64
+ deleteInstance?: boolean
65
+ getMetric?: boolean
66
+ getInstanceLog?: boolean
67
+ getConfig?: boolean
68
+ updateConfig?: boolean
69
+ getBackup?: boolean
70
+ createBackup?: boolean
71
+ updateBackup?: boolean
72
+ deleteBackup?: boolean
73
+ getBackupConf?: boolean
74
+ createBackupConf?: boolean
75
+ updateBackupConf?: boolean
76
+ deleteBackupConf?: boolean
77
+ }
78
+
79
+ export type GetPermissionsListResp = {
80
+ permissionsBool?: GetPermissionsListRespPermissions
81
+ permissions?: PermissionsType[]
82
+ }
83
+
36
84
  export type GetAllEventKindsListResp = {
37
85
  data?: string[]
38
86
  }
@@ -115,6 +163,7 @@ export type GetClusterPodLabelListReq = {
115
163
  page?: number
116
164
  pageSize?: number
117
165
  searchKey?: string
166
+ filterNamespace?: string
118
167
  cluster?: string
119
168
  }
120
169
 
@@ -268,4 +317,7 @@ export class Cluster {
268
317
  static GetMetallbIPAddressPoolsList(req: GetMetallbIPAddressPoolsListReq, initReq?: fm.InitReq): Promise<GetMetallbIPAddressPoolsListResp> {
269
318
  return fm.fetchReq<GetMetallbIPAddressPoolsListReq, GetMetallbIPAddressPoolsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["cluster"]}/lbaddress/pools?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
270
319
  }
320
+ static GetPermissionsList(req: GetPermissionsListReq, initReq?: fm.InitReq): Promise<GetPermissionsListResp> {
321
+ return fm.fetchReq<GetPermissionsListReq, GetPermissionsListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/permissions?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
322
+ }
271
323
  }
package/common.pb.ts CHANGED
@@ -151,6 +151,7 @@ export type PodCommon = {
151
151
  containersName?: string[]
152
152
  ownerReference?: OwnerReference[]
153
153
  initContainersName?: string[]
154
+ initContainersStatuses?: ContainerStatus[]
154
155
  }
155
156
 
156
157
  export type OwnerReference = {
@@ -164,7 +165,50 @@ export type CommonItemStatus = {
164
165
  serviceAddresses?: string[]
165
166
  webManagerAddress?: string
166
167
  webLogAddress?: string
167
- isHwameistorSc?: boolean
168
168
  avgPvAllocatedInGb?: number
169
169
  avgPvUsedInGb?: number
170
+ }
171
+
172
+ export type AccessWhitelistInternal = {
173
+ namespace?: string
174
+ podSelector?: {[key: string]: string}
175
+ }
176
+
177
+ export type AccessWhitelistExternal = {
178
+ cidr?: string
179
+ ip?: string
180
+ }
181
+
182
+ export type AccessWhitelist = {
183
+ internals?: AccessWhitelistInternal[]
184
+ externals?: AccessWhitelistExternal[]
185
+ }
186
+
187
+ export type ContainerStatus = {
188
+ name?: string
189
+ state?: ContainerState
190
+ }
191
+
192
+ export type ContainerState = {
193
+ waiting?: ContainerStateWaiting
194
+ running?: ContainerStateRunning
195
+ terminated?: ContainerStateTerminated
196
+ }
197
+
198
+ export type ContainerStateWaiting = {
199
+ reason?: string
200
+ message?: string
201
+ }
202
+
203
+ export type ContainerStateRunning = {
204
+ startedAt?: string
205
+ }
206
+
207
+ export type ContainerStateTerminated = {
208
+ exitCode?: number
209
+ signal?: number
210
+ reason?: string
211
+ message?: string
212
+ startedAt?: string
213
+ finishedAt?: string
170
214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-postgresql",
3
- "version":"0.3.0-rc2-2",
3
+ "version":"0.4.0-rc2-2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/postgresql.pb.ts CHANGED
@@ -22,6 +22,48 @@ export enum Status {
22
22
  Creating = "Creating",
23
23
  }
24
24
 
25
+ export enum GetPostgresqlS3ConfigListReqSortDir {
26
+ ASC = "ASC",
27
+ DESC = "DESC",
28
+ }
29
+
30
+ export enum GetPostgresqlBackupListReqSortDir {
31
+ ASC = "ASC",
32
+ DESC = "DESC",
33
+ }
34
+
35
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus {
36
+ Running = "Running",
37
+ Failed = "Failed",
38
+ Succeeded = "Succeeded",
39
+ }
40
+
41
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType {
42
+ Full = "Full",
43
+ Incremental = "Incremental",
44
+ }
45
+
46
+ export enum GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod {
47
+ Manual = "Manual",
48
+ Auto = "Auto",
49
+ }
50
+
51
+ export enum PostgresqlBackupItemStatusStatus {
52
+ Running = "Running",
53
+ Failed = "Failed",
54
+ Succeeded = "Succeeded",
55
+ }
56
+
57
+ export enum PostgresqlBackupItemStatusBackupType {
58
+ Full = "Full",
59
+ Incremental = "Incremental",
60
+ }
61
+
62
+ export enum PostgresqlBackupItemStatusBackupMethod {
63
+ Manual = "Manual",
64
+ Auto = "Auto",
65
+ }
66
+
25
67
  export enum GetPostgresqlListReqSortDir {
26
68
  ASC = "ASC",
27
69
  DESC = "DESC",
@@ -67,6 +109,150 @@ export enum GetPostgresqlConfRespItemsParamType {
67
109
  conf = "conf",
68
110
  }
69
111
 
112
+ export type DeletePostgresqlBackupReq = {
113
+ cluster?: string
114
+ namespace?: string
115
+ name?: string
116
+ backupName?: string
117
+ }
118
+
119
+ export type DeletePostgresqlBackupResp = {
120
+ message?: string
121
+ }
122
+
123
+ export type CreateBucketExistCheckingReq = {
124
+ endpoint?: string
125
+ accessKey?: string
126
+ secretKey?: string
127
+ bucket?: string
128
+ }
129
+
130
+ export type CreateBucketExistCheckingResp = {
131
+ message?: string
132
+ }
133
+
134
+ export type UpdatePostgresqlS3ConfigReq = {
135
+ cluster?: string
136
+ namespace?: string
137
+ name?: string
138
+ description?: string
139
+ endpoint?: string
140
+ accessKey?: string
141
+ secretKey?: string
142
+ bucket?: string
143
+ retentionTime?: string
144
+ provider?: string
145
+ }
146
+
147
+ export type UpdatePostgresqlS3ConfigResp = {
148
+ message?: string
149
+ }
150
+
151
+ export type GetPostgresqlS3ConfigListReq = {
152
+ page?: number
153
+ pageSize?: number
154
+ sortDir?: GetPostgresqlS3ConfigListReqSortDir
155
+ sortBy?: string
156
+ searchKey?: string
157
+ workspaceId?: number
158
+ }
159
+
160
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus = {
161
+ createTimestamp?: string
162
+ updateTimestamp?: string
163
+ backupPath?: string
164
+ }
165
+
166
+ export type GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems = {
167
+ spec?: UpdatePostgresqlS3ConfigReq
168
+ status?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItemsStatus
169
+ }
170
+
171
+ export type GetPostgresqlS3ConfigListResp = {
172
+ items?: GetPostgresqlS3ConfigListRespGetPostgresqlS3ConfigItems[]
173
+ pagination?: CommonCommon.Pagination
174
+ }
175
+
176
+ export type UpdatePostgresqlBackupConfigReq = {
177
+ cluster?: string
178
+ namespace?: string
179
+ name?: string
180
+ isOpenAutoBackup?: boolean
181
+ backupSchedule?: string
182
+ }
183
+
184
+ export type UpdatePostgresqlBackupConfigResp = {
185
+ message?: string
186
+ }
187
+
188
+ export type GetPostgresqlBackupListReq = {
189
+ page?: number
190
+ pageSize?: number
191
+ sortDir?: GetPostgresqlBackupListReqSortDir
192
+ sortBy?: string
193
+ searchKey?: string
194
+ cluster?: string
195
+ namespace?: string
196
+ name?: string
197
+ }
198
+
199
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemMetadata = {
200
+ creationTimestamp?: string
201
+ name?: string
202
+ namespace?: string
203
+ }
204
+
205
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition = {
206
+ type?: string
207
+ status?: string
208
+ reason?: string
209
+ message?: string
210
+ }
211
+
212
+ export type GetPostgresqlBackupListRespPostgresqlBackupItemStatus = {
213
+ completionTimestamp?: string
214
+ startTime?: string
215
+ active?: number
216
+ succeeded?: number
217
+ failed?: number
218
+ conditions?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusJobCondition[]
219
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusStatus
220
+ backupType?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupType
221
+ backupMethod?: GetPostgresqlBackupListRespPostgresqlBackupItemStatusBackupMethod
222
+ storePath?: string
223
+ }
224
+
225
+ export type GetPostgresqlBackupListRespPostgresqlBackupItem = {
226
+ metadata?: GetPostgresqlBackupListRespPostgresqlBackupItemMetadata
227
+ spec?: CreatePostgresqlBackupReq
228
+ status?: GetPostgresqlBackupListRespPostgresqlBackupItemStatus
229
+ }
230
+
231
+ export type GetPostgresqlBackupListResp = {
232
+ items?: GetPostgresqlBackupListRespPostgresqlBackupItem[]
233
+ pagination?: CommonCommon.Pagination
234
+ }
235
+
236
+ export type CreatePostgresqlBackupReq = {
237
+ cluster?: string
238
+ namespace?: string
239
+ name?: string
240
+ backupName?: string
241
+ }
242
+
243
+ export type CreatePostgresqlBackupResp = {
244
+ message?: string
245
+ }
246
+
247
+ export type PostgresqlBackupItemStatus = {
248
+ status?: PostgresqlBackupItemStatusStatus
249
+ message?: string
250
+ backupUrl?: string
251
+ backupType?: PostgresqlBackupItemStatusBackupType
252
+ backupMethod?: PostgresqlBackupItemStatusBackupMethod
253
+ completionTimestamp?: string
254
+ }
255
+
70
256
  export type GetPostgresqlUsersReq = {
71
257
  cluster?: string
72
258
  namespace?: string
@@ -149,6 +335,7 @@ export type CreatePostgresqlReq = {
149
335
  pgAdminDefaultEmail?: string
150
336
  pgAdminDefaultPassword?: string
151
337
  affinity?: CommonCommon.Affinity
338
+ backupConfig?: UpdatePostgresqlBackupConfigReq
152
339
  externalTrafficPolicy?: CommonCommon.ExternalTrafficPolicy
153
340
  lbTyp?: CommonCommon.LBTyp
154
341
  lbPoolName?: string
@@ -388,4 +575,25 @@ export class Postgresql {
388
575
  static GetPostgresqlUsers(req: GetPostgresqlUsersReq, initReq?: fm.InitReq): Promise<GetPostgresqlUsersResp> {
389
576
  return fm.fetchReq<GetPostgresqlUsersReq, GetPostgresqlUsersResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/users?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
390
577
  }
578
+ static GetPostgresqlBackupList(req: GetPostgresqlBackupListReq, initReq?: fm.InitReq): Promise<GetPostgresqlBackupListResp> {
579
+ return fm.fetchReq<GetPostgresqlBackupListReq, GetPostgresqlBackupListResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backups?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
580
+ }
581
+ static CreatePostgresqlBackup(req: CreatePostgresqlBackupReq, initReq?: fm.InitReq): Promise<CreatePostgresqlBackupResp> {
582
+ return fm.fetchReq<CreatePostgresqlBackupReq, CreatePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup`, {...initReq, method: "POST", body: JSON.stringify(req)})
583
+ }
584
+ static DeletePostgresqlBackup(req: DeletePostgresqlBackupReq, initReq?: fm.InitReq): Promise<DeletePostgresqlBackupResp> {
585
+ return fm.fetchReq<DeletePostgresqlBackupReq, DeletePostgresqlBackupResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/backups/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/${req["backupName"]}`, {...initReq, method: "DELETE"})
586
+ }
587
+ static UpdatePostgresqlBackupConfig(req: UpdatePostgresqlBackupConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlBackupConfigResp> {
588
+ return fm.fetchReq<UpdatePostgresqlBackupConfigReq, UpdatePostgresqlBackupConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/backup/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
589
+ }
590
+ static GetPostgresqlS3ConfigList(req: GetPostgresqlS3ConfigListReq, initReq?: fm.InitReq): Promise<GetPostgresqlS3ConfigListResp> {
591
+ return fm.fetchReq<GetPostgresqlS3ConfigListReq, GetPostgresqlS3ConfigListResp>(`/apis/mcamel.io/postgresql/v1alpha1/${req["workspaceId"]}/s3/configs?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
592
+ }
593
+ static UpdatePostgresqlS3Config(req: UpdatePostgresqlS3ConfigReq, initReq?: fm.InitReq): Promise<UpdatePostgresqlS3ConfigResp> {
594
+ return fm.fetchReq<UpdatePostgresqlS3ConfigReq, UpdatePostgresqlS3ConfigResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/s3/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
595
+ }
596
+ static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
597
+ return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
598
+ }
391
599
  }