@daocloud-proto/kangaroo 0.4.3 → 0.4.4
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/kangaroo.io/api/core/v1alpha1/auth.pb.ts +16 -0
- package/kangaroo.io/api/core/v1alpha1/rpc.pb.ts +8 -0
- package/kangaroo.io/api/harbor/v1alpha1/harbor.pb.ts +21 -2
- package/kangaroo.io/api/harbor/v1alpha1/rpc.pb.ts +7 -1
- package/kangaroo.io/api/image/v1alpha1/image.pb.ts +13 -0
- package/kangaroo.io/api/image/v1alpha1/rpc.pb.ts +3 -0
- package/kangaroo.io/api/registry/v1alpha1/registry.pb.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
export type GlobalPermissionsResponse = {
|
|
7
|
+
permissions?: string[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type WorkspacePermissionsResponse = {
|
|
11
|
+
permissions?: string[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type WorkspacePermissionsRequest = {
|
|
15
|
+
workspace?: string
|
|
16
|
+
}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../../../fetch.pb"
|
|
8
|
+
import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
|
|
9
|
+
import * as KangarooIoApiCoreV1alpha1Auth from "./auth.pb"
|
|
8
10
|
import * as KangarooIoApiCoreV1alpha1Cluster from "./cluster.pb"
|
|
9
11
|
import * as KangarooIoApiCoreV1alpha1Namespace from "./namespace.pb"
|
|
10
12
|
import * as KangarooIoApiCoreV1alpha1Workspace from "./workspace.pb"
|
|
@@ -18,4 +20,10 @@ export class Core {
|
|
|
18
20
|
static ListVisibleWorkspaces(req: KangarooIoApiCoreV1alpha1Workspace.ListWorkspaceRequest, initReq?: fm.InitReq): Promise<KangarooIoApiCoreV1alpha1Workspace.ListWorkspaceResponse> {
|
|
19
21
|
return fm.fetchReq<KangarooIoApiCoreV1alpha1Workspace.ListWorkspaceRequest, KangarooIoApiCoreV1alpha1Workspace.ListWorkspaceResponse>(`/apis/kangaroo.io/v1alpha1/workspace?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
20
22
|
}
|
|
23
|
+
static GetGlobalPermissions(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<KangarooIoApiCoreV1alpha1Auth.GlobalPermissionsResponse> {
|
|
24
|
+
return fm.fetchReq<GoogleProtobufEmpty.Empty, KangarooIoApiCoreV1alpha1Auth.GlobalPermissionsResponse>(`/apis/kangaroo.io/v1alpha1/current-user/global-permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
25
|
+
}
|
|
26
|
+
static GetWorkspacePermissions(req: KangarooIoApiCoreV1alpha1Auth.WorkspacePermissionsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiCoreV1alpha1Auth.WorkspacePermissionsResponse> {
|
|
27
|
+
return fm.fetchReq<KangarooIoApiCoreV1alpha1Auth.WorkspacePermissionsRequest, KangarooIoApiCoreV1alpha1Auth.WorkspacePermissionsResponse>(`/apis/kangaroo.io/v1alpha1/current-user/workspace-permissions/${req["workspace"]}?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
28
|
+
}
|
|
21
29
|
}
|
|
@@ -13,7 +13,6 @@ export enum VerifyHarborOperatorResponseHarborOperatorStatus {
|
|
|
13
13
|
STATUS_HARBOR_OPERATOR_IS_NOT_INSTALLED = "STATUS_HARBOR_OPERATOR_IS_NOT_INSTALLED",
|
|
14
14
|
STATUS_CLUSTER_IS_NOT_EXIST = "STATUS_CLUSTER_IS_NOT_EXIST",
|
|
15
15
|
STATUS_READY = "STATUS_READY",
|
|
16
|
-
STATUS_NAMESPACE_QUOTA_EXCEEDED = "STATUS_NAMESPACE_QUOTA_EXCEEDED",
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
export enum DatabaseSpecDatabaseType {
|
|
@@ -67,13 +66,24 @@ export type ResourceNameList = {
|
|
|
67
66
|
|
|
68
67
|
export type VerifyHarborOperatorRequest = {
|
|
69
68
|
cluster?: string
|
|
70
|
-
namespace?: string
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
export type VerifyHarborOperatorResponse = {
|
|
74
72
|
status?: VerifyHarborOperatorResponseHarborOperatorStatus
|
|
75
73
|
}
|
|
76
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 = {
|
|
84
|
+
status?: boolean
|
|
85
|
+
}
|
|
86
|
+
|
|
77
87
|
export type HarborCluster = {
|
|
78
88
|
metadata?: KangarooIoApiTypesObjectmeta.ObjectMeta
|
|
79
89
|
spec?: HarborClusterSpec
|
|
@@ -224,4 +234,13 @@ export type ListHarborClusterRequest = {
|
|
|
224
234
|
export type ListHarborClusterResponse = {
|
|
225
235
|
items?: HarborCluster[]
|
|
226
236
|
pagination?: KangarooIoApiTypesPage.Page
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export type VerifyNodePortRequest = {
|
|
240
|
+
cluster?: string
|
|
241
|
+
port?: string
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type VerifyNodePortResponse = {
|
|
245
|
+
status?: boolean
|
|
227
246
|
}
|
|
@@ -13,7 +13,13 @@ export class Harbor {
|
|
|
13
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"})
|
|
14
14
|
}
|
|
15
15
|
static VerifyHarborOperator(req: KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorResponse> {
|
|
16
|
-
return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorRequest, KangarooIoApiHarborV1alpha1Harbor.VerifyHarborOperatorResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/
|
|
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"})
|
|
20
|
+
}
|
|
21
|
+
static VerifyNodePort(req: KangarooIoApiHarborV1alpha1Harbor.VerifyNodePortRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.VerifyNodePortResponse> {
|
|
22
|
+
return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.VerifyNodePortRequest, KangarooIoApiHarborV1alpha1Harbor.VerifyNodePortResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/node-port/check?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
17
23
|
}
|
|
18
24
|
static GetHarborCluster(req: KangarooIoApiHarborV1alpha1Harbor.GetHarborClusterRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.HarborCluster> {
|
|
19
25
|
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"})
|
|
@@ -384,4 +384,17 @@ export type ScannerRegistration = {
|
|
|
384
384
|
|
|
385
385
|
export type GetScannerOfProjectResponse = {
|
|
386
386
|
scanner?: ScannerRegistration
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export type GetPushCommandRequest = {
|
|
390
|
+
workspace?: string
|
|
391
|
+
registry?: string
|
|
392
|
+
project?: string
|
|
393
|
+
expired?: number
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export type GetPushCommandResponse = {
|
|
397
|
+
cmd?: string
|
|
398
|
+
expired?: number
|
|
399
|
+
expiredAt?: string
|
|
387
400
|
}
|
|
@@ -38,6 +38,9 @@ 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 GetPushCommand(req: KangarooIoApiImageV1alpha1Image.GetPushCommandRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.GetPushCommandResponse> {
|
|
42
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.GetPushCommandRequest, KangarooIoApiImageV1alpha1Image.GetPushCommandResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/project/${req["project"]}/push?${fm.renderURLSearchParams(req, ["workspace", "registry", "project"])}`, {...initReq, method: "GET"})
|
|
43
|
+
}
|
|
41
44
|
static GetScannerOfProject(req: KangarooIoApiImageV1alpha1Image.GetScannerOfProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.GetScannerOfProjectResponse> {
|
|
42
45
|
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
46
|
}
|