@daocloud-proto/kangaroo 0.2.2-2 → 0.2.2-20
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/harbor/v1alpha1/harbor.pb.ts +1 -0
- package/kangaroo.io/api/harbor/v1alpha1/rpc.pb.ts +0 -21
- package/kangaroo.io/api/image/v1alpha1/image.pb.ts +6 -8
- package/kangaroo.io/api/image/v1alpha1/rpc.pb.ts +2 -2
- package/kangaroo.io/api/registry/v1alpha1/registry.pb.ts +1 -0
- package/package.json +1 -1
- package/kangaroo.io/api/harbor/v1alpha1/project.pb.ts +0 -85
- package/kangaroo.io/api/harbor/v1alpha1/repository.pb.ts +0 -48
|
@@ -7,8 +7,6 @@
|
|
|
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 KangarooIoApiHarborV1alpha1Project from "./project.pb"
|
|
11
|
-
import * as KangarooIoApiHarborV1alpha1Repository from "./repository.pb"
|
|
12
10
|
export class Harbor {
|
|
13
11
|
static GetHarborParams(req: KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse> {
|
|
14
12
|
return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/harbors/default-params?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
@@ -34,23 +32,4 @@ export class Harbor {
|
|
|
34
32
|
static GetStorageStatistic(req: KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticResponse> {
|
|
35
33
|
return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticRequest, KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["name"]}/storage_statistic?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
36
34
|
}
|
|
37
|
-
}
|
|
38
|
-
export class HarborProject {
|
|
39
|
-
static ListProject(req: KangarooIoApiHarborV1alpha1Project.ListProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Project.ListProjectResponse> {
|
|
40
|
-
return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.ListProjectRequest, KangarooIoApiHarborV1alpha1Project.ListProjectResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects?${fm.renderURLSearchParams(req, ["cluster", "namespace", "harbor"])}`, {...initReq, method: "GET"})
|
|
41
|
-
}
|
|
42
|
-
static DeleteProject(req: KangarooIoApiHarborV1alpha1Project.DeleteProjectRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
43
|
-
return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.DeleteProjectRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
44
|
-
}
|
|
45
|
-
static CreateProject(req: KangarooIoApiHarborV1alpha1Project.CreateProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Project.Project> {
|
|
46
|
-
return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.CreateProjectRequest, KangarooIoApiHarborV1alpha1Project.Project>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/project`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
export class HarborRepository {
|
|
50
|
-
static ListRepositories(req: KangarooIoApiHarborV1alpha1Repository.ListRepositoriesRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Repository.ListRepositoriesResponse> {
|
|
51
|
-
return fm.fetchReq<KangarooIoApiHarborV1alpha1Repository.ListRepositoriesRequest, KangarooIoApiHarborV1alpha1Repository.ListRepositoriesResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["project"]}/repositories?${fm.renderURLSearchParams(req, ["cluster", "namespace", "harbor", "project"])}`, {...initReq, method: "GET"})
|
|
52
|
-
}
|
|
53
|
-
static DeleteRepository(req: KangarooIoApiHarborV1alpha1Repository.DeleteRepositoryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
54
|
-
return fm.fetchReq<KangarooIoApiHarborV1alpha1Repository.DeleteRepositoryRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["project"]}/repositories/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
55
|
-
}
|
|
56
35
|
}
|
|
@@ -53,6 +53,7 @@ export type ListRepositoriesRequest = {
|
|
|
53
53
|
project?: string
|
|
54
54
|
page?: number
|
|
55
55
|
pageSize?: number
|
|
56
|
+
fuzzyName?: string
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
export type ListRepositoriesResponse = {
|
|
@@ -108,6 +109,7 @@ export type ListArtifactsRequest = {
|
|
|
108
109
|
orderBy?: KangarooIoApiTypesPage.OrderBy
|
|
109
110
|
page?: number
|
|
110
111
|
pageSize?: number
|
|
112
|
+
fuzzyTagName?: string
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
export type ListArtifactsResponse = {
|
|
@@ -162,21 +164,16 @@ export type DeleteArtifactsRequest = {
|
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
export type ListRegistryProjectRequest = {
|
|
165
|
-
|
|
167
|
+
fuzzyName?: string
|
|
166
168
|
registry?: string
|
|
167
169
|
page?: number
|
|
168
170
|
pageSize?: number
|
|
169
171
|
}
|
|
170
172
|
|
|
171
|
-
export type ProjectBindingWorkspace = {
|
|
172
|
-
projectId?: string
|
|
173
|
-
projectAlias?: string
|
|
174
|
-
}
|
|
175
|
-
|
|
176
173
|
export type RegistryProjectResponse = {
|
|
177
174
|
project?: string
|
|
178
175
|
public?: boolean
|
|
179
|
-
bindingWorkspace?:
|
|
176
|
+
bindingWorkspace?: string[]
|
|
180
177
|
repositoriesCount?: string
|
|
181
178
|
createTime?: string
|
|
182
179
|
}
|
|
@@ -189,7 +186,7 @@ export type ListRegistryProjectResponse = {
|
|
|
189
186
|
export type ProjectBindingRequest = {
|
|
190
187
|
registry?: string
|
|
191
188
|
project?: string
|
|
192
|
-
bindingWorkspace?:
|
|
189
|
+
bindingWorkspace?: string[]
|
|
193
190
|
}
|
|
194
191
|
|
|
195
192
|
export type DeleteRegistryProject = {
|
|
@@ -253,6 +250,7 @@ export type APIListRepositoriesRequest = {
|
|
|
253
250
|
project?: string
|
|
254
251
|
page?: number
|
|
255
252
|
pageSize?: number
|
|
253
|
+
fuzzyName?: string
|
|
256
254
|
}
|
|
257
255
|
|
|
258
256
|
export type APIListRepositoriesResponse = {
|
|
@@ -33,13 +33,13 @@ export class Image {
|
|
|
33
33
|
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRegistryProjectRequest, KangarooIoApiImageV1alpha1Image.ListRegistryProjectResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
|
|
34
34
|
}
|
|
35
35
|
static UpdateRegistryProjectBinding(req: KangarooIoApiImageV1alpha1Image.ProjectBindingRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
36
|
-
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ProjectBindingRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects/${req["project"]}/binding`, {...initReq, method: "PUT"})
|
|
36
|
+
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)})
|
|
37
37
|
}
|
|
38
38
|
static DeleteRegistryProject(req: KangarooIoApiImageV1alpha1Image.DeleteRegistryProject, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
39
39
|
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.DeleteRegistryProject, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects/${req["project"]}`, {...initReq, method: "DELETE"})
|
|
40
40
|
}
|
|
41
41
|
static CreateRegistryProject(req: KangarooIoApiImageV1alpha1Image.CreateRegistryProject, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
42
|
-
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.CreateRegistryProject, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects`, {...initReq, method: "POST"})
|
|
42
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.CreateRegistryProject, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
43
43
|
}
|
|
44
44
|
static GetRegistryStatistic(req: KangarooIoApiImageV1alpha1Image.StatisticRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.StatisticResponse> {
|
|
45
45
|
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.StatisticRequest, KangarooIoApiImageV1alpha1Image.StatisticResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/statistic?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
|
package/package.json
CHANGED
|
@@ -1,85 +0,0 @@
|
|
|
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 ListProjectRequestSortBy {
|
|
10
|
-
SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
|
|
11
|
-
field_name = "field_name",
|
|
12
|
-
creation_time = "creation_time",
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type Project = {
|
|
16
|
-
chartCount?: string
|
|
17
|
-
creationTime?: string
|
|
18
|
-
currentUserRoleID?: string
|
|
19
|
-
currentUserRoleIds?: number[]
|
|
20
|
-
cVEAllowList?: CVEAllowList
|
|
21
|
-
deleted?: boolean
|
|
22
|
-
metadata?: ProjectMetadata
|
|
23
|
-
name?: string
|
|
24
|
-
ownerID?: number
|
|
25
|
-
ownerName?: string
|
|
26
|
-
projectID?: number
|
|
27
|
-
registryID?: string
|
|
28
|
-
repoCount?: string
|
|
29
|
-
togglable?: boolean
|
|
30
|
-
updateTime?: string
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type CVEAllowList = {
|
|
34
|
-
creationTime?: string
|
|
35
|
-
expiresAt?: string
|
|
36
|
-
id?: string
|
|
37
|
-
items?: CVEAllowListItem[]
|
|
38
|
-
projectID?: string
|
|
39
|
-
updateTime?: string
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type CVEAllowListItem = {
|
|
43
|
-
cVEID?: string
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type ProjectMetadata = {
|
|
47
|
-
autoScan?: string
|
|
48
|
-
enableContentTrust?: string
|
|
49
|
-
enableContentTrustCosign?: string
|
|
50
|
-
preventVul?: string
|
|
51
|
-
public?: string
|
|
52
|
-
retentionID?: string
|
|
53
|
-
reuseSysCVEAllowList?: string
|
|
54
|
-
severity?: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type ListProjectRequest = {
|
|
58
|
-
cluster?: string
|
|
59
|
-
namespace?: string
|
|
60
|
-
harbor?: string
|
|
61
|
-
page?: number
|
|
62
|
-
pageSize?: number
|
|
63
|
-
sortBy?: ListProjectRequestSortBy
|
|
64
|
-
orderBy?: KangarooIoApiTypesPage.OrderBy
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export type ListProjectResponse = {
|
|
68
|
-
items?: Project[]
|
|
69
|
-
pagination?: KangarooIoApiTypesPage.Page
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export type DeleteProjectRequest = {
|
|
73
|
-
cluster?: string
|
|
74
|
-
namespace?: string
|
|
75
|
-
harbor?: string
|
|
76
|
-
name?: string
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type CreateProjectRequest = {
|
|
80
|
-
cluster?: string
|
|
81
|
-
namespace?: string
|
|
82
|
-
harbor?: string
|
|
83
|
-
name?: string
|
|
84
|
-
public?: boolean
|
|
85
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
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 ListRepositoriesRequestSortBy {
|
|
10
|
-
SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
|
|
11
|
-
name = "name",
|
|
12
|
-
creation_time = "creation_time",
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type Repository = {
|
|
16
|
-
artifactCount?: string
|
|
17
|
-
creationTime?: string
|
|
18
|
-
description?: string
|
|
19
|
-
id?: string
|
|
20
|
-
name?: string
|
|
21
|
-
projectId?: string
|
|
22
|
-
pullCount?: string
|
|
23
|
-
updateTime?: string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type ListRepositoriesRequest = {
|
|
27
|
-
cluster?: string
|
|
28
|
-
namespace?: string
|
|
29
|
-
harbor?: string
|
|
30
|
-
project?: string
|
|
31
|
-
page?: number
|
|
32
|
-
pageSize?: number
|
|
33
|
-
sortBy?: ListRepositoriesRequestSortBy
|
|
34
|
-
orderBy?: KangarooIoApiTypesPage.OrderBy
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type ListRepositoriesResponse = {
|
|
38
|
-
items?: Repository[]
|
|
39
|
-
pagination?: KangarooIoApiTypesPage.Page
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type DeleteRepositoryRequest = {
|
|
43
|
-
cluster?: string
|
|
44
|
-
namespace?: string
|
|
45
|
-
harbor?: string
|
|
46
|
-
project?: string
|
|
47
|
-
name?: string
|
|
48
|
-
}
|