@daocloud-proto/kangaroo 0.6.2 → 0.7.0
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 +2 -0
- package/kangaroo.io/api/harbor/v1alpha1/harbor.pb.ts +40 -0
- package/kangaroo.io/api/harbor/v1alpha1/rpc.pb.ts +8 -1
- package/kangaroo.io/api/image/v1alpha1/image.pb.ts +20 -0
- package/kangaroo.io/api/image/v1alpha1/retention.pb.ts +148 -0
- package/kangaroo.io/api/image/v1alpha1/rpc.pb.ts +30 -0
- package/kangaroo.io/api/registry/v1alpha1/registry.pb.ts +13 -0
- package/kangaroo.io/api/registry/v1alpha1/replication.pb.ts +19 -8
- package/kangaroo.io/api/registry/v1alpha1/rpc.pb.ts +4 -1
- package/package.json +1 -1
|
@@ -26,6 +26,8 @@ export enum PermissionsType {
|
|
|
26
26
|
DeleteManagedHarbor = "DeleteManagedHarbor",
|
|
27
27
|
UpdateManagedHarbor = "UpdateManagedHarbor",
|
|
28
28
|
GetManagedHarbor = "GetManagedHarbor",
|
|
29
|
+
CreateImage = "CreateImage",
|
|
30
|
+
UpdateImage = "UpdateImage",
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export type GlobalPermissionsResponse = {
|
|
@@ -8,6 +8,12 @@ import * as KangarooIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
|
8
8
|
import * as KangarooIoApiTypesPage from "../../types/page.pb"
|
|
9
9
|
import * as KangarooIoApiHarborV1alpha1Redis from "./redis.pb"
|
|
10
10
|
|
|
11
|
+
export enum TLSType {
|
|
12
|
+
TLS_TYPE_UNSPECIFIED = "TLS_TYPE_UNSPECIFIED",
|
|
13
|
+
SELF_SIGNED = "SELF_SIGNED",
|
|
14
|
+
CUSTOM = "CUSTOM",
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
export enum VerifyHarborOperatorResponseHarborOperatorStatus {
|
|
12
18
|
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
13
19
|
STATUS_HARBOR_OPERATOR_IS_NOT_INSTALLED = "STATUS_HARBOR_OPERATOR_IS_NOT_INSTALLED",
|
|
@@ -101,6 +107,7 @@ export type HarborClusterSpec = {
|
|
|
101
107
|
userSyncToHarbor?: boolean
|
|
102
108
|
adminPassword?: string
|
|
103
109
|
enableTrivy?: boolean
|
|
110
|
+
enableMetrics?: boolean
|
|
104
111
|
}
|
|
105
112
|
|
|
106
113
|
export type Resources = {
|
|
@@ -254,6 +261,7 @@ export type VerifyNodePortResponse = {
|
|
|
254
261
|
|
|
255
262
|
export type ListTLSRequest = {
|
|
256
263
|
cluster?: string
|
|
264
|
+
namespace?: string
|
|
257
265
|
}
|
|
258
266
|
|
|
259
267
|
export type ListTLSResponse = {
|
|
@@ -263,4 +271,36 @@ export type ListTLSResponse = {
|
|
|
263
271
|
export type ListTLSResponseItem = {
|
|
264
272
|
namespace?: string
|
|
265
273
|
name?: string
|
|
274
|
+
type?: TLSType
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export type CheckDependServiceRequest = {
|
|
278
|
+
name?: string
|
|
279
|
+
namespace?: string
|
|
280
|
+
cluster?: string
|
|
281
|
+
database?: DatabaseSpec
|
|
282
|
+
cache?: CacheSpec
|
|
283
|
+
storage?: OCIStorageSpec
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export type DatabaseCheckResponse = {
|
|
287
|
+
status?: string
|
|
288
|
+
message?: string
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export type CacheCheckResponse = {
|
|
292
|
+
status?: string
|
|
293
|
+
message?: string
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export type StorageCheckResponse = {
|
|
297
|
+
status?: string
|
|
298
|
+
message?: string
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export type CheckDependServiceResponse = {
|
|
302
|
+
completed?: boolean
|
|
303
|
+
db?: DatabaseCheckResponse
|
|
304
|
+
cache?: CacheCheckResponse
|
|
305
|
+
storage?: StorageCheckResponse
|
|
266
306
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../../../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
|
|
9
|
+
import * as KangarooIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
9
10
|
import * as KangarooIoApiHarborV1alpha1Harbor from "./harbor.pb"
|
|
10
11
|
import * as KangarooIoApiHarborV1alpha1Redis from "./redis.pb"
|
|
11
12
|
export class Harbor {
|
|
@@ -40,6 +41,12 @@ export class Harbor {
|
|
|
40
41
|
return fm.fetchReq<KangarooIoApiHarborV1alpha1Redis.ListRedisRequest, KangarooIoApiHarborV1alpha1Redis.ListRedisResponse>(`/apis/kangaroo.io/v1alpha1/workspace/${req["workspace"]}/redis?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
41
42
|
}
|
|
42
43
|
static ListTLSSecret(req: KangarooIoApiHarborV1alpha1Harbor.ListTLSRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.ListTLSResponse> {
|
|
43
|
-
return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.ListTLSRequest, KangarooIoApiHarborV1alpha1Harbor.ListTLSResponse>(`/apis/kangaroo.io/v1alpha1/cluster/${req["cluster"]}/tls?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
44
|
+
return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.ListTLSRequest, KangarooIoApiHarborV1alpha1Harbor.ListTLSResponse>(`/apis/kangaroo.io/v1alpha1/cluster/${req["cluster"]}/namespace/${req["namespace"]}/tls?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
45
|
+
}
|
|
46
|
+
static CreateVerifyDependService(req: KangarooIoApiHarborV1alpha1Harbor.CheckDependServiceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
47
|
+
return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.CheckDependServiceRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/cluster/${req["cluster"]}/namespace/${req["namespace"]}/harbors/${req["name"]}/verify`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
48
|
+
}
|
|
49
|
+
static GetVerifyDependService(req: KangarooIoApiTypesObjectmeta.ObjectMeta, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.CheckDependServiceResponse> {
|
|
50
|
+
return fm.fetchReq<KangarooIoApiTypesObjectmeta.ObjectMeta, KangarooIoApiHarborV1alpha1Harbor.CheckDependServiceResponse>(`/apis/kangaroo.io/v1alpha1/cluster/${req["cluster"]}/namespace/${req["namespace"]}/harbors/${req["name"]}/verify?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
44
51
|
}
|
|
45
52
|
}
|
|
@@ -83,6 +83,7 @@ export type Repository = {
|
|
|
83
83
|
tagCount?: string
|
|
84
84
|
pullCount?: string
|
|
85
85
|
updateTime?: string
|
|
86
|
+
description?: string
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
export type ListRepositoriesRequest = {
|
|
@@ -408,4 +409,23 @@ export type GetPushCommandResponse = {
|
|
|
408
409
|
cmd?: string
|
|
409
410
|
expired?: string
|
|
410
411
|
expiredAt?: string
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export type UpdateRepositoryDescriptionRequest = {
|
|
415
|
+
workspace?: string
|
|
416
|
+
registry?: string
|
|
417
|
+
project?: string
|
|
418
|
+
repository?: string
|
|
419
|
+
description?: string
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export type UpdateRepositoryDescriptionResponse = {
|
|
423
|
+
description?: string
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export type GetRepositoryRequest = {
|
|
427
|
+
workspace?: string
|
|
428
|
+
registry?: string
|
|
429
|
+
project?: string
|
|
430
|
+
repository?: string
|
|
411
431
|
}
|
|
@@ -0,0 +1,148 @@
|
|
|
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 RetentionRuleTemplate {
|
|
10
|
+
RETENTION_RULE_TEMPLATE_UNSPECIFIED = "RETENTION_RULE_TEMPLATE_UNSPECIFIED",
|
|
11
|
+
N_DAYS_SINCE_LAST_PULL = "N_DAYS_SINCE_LAST_PULL",
|
|
12
|
+
N_DAYS_SINCE_LAST_PUSH = "N_DAYS_SINCE_LAST_PUSH",
|
|
13
|
+
TYPE_ALWAYS = "TYPE_ALWAYS",
|
|
14
|
+
LATEST_PULLED_N = "LATEST_PULLED_N",
|
|
15
|
+
LATEST_PUSHED_K = "LATEST_PUSHED_K",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum RetentionRuleTriggerKind {
|
|
19
|
+
RETENTION_RULE_TRIGGER_KIND_UNSPECIFIED = "RETENTION_RULE_TRIGGER_KIND_UNSPECIFIED",
|
|
20
|
+
MANUAL = "MANUAL",
|
|
21
|
+
SCHEDULED = "SCHEDULED",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum RetentionDecoration {
|
|
25
|
+
RETENTION_DECORATION_UNSPECIFIED = "RETENTION_DECORATION_UNSPECIFIED",
|
|
26
|
+
REPO_MATCHES = "REPO_MATCHES",
|
|
27
|
+
REPO_EXCLUDES = "REPO_EXCLUDES",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum RetentionExecutionStatus {
|
|
31
|
+
RETENTION_EXECUTION_STATUS_UNSPECIFIED = "RETENTION_EXECUTION_STATUS_UNSPECIFIED",
|
|
32
|
+
RETENTION_EXECUTION_STATUS_RUNNING = "RETENTION_EXECUTION_STATUS_RUNNING",
|
|
33
|
+
RETENTION_EXECUTION_STATUS_STOPPED = "RETENTION_EXECUTION_STATUS_STOPPED",
|
|
34
|
+
RETENTION_EXECUTION_STATUS_SUCCEED = "RETENTION_EXECUTION_STATUS_SUCCEED",
|
|
35
|
+
RETENTION_EXECUTION_STATUS_ERROR = "RETENTION_EXECUTION_STATUS_ERROR",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export enum RetentionExecutionTrigger {
|
|
39
|
+
RETENTION_EXECUTION_TRIGGER_MANUAL = "RETENTION_EXECUTION_TRIGGER_MANUAL",
|
|
40
|
+
RETENTION_EXECUTION_TRIGGER_SCHEDULED = "RETENTION_EXECUTION_TRIGGER_SCHEDULED",
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type RetentionPolicy = {
|
|
44
|
+
algorithm?: string
|
|
45
|
+
id?: string
|
|
46
|
+
rules?: RetentionRule[]
|
|
47
|
+
scope?: RetentionPolicyScope
|
|
48
|
+
trigger?: RetentionRuleTrigger
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type RetentionRule = {
|
|
52
|
+
action?: string
|
|
53
|
+
disabled?: boolean
|
|
54
|
+
id?: string
|
|
55
|
+
params?: {[key: string]: string}
|
|
56
|
+
priority?: string
|
|
57
|
+
scopeSelectors?: RetentionSelector[]
|
|
58
|
+
template?: RetentionRuleTemplate
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type RetentionPolicyScope = {
|
|
62
|
+
level?: string
|
|
63
|
+
ref?: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type RetentionRuleTrigger = {
|
|
67
|
+
kind?: RetentionRuleTriggerKind
|
|
68
|
+
settings?: RetentionRuleTriggerSettings
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type RetentionRuleTriggerSettings = {
|
|
72
|
+
cron?: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type RetentionSelector = {
|
|
76
|
+
decoration?: RetentionDecoration
|
|
77
|
+
extras?: string
|
|
78
|
+
kind?: string
|
|
79
|
+
pattern?: string
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type GetRetentionRequest = {
|
|
83
|
+
registry?: string
|
|
84
|
+
retentionId?: string
|
|
85
|
+
workspace?: string
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type UpdateRetentionRequest = {
|
|
89
|
+
registry?: string
|
|
90
|
+
retention?: RetentionPolicy
|
|
91
|
+
workspace?: string
|
|
92
|
+
retentionId?: string
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type RetentionExecution = {
|
|
96
|
+
dryRun?: boolean
|
|
97
|
+
endTime?: string
|
|
98
|
+
id?: string
|
|
99
|
+
policyId?: string
|
|
100
|
+
startTime?: string
|
|
101
|
+
status?: RetentionExecutionStatus
|
|
102
|
+
trigger?: RetentionExecutionTrigger
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type ListRetentionExecutionsRequest = {
|
|
106
|
+
registry?: string
|
|
107
|
+
retentionId?: string
|
|
108
|
+
workspace?: string
|
|
109
|
+
page?: number
|
|
110
|
+
pageSize?: number
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type ListRetentionExecutionsResponse = {
|
|
114
|
+
items?: RetentionExecution[]
|
|
115
|
+
pagination?: KangarooIoApiTypesPage.Page
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type CreateRetentionExecutionRequest = {
|
|
119
|
+
registry?: string
|
|
120
|
+
retentionId?: string
|
|
121
|
+
workspace?: string
|
|
122
|
+
dryRun?: boolean
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type StopRetentionExecutionRequest = {
|
|
126
|
+
registry?: string
|
|
127
|
+
retentionId?: string
|
|
128
|
+
workspace?: string
|
|
129
|
+
executionId?: string
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type CreateRetentionRuleRequest = {
|
|
133
|
+
registry?: string
|
|
134
|
+
retentionId?: string
|
|
135
|
+
workspace?: string
|
|
136
|
+
rule?: RetentionRule
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type CreateRetentionRuleResponse = {
|
|
140
|
+
rule?: RetentionRule[]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type DeleteRetentionRuleRequest = {
|
|
144
|
+
registry?: string
|
|
145
|
+
retentionId?: string
|
|
146
|
+
workspace?: string
|
|
147
|
+
rule?: RetentionRule[]
|
|
148
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as fm from "../../../../fetch.pb"
|
|
8
8
|
import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
|
|
9
9
|
import * as KangarooIoApiImageV1alpha1Image from "./image.pb"
|
|
10
|
+
import * as KangarooIoApiImageV1alpha1Retention from "./retention.pb"
|
|
10
11
|
export class Image {
|
|
11
12
|
static ListRegistry(req: KangarooIoApiImageV1alpha1Image.ListRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListRegistryResponse> {
|
|
12
13
|
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRegistryRequest, KangarooIoApiImageV1alpha1Image.ListRegistryResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/summary?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -17,6 +18,12 @@ export class Image {
|
|
|
17
18
|
static ListRepositories(req: KangarooIoApiImageV1alpha1Image.ListRepositoriesRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListRepositoriesResponse> {
|
|
18
19
|
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRepositoriesRequest, KangarooIoApiImageV1alpha1Image.ListRepositoriesResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories?${fm.renderURLSearchParams(req, ["workspace", "registry", "project"])}`, {...initReq, method: "GET"})
|
|
19
20
|
}
|
|
21
|
+
static UpdateRepositoryDescription(req: KangarooIoApiImageV1alpha1Image.UpdateRepositoryDescriptionRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.UpdateRepositoryDescriptionResponse> {
|
|
22
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.UpdateRepositoryDescriptionRequest, KangarooIoApiImageV1alpha1Image.UpdateRepositoryDescriptionResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
23
|
+
}
|
|
24
|
+
static GetRepository(req: KangarooIoApiImageV1alpha1Image.GetRepositoryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.Repository> {
|
|
25
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.GetRepositoryRequest, KangarooIoApiImageV1alpha1Image.Repository>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}?${fm.renderURLSearchParams(req, ["workspace", "registry", "project", "repository"])}`, {...initReq, method: "GET"})
|
|
26
|
+
}
|
|
20
27
|
static ListArtifacts(req: KangarooIoApiImageV1alpha1Image.ListArtifactsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListArtifactsResponse> {
|
|
21
28
|
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListArtifactsRequest, KangarooIoApiImageV1alpha1Image.ListArtifactsResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts?${fm.renderURLSearchParams(req, ["workspace", "registry", "project", "repository"])}`, {...initReq, method: "GET"})
|
|
22
29
|
}
|
|
@@ -77,4 +84,27 @@ export class Image {
|
|
|
77
84
|
static APIListArtifacts(req: KangarooIoApiImageV1alpha1Image.APIListArtifactsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.APIListArtifactsResponse> {
|
|
78
85
|
return fm.fetchReq<KangarooIoApiImageV1alpha1Image.APIListArtifactsRequest, KangarooIoApiImageV1alpha1Image.APIListArtifactsResponse>(`/apis/kangaroo.io/v1alpha1/select/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts?${fm.renderURLSearchParams(req, ["registry", "project", "repository"])}`, {...initReq, method: "GET"})
|
|
79
86
|
}
|
|
87
|
+
}
|
|
88
|
+
export class Retention {
|
|
89
|
+
static GetRetention(req: KangarooIoApiImageV1alpha1Retention.GetRetentionRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Retention.RetentionPolicy> {
|
|
90
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Retention.GetRetentionRequest, KangarooIoApiImageV1alpha1Retention.RetentionPolicy>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/retention/${req["retentionId"]}?${fm.renderURLSearchParams(req, ["workspace", "registry", "retentionId"])}`, {...initReq, method: "GET"})
|
|
91
|
+
}
|
|
92
|
+
static UpdateRetention(req: KangarooIoApiImageV1alpha1Retention.UpdateRetentionRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Retention.RetentionPolicy> {
|
|
93
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Retention.UpdateRetentionRequest, KangarooIoApiImageV1alpha1Retention.RetentionPolicy>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/retention/${req["retentionId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
94
|
+
}
|
|
95
|
+
static CreateRetentionRule(req: KangarooIoApiImageV1alpha1Retention.CreateRetentionRuleRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Retention.CreateRetentionRuleResponse> {
|
|
96
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Retention.CreateRetentionRuleRequest, KangarooIoApiImageV1alpha1Retention.CreateRetentionRuleResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/retention/${req["retentionId"]}/Rule`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
97
|
+
}
|
|
98
|
+
static DeleteRetentionRule(req: KangarooIoApiImageV1alpha1Retention.DeleteRetentionRuleRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
99
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Retention.DeleteRetentionRuleRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/retention/${req["retentionId"]}/Rule`, {...initReq, method: "DELETE", body: JSON.stringify(req)})
|
|
100
|
+
}
|
|
101
|
+
static ListRetentionExecutions(req: KangarooIoApiImageV1alpha1Retention.ListRetentionExecutionsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Retention.ListRetentionExecutionsResponse> {
|
|
102
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Retention.ListRetentionExecutionsRequest, KangarooIoApiImageV1alpha1Retention.ListRetentionExecutionsResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/retention/${req["retentionId"]}/executions?${fm.renderURLSearchParams(req, ["workspace", "registry", "retentionId"])}`, {...initReq, method: "GET"})
|
|
103
|
+
}
|
|
104
|
+
static CreateRetentionExecution(req: KangarooIoApiImageV1alpha1Retention.CreateRetentionExecutionRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
105
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Retention.CreateRetentionExecutionRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/retention/${req["retentionId"]}/executions`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
106
|
+
}
|
|
107
|
+
static StopRetentionExecution(req: KangarooIoApiImageV1alpha1Retention.StopRetentionExecutionRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
108
|
+
return fm.fetchReq<KangarooIoApiImageV1alpha1Retention.StopRetentionExecutionRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/retention/${req["retentionId"]}/executions/${req["executionId"]}`, {...initReq, method: "PUT"})
|
|
109
|
+
}
|
|
80
110
|
}
|
|
@@ -33,6 +33,7 @@ export type Registry = {
|
|
|
33
33
|
integratedType?: IntegratedType
|
|
34
34
|
status?: RegistryStatus
|
|
35
35
|
createAt?: string
|
|
36
|
+
isExist?: boolean
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export type RegistryStatus = {
|
|
@@ -70,6 +71,18 @@ export type ListRegistryResponse = {
|
|
|
70
71
|
pagination?: KangarooIoApiTypesPage.Page
|
|
71
72
|
}
|
|
72
73
|
|
|
74
|
+
export type ListFilterRegistryRequest = {
|
|
75
|
+
page?: number
|
|
76
|
+
pageSize?: number
|
|
77
|
+
registry?: string
|
|
78
|
+
fuzzyName?: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type ListFilterRegistryResponse = {
|
|
82
|
+
items?: Registry[]
|
|
83
|
+
pagination?: KangarooIoApiTypesPage.Page
|
|
84
|
+
}
|
|
85
|
+
|
|
73
86
|
export type RegistryAdminCredential = {
|
|
74
87
|
username?: string
|
|
75
88
|
password?: string
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as KangarooIoApiTypesPage from "../../types/page.pb"
|
|
8
8
|
|
|
9
|
-
export enum
|
|
9
|
+
export enum NativeRegistryType {
|
|
10
10
|
NATIVE_REGISTRY_UNSPECIFIED = "NATIVE_REGISTRY_UNSPECIFIED",
|
|
11
11
|
NATIVE_REGISTRY_DOCKER_REGISTRY = "NATIVE_REGISTRY_DOCKER_REGISTRY",
|
|
12
12
|
NATIVE_REGISTRY_HARBOR = "NATIVE_REGISTRY_HARBOR",
|
|
@@ -45,6 +45,12 @@ export enum FilterFilterType {
|
|
|
45
45
|
TAG = "TAG",
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export enum FilterDecoration {
|
|
49
|
+
DECORATION_UNSPECIFIED = "DECORATION_UNSPECIFIED",
|
|
50
|
+
DECORATION_MATCHES = "DECORATION_MATCHES",
|
|
51
|
+
DECORATION_EXCLUDES = "DECORATION_EXCLUDES",
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
export enum ExecutionStatus {
|
|
49
55
|
STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
|
|
50
56
|
STATUS_STOPPED = "STATUS_STOPPED",
|
|
@@ -77,13 +83,14 @@ export type ListNativeRegistryRequest = {
|
|
|
77
83
|
|
|
78
84
|
export type NativeRegistry = {
|
|
79
85
|
id?: string
|
|
80
|
-
type?:
|
|
86
|
+
type?: NativeRegistryType
|
|
81
87
|
name?: string
|
|
82
88
|
url?: string
|
|
83
89
|
nativeRegistryCredential?: NativeRegistryCredential
|
|
84
90
|
insecure?: boolean
|
|
85
91
|
description?: string
|
|
86
92
|
status?: NativeRegistryregistry_status
|
|
93
|
+
creationTime?: string
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
export type NativeRegistryCredential = {
|
|
@@ -98,7 +105,7 @@ export type ListNativeRegistryResponse = {
|
|
|
98
105
|
}
|
|
99
106
|
|
|
100
107
|
export type NativeRegistrySpec = {
|
|
101
|
-
type?:
|
|
108
|
+
type?: NativeRegistryType
|
|
102
109
|
name?: string
|
|
103
110
|
url?: string
|
|
104
111
|
nativeRegistryCredential?: NativeRegistryCredential
|
|
@@ -125,7 +132,7 @@ export type DeleteNativeRegistryRequest = {
|
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
export type Policy = {
|
|
128
|
-
|
|
135
|
+
destRegistry?: NativeRegistry
|
|
129
136
|
srcRegistry?: NativeRegistry
|
|
130
137
|
enabled?: boolean
|
|
131
138
|
creationTime?: string
|
|
@@ -135,6 +142,7 @@ export type Policy = {
|
|
|
135
142
|
override?: boolean
|
|
136
143
|
name?: string
|
|
137
144
|
description?: string
|
|
145
|
+
destNamespace?: string
|
|
138
146
|
filters?: Filter[]
|
|
139
147
|
trigger?: Trigger
|
|
140
148
|
}
|
|
@@ -147,6 +155,7 @@ export type Trigger = {
|
|
|
147
155
|
export type Filter = {
|
|
148
156
|
type?: FilterFilterType
|
|
149
157
|
value?: string
|
|
158
|
+
decoration?: FilterDecoration
|
|
150
159
|
}
|
|
151
160
|
|
|
152
161
|
export type ListPoliciesRequest = {
|
|
@@ -196,6 +205,8 @@ export type ListExecutionsRequest = {
|
|
|
196
205
|
page?: number
|
|
197
206
|
pageSize?: number
|
|
198
207
|
policyId?: string
|
|
208
|
+
status?: string
|
|
209
|
+
trigger?: string
|
|
199
210
|
}
|
|
200
211
|
|
|
201
212
|
export type ListExecutionsResponse = {
|
|
@@ -209,8 +220,8 @@ export type CreatePolicyRequest = {
|
|
|
209
220
|
description?: string
|
|
210
221
|
trigger?: Trigger
|
|
211
222
|
filters?: Filter[]
|
|
212
|
-
|
|
213
|
-
|
|
223
|
+
srcRegistryId?: string
|
|
224
|
+
destRegistryId?: string
|
|
214
225
|
enabled?: boolean
|
|
215
226
|
override?: boolean
|
|
216
227
|
destNamespace?: string
|
|
@@ -224,7 +235,7 @@ export type UpdatePolicyRequest = {
|
|
|
224
235
|
trigger?: Trigger
|
|
225
236
|
filters?: Filter[]
|
|
226
237
|
srcRegistry?: NativeRegistry
|
|
227
|
-
|
|
238
|
+
destRegistry?: NativeRegistry
|
|
228
239
|
enabled?: boolean
|
|
229
240
|
override?: boolean
|
|
230
241
|
destNamespace?: string
|
|
@@ -250,7 +261,7 @@ export type ListReplicationTasksResponse = {
|
|
|
250
261
|
}
|
|
251
262
|
|
|
252
263
|
export type ReplicationTask = {
|
|
253
|
-
|
|
264
|
+
destResource?: string
|
|
254
265
|
endTime?: string
|
|
255
266
|
executionId?: string
|
|
256
267
|
id?: string
|
|
@@ -48,6 +48,9 @@ export class Registries {
|
|
|
48
48
|
static GetStorageStatistic(req: KangarooIoApiRegistryV1alpha1Registry.GetStorageStatisticRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.GetStorageStatisticResponse> {
|
|
49
49
|
return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.GetStorageStatisticRequest, KangarooIoApiRegistryV1alpha1Registry.GetStorageStatisticResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/storage_statistic?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
|
|
50
50
|
}
|
|
51
|
+
static ListFilterRegistry(req: KangarooIoApiRegistryV1alpha1Registry.ListFilterRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.ListFilterRegistryResponse> {
|
|
52
|
+
return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.ListFilterRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.ListFilterRegistryResponse>(`/apis/kangaroo.io/v1alpha1/filter_registries/${req["registry"]}/registries?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
|
|
53
|
+
}
|
|
51
54
|
}
|
|
52
55
|
export class Replications {
|
|
53
56
|
static ListNativeRegistry(req: KangarooIoApiRegistryV1alpha1Replication.ListNativeRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Replication.ListNativeRegistryResponse> {
|
|
@@ -69,7 +72,7 @@ export class Replications {
|
|
|
69
72
|
return fm.fetchReq<KangarooIoApiRegistryV1alpha1Replication.DeletePolicyRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/policies/${req["policyId"]}`, {...initReq, method: "DELETE"})
|
|
70
73
|
}
|
|
71
74
|
static CreateExecution(req: KangarooIoApiRegistryV1alpha1Replication.CreateExecutionRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
72
|
-
return fm.fetchReq<KangarooIoApiRegistryV1alpha1Replication.CreateExecutionRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/executions`, {...initReq, method: "POST"})
|
|
75
|
+
return fm.fetchReq<KangarooIoApiRegistryV1alpha1Replication.CreateExecutionRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/executions`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
73
76
|
}
|
|
74
77
|
static StopExecution(req: KangarooIoApiRegistryV1alpha1Replication.StopExecutionRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
75
78
|
return fm.fetchReq<KangarooIoApiRegistryV1alpha1Replication.StopExecutionRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/executions/${req["executionId"]}`, {...initReq, method: "PUT"})
|