@daocloud-proto/kangaroo 0.4.2 → 0.4.3-12

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.
@@ -6,6 +6,14 @@
6
6
 
7
7
  import * as KangarooIoApiTypesObjectmeta from "../../types/objectmeta.pb"
8
8
  import * as KangarooIoApiTypesPage from "../../types/page.pb"
9
+ import * as KangarooIoApiHarborV1alpha1Redis from "./redis.pb"
10
+
11
+ export enum VerifyHarborOperatorResponseHarborOperatorStatus {
12
+ STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
13
+ STATUS_HARBOR_OPERATOR_IS_NOT_INSTALLED = "STATUS_HARBOR_OPERATOR_IS_NOT_INSTALLED",
14
+ STATUS_CLUSTER_IS_NOT_EXIST = "STATUS_CLUSTER_IS_NOT_EXIST",
15
+ STATUS_READY = "STATUS_READY",
16
+ }
9
17
 
10
18
  export enum DatabaseSpecDatabaseType {
11
19
  DATABASE_UNSPECIFIED = "DATABASE_UNSPECIFIED",
@@ -58,12 +66,22 @@ export type ResourceNameList = {
58
66
 
59
67
  export type VerifyHarborOperatorRequest = {
60
68
  cluster?: string
61
- namespace?: string
62
69
  }
63
70
 
64
71
  export type VerifyHarborOperatorResponse = {
72
+ status?: VerifyHarborOperatorResponseHarborOperatorStatus
73
+ }
74
+
75
+ export type VerifyNamespaceQuotaRequest = {
76
+ cluster?: string
77
+ namespace?: string
78
+ requestCpu?: string
79
+ requestMemory?: string
80
+ replicas?: string
81
+ }
82
+
83
+ export type VerifyNamespaceQuotaResponse = {
65
84
  status?: boolean
66
- message?: string
67
85
  }
68
86
 
69
87
  export type HarborCluster = {
@@ -82,6 +100,7 @@ export type HarborClusterSpec = {
82
100
  expose?: ExposeSpec
83
101
  userSyncToHarbor?: boolean
84
102
  adminPassword?: string
103
+ enableTrivy?: boolean
85
104
  }
86
105
 
87
106
  export type Resources = {
@@ -119,6 +138,10 @@ export type CacheBuiltInModeSpec = {
119
138
  }
120
139
 
121
140
  export type CacheMcamelModeSpec = {
141
+ name?: string
142
+ namespace?: string
143
+ cluster?: string
144
+ type?: KangarooIoApiHarborV1alpha1Redis.RedisInstanceType
122
145
  }
123
146
 
124
147
  export type CacheExternalModeSpec = {
@@ -153,6 +176,8 @@ export type ExposeSpec = {
153
176
  ingressSpec?: ExposeIngressSpec
154
177
  loadBalanceSpec?: ExposeLoadBalanceSpec
155
178
  nodePortSpec?: ExposeNodePortSpec
179
+ externalUrl?: string
180
+ exposeHttps?: boolean
156
181
  }
157
182
 
158
183
  export type ExposeIngressSpec = {
@@ -0,0 +1,39 @@
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 KangarooIoApiTypesPage from "../../types/page.pb"
8
+
9
+ export enum RedisStatus {
10
+ RUNNING = "RUNNING",
11
+ CREATING = "CREATING",
12
+ FAILED = "FAILED",
13
+ }
14
+
15
+ export enum RedisInstanceType {
16
+ STANDALONE = "STANDALONE",
17
+ CLUSTER = "CLUSTER",
18
+ FAILOVER = "FAILOVER",
19
+ }
20
+
21
+ export type RedisSummary = {
22
+ name?: string
23
+ redisAddr?: string
24
+ cluster?: string
25
+ namespace?: string
26
+ status?: RedisStatus
27
+ instanceType?: RedisInstanceType
28
+ }
29
+
30
+ export type ListRedisRequest = {
31
+ workspace?: string
32
+ page?: number
33
+ pageSize?: number
34
+ }
35
+
36
+ export type ListRedisResponse = {
37
+ items?: RedisSummary[]
38
+ pagination?: KangarooIoApiTypesPage.Page
39
+ }
@@ -7,12 +7,16 @@
7
7
  import * as fm from "../../../../fetch.pb"
8
8
  import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
9
9
  import * as KangarooIoApiHarborV1alpha1Harbor from "./harbor.pb"
10
+ import * as KangarooIoApiHarborV1alpha1Redis from "./redis.pb"
10
11
  export class Harbor {
11
12
  static GetHarborParams(req: KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse> {
12
13
  return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/harbors/default-params?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
13
14
  }
14
15
  static VerifyHarborOperator(req: KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorResponse> {
15
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorRequest, KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/check?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
16
+ return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorRequest, KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/check?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
17
+ }
18
+ static VerifyNamespaceQuota(req: KangarooIoApiHarborV1alpha1Harbor.VerifyNamespaceQuotaRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.VerifyNamespaceQuotaResponse> {
19
+ return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.VerifyNamespaceQuotaRequest, KangarooIoApiHarborV1alpha1Harbor.VerifyNamespaceQuotaResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespace/${req["namespace"]}/check?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
16
20
  }
17
21
  static GetHarborCluster(req: KangarooIoApiHarborV1alpha1Harbor.GetHarborClusterRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.HarborCluster> {
18
22
  return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetHarborClusterRequest, KangarooIoApiHarborV1alpha1Harbor.HarborCluster>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
@@ -29,4 +33,7 @@ export class Harbor {
29
33
  static DeleteHarborCluster(req: KangarooIoApiHarborV1alpha1Harbor.DeleteHarborCluster, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
30
34
  return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.DeleteHarborCluster, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["name"]}`, {...initReq, method: "DELETE"})
31
35
  }
36
+ static ListRedis(req: KangarooIoApiHarborV1alpha1Redis.ListRedisRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Redis.ListRedisResponse> {
37
+ return fm.fetchReq<KangarooIoApiHarborV1alpha1Redis.ListRedisRequest, KangarooIoApiHarborV1alpha1Redis.ListRedisResponse>(`/apis/kangaroo.io/v1alpha1/workspace/${req["workspace"]}/redis?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
38
+ }
32
39
  }
@@ -35,6 +35,12 @@ export enum ListArtifactsRequestSortBy {
35
35
  SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
36
36
  }
37
37
 
38
+ export enum ScannerRegistrationHealth {
39
+ unspecified = "unspecified",
40
+ healthy = "healthy",
41
+ unhealthy = "unhealthy",
42
+ }
43
+
38
44
  export type ListRegistryRequest = {
39
45
  workspace?: string
40
46
  page?: number
@@ -185,6 +191,7 @@ export type ExtraAttrs = {
185
191
  repoName?: string
186
192
  os?: string
187
193
  imagePullUrl?: string
194
+ pullTime?: string
188
195
  }
189
196
 
190
197
  export type BuildHistory = {
@@ -222,6 +229,12 @@ export type RegistryProjectResponse = {
222
229
  createTime?: string
223
230
  }
224
231
 
232
+ export type UpdateProjectRequest = {
233
+ registry?: string
234
+ project?: string
235
+ public?: boolean
236
+ }
237
+
225
238
  export type ListRegistryProjectResponse = {
226
239
  items?: RegistryProjectResponse[]
227
240
  pagination?: KangarooIoApiTypesPage.Page
@@ -343,4 +356,32 @@ export type StopScanArtifactRequest = {
343
356
  project?: string
344
357
  repository?: string
345
358
  digest?: string
359
+ }
360
+
361
+ export type GetScannerOfProjectRequest = {
362
+ registry?: string
363
+ project?: string
364
+ }
365
+
366
+ export type ScannerRegistration = {
367
+ accessCredential?: string
368
+ adapter?: string
369
+ auth?: string
370
+ createTime?: string
371
+ description?: string
372
+ disabled?: boolean
373
+ health?: ScannerRegistrationHealth
374
+ isDefault?: boolean
375
+ name?: string
376
+ skipCertVerify?: boolean
377
+ updateTime?: string
378
+ url?: string
379
+ useInternalAddr?: boolean
380
+ uuid?: string
381
+ vendor?: string
382
+ version?: string
383
+ }
384
+
385
+ export type GetScannerOfProjectResponse = {
386
+ scanner?: ScannerRegistration
346
387
  }
@@ -38,9 +38,15 @@ export class Image {
38
38
  static GetScanReport(req: KangarooIoApiImageV1alpha1Image.GetScanReportRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.GetScanReportResponse> {
39
39
  return fm.fetchReq<KangarooIoApiImageV1alpha1Image.GetScanReportRequest, KangarooIoApiImageV1alpha1Image.GetScanReportResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts/${req["digest"]}/scan/${req["report"]}?${fm.renderURLSearchParams(req, ["workspace", "registry", "project", "repository", "digest", "report"])}`, {...initReq, method: "GET"})
40
40
  }
41
+ static GetScannerOfProject(req: KangarooIoApiImageV1alpha1Image.GetScannerOfProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.GetScannerOfProjectResponse> {
42
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.GetScannerOfProjectRequest, KangarooIoApiImageV1alpha1Image.GetScannerOfProjectResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/project/${req["project"]}/scanner?${fm.renderURLSearchParams(req, ["registry", "project"])}`, {...initReq, method: "GET"})
43
+ }
41
44
  static ListRegistryProject(req: KangarooIoApiImageV1alpha1Image.ListRegistryProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListRegistryProjectResponse> {
42
45
  return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRegistryProjectRequest, KangarooIoApiImageV1alpha1Image.ListRegistryProjectResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
43
46
  }
47
+ static UpdateProject(req: KangarooIoApiImageV1alpha1Image.UpdateProjectRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
48
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.UpdateProjectRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects/${req["project"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
49
+ }
44
50
  static UpdateRegistryProjectBinding(req: KangarooIoApiImageV1alpha1Image.ProjectBindingRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
45
51
  return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ProjectBindingRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects/${req["project"]}/binding`, {...initReq, method: "PUT", body: JSON.stringify(req)})
46
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kangaroo",
3
- "version":"0.4.2",
3
+ "version":"0.4.3-12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {