mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
cd: the API is /v1, not /api/v1 — no /api prefix anywhere
House rule: /v1/ is the API prefix, everywhere, and /api/ is never added on top of it. The api.* subdomain names the API; a path prefix restating it is noise. This applies it to the whole route surface: /api/v1/* -> /v1/* 106 proto annotations, 109 gateway patterns /api/version -> /v1/version /api/badge -> /v1/badge /api/webhook -> /v1/webhook (server + applicationset controller) /api/dex/* -> /v1/dex/* (constants; dex is built, not deployed) The grpc-gateway .pb.gw.go files are generated, and the plugin toolchain is not on this machine, so they were rewritten by a script that applies exactly the transform codegen would: for /api/v1 paths, drop the leading "api" literal-push opcode pair and decrement every LitPush(2,N)/Capture(5,N) pool index; for /api/version, rename the segment. ConcatN(4,N) operands are counts, not pool indexes, and are untouched. The .proto annotations moved in the same commit, so the next real codegen run is a no-op against these files. MustPattern panics at package init on a malformed pattern, so every rewritten pattern is validated by any import of pkg/apiclient — those tests pass. Also moved: assets/swagger.json (82 paths), the UI's two roots (apiRoot() '/v1', version-service '/v1/version') and its two relative composers (app logs download, badge panel), the five audit-pattern regexes in server.go, and the tests that asserted the old paths. terminal_test's request URL claimed /api/v1/terminal, a route that never existed — the handler is mounted at /terminal; the fixture now says so. NOT touched, deliberately: /api/v3 in GitHub Enterprise base-url examples (GitHub's URL shape, not ours), util/vendored/kubeclientmetrics (parses the KUBERNETES API server's /api/v1 paths), and util/http's cookie-path fixture (arbitrary string exercising slash normalization). go build ./... clean. Pre-existing failures in badge/session/webhook/account tests reproduce identically on the parent commit (rebrand fallout — badge colors, cookie name length, dex issuer) and are not made worse here. External consumers checked: universe has zero references to cd.hanzo.ai/api; the CLI speaks gRPC, not the REST gateway; UI and server ship in one image so they move together. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
Generated
+83
-83
@@ -12,7 +12,7 @@
|
||||
"version": "version not set"
|
||||
},
|
||||
"paths": {
|
||||
"/api/v1/account": {
|
||||
"/v1/account": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"AccountService"
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/account/can-i/{resource}/{action}/{subresource}": {
|
||||
"/v1/account/can-i/{resource}/{action}/{subresource}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"AccountService"
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/account/password": {
|
||||
"/v1/account/password": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"AccountService"
|
||||
@@ -111,7 +111,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/account/{name}": {
|
||||
"/v1/account/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"AccountService"
|
||||
@@ -142,7 +142,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/account/{name}/token": {
|
||||
"/v1/account/{name}/token": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"AccountService"
|
||||
@@ -181,7 +181,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/account/{name}/token/{id}": {
|
||||
"/v1/account/{name}/token/{id}": {
|
||||
"delete": {
|
||||
"tags": [
|
||||
"AccountService"
|
||||
@@ -218,7 +218,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications": {
|
||||
"/v1/applications": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -340,7 +340,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/manifestsWithFiles": {
|
||||
"/v1/applications/manifestsWithFiles": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -374,7 +374,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{appName}/server-side-diff": {
|
||||
"/v1/applications/{appName}/server-side-diff": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -424,7 +424,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{application.metadata.name}": {
|
||||
"/v1/applications/{application.metadata.name}": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -474,7 +474,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{applicationName}/managed-resources": {
|
||||
"/v1/applications/{applicationName}/managed-resources": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -540,7 +540,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{applicationName}/resource-tree": {
|
||||
"/v1/applications/{applicationName}/resource-tree": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -606,7 +606,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}": {
|
||||
"/v1/applications/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -774,7 +774,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/events": {
|
||||
"/v1/applications/{name}/events": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -830,7 +830,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/links": {
|
||||
"/v1/applications/{name}/links": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -871,7 +871,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/logs": {
|
||||
"/v1/applications/{name}/logs": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1002,7 +1002,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/manifests": {
|
||||
"/v1/applications/{name}/manifests": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1072,7 +1072,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/operation": {
|
||||
"/v1/applications/{name}/operation": {
|
||||
"delete": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1113,7 +1113,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/pods/{podName}/logs": {
|
||||
"/v1/applications/{name}/pods/{podName}/logs": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1245,7 +1245,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/resource": {
|
||||
"/v1/applications/{name}/resource": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1462,7 +1462,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/resource/actions": {
|
||||
"/v1/applications/{name}/resource/actions": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1601,7 +1601,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/resource/actions/v2": {
|
||||
"/v1/applications/{name}/resource/actions/v2": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1640,7 +1640,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/resource/links": {
|
||||
"/v1/applications/{name}/resource/links": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1706,7 +1706,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/revisions/{revision}/chartdetails": {
|
||||
"/v1/applications/{name}/revisions/{revision}/chartdetails": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1770,7 +1770,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/revisions/{revision}/metadata": {
|
||||
"/v1/applications/{name}/revisions/{revision}/metadata": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1834,7 +1834,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/revisions/{revision}/ocimetadata": {
|
||||
"/v1/applications/{name}/revisions/{revision}/ocimetadata": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1898,7 +1898,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/rollback": {
|
||||
"/v1/applications/{name}/rollback": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1937,7 +1937,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/spec": {
|
||||
"/v1/applications/{name}/spec": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -1991,7 +1991,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/sync": {
|
||||
"/v1/applications/{name}/sync": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -2030,7 +2030,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applications/{name}/syncwindows": {
|
||||
"/v1/applications/{name}/syncwindows": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -2071,7 +2071,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applicationsets": {
|
||||
"/v1/applicationsets": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationSetService"
|
||||
@@ -2159,7 +2159,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applicationsets/generate": {
|
||||
"/v1/applicationsets/generate": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ApplicationSetService"
|
||||
@@ -2192,7 +2192,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applicationsets/{name}": {
|
||||
"/v1/applicationsets/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationSetService"
|
||||
@@ -2265,7 +2265,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applicationsets/{name}/events": {
|
||||
"/v1/applicationsets/{name}/events": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationSetService"
|
||||
@@ -2303,7 +2303,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/applicationsets/{name}/resource-tree": {
|
||||
"/v1/applicationsets/{name}/resource-tree": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationSetService"
|
||||
@@ -2340,7 +2340,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/certificates": {
|
||||
"/v1/certificates": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"CertificateService"
|
||||
@@ -2462,7 +2462,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/clusters": {
|
||||
"/v1/clusters": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ClusterService"
|
||||
@@ -2545,7 +2545,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/clusters/{id.value}": {
|
||||
"/v1/clusters/{id.value}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ClusterService"
|
||||
@@ -2692,7 +2692,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/clusters/{id.value}/invalidate-cache": {
|
||||
"/v1/clusters/{id.value}/invalidate-cache": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ClusterService"
|
||||
@@ -2724,7 +2724,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/clusters/{id.value}/rotate-auth": {
|
||||
"/v1/clusters/{id.value}/rotate-auth": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ClusterService"
|
||||
@@ -2756,7 +2756,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/gpgkeys": {
|
||||
"/v1/gpgkeys": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"GPGKeyService"
|
||||
@@ -2854,7 +2854,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/gpgkeys/{keyID}": {
|
||||
"/v1/gpgkeys/{keyID}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"GPGKeyService"
|
||||
@@ -2886,7 +2886,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/notifications/services": {
|
||||
"/v1/notifications/services": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"NotificationService"
|
||||
@@ -2909,7 +2909,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/notifications/templates": {
|
||||
"/v1/notifications/templates": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"NotificationService"
|
||||
@@ -2932,7 +2932,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/notifications/triggers": {
|
||||
"/v1/notifications/triggers": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"NotificationService"
|
||||
@@ -2955,7 +2955,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects": {
|
||||
"/v1/projects": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3016,7 +3016,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{name}": {
|
||||
"/v1/projects/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3076,7 +3076,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{name}/detailed": {
|
||||
"/v1/projects/{name}/detailed": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3107,7 +3107,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{name}/events": {
|
||||
"/v1/projects/{name}/events": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3138,7 +3138,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{name}/globalprojects": {
|
||||
"/v1/projects/{name}/globalprojects": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3169,7 +3169,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{name}/links": {
|
||||
"/v1/projects/{name}/links": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3200,7 +3200,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{name}/syncwindows": {
|
||||
"/v1/projects/{name}/syncwindows": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3231,7 +3231,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{project.metadata.name}": {
|
||||
"/v1/projects/{project.metadata.name}": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3271,7 +3271,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{project}/roles/{role}/token": {
|
||||
"/v1/projects/{project}/roles/{role}/token": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3316,7 +3316,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/projects/{project}/roles/{role}/token/{iat}": {
|
||||
"/v1/projects/{project}/roles/{role}/token/{iat}": {
|
||||
"delete": {
|
||||
"tags": [
|
||||
"ProjectService"
|
||||
@@ -3365,7 +3365,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repocreds": {
|
||||
"/v1/repocreds": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepoCredsService"
|
||||
@@ -3434,7 +3434,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repocreds/{creds.url}": {
|
||||
"/v1/repocreds/{creds.url}": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"RepoCredsService"
|
||||
@@ -3474,7 +3474,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repocreds/{url}": {
|
||||
"/v1/repocreds/{url}": {
|
||||
"delete": {
|
||||
"tags": [
|
||||
"RepoCredsService"
|
||||
@@ -3505,7 +3505,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories": {
|
||||
"/v1/repositories": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -3592,7 +3592,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{repo.repo}": {
|
||||
"/v1/repositories/{repo.repo}": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -3632,7 +3632,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{repo}": {
|
||||
"/v1/repositories/{repo}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -3718,7 +3718,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{repo}/apps": {
|
||||
"/v1/repositories/{repo}/apps": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -3764,7 +3764,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{repo}/helmcharts": {
|
||||
"/v1/repositories/{repo}/helmcharts": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -3808,7 +3808,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{repo}/oci-tags": {
|
||||
"/v1/repositories/{repo}/oci-tags": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -3851,7 +3851,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{repo}/refs": {
|
||||
"/v1/repositories/{repo}/refs": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -3894,7 +3894,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{repo}/validate": {
|
||||
"/v1/repositories/{repo}/validate": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -4081,7 +4081,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/repositories/{source.repoURL}/appdetails": {
|
||||
"/v1/repositories/{source.repoURL}/appdetails": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -4121,7 +4121,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/session": {
|
||||
"/v1/session": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"SessionService"
|
||||
@@ -4175,7 +4175,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/session/userinfo": {
|
||||
"/v1/session/userinfo": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"SessionService"
|
||||
@@ -4198,7 +4198,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/settings": {
|
||||
"/v1/settings": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"SettingsService"
|
||||
@@ -4221,7 +4221,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/settings/plugins": {
|
||||
"/v1/settings/plugins": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"SettingsService"
|
||||
@@ -4244,7 +4244,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/stream/applications": {
|
||||
"/v1/stream/applications": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -4334,7 +4334,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/stream/applications/{applicationName}/resource-tree": {
|
||||
"/v1/stream/applications/{applicationName}/resource-tree": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationService"
|
||||
@@ -4409,7 +4409,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/stream/applicationsets": {
|
||||
"/v1/stream/applicationsets": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"ApplicationSetService"
|
||||
@@ -4472,7 +4472,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/write-repocreds": {
|
||||
"/v1/write-repocreds": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepoCredsService"
|
||||
@@ -4541,7 +4541,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/write-repocreds/{creds.url}": {
|
||||
"/v1/write-repocreds/{creds.url}": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"RepoCredsService"
|
||||
@@ -4581,7 +4581,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/write-repocreds/{url}": {
|
||||
"/v1/write-repocreds/{url}": {
|
||||
"delete": {
|
||||
"tags": [
|
||||
"RepoCredsService"
|
||||
@@ -4612,7 +4612,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/write-repositories": {
|
||||
"/v1/write-repositories": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -4699,7 +4699,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/write-repositories/{repo.repo}": {
|
||||
"/v1/write-repositories/{repo.repo}": {
|
||||
"put": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -4739,7 +4739,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/write-repositories/{repo}": {
|
||||
"/v1/write-repositories/{repo}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -4825,7 +4825,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/write-repositories/{repo}/validate": {
|
||||
"/v1/write-repositories/{repo}/validate": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"RepositoryService"
|
||||
@@ -5012,7 +5012,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/version": {
|
||||
"/v1/version": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"VersionService"
|
||||
@@ -11168,4 +11168,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,7 +332,7 @@ func NewCommand() *cobra.Command {
|
||||
|
||||
func startWebhookServer(webhookHandler *webhook.WebhookHandler, webhookAddr string) {
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/api/webhook", webhookHandler.Handler)
|
||||
mux.HandleFunc("/v1/webhook", webhookHandler.Handler)
|
||||
go func() {
|
||||
log.Infof("Starting webhook server %s", webhookAddr)
|
||||
err := http.ListenAndServe(webhookAddr, mux)
|
||||
|
||||
@@ -469,7 +469,7 @@ cd account session-token -o json
|
||||
|
||||
# Use in scripts
|
||||
export CD_AUTH_TOKEN=$(cd account session-token)
|
||||
curl -H "Authorization: Bearer $CD_AUTH_TOKEN" $CD_SERVER/api/v1/applications`,
|
||||
curl -H "Authorization: Bearer $CD_AUTH_TOKEN" $CD_SERVER/v1/applications`,
|
||||
Run: func(_ *cobra.Command, _ []string) {
|
||||
// Create client first - this handles token refresh automatically
|
||||
_, err := cdclient.NewClient(clientOpts)
|
||||
|
||||
+2
-2
@@ -161,7 +161,7 @@ const (
|
||||
// Dex related constants
|
||||
const (
|
||||
// DexAPIEndpoint is the endpoint where we serve the Dex API server
|
||||
DexAPIEndpoint = "/api/dex"
|
||||
DexAPIEndpoint = "/v1/dex"
|
||||
// LoginEndpoint is Argo CD's shorthand login endpoint which redirects to dex's OAuth 2.0 provider's consent page
|
||||
LoginEndpoint = "/auth/login"
|
||||
// LogoutEndpoint is Argo CD's shorthand logout endpoint which invalidates OIDC session after logout
|
||||
@@ -169,7 +169,7 @@ const (
|
||||
// CallbackEndpoint is Argo CD's final callback endpoint we reach after OAuth 2.0 login flow has been completed
|
||||
CallbackEndpoint = "/auth/callback"
|
||||
// DexCallbackEndpoint is Argo CD's final callback endpoint when Dex is configured
|
||||
DexCallbackEndpoint = "/api/dex/callback"
|
||||
DexCallbackEndpoint = "/v1/dex/callback"
|
||||
// ArgoCDClientAppName is name of the Oauth client app used when registering our web app to dex
|
||||
ArgoCDClientAppName = "Argo CD"
|
||||
// ArgoCDClientAppID is the Oauth client ID we will use when registering our app to dex
|
||||
|
||||
@@ -692,17 +692,17 @@ func RegisterAccountServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_AccountService_CanI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 3, 0, 4, 1, 5, 6}, []string{"api", "v1", "account", "can-i", "resource", "action", "subresource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_AccountService_CanI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 3, 0, 4, 1, 5, 5}, []string{"v1", "account", "can-i", "resource", "action", "subresource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AccountService_UpdatePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "account", "password"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_AccountService_UpdatePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "account", "password"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AccountService_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "account"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_AccountService_ListAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "account"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AccountService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "account", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_AccountService_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "account", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AccountService_CreateToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "account", "name", "token"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_AccountService_CreateToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "account", "name", "token"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AccountService_DeleteToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"api", "v1", "account", "name", "token", "id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_AccountService_DeleteToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "account", "name", "token", "id"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -3611,69 +3611,69 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_ApplicationService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applications"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "applications"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_ListResourceEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "events"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_ListResourceEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "events"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "stream", "applications"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "stream", "applications"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applications"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "applications"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "applications", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_GetApplicationSyncWindows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "syncwindows"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_GetApplicationSyncWindows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "syncwindows"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_RevisionMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "applications", "name", "revisions", "revision", "metadata"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_RevisionMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1", "applications", "name", "revisions", "revision", "metadata"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_RevisionChartDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "applications", "name", "revisions", "revision", "chartdetails"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_RevisionChartDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1", "applications", "name", "revisions", "revision", "chartdetails"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_GetOCIMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "applications", "name", "revisions", "revision", "ocimetadata"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_GetOCIMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1", "applications", "name", "revisions", "revision", "ocimetadata"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_GetManifests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "manifests"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_GetManifests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "manifests"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_GetManifestsWithFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "applications", "manifestsWithFiles"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_GetManifestsWithFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "applications", "manifestsWithFiles"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "application.metadata.name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "applications", "application.metadata.name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_UpdateSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "spec"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_UpdateSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "spec"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Patch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Patch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "applications", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "applications", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "sync"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "sync"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_ManagedResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "applicationName", "managed-resources"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_ManagedResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "applicationName", "managed-resources"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_ServerSideDiff_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "appName", "server-side-diff"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_ServerSideDiff_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "appName", "server-side-diff"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_ResourceTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "applicationName", "resource-tree"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_ResourceTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "applicationName", "resource-tree"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_WatchResourceTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"api", "v1", "stream", "applications", "applicationName", "resource-tree"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_WatchResourceTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "stream", "applications", "applicationName", "resource-tree"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_Rollback_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "rollback"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_Rollback_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "rollback"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_TerminateOperation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "operation"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_TerminateOperation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "operation"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_GetResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "resource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_GetResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "resource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_PatchResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "resource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_PatchResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "resource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_ListResourceActions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 2, 5}, []string{"api", "v1", "applications", "name", "resource", "actions"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_ListResourceActions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "applications", "name", "resource", "actions"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_RunResourceAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 2, 5}, []string{"api", "v1", "applications", "name", "resource", "actions"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_RunResourceAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "applications", "name", "resource", "actions"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_RunResourceActionV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 2, 5, 2, 6}, []string{"api", "v1", "applications", "name", "resource", "actions", "v2"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_RunResourceActionV2_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "applications", "name", "resource", "actions", "v2"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_DeleteResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "resource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_DeleteResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "resource"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_PodLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "applications", "name", "pods", "podName", "logs"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_PodLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1", "applications", "name", "pods", "podName", "logs"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_PodLogs_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "logs"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_PodLogs_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "logs"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_ListLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "links"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_ListLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applications", "name", "links"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationService_ListResourceLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 2, 5}, []string{"api", "v1", "applications", "name", "resource", "links"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationService_ListResourceLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "applications", "name", "resource", "links"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -850,21 +850,21 @@ func RegisterApplicationSetServiceHandlerClient(ctx context.Context, mux *runtim
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_ApplicationSetService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applicationsets", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "applicationsets", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationSetService_Generate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "applicationsets", "generate"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_Generate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "applicationsets", "generate"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationSetService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationSetService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationSetService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applicationsets", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "applicationsets", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationSetService_ResourceTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applicationsets", "name", "resource-tree"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_ResourceTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applicationsets", "name", "resource-tree"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationSetService_ListResourceEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applicationsets", "name", "events"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_ListResourceEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "applicationsets", "name", "events"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ApplicationSetService_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "stream", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ApplicationSetService_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "stream", "applicationsets"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -337,11 +337,11 @@ func RegisterCertificateServiceHandlerClient(ctx context.Context, mux *runtime.S
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_CertificateService_ListCertificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "certificates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_CertificateService_ListCertificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "certificates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_CertificateService_CreateCertificate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "certificates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_CertificateService_CreateCertificate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "certificates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_CertificateService_DeleteCertificate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "certificates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_CertificateService_DeleteCertificate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "certificates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -849,19 +849,19 @@ func RegisterClusterServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_ClusterService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "clusters"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ClusterService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "clusters"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ClusterService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "clusters"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ClusterService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "clusters"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ClusterService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "id.value"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ClusterService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "clusters", "id.value"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ClusterService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "id.value"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ClusterService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "clusters", "id.value"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ClusterService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "clusters", "id.value"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ClusterService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "clusters", "id.value"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ClusterService_RotateAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "clusters", "id.value", "rotate-auth"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ClusterService_RotateAuth_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "clusters", "id.value", "rotate-auth"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ClusterService_InvalidateCache_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "clusters", "id.value", "invalidate-cache"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ClusterService_InvalidateCache_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "clusters", "id.value", "invalidate-cache"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -434,13 +434,13 @@ func RegisterGPGKeyServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_GPGKeyService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "gpgkeys"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_GPGKeyService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gpgkeys"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_GPGKeyService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "gpgkeys", "keyID"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_GPGKeyService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "gpgkeys", "keyID"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_GPGKeyService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "gpgkeys"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_GPGKeyService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gpgkeys"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_GPGKeyService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "gpgkeys"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_GPGKeyService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "gpgkeys"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -267,11 +267,11 @@ func RegisterNotificationServiceHandlerClient(ctx context.Context, mux *runtime.
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_NotificationService_ListTriggers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "notifications", "triggers"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_NotificationService_ListTriggers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notifications", "triggers"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_NotificationService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "notifications", "services"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_NotificationService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notifications", "services"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_NotificationService_ListTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "notifications", "templates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_NotificationService_ListTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "notifications", "templates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -1326,29 +1326,29 @@ func RegisterProjectServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_ProjectService_CreateToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "projects", "project", "roles", "role", "token"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_CreateToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1", "projects", "project", "roles", "role", "token"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_DeleteToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"api", "v1", "projects", "project", "roles", "role", "token", "iat"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_DeleteToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v1", "projects", "project", "roles", "role", "token", "iat"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "projects"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "projects"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "projects"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "projects"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_GetDetailedProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "projects", "name", "detailed"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_GetDetailedProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "projects", "name", "detailed"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "projects", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_GetGlobalProjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "projects", "name", "globalprojects"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_GetGlobalProjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "projects", "name", "globalprojects"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "project.metadata.name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "projects", "project.metadata.name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "projects", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "projects", "name"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_ListEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "projects", "name", "events"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_ListEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "projects", "name", "events"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_GetSyncWindowsState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "projects", "name", "syncwindows"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_GetSyncWindowsState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "projects", "name", "syncwindows"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_ProjectService_ListLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "projects", "name", "links"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_ProjectService_ListLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "projects", "name", "links"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -852,21 +852,21 @@ func RegisterRepoCredsServiceHandlerClient(ctx context.Context, mux *runtime.Ser
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_RepoCredsService_ListRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_ListRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepoCredsService_ListWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "write-repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_ListWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "write-repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepoCredsService_CreateRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_CreateRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepoCredsService_CreateWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "write-repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_CreateWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "write-repocreds"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepoCredsService_UpdateRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "repocreds", "creds.url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_UpdateRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "repocreds", "creds.url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepoCredsService_UpdateWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "write-repocreds", "creds.url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_UpdateWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "write-repocreds", "creds.url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepoCredsService_DeleteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "repocreds", "url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_DeleteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "repocreds", "url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepoCredsService_DeleteWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "write-repocreds", "url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepoCredsService_DeleteWriteRepositoryCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "write-repocreds", "url"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -2355,47 +2355,47 @@ func RegisterRepositoryServiceHandlerClient(ctx context.Context, mux *runtime.Se
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_RepositoryService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_GetWrite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "write-repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_GetWrite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "write-repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_ListRepositories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_ListRepositories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_ListWriteRepositories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "write-repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_ListWriteRepositories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "write-repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_ListRefs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "repositories", "repo", "refs"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_ListRefs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "repositories", "repo", "refs"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_ListOCITags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "repositories", "repo", "oci-tags"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_ListOCITags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "repositories", "repo", "oci-tags"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_ListApps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "repositories", "repo", "apps"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_ListApps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "repositories", "repo", "apps"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_GetAppDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "repositories", "source.repoURL", "appdetails"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_GetAppDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "repositories", "source.repoURL", "appdetails"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_GetHelmCharts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "repositories", "repo", "helmcharts"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_GetHelmCharts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "repositories", "repo", "helmcharts"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_CreateRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_CreateRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_CreateWriteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "write-repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_CreateWriteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "write-repositories"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "repositories", "repo.repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "repositories", "repo.repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_UpdateRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "repositories", "repo.repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_UpdateRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "repositories", "repo.repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_UpdateWriteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "write-repositories", "repo.repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_UpdateWriteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "write-repositories", "repo.repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_DeleteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_DeleteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_DeleteWriteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "write-repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_DeleteWriteRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "write-repositories", "repo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_ValidateAccess_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "repositories", "repo", "validate"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_ValidateAccess_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "repositories", "repo", "validate"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_RepositoryService_ValidateWriteAccess_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "write-repositories", "repo", "validate"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_RepositoryService_ValidateWriteAccess_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "write-repositories", "repo", "validate"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -283,11 +283,11 @@ func RegisterSessionServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_SessionService_GetUserInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "session", "userinfo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_SessionService_GetUserInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "session", "userinfo"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_SessionService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "session"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_SessionService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "session"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_SessionService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "session"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_SessionService_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "session"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -206,9 +206,9 @@ func RegisterSettingsServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_SettingsService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "settings"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_SettingsService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "settings"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_SettingsService_GetPlugins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "settings", "plugins"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_SettingsService_GetPlugins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "settings", "plugins"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -146,7 +146,7 @@ func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_VersionService_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api", "version"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
pattern_VersionService_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "version"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -77,37 +77,37 @@ service AccountService {
|
||||
|
||||
// CanI checks if the current account has permission to perform an action
|
||||
rpc CanI(CanIRequest) returns (CanIResponse) {
|
||||
option (google.api.http).get = "/api/v1/account/can-i/{resource}/{action}/{subresource=**}";
|
||||
option (google.api.http).get = "/v1/account/can-i/{resource}/{action}/{subresource=**}";
|
||||
}
|
||||
|
||||
// UpdatePassword updates an account's password to a new value
|
||||
rpc UpdatePassword(UpdatePasswordRequest) returns (UpdatePasswordResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/account/password"
|
||||
put: "/v1/account/password"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// ListAccounts returns the list of accounts
|
||||
rpc ListAccounts(ListAccountRequest) returns (AccountsList) {
|
||||
option (google.api.http).get = "/api/v1/account";
|
||||
option (google.api.http).get = "/v1/account";
|
||||
}
|
||||
|
||||
// GetAccount returns an account
|
||||
rpc GetAccount(GetAccountRequest) returns (Account) {
|
||||
option (google.api.http).get = "/api/v1/account/{name}";
|
||||
option (google.api.http).get = "/v1/account/{name}";
|
||||
}
|
||||
|
||||
// CreateToken creates a token
|
||||
rpc CreateToken(CreateTokenRequest) returns (CreateTokenResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/account/{name}/token"
|
||||
post: "/v1/account/{name}/token"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// DeleteToken deletes a token
|
||||
rpc DeleteToken(DeleteTokenRequest) returns (EmptyResponse) {
|
||||
option (google.api.http).delete = "/api/v1/account/{name}/token/{id}";
|
||||
option (google.api.http).delete = "/v1/account/{name}/token/{id}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ func ssoAdminContext(ctx context.Context, iat time.Time) context.Context {
|
||||
//nolint:staticcheck
|
||||
return context.WithValue(ctx, "claims", &jwt.RegisteredClaims{
|
||||
Subject: "admin",
|
||||
Issuer: "https://mycdhost.com/api/dex",
|
||||
Issuer: "https://mycdhost.com/v1/dex",
|
||||
IssuedAt: jwt.NewNumericDate(iat),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -355,61 +355,61 @@ service ApplicationService {
|
||||
|
||||
// List returns list of applications
|
||||
rpc List(ApplicationQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationList) {
|
||||
option (google.api.http).get = "/api/v1/applications";
|
||||
option (google.api.http).get = "/v1/applications";
|
||||
}
|
||||
|
||||
// ListResourceEvents returns a list of event resources
|
||||
rpc ListResourceEvents(ApplicationResourceEventsQuery) returns (events.EventList) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/events";
|
||||
option (google.api.http).get = "/v1/applications/{name}/events";
|
||||
}
|
||||
|
||||
// Watch returns stream of application change events
|
||||
rpc Watch(ApplicationQuery) returns (stream github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationWatchEvent) {
|
||||
option (google.api.http).get = "/api/v1/stream/applications";
|
||||
option (google.api.http).get = "/v1/stream/applications";
|
||||
}
|
||||
|
||||
// Create creates an application
|
||||
rpc Create (ApplicationCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applications"
|
||||
post: "/v1/applications"
|
||||
body: "application"
|
||||
};
|
||||
}
|
||||
|
||||
// Get returns an application by name
|
||||
rpc Get (ApplicationQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}";
|
||||
option (google.api.http).get = "/v1/applications/{name}";
|
||||
}
|
||||
|
||||
// Get returns sync windows of the application
|
||||
rpc GetApplicationSyncWindows (ApplicationSyncWindowsQuery) returns (ApplicationSyncWindowsResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/syncwindows";
|
||||
option (google.api.http).get = "/v1/applications/{name}/syncwindows";
|
||||
}
|
||||
|
||||
// Get the meta-data (author, date, tags, message) for a specific revision of the application
|
||||
rpc RevisionMetadata (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RevisionMetadata) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/metadata";
|
||||
option (google.api.http).get = "/v1/applications/{name}/revisions/{revision}/metadata";
|
||||
}
|
||||
|
||||
// Get the chart metadata (description, maintainers, home) for a specific revision of the application
|
||||
rpc RevisionChartDetails (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ChartDetails) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/chartdetails";
|
||||
option (google.api.http).get = "/v1/applications/{name}/revisions/{revision}/chartdetails";
|
||||
}
|
||||
|
||||
// Get the chart metadata (description, maintainers, home) for a specific revision of the application
|
||||
rpc GetOCIMetadata (RevisionMetadataQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.OCIMetadata) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/revisions/{revision}/ocimetadata";
|
||||
option (google.api.http).get = "/v1/applications/{name}/revisions/{revision}/ocimetadata";
|
||||
}
|
||||
|
||||
// GetManifests returns application manifests
|
||||
rpc GetManifests (ApplicationManifestQuery) returns (repository.ManifestResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/manifests";
|
||||
option (google.api.http).get = "/v1/applications/{name}/manifests";
|
||||
}
|
||||
|
||||
// GetManifestsWithFiles returns application manifests using provided files to generate them
|
||||
rpc GetManifestsWithFiles (stream ApplicationManifestQueryWithFilesWrapper) returns (repository.ManifestResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applications/manifestsWithFiles"
|
||||
post: "/v1/applications/manifestsWithFiles"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
@@ -417,7 +417,7 @@ service ApplicationService {
|
||||
// Update updates an application
|
||||
rpc Update(ApplicationUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/applications/{application.metadata.name}"
|
||||
put: "/v1/applications/{application.metadata.name}"
|
||||
body: "application"
|
||||
};
|
||||
}
|
||||
@@ -425,7 +425,7 @@ service ApplicationService {
|
||||
// UpdateSpec updates an application spec
|
||||
rpc UpdateSpec(ApplicationUpdateSpecRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSpec) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/applications/{name}/spec"
|
||||
put: "/v1/applications/{name}/spec"
|
||||
body: "spec"
|
||||
};
|
||||
}
|
||||
@@ -433,48 +433,48 @@ service ApplicationService {
|
||||
// Patch patch an application
|
||||
rpc Patch(ApplicationPatchRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v1/applications/{name}"
|
||||
patch: "/v1/applications/{name}"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete deletes an application
|
||||
rpc Delete(ApplicationDeleteRequest) returns (ApplicationResponse) {
|
||||
option (google.api.http).delete = "/api/v1/applications/{name}";
|
||||
option (google.api.http).delete = "/v1/applications/{name}";
|
||||
}
|
||||
|
||||
// Sync syncs an application to its target state
|
||||
rpc Sync(ApplicationSyncRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applications/{name}/sync"
|
||||
post: "/v1/applications/{name}/sync"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// ManagedResources returns list of managed resources
|
||||
rpc ManagedResources(ResourcesQuery) returns (ManagedResourcesResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{applicationName}/managed-resources";
|
||||
option (google.api.http).get = "/v1/applications/{applicationName}/managed-resources";
|
||||
}
|
||||
|
||||
// ServerSideDiff performs server-side diff calculation using dry-run apply
|
||||
rpc ServerSideDiff(ApplicationServerSideDiffQuery) returns (ApplicationServerSideDiffResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{appName}/server-side-diff";
|
||||
option (google.api.http).get = "/v1/applications/{appName}/server-side-diff";
|
||||
}
|
||||
|
||||
// ResourceTree returns resource tree
|
||||
rpc ResourceTree(ResourcesQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationTree) {
|
||||
option (google.api.http).get = "/api/v1/applications/{applicationName}/resource-tree";
|
||||
option (google.api.http).get = "/v1/applications/{applicationName}/resource-tree";
|
||||
}
|
||||
|
||||
// Watch returns stream of application resource tree
|
||||
rpc WatchResourceTree(ResourcesQuery) returns (stream github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationTree) {
|
||||
option (google.api.http).get = "/api/v1/stream/applications/{applicationName}/resource-tree";
|
||||
option (google.api.http).get = "/v1/stream/applications/{applicationName}/resource-tree";
|
||||
}
|
||||
|
||||
// Rollback syncs an application to its target state
|
||||
rpc Rollback(ApplicationRollbackRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Application) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applications/{name}/rollback"
|
||||
post: "/v1/applications/{name}/rollback"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
@@ -482,26 +482,26 @@ service ApplicationService {
|
||||
// TerminateOperation terminates the currently running operation
|
||||
rpc TerminateOperation(OperationTerminateRequest) returns (OperationTerminateResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/api/v1/applications/{name}/operation";
|
||||
delete: "/v1/applications/{name}/operation";
|
||||
};
|
||||
}
|
||||
|
||||
// GetResource returns single application resource
|
||||
rpc GetResource(ApplicationResourceRequest) returns (ApplicationResourceResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/resource";
|
||||
option (google.api.http).get = "/v1/applications/{name}/resource";
|
||||
}
|
||||
|
||||
// PatchResource patch single application resource
|
||||
rpc PatchResource(ApplicationResourcePatchRequest) returns (ApplicationResourceResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applications/{name}/resource"
|
||||
post: "/v1/applications/{name}/resource"
|
||||
body: "patch"
|
||||
};
|
||||
}
|
||||
|
||||
// ListResourceActions returns list of resource actions
|
||||
rpc ListResourceActions(ApplicationResourceRequest) returns (ResourceActionsListResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/resource/actions";
|
||||
option (google.api.http).get = "/v1/applications/{name}/resource/actions";
|
||||
}
|
||||
|
||||
// RunResourceAction runs a resource action
|
||||
@@ -511,7 +511,7 @@ service ApplicationService {
|
||||
rpc RunResourceAction(ResourceActionRunRequest) returns (ApplicationResponse) {
|
||||
option deprecated = true;
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applications/{name}/resource/actions"
|
||||
post: "/v1/applications/{name}/resource/actions"
|
||||
body: "action"
|
||||
};
|
||||
}
|
||||
@@ -519,33 +519,33 @@ service ApplicationService {
|
||||
// RunResourceActionV2 runs a resource action with parameters
|
||||
rpc RunResourceActionV2(ResourceActionRunRequestV2) returns (ApplicationResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applications/{name}/resource/actions/v2"
|
||||
post: "/v1/applications/{name}/resource/actions/v2"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// DeleteResource deletes a single application resource
|
||||
rpc DeleteResource(ApplicationResourceDeleteRequest) returns (ApplicationResponse) {
|
||||
option (google.api.http).delete = "/api/v1/applications/{name}/resource";
|
||||
option (google.api.http).delete = "/v1/applications/{name}/resource";
|
||||
}
|
||||
|
||||
// PodLogs returns stream of log entries for the specified pod. Pod
|
||||
rpc PodLogs(ApplicationPodLogsQuery) returns (stream LogEntry) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/applications/{name}/pods/{podName}/logs"
|
||||
get: "/v1/applications/{name}/pods/{podName}/logs"
|
||||
additional_bindings {
|
||||
get: "/api/v1/applications/{name}/logs"
|
||||
get: "/v1/applications/{name}/logs"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// ListLinks returns the list of all application deep links
|
||||
rpc ListLinks(ListAppLinksRequest) returns (LinksResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/links";
|
||||
option (google.api.http).get = "/v1/applications/{name}/links";
|
||||
}
|
||||
|
||||
// ListResourceLinks returns the list of all resource deep links
|
||||
rpc ListResourceLinks(ApplicationResourceRequest) returns (LinksResponse) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/resource/links";
|
||||
option (google.api.http).get = "/v1/applications/{name}/resource/links";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ func TestTerminalHandler_ServeHTTP_empty_params(t *testing.T) {
|
||||
paramsArray = append(paramsArray, key+"="+value)
|
||||
}
|
||||
paramsString := strings.Join(paramsArray, "&")
|
||||
request := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "https://cd.example.com/api/v1/terminal?"+paramsString, http.NoBody)
|
||||
request := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "https://cd.example.com/terminal?"+paramsString, http.NoBody)
|
||||
recorder := httptest.NewRecorder()
|
||||
handler.ServeHTTP(recorder, request)
|
||||
response := recorder.Result()
|
||||
@@ -332,7 +332,7 @@ func TestTerminalHandler_ServeHTTP_empty_params(t *testing.T) {
|
||||
|
||||
func TestTerminalHandler_ServeHTTP_disallowed_namespace(t *testing.T) {
|
||||
handler := terminalHandler{namespace: "cd", enabledNamespaces: []string{"allowed"}}
|
||||
request := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "https://cd.example.com/api/v1/terminal?pod=valid&container=valid&appName=valid&projectName=valid&namespace=test&appNamespace=disallowed", http.NoBody)
|
||||
request := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "https://cd.example.com/terminal?pod=valid&container=valid&appName=valid&projectName=valid&namespace=test&appNamespace=disallowed", http.NoBody)
|
||||
recorder := httptest.NewRecorder()
|
||||
handler.ServeHTTP(recorder, request)
|
||||
response := recorder.Result()
|
||||
|
||||
@@ -78,47 +78,47 @@ message ApplicationSetGenerateResponse {
|
||||
service ApplicationSetService {
|
||||
// Get returns an applicationset by name
|
||||
rpc Get (ApplicationSetGetQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSet) {
|
||||
option (google.api.http).get = "/api/v1/applicationsets/{name}";
|
||||
option (google.api.http).get = "/v1/applicationsets/{name}";
|
||||
}
|
||||
|
||||
// Generate generates
|
||||
rpc Generate (ApplicationSetGenerateRequest) returns (ApplicationSetGenerateResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applicationsets/generate"
|
||||
post: "/v1/applicationsets/generate"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
//List returns list of applicationset
|
||||
rpc List (ApplicationSetListQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSetList) {
|
||||
option (google.api.http).get = "/api/v1/applicationsets";
|
||||
option (google.api.http).get = "/v1/applicationsets";
|
||||
}
|
||||
|
||||
//Create creates an applicationset
|
||||
rpc Create (ApplicationSetCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSet) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/applicationsets"
|
||||
post: "/v1/applicationsets"
|
||||
body: "applicationset"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete deletes an application set
|
||||
rpc Delete(ApplicationSetDeleteRequest) returns (ApplicationSetResponse) {
|
||||
option (google.api.http).delete = "/api/v1/applicationsets/{name}";
|
||||
option (google.api.http).delete = "/v1/applicationsets/{name}";
|
||||
}
|
||||
|
||||
// ResourceTree returns resource tree
|
||||
rpc ResourceTree(ApplicationSetTreeQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSetTree) {
|
||||
option (google.api.http).get = "/api/v1/applicationsets/{name}/resource-tree";
|
||||
option (google.api.http).get = "/v1/applicationsets/{name}/resource-tree";
|
||||
}
|
||||
|
||||
// ListResourceEvents returns a list of event resources
|
||||
rpc ListResourceEvents(ApplicationSetGetQuery) returns (events.EventList) {
|
||||
option (google.api.http).get = "/api/v1/applicationsets/{name}/events";
|
||||
option (google.api.http).get = "/v1/applicationsets/{name}/events";
|
||||
}
|
||||
|
||||
rpc Watch (ApplicationSetWatchQuery) returns (stream github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ApplicationSetWatchEvent) {
|
||||
option (google.api.http).get = "/api/v1/stream/applicationsets";
|
||||
option (google.api.http).get = "/v1/stream/applicationsets";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
reqNs = h.namespace
|
||||
}
|
||||
|
||||
// Sample url: http://localhost:8080/api/badge?name=123
|
||||
// Sample url: http://localhost:8080/v1/badge?name=123
|
||||
if name, ok := r.URL.Query()["name"]; ok && enabled && !notFound {
|
||||
if !cd.IsValidAppName(name[0]) {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
@@ -141,7 +141,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
notFound = true
|
||||
}
|
||||
}
|
||||
// Sample url: http://localhost:8080/api/badge?project=default
|
||||
// Sample url: http://localhost:8080/v1/badge?project=default
|
||||
if projects, ok := r.URL.Query()["project"]; ok && enabled && !notFound {
|
||||
for _, p := range projects {
|
||||
if errs := validation.NameIsDNSLabel(strings.ToLower(p), false); p != "" && len(errs) != 0 {
|
||||
@@ -167,7 +167,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sample url: http://localhost:8080/api/badge?name=123&revision=true
|
||||
// Sample url: http://localhost:8080/v1/badge?name=123&revision=true
|
||||
if revisionParam, ok := r.URL.Query()["revision"]; ok && enabled && strings.EqualFold(revisionParam[0], "true") {
|
||||
revisionEnabled = true
|
||||
}
|
||||
|
||||
+29
-29
@@ -102,7 +102,7 @@ func TestHandlerFeatureIsEnabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp()), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -134,63 +134,63 @@ func TestHandlerFeatureProjectIsEnabled(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
createApplications([]string{"Healthy:Synced", "Healthy:Synced"}, []string{"default", "default"}, "test"),
|
||||
http.StatusOK, "/api/badge?project=default", "test", "Healthy", "Synced", Green, Green,
|
||||
http.StatusOK, "/v1/badge?project=default", "test", "Healthy", "Synced", Green, Green,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Healthy:Synced", "Healthy:OutOfSync"}, []string{"test-project", "test-project"}, "default"),
|
||||
http.StatusOK, "/api/badge?project=test-project", "default", "Healthy", "OutOfSync", Green, Orange,
|
||||
http.StatusOK, "/v1/badge?project=test-project", "default", "Healthy", "OutOfSync", Green, Orange,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Healthy:Synced", "Degraded:Synced"}, []string{"default", "default"}, "test"),
|
||||
http.StatusOK, "/api/badge?project=default", "test", "Degraded", "Synced", Red, Green,
|
||||
http.StatusOK, "/v1/badge?project=default", "test", "Degraded", "Synced", Red, Green,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Healthy:Synced", "Degraded:OutOfSync"}, []string{"test-project", "test-project"}, "default"),
|
||||
http.StatusOK, "/api/badge?project=test-project", "default", "Degraded", "OutOfSync", Red, Orange,
|
||||
http.StatusOK, "/v1/badge?project=test-project", "default", "Degraded", "OutOfSync", Red, Orange,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Healthy:Synced", "Healthy:Synced"}, []string{"test-project", "default"}, "test"),
|
||||
http.StatusOK, "/api/badge?project=default&project=test-project", "test", "Healthy", "Synced", Green, Green,
|
||||
http.StatusOK, "/v1/badge?project=default&project=test-project", "test", "Healthy", "Synced", Green, Green,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Healthy:OutOfSync", "Healthy:Synced"}, []string{"test-project", "default"}, "default"),
|
||||
http.StatusOK, "/api/badge?project=default&project=test-project", "default", "Healthy", "OutOfSync", Green, Orange,
|
||||
http.StatusOK, "/v1/badge?project=default&project=test-project", "default", "Healthy", "OutOfSync", Green, Orange,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Degraded:Synced", "Healthy:Synced"}, []string{"test-project", "default"}, "test"),
|
||||
http.StatusOK, "/api/badge?project=default&project=test-project", "test", "Degraded", "Synced", Red, Green,
|
||||
http.StatusOK, "/v1/badge?project=default&project=test-project", "test", "Degraded", "Synced", Red, Green,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Degraded:OutOfSync", "Healthy:OutOfSync"}, []string{"test-project", "default"}, "default"),
|
||||
http.StatusOK, "/api/badge?project=default&project=test-project", "default", "Degraded", "OutOfSync", Red, Orange,
|
||||
http.StatusOK, "/v1/badge?project=default&project=test-project", "default", "Degraded", "OutOfSync", Red, Orange,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Unknown:Unknown", "Unknown:Unknown"}, []string{"test-project", "default"}, "default"),
|
||||
http.StatusOK, "/api/badge?project=", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
http.StatusOK, "/v1/badge?project=", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Unknown:Unknown", "Unknown:Unknown"}, []string{"test-project", "default"}, "default"),
|
||||
http.StatusBadRequest, "/api/badge?project=test$project", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
http.StatusBadRequest, "/v1/badge?project=test$project", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Unknown:Unknown", "Unknown:Unknown"}, []string{"test-project", "default"}, "default"),
|
||||
http.StatusOK, "/api/badge?project=unknown", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
http.StatusOK, "/v1/badge?project=unknown", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Unknown:Unknown", "Unknown:Unknown"}, []string{"test-project", "default"}, "default"),
|
||||
http.StatusBadRequest, "/api/badge?name=foo_bar", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
http.StatusBadRequest, "/v1/badge?name=foo_bar", "default", "Unknown", "Unknown", Purple, Purple,
|
||||
},
|
||||
{
|
||||
createApplications([]string{"Unknown:Unknown", "Unknown:Unknown"}, []string{"test-project", "default"}, "default"),
|
||||
http.StatusOK, "/api/badge?name=foobar", "default", "Not Found", "", Purple, Purple,
|
||||
http.StatusOK, "/v1/badge?name=foobar", "default", "Not Found", "", Purple, Purple,
|
||||
},
|
||||
{
|
||||
createApplicationsWithName([]string{"Healthy:Synced"}, []string{"default"}, "test", "test.application"),
|
||||
http.StatusOK, "/api/badge?name=test.application-0", "test", "Healthy", "Synced", Green, Green,
|
||||
http.StatusOK, "/v1/badge?name=test.application-0", "test", "Healthy", "Synced", Green, Green,
|
||||
},
|
||||
{
|
||||
createApplicationsWithName([]string{"Healthy:Synced"}, []string{"default"}, "test", "test.invalid_name"),
|
||||
http.StatusBadRequest, "/api/badge?name=test.invalid_name-0", "test", "Healthy", "Synced", Green, Green,
|
||||
http.StatusBadRequest, "/v1/badge?name=test.invalid_name-0", "test", "Healthy", "Synced", Green, Green,
|
||||
},
|
||||
}
|
||||
for _, tt := range projectTests {
|
||||
@@ -230,7 +230,7 @@ func TestHandlerNamespacesIsEnabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp2()), settingsMgr, "default", []string{"cd-test"})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&namespace=cd-test", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&namespace=cd-test", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -252,7 +252,7 @@ func TestHandlerNamespacesIsEnabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp2()), settingsMgr, "default", []string{"cd-test"})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&namespace=kube-system", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&namespace=kube-system", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -270,7 +270,7 @@ func TestHandlerNamespacesIsEnabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp2()), settingsMgr, "default", []string{"cd-test"})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&namespace=kube()system", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&namespace=kube()system", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -284,7 +284,7 @@ func TestHandlerFeatureIsEnabledKeepFullRevisionIsEnabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp3()), settingsMgr, "cd-test", []string{""})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&revision=true&keepFullRevision=true", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&revision=true&keepFullRevision=true", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -306,7 +306,7 @@ func TestHandlerFeatureIsEnabledKeepFullRevisionIsDisabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp3()), settingsMgr, "cd-test", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&revision=true&keepFullRevision=false", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&revision=true&keepFullRevision=false", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -328,7 +328,7 @@ func TestHandlerFeatureIsEnabledKeepFullRevisionAndWidthIsEnabled(t *testing.T)
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp3()), settingsMgr, "cd-test", []string{""})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&revision=true&keepFullRevision=true&width=500", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&revision=true&keepFullRevision=true&width=500", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -403,7 +403,7 @@ func TestHandlerFeatureIsEnabledRevisionIsEnabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp()), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&revision=true", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&revision=true", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -428,7 +428,7 @@ func TestHandlerRevisionIsEnabledNoOperationState(t *testing.T) {
|
||||
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(app), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&revision=true", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&revision=true", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -453,7 +453,7 @@ func TestHandlerRevisionIsEnabledShortCommitSHA(t *testing.T) {
|
||||
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(app), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&revision=true", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&revision=true", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -471,7 +471,7 @@ func TestHandlerRevisionIsEnabledMultipleSources(t *testing.T) {
|
||||
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(app), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&revision=true", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&revision=true", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -489,7 +489,7 @@ func TestHandlerFeatureIsDisabled(t *testing.T) {
|
||||
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewSimpleClientset(argoCDCmDisabled, argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp()), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -511,7 +511,7 @@ func TestHandlerApplicationNameInBadgeIsEnabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewSimpleClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp()), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app&showAppName=true", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app&showAppName=true", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
@@ -539,7 +539,7 @@ func TestHandlerApplicationNameInBadgeIsDisabled(t *testing.T) {
|
||||
t.Parallel()
|
||||
settingsMgr := settings.NewSettingsManager(t.Context(), fake.NewSimpleClientset(argoCDCm(), argoCDSecret()), "default")
|
||||
handler := NewHandler(appclientset.NewSimpleClientset(testApp()), settingsMgr, "default", []string{})
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/api/badge?name=test-app", http.NoBody)
|
||||
req, err := http.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/badge?name=test-app", http.NoBody)
|
||||
require.NoError(t, err)
|
||||
|
||||
rr := httptest.NewRecorder()
|
||||
|
||||
@@ -33,19 +33,19 @@ message RepositoryCertificateResponse {}
|
||||
service CertificateService {
|
||||
// List all available repository certificates
|
||||
rpc ListCertificates(RepositoryCertificateQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryCertificateList) {
|
||||
option (google.api.http).get = "/api/v1/certificates";
|
||||
option (google.api.http).get = "/v1/certificates";
|
||||
}
|
||||
|
||||
// Creates repository certificates on the server
|
||||
rpc CreateCertificate(RepositoryCertificateCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryCertificateList) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/certificates"
|
||||
post: "/v1/certificates"
|
||||
body: "certificates"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete the certificates that match the RepositoryCertificateQuery
|
||||
rpc DeleteCertificate(RepositoryCertificateQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryCertificateList) {
|
||||
option (google.api.http).delete = "/api/v1/certificates";
|
||||
option (google.api.http).delete = "/v1/certificates";
|
||||
}
|
||||
}
|
||||
@@ -42,42 +42,42 @@ service ClusterService {
|
||||
|
||||
// List returns list of clusters
|
||||
rpc List(ClusterQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.ClusterList) {
|
||||
option (google.api.http).get = "/api/v1/clusters";
|
||||
option (google.api.http).get = "/v1/clusters";
|
||||
}
|
||||
|
||||
// Create creates a cluster
|
||||
rpc Create(ClusterCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Cluster) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/clusters"
|
||||
post: "/v1/clusters"
|
||||
body: "cluster"
|
||||
};
|
||||
}
|
||||
|
||||
// Get returns a cluster by server address
|
||||
rpc Get(ClusterQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Cluster) {
|
||||
option (google.api.http).get = "/api/v1/clusters/{id.value}";
|
||||
option (google.api.http).get = "/v1/clusters/{id.value}";
|
||||
}
|
||||
|
||||
// Update updates a cluster
|
||||
rpc Update(ClusterUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Cluster) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/clusters/{id.value}"
|
||||
put: "/v1/clusters/{id.value}"
|
||||
body: "cluster"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete deletes a cluster
|
||||
rpc Delete(ClusterQuery) returns (ClusterResponse) {
|
||||
option (google.api.http).delete = "/api/v1/clusters/{id.value}";
|
||||
option (google.api.http).delete = "/v1/clusters/{id.value}";
|
||||
}
|
||||
|
||||
// RotateAuth rotates the bearer token used for a cluster
|
||||
rpc RotateAuth(ClusterQuery) returns (ClusterResponse) {
|
||||
option (google.api.http).post = "/api/v1/clusters/{id.value}/rotate-auth";
|
||||
option (google.api.http).post = "/v1/clusters/{id.value}/rotate-auth";
|
||||
}
|
||||
|
||||
// InvalidateCache invalidates cluster cache
|
||||
rpc InvalidateCache(ClusterQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Cluster) {
|
||||
option (google.api.http).post = "/api/v1/clusters/{id.value}/invalidate-cache";
|
||||
option (google.api.http).post = "/v1/clusters/{id.value}/invalidate-cache";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,24 +38,24 @@ message GnuPGPublicKeyResponse {}
|
||||
service GPGKeyService {
|
||||
// List all available repository certificates
|
||||
rpc List(GnuPGPublicKeyQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.GnuPGPublicKeyList) {
|
||||
option (google.api.http).get = "/api/v1/gpgkeys";
|
||||
option (google.api.http).get = "/v1/gpgkeys";
|
||||
}
|
||||
|
||||
// Get information about specified GPG public key from the server
|
||||
rpc Get(GnuPGPublicKeyQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.GnuPGPublicKey) {
|
||||
option (google.api.http).get = "/api/v1/gpgkeys/{keyID}";
|
||||
option (google.api.http).get = "/v1/gpgkeys/{keyID}";
|
||||
}
|
||||
|
||||
// Create one or more GPG public keys in the server's configuration
|
||||
rpc Create(GnuPGPublicKeyCreateRequest) returns (GnuPGPublicKeyCreateResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/gpgkeys"
|
||||
post: "/v1/gpgkeys"
|
||||
body: "publickey"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete specified GPG public key from the server's configuration
|
||||
rpc Delete(GnuPGPublicKeyQuery) returns (GnuPGPublicKeyResponse) {
|
||||
option (google.api.http).delete = "/api/v1/gpgkeys";
|
||||
option (google.api.http).delete = "/v1/gpgkeys";
|
||||
}
|
||||
}
|
||||
@@ -80,70 +80,70 @@ service ProjectService {
|
||||
// Create a new project token
|
||||
rpc CreateToken(ProjectTokenCreateRequest) returns (ProjectTokenResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/projects/{project}/roles/{role}/token"
|
||||
post: "/v1/projects/{project}/roles/{role}/token"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete a new project token
|
||||
rpc DeleteToken(ProjectTokenDeleteRequest) returns (EmptyResponse) {
|
||||
option (google.api.http).delete = "/api/v1/projects/{project}/roles/{role}/token/{iat}";
|
||||
option (google.api.http).delete = "/v1/projects/{project}/roles/{role}/token/{iat}";
|
||||
}
|
||||
|
||||
// Create a new project
|
||||
rpc Create(ProjectCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.AppProject) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/projects"
|
||||
post: "/v1/projects"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// List returns list of projects
|
||||
rpc List(ProjectQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.AppProjectList) {
|
||||
option (google.api.http).get = "/api/v1/projects";
|
||||
option (google.api.http).get = "/v1/projects";
|
||||
}
|
||||
|
||||
// GetDetailedProject returns a project that include project, global project and scoped resources by name
|
||||
rpc GetDetailedProject(ProjectQuery) returns (DetailedProjectsResponse) {
|
||||
option (google.api.http).get = "/api/v1/projects/{name}/detailed";
|
||||
option (google.api.http).get = "/v1/projects/{name}/detailed";
|
||||
}
|
||||
|
||||
// Get returns a project by name
|
||||
rpc Get(ProjectQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.AppProject) {
|
||||
option (google.api.http).get = "/api/v1/projects/{name}";
|
||||
option (google.api.http).get = "/v1/projects/{name}";
|
||||
}
|
||||
|
||||
// Get returns a virtual project by name
|
||||
rpc GetGlobalProjects(ProjectQuery) returns (GlobalProjectsResponse) {
|
||||
option (google.api.http).get = "/api/v1/projects/{name}/globalprojects";
|
||||
option (google.api.http).get = "/v1/projects/{name}/globalprojects";
|
||||
}
|
||||
|
||||
// Update updates a project
|
||||
rpc Update(ProjectUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.AppProject) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/projects/{project.metadata.name}"
|
||||
put: "/v1/projects/{project.metadata.name}"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete deletes a project
|
||||
rpc Delete(ProjectQuery) returns (EmptyResponse) {
|
||||
option (google.api.http).delete = "/api/v1/projects/{name}";
|
||||
option (google.api.http).delete = "/v1/projects/{name}";
|
||||
}
|
||||
|
||||
// ListEvents returns a list of project events
|
||||
rpc ListEvents(ProjectQuery) returns (events.EventList) {
|
||||
option (google.api.http).get = "/api/v1/projects/{name}/events";
|
||||
option (google.api.http).get = "/v1/projects/{name}/events";
|
||||
}
|
||||
|
||||
// GetSchedulesState returns true if there are any active sync syncWindows
|
||||
rpc GetSyncWindowsState(SyncWindowsQuery) returns (SyncWindowsResponse) {
|
||||
option (google.api.http).get = "/api/v1/projects/{name}/syncwindows";
|
||||
option (google.api.http).get = "/v1/projects/{name}/syncwindows";
|
||||
}
|
||||
|
||||
// ListLinks returns all deep links for the particular project
|
||||
rpc ListLinks(ListProjectLinksRequest) returns (application.LinksResponse) {
|
||||
option (google.api.http).get = "/api/v1/projects/{name}/links";
|
||||
option (google.api.http).get = "/v1/projects/{name}/links";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -40,18 +40,18 @@ service RepoCredsService {
|
||||
|
||||
// ListRepositoryCredentials gets a list of all configured repository credential sets
|
||||
rpc ListRepositoryCredentials(RepoCredsQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepoCredsList) {
|
||||
option (google.api.http).get = "/api/v1/repocreds";
|
||||
option (google.api.http).get = "/v1/repocreds";
|
||||
}
|
||||
|
||||
//ListWriteRepositoryCredentials gets a list of all configured repository credential sets that have write access
|
||||
rpc ListWriteRepositoryCredentials(RepoCredsQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepoCredsList) {
|
||||
option (google.api.http).get = "/api/v1/write-repocreds";
|
||||
option (google.api.http).get = "/v1/write-repocreds";
|
||||
}
|
||||
|
||||
// CreateRepositoryCredentials creates a new repository credential set
|
||||
rpc CreateRepositoryCredentials(RepoCredsCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepoCreds) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/repocreds"
|
||||
post: "/v1/repocreds"
|
||||
body: "creds"
|
||||
};
|
||||
}
|
||||
@@ -59,7 +59,7 @@ service RepoCredsService {
|
||||
// CreateWriteRepositoryCredentials creates a new repository credential set with write access
|
||||
rpc CreateWriteRepositoryCredentials(RepoCredsCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepoCreds) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/write-repocreds"
|
||||
post: "/v1/write-repocreds"
|
||||
body: "creds"
|
||||
};
|
||||
}
|
||||
@@ -67,7 +67,7 @@ service RepoCredsService {
|
||||
// UpdateRepositoryCredentials updates a repository credential set
|
||||
rpc UpdateRepositoryCredentials(RepoCredsUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepoCreds) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/repocreds/{creds.url}"
|
||||
put: "/v1/repocreds/{creds.url}"
|
||||
body: "creds"
|
||||
};
|
||||
}
|
||||
@@ -75,18 +75,18 @@ service RepoCredsService {
|
||||
// UpdateWriteRepositoryCredentials updates a repository credential set with write access
|
||||
rpc UpdateWriteRepositoryCredentials(RepoCredsUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepoCreds) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/write-repocreds/{creds.url}"
|
||||
put: "/v1/write-repocreds/{creds.url}"
|
||||
body: "creds"
|
||||
};
|
||||
}
|
||||
|
||||
// DeleteRepositoryCredentials deletes a repository credential set from the configuration
|
||||
rpc DeleteRepositoryCredentials(RepoCredsDeleteRequest) returns (RepoCredsResponse) {
|
||||
option (google.api.http).delete = "/api/v1/repocreds/{url}";
|
||||
option (google.api.http).delete = "/v1/repocreds/{url}";
|
||||
}
|
||||
|
||||
// DeleteWriteRepositoryCredentials deletes a repository credential set with write access from the configuration
|
||||
rpc DeleteWriteRepositoryCredentials(RepoCredsDeleteRequest) returns (RepoCredsResponse) {
|
||||
option (google.api.http).delete = "/api/v1/write-repocreds/{url}";
|
||||
option (google.api.http).delete = "/v1/write-repocreds/{url}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,60 +126,60 @@ service RepositoryService {
|
||||
|
||||
// List returns list of repos or repository credentials
|
||||
rpc List(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryList) {
|
||||
option (google.api.http).get = "/api/v1/repositories";
|
||||
option (google.api.http).get = "/v1/repositories";
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
// Get returns a repository or its credentials
|
||||
rpc Get(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http).get = "/api/v1/repositories/{repo}";
|
||||
option (google.api.http).get = "/v1/repositories/{repo}";
|
||||
}
|
||||
|
||||
// GetWrite returns a repository or its write credentials
|
||||
rpc GetWrite(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http).get = "/api/v1/write-repositories/{repo}";
|
||||
option (google.api.http).get = "/v1/write-repositories/{repo}";
|
||||
}
|
||||
|
||||
// ListRepositories gets a list of all configured repositories
|
||||
rpc ListRepositories(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryList) {
|
||||
option (google.api.http).get = "/api/v1/repositories";
|
||||
option (google.api.http).get = "/v1/repositories";
|
||||
}
|
||||
|
||||
// ListWriteRepositories gets a list of all configured write repositories
|
||||
rpc ListWriteRepositories(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryList) {
|
||||
option (google.api.http).get = "/api/v1/write-repositories";
|
||||
option (google.api.http).get = "/v1/write-repositories";
|
||||
}
|
||||
|
||||
rpc ListRefs(RepoQuery) returns (Refs) {
|
||||
option (google.api.http).get = "/api/v1/repositories/{repo}/refs";
|
||||
option (google.api.http).get = "/v1/repositories/{repo}/refs";
|
||||
}
|
||||
|
||||
rpc ListOCITags(RepoQuery) returns (Refs) {
|
||||
option (google.api.http).get = "/api/v1/repositories/{repo}/oci-tags";
|
||||
option (google.api.http).get = "/v1/repositories/{repo}/oci-tags";
|
||||
}
|
||||
|
||||
// ListApps returns list of apps in the repo
|
||||
rpc ListApps(RepoAppsQuery) returns (RepoAppsResponse) {
|
||||
option (google.api.http).get = "/api/v1/repositories/{repo}/apps";
|
||||
option (google.api.http).get = "/v1/repositories/{repo}/apps";
|
||||
}
|
||||
|
||||
// GetAppDetails returns application details by given path
|
||||
rpc GetAppDetails(RepoAppDetailsQuery) returns (repository.RepoAppDetailsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/repositories/{source.repoURL}/appdetails"
|
||||
post: "/v1/repositories/{source.repoURL}/appdetails"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// GetHelmCharts returns list of helm charts in the specified repository
|
||||
rpc GetHelmCharts(RepoQuery) returns (repository.HelmChartsResponse) {
|
||||
option (google.api.http).get = "/api/v1/repositories/{repo}/helmcharts";
|
||||
option (google.api.http).get = "/v1/repositories/{repo}/helmcharts";
|
||||
}
|
||||
|
||||
// Create creates a repo or a repo credential set
|
||||
rpc Create(RepoCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/repositories"
|
||||
post: "/v1/repositories"
|
||||
body: "repo"
|
||||
};
|
||||
option deprecated = true;
|
||||
@@ -188,7 +188,7 @@ service RepositoryService {
|
||||
// CreateRepository creates a new repository configuration
|
||||
rpc CreateRepository(RepoCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/repositories"
|
||||
post: "/v1/repositories"
|
||||
body: "repo"
|
||||
};
|
||||
}
|
||||
@@ -196,7 +196,7 @@ service RepositoryService {
|
||||
// CreateWriteRepository creates a new write repository configuration
|
||||
rpc CreateWriteRepository(RepoCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/write-repositories"
|
||||
post: "/v1/write-repositories"
|
||||
body: "repo"
|
||||
};
|
||||
}
|
||||
@@ -204,7 +204,7 @@ service RepositoryService {
|
||||
// Update updates a repo or repo credential set
|
||||
rpc Update(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/repositories/{repo.repo}"
|
||||
put: "/v1/repositories/{repo.repo}"
|
||||
body: "repo"
|
||||
};
|
||||
option deprecated = true;
|
||||
@@ -213,7 +213,7 @@ service RepositoryService {
|
||||
// UpdateRepository updates a repository configuration
|
||||
rpc UpdateRepository(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/repositories/{repo.repo}"
|
||||
put: "/v1/repositories/{repo.repo}"
|
||||
body: "repo"
|
||||
};
|
||||
}
|
||||
@@ -221,31 +221,31 @@ service RepositoryService {
|
||||
// UpdateWriteRepository updates a write repository configuration
|
||||
rpc UpdateWriteRepository(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/write-repositories/{repo.repo}"
|
||||
put: "/v1/write-repositories/{repo.repo}"
|
||||
body: "repo"
|
||||
};
|
||||
}
|
||||
|
||||
// Delete deletes a repository from the configuration
|
||||
rpc Delete(RepoQuery) returns (RepoResponse) {
|
||||
option (google.api.http).delete = "/api/v1/repositories/{repo}";
|
||||
option (google.api.http).delete = "/v1/repositories/{repo}";
|
||||
option deprecated = true;
|
||||
}
|
||||
|
||||
// DeleteRepository deletes a repository from the configuration
|
||||
rpc DeleteRepository(RepoQuery) returns (RepoResponse) {
|
||||
option (google.api.http).delete = "/api/v1/repositories/{repo}";
|
||||
option (google.api.http).delete = "/v1/repositories/{repo}";
|
||||
}
|
||||
|
||||
// DeleteWriteRepository deletes a write repository from the configuration
|
||||
rpc DeleteWriteRepository(RepoQuery) returns (RepoResponse) {
|
||||
option (google.api.http).delete = "/api/v1/write-repositories/{repo}";
|
||||
option (google.api.http).delete = "/v1/write-repositories/{repo}";
|
||||
}
|
||||
|
||||
// ValidateAccess validates access to a repository with given parameters
|
||||
rpc ValidateAccess(RepoAccessQuery) returns (RepoResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/repositories/{repo}/validate"
|
||||
post: "/v1/repositories/{repo}/validate"
|
||||
body: "repo"
|
||||
};
|
||||
}
|
||||
@@ -253,7 +253,7 @@ service RepositoryService {
|
||||
// ValidateWriteAccess validates write access to a repository with given parameters
|
||||
rpc ValidateWriteAccess(RepoAccessQuery) returns (RepoResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/write-repositories/{repo}/validate"
|
||||
post: "/v1/write-repositories/{repo}/validate"
|
||||
body: "repo"
|
||||
};
|
||||
}
|
||||
|
||||
+9
-9
@@ -1153,7 +1153,7 @@ func (server *ArgoCDServer) newHTTPServer(ctx context.Context, port int, grpcWeb
|
||||
Handler: &handlerSwitcher{
|
||||
handler: mux,
|
||||
urlToHandler: map[string]http.Handler{
|
||||
"/api/badge": otelhttp.NewHandler(badge.NewHandler(server.AppClientset, server.settingsMgr, server.Namespace, server.ApplicationNamespaces), "server.ArgoCDServer/badge"),
|
||||
"/v1/badge": otelhttp.NewHandler(badge.NewHandler(server.AppClientset, server.settingsMgr, server.Namespace, server.ApplicationNamespaces), "server.ArgoCDServer/badge"),
|
||||
common.LogoutEndpoint: otelhttp.NewHandler(logout.NewHandler(server.settingsMgr, server.sessionMgr, server.RootPath, server.BaseHRef), "server.ArgoCDServer/logout"),
|
||||
},
|
||||
contentTypeToHandler: map[string]http.Handler{
|
||||
@@ -1192,7 +1192,7 @@ func (server *ArgoCDServer) newHTTPServer(ctx context.Context, port int, grpcWeb
|
||||
} else {
|
||||
log.WithField(common.SecurityField, common.SecurityHigh).Warnf("Content-Type enforcement is disabled, which may make your API vulnerable to CSRF attacks")
|
||||
}
|
||||
mux.Handle("/api/", handler)
|
||||
mux.Handle("/v1/", handler)
|
||||
|
||||
terminalOpts := application.TerminalOptions{DisableAuth: server.DisableAuth, Enf: server.enf}
|
||||
|
||||
@@ -1234,7 +1234,7 @@ func (server *ArgoCDServer) newHTTPServer(ctx context.Context, port int, grpcWeb
|
||||
argoDB := db.NewDB(server.Namespace, server.settingsMgr, server.KubeClientset)
|
||||
acdWebhookHandler := webhook.NewHandler(server.Namespace, server.ApplicationNamespaces, server.WebhookParallelism, server.WebhookRefreshWorkers, server.AppClientset, server.appLister, server.settings, server.settingsMgr, server.RepoServerCache, server.Cache, argoDB, server.settingsMgr.GetMaxWebhookPayloadSize(), server.settingsMgr.GetWebhookRefreshJitter(), server.settingsMgr.GetWebhookRefreshJitterThreshold())
|
||||
|
||||
mux.HandleFunc("/api/webhook", acdWebhookHandler.Handler)
|
||||
mux.HandleFunc("/v1/webhook", acdWebhookHandler.Handler)
|
||||
|
||||
// Serve cli binaries directly from API server
|
||||
registerDownloadHandlers(mux, "/download")
|
||||
@@ -1342,7 +1342,7 @@ func (server *ArgoCDServer) registerDexHandlers(mux *http.ServeMux) {
|
||||
if !server.settings.IsSSOConfigured() {
|
||||
return
|
||||
}
|
||||
// Run dex OpenID Connect Identity Provider behind a reverse proxy (served at /api/dex)
|
||||
// Run dex OpenID Connect Identity Provider behind a reverse proxy (served at /v1/dex)
|
||||
mux.Handle(common.DexAPIEndpoint+"/", otelhttp.NewHandler(http.HandlerFunc(dexutil.NewDexHTTPReverseProxy(server.DexServerAddr, server.BaseHRef, server.DexTLSConfig)), "server.dex/Proxy"))
|
||||
|
||||
mux.Handle(common.LoginEndpoint, otelhttp.NewHandler(http.HandlerFunc(server.ssoClientApp.HandleLogin), "server.ClientApp/HandleLogin"))
|
||||
@@ -1670,11 +1670,11 @@ type bug21955Workaround struct {
|
||||
}
|
||||
|
||||
var pathPatters = []*regexp.Regexp{
|
||||
regexp.MustCompile(`/api/v1/clusters/[^/]+`),
|
||||
regexp.MustCompile(`/api/v1/repositories/[^/]+`),
|
||||
regexp.MustCompile(`/api/v1/repocreds/[^/]+`),
|
||||
regexp.MustCompile(`/api/v1/repositories/[^/]+/apps`),
|
||||
regexp.MustCompile(`/api/v1/repositories/[^/]+/apps/[^/]+`),
|
||||
regexp.MustCompile(`/v1/clusters/[^/]+`),
|
||||
regexp.MustCompile(`/v1/repositories/[^/]+`),
|
||||
regexp.MustCompile(`/v1/repocreds/[^/]+`),
|
||||
regexp.MustCompile(`/v1/repositories/[^/]+/apps`),
|
||||
regexp.MustCompile(`/v1/repositories/[^/]+/apps/[^/]+`),
|
||||
regexp.MustCompile(`/settings/clusters/[^/]+`),
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -646,15 +646,15 @@ func dexMockHandler(t *testing.T, url string) func(http.ResponseWriter, *http.Re
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
switch r.RequestURI {
|
||||
case "/api/dex/.well-known/openid-configuration":
|
||||
case "/v1/dex/.well-known/openid-configuration":
|
||||
_, err := fmt.Fprintf(w, `
|
||||
{
|
||||
"issuer": "%[1]s/api/dex",
|
||||
"authorization_endpoint": "%[1]s/api/dex/auth",
|
||||
"token_endpoint": "%[1]s/api/dex/token",
|
||||
"jwks_uri": "%[1]s/api/dex/keys",
|
||||
"userinfo_endpoint": "%[1]s/api/dex/userinfo",
|
||||
"device_authorization_endpoint": "%[1]s/api/dex/device/code",
|
||||
"issuer": "%[1]s/v1/dex",
|
||||
"authorization_endpoint": "%[1]s/v1/dex/auth",
|
||||
"token_endpoint": "%[1]s/v1/dex/token",
|
||||
"jwks_uri": "%[1]s/v1/dex/keys",
|
||||
"userinfo_endpoint": "%[1]s/v1/dex/userinfo",
|
||||
"device_authorization_endpoint": "%[1]s/v1/dex/device/code",
|
||||
"grant_types_supported": [
|
||||
"authorization_code",
|
||||
"refresh_token",
|
||||
@@ -701,7 +701,7 @@ func dexMockHandler(t *testing.T, url string) func(http.ResponseWriter, *http.Re
|
||||
if err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
case "/api/dex/keys":
|
||||
case "/v1/dex/keys":
|
||||
pubKey, err := jwt.ParseRSAPublicKeyFromPEM(testutil.Cert)
|
||||
require.NoError(t, err)
|
||||
jwks := jose.JSONWebKeySet{
|
||||
@@ -1089,7 +1089,7 @@ func TestAuthenticate_3rd_party_JWTs(t *testing.T) {
|
||||
cd, oidcURL := getTestServer(t, testDataCopy.anonymousEnabled, true, testDataCopy.useDex, settings_util.OIDCConfig{})
|
||||
|
||||
if testDataCopy.useDex {
|
||||
testDataCopy.claims.Issuer = oidcURL + "/api/dex"
|
||||
testDataCopy.claims.Issuer = oidcURL + "/v1/dex"
|
||||
} else {
|
||||
testDataCopy.claims.Issuer = oidcURL
|
||||
}
|
||||
@@ -1210,7 +1210,7 @@ func TestAuthenticate_no_SSO(t *testing.T) {
|
||||
ctx := t.Context() //nolint:ineffassign,staticcheck
|
||||
|
||||
cd, dexURL := getTestServer(t, testDataCopy.anonymousEnabled, false, true, settings_util.OIDCConfig{})
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.RegisteredClaims{Issuer: dexURL + "/api/dex"})
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.RegisteredClaims{Issuer: dexURL + "/v1/dex"})
|
||||
tokenString, err := token.SignedString([]byte("key"))
|
||||
require.NoError(t, err)
|
||||
ctx = metadata.NewIncomingContext(t.Context(), metadata.Pairs(apiclient.MetaDataTokenKey, tokenString))
|
||||
|
||||
@@ -40,13 +40,13 @@ service SessionService {
|
||||
|
||||
// Get the current user's info
|
||||
rpc GetUserInfo (GetUserInfoRequest) returns (GetUserInfoResponse) {
|
||||
option (google.api.http).get = "/api/v1/session/userinfo";
|
||||
option (google.api.http).get = "/v1/session/userinfo";
|
||||
}
|
||||
|
||||
// Create a new JWT for authentication and set a cookie if using HTTP
|
||||
rpc Create(SessionCreateRequest) returns (SessionResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/session"
|
||||
post: "/v1/session"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
@@ -54,7 +54,7 @@ service SessionService {
|
||||
// Delete an existing JWT cookie if using HTTP
|
||||
rpc Delete(SessionDeleteRequest) returns (SessionResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/api/v1/session"
|
||||
delete: "/v1/session"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,11 +99,11 @@ service SettingsService {
|
||||
|
||||
// Get returns Hanzo CD settings
|
||||
rpc Get(SettingsQuery) returns (Settings) {
|
||||
option (google.api.http).get = "/api/v1/settings";
|
||||
option (google.api.http).get = "/v1/settings";
|
||||
}
|
||||
|
||||
// Get returns Hanzo CD plugins
|
||||
rpc GetPlugins(SettingsQuery) returns (SettingsPluginsResponse) {
|
||||
option (google.api.http).get = "/api/v1/settings/plugins";
|
||||
option (google.api.http).get = "/v1/settings/plugins";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ service VersionService {
|
||||
// Version returns version information of the API server
|
||||
rpc Version(google.protobuf.Empty) returns (VersionMessage) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/version"
|
||||
get: "/v1/version"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,14 @@ export const BadgePanel = ({app, project, appNamespace, nsEnabled}: {app?: strin
|
||||
let entityURL = '';
|
||||
let alt = '';
|
||||
if (app) {
|
||||
badgeURL = `${root}api/badge?name=${app}&revision=true&showAppName=true`;
|
||||
badgeURL = `${root}v1/badge?name=${app}&revision=true&showAppName=true`;
|
||||
if (nsEnabled) {
|
||||
badgeURL += `&namespace=${appNamespace}`;
|
||||
}
|
||||
entityURL = `${root}applications/${app}`;
|
||||
alt = 'App Status';
|
||||
} else if (project) {
|
||||
badgeURL = `${root}api/badge?project=${project}&revision=true`;
|
||||
badgeURL = `${root}v1/badge?project=${project}&revision=true`;
|
||||
entityURL = `${root}projects/${project}`;
|
||||
alt = 'Project Status';
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ export class ApplicationsService {
|
||||
): string {
|
||||
const search = this.getLogsQuery({namespace, appNamespace, podName, resource, containerName, follow: false, previous});
|
||||
search.set('download', 'true');
|
||||
return `api/v1/applications/${applicationName}/logs?${search.toString()}`;
|
||||
return `v1/applications/${applicationName}/logs?${search.toString()}`;
|
||||
}
|
||||
|
||||
public getContainerLogs(query: {
|
||||
|
||||
@@ -31,7 +31,7 @@ function toAbsURL(val: string): string {
|
||||
}
|
||||
|
||||
function apiRoot(): string {
|
||||
return toAbsURL('/api/v1');
|
||||
return toAbsURL('/v1');
|
||||
}
|
||||
|
||||
function initHandlers(req: agent.Request) {
|
||||
|
||||
@@ -3,6 +3,6 @@ import requests from './requests';
|
||||
|
||||
export class VersionService {
|
||||
public version(): Promise<VersionMessage> {
|
||||
return requests.agent.get(requests.toAbsURL('/api/version')).then(res => res.body as VersionMessage);
|
||||
return requests.agent.get(requests.toAbsURL('/v1/version')).then(res => res.body as VersionMessage);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -49,8 +49,8 @@ func TLSConfig(tlsConfig *DexTLSConfig) *tls.Config {
|
||||
|
||||
// NewDexHTTPReverseProxy returns a reverse proxy to the Dex server. Dex is assumed to be configured
|
||||
// with the external issuer URL muxed to the same path configured in server.go. In other words, if
|
||||
// Hanzo CD API server wants to proxy requests at /api/dex, then the dex config yaml issuer URL should
|
||||
// also be /api/dex (e.g. issuer: https://cd.example.com/api/dex)
|
||||
// Hanzo CD API server wants to proxy requests at /v1/dex, then the dex config yaml issuer URL should
|
||||
// also be /v1/dex (e.g. issuer: https://cd.example.com/v1/dex)
|
||||
func NewDexHTTPReverseProxy(serverAddr string, baseHRef string, tlsConfig *DexTLSConfig) func(writer http.ResponseWriter, request *http.Request) {
|
||||
fullAddr := DexServerAddressWithProtocol(serverAddr, tlsConfig)
|
||||
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ type ClientApp struct {
|
||||
useAzureWorkloadIdentity bool
|
||||
// Callback URL for OAuth2 responses (e.g. https://cd.example.com/auth/callback)
|
||||
redirectURI string
|
||||
// URL of the issuer (e.g. https://cd.example.com/api/dex)
|
||||
// URL of the issuer (e.g. https://cd.example.com/v1/dex)
|
||||
issuerURL string
|
||||
// The URL endpoint at which the Hanzo CD server is accessed.
|
||||
baseHRef string
|
||||
|
||||
@@ -64,7 +64,7 @@ func (p *providerImpl) provider() (*gooidc.Provider, error) {
|
||||
}
|
||||
|
||||
// newGoOIDCProvider creates a new instance of go-oidc.Provider querying the well known oidc
|
||||
// configuration path (http://example-cd.com/api/dex/.well-known/openid-configuration)
|
||||
// configuration path (http://example-cd.com/v1/dex/.well-known/openid-configuration)
|
||||
func (p *providerImpl) newGoOIDCProvider() (*gooidc.Provider, error) {
|
||||
log.Infof("Initializing OIDC provider (issuer: %s)", p.issuerURL)
|
||||
ctx := gooidc.ClientContext(context.Background(), p.client)
|
||||
|
||||
@@ -836,7 +836,7 @@ rootCA: |
|
||||
mgr.verificationDelayNoiseEnabled = false
|
||||
|
||||
claims := jwt.RegisteredClaims{Audience: jwt.ClaimStrings{"test-client"}, Subject: "admin", ExpiresAt: jwt.NewNumericDate(time.Now().Add(time.Hour * 24))}
|
||||
claims.Issuer = dexTestServer.URL + "/api/dex"
|
||||
claims.Issuer = dexTestServer.URL + "/v1/dex"
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodRS512, claims)
|
||||
key, err := jwt.ParseRSAPrivateKeyFromPEM(utiltest.PrivateKey)
|
||||
require.NoError(t, err)
|
||||
@@ -906,7 +906,7 @@ requestedScopes: ["oidc"]`, oidcTestServer.URL),
|
||||
mgr.verificationDelayNoiseEnabled = false
|
||||
|
||||
claims := jwt.RegisteredClaims{Audience: jwt.ClaimStrings{"test-client"}, Subject: "admin", ExpiresAt: jwt.NewNumericDate(time.Now().Add(time.Hour * 24))}
|
||||
claims.Issuer = dexTestServer.URL + "/api/dex"
|
||||
claims.Issuer = dexTestServer.URL + "/v1/dex"
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodRS512, claims)
|
||||
key, err := jwt.ParseRSAPrivateKeyFromPEM(utiltest.PrivateKey)
|
||||
require.NoError(t, err)
|
||||
@@ -1424,7 +1424,7 @@ requestedScopes: ["oidc"]`, oidcTestServer.URL),
|
||||
mgr.verificationDelayNoiseEnabled = false
|
||||
|
||||
claims := jwt.RegisteredClaims{Audience: jwt.ClaimStrings{"argo-cd-cli"}, Subject: "admin", ExpiresAt: jwt.NewNumericDate(time.Now().Add(time.Hour * 24))}
|
||||
claims.Issuer = dexTestServer.URL + "/api/dex"
|
||||
claims.Issuer = dexTestServer.URL + "/v1/dex"
|
||||
claims.ID = tokenID
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodRS512, claims)
|
||||
key, err := jwt.ParseRSAPrivateKeyFromPEM(utiltest.PrivateKey)
|
||||
@@ -1512,7 +1512,7 @@ func TestSessionManager_VerifyToken_DexTokenRevokedByAccessTokenHash(t *testing.
|
||||
"aud": []string{"argo-cd-cli"},
|
||||
"sub": "admin",
|
||||
"exp": jwt.NewNumericDate(time.Now().Add(time.Hour * 24)),
|
||||
"iss": dexTestServer.URL + "/api/dex",
|
||||
"iss": dexTestServer.URL + "/v1/dex",
|
||||
"at_hash": accessTokenHash,
|
||||
// Deliberately no "jti" claim
|
||||
}
|
||||
|
||||
@@ -1161,10 +1161,10 @@ userInfoBaseURL: "://users.example.com"
|
||||
|
||||
func TestRedirectURL(t *testing.T) {
|
||||
cases := map[string][]string{
|
||||
"https://localhost:4000": {"https://localhost:4000/auth/callback", "https://localhost:4000/api/dex/callback"},
|
||||
"https://localhost:4000/": {"https://localhost:4000/auth/callback", "https://localhost:4000/api/dex/callback"},
|
||||
"https://localhost:4000/cd": {"https://localhost:4000/cd/auth/callback", "https://localhost:4000/cd/api/dex/callback"},
|
||||
"https://localhost:4000/cd/": {"https://localhost:4000/cd/auth/callback", "https://localhost:4000/cd/api/dex/callback"},
|
||||
"https://localhost:4000": {"https://localhost:4000/auth/callback", "https://localhost:4000/v1/dex/callback"},
|
||||
"https://localhost:4000/": {"https://localhost:4000/auth/callback", "https://localhost:4000/v1/dex/callback"},
|
||||
"https://localhost:4000/cd": {"https://localhost:4000/cd/auth/callback", "https://localhost:4000/cd/v1/dex/callback"},
|
||||
"https://localhost:4000/cd/": {"https://localhost:4000/cd/auth/callback", "https://localhost:4000/cd/v1/dex/callback"},
|
||||
}
|
||||
for given, expected := range cases {
|
||||
settings := ArgoCDSettings{URL: given}
|
||||
|
||||
@@ -117,15 +117,15 @@ func dexMockHandler(t *testing.T, url string) func(http.ResponseWriter, *http.Re
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
switch r.RequestURI {
|
||||
case "/api/dex/.well-known/openid-configuration":
|
||||
case "/v1/dex/.well-known/openid-configuration":
|
||||
_, err := fmt.Fprintf(w, `
|
||||
{
|
||||
"issuer": "%[1]s/api/dex",
|
||||
"authorization_endpoint": "%[1]s/api/dex/auth",
|
||||
"token_endpoint": "%[1]s/api/dex/token",
|
||||
"jwks_uri": "%[1]s/api/dex/keys",
|
||||
"userinfo_endpoint": "%[1]s/api/dex/userinfo",
|
||||
"device_authorization_endpoint": "%[1]s/api/dex/device/code",
|
||||
"issuer": "%[1]s/v1/dex",
|
||||
"authorization_endpoint": "%[1]s/v1/dex/auth",
|
||||
"token_endpoint": "%[1]s/v1/dex/token",
|
||||
"jwks_uri": "%[1]s/v1/dex/keys",
|
||||
"userinfo_endpoint": "%[1]s/v1/dex/userinfo",
|
||||
"device_authorization_endpoint": "%[1]s/v1/dex/device/code",
|
||||
"grant_types_supported": ["authorization_code"],
|
||||
"response_types_supported": ["code"],
|
||||
"subject_types_supported": ["public"],
|
||||
@@ -136,7 +136,7 @@ func dexMockHandler(t *testing.T, url string) func(http.ResponseWriter, *http.Re
|
||||
"claims_supported": ["sub", "aud", "exp"]
|
||||
}`, url)
|
||||
require.NoError(t, err)
|
||||
case "/api/dex/keys":
|
||||
case "/v1/dex/keys":
|
||||
pubKey, err := jwt.ParseRSAPublicKeyFromPEM(Cert)
|
||||
require.NoError(t, err)
|
||||
jwks := jose.JSONWebKeySet{
|
||||
|
||||
@@ -71,7 +71,7 @@ func TestGHCRHandlerCanHandle(t *testing.T) {
|
||||
func TestRegistryPackageEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "package")
|
||||
payload, err := os.ReadFile("testdata/ghcr-package-event.json")
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -172,7 +172,7 @@ func newMockHandler(reactor *reactorDef, applicationNamespaces []string, maxPayl
|
||||
func TestGitHubCommitEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "push")
|
||||
eventJSON, err := os.ReadFile("testdata/github-commit-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -189,7 +189,7 @@ func TestGitHubCommitEvent(t *testing.T) {
|
||||
func TestAzureDevOpsCommitEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-Vss-Activityid", "abc")
|
||||
eventJSON, err := os.ReadFile("testdata/azuredevops-git-push-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -270,7 +270,7 @@ func TestGitHubCommitEvent_AppsInOtherNamespaces(t *testing.T) {
|
||||
},
|
||||
},
|
||||
)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "push")
|
||||
eventJSON, err := os.ReadFile("testdata/github-commit-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -304,7 +304,7 @@ func TestGitHubCommitEvent_AppsInOtherNamespaces(t *testing.T) {
|
||||
func TestGitHubTagEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "push")
|
||||
eventJSON, err := os.ReadFile("testdata/github-tag-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -321,7 +321,7 @@ func TestGitHubTagEvent(t *testing.T) {
|
||||
func TestGitHubPingEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "ping")
|
||||
eventJSON, err := os.ReadFile("testdata/github-ping-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -338,7 +338,7 @@ func TestGitHubPingEvent(t *testing.T) {
|
||||
func TestBitbucketServerRepositoryReferenceChangedEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-Event-Key", "repo:refs_changed")
|
||||
eventJSON, err := os.ReadFile("testdata/bitbucket-server-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -358,7 +358,7 @@ func TestBitbucketServerRepositoryDiagnosticPingEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
eventJSON := "{\"test\": true}"
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", bytes.NewBufferString(eventJSON))
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", bytes.NewBufferString(eventJSON))
|
||||
req.Header.Set("X-Event-Key", "diagnostics:ping")
|
||||
w := httptest.NewRecorder()
|
||||
h.Handler(w, req)
|
||||
@@ -372,7 +372,7 @@ func TestBitbucketServerRepositoryDiagnosticPingEvent(t *testing.T) {
|
||||
func TestGogsPushEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-Gogs-Event", "push")
|
||||
eventJSON, err := os.ReadFile("testdata/gogs-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -389,7 +389,7 @@ func TestGogsPushEvent(t *testing.T) {
|
||||
func TestGitLabPushEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-Gitlab-Event", "Push Hook")
|
||||
eventJSON, err := os.ReadFile("testdata/gitlab-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -406,7 +406,7 @@ func TestGitLabPushEvent(t *testing.T) {
|
||||
func TestGitLabSystemEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-Gitlab-Event", "System Hook")
|
||||
eventJSON, err := os.ReadFile("testdata/gitlab-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -423,7 +423,7 @@ func TestGitLabSystemEvent(t *testing.T) {
|
||||
func TestInvalidMethod(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "push")
|
||||
w := httptest.NewRecorder()
|
||||
h.Handler(w, req)
|
||||
@@ -437,7 +437,7 @@ func TestInvalidMethod(t *testing.T) {
|
||||
func TestInvalidEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "push")
|
||||
w := httptest.NewRecorder()
|
||||
h.Handler(w, req)
|
||||
@@ -451,7 +451,7 @@ func TestInvalidEvent(t *testing.T) {
|
||||
func TestUnknownEvent(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
h := NewMockHandler(nil, []string{})
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-Unknown-Event", "push")
|
||||
w := httptest.NewRecorder()
|
||||
h.Handler(w, req)
|
||||
@@ -751,7 +751,7 @@ func TestGitHubCommitEventMaxPayloadSize(t *testing.T) {
|
||||
hook := test.NewGlobal()
|
||||
maxPayloadSize := int64(100)
|
||||
h := NewMockHandlerWithPayloadLimit(nil, []string{}, maxPayloadSize)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "push")
|
||||
eventJSON, err := os.ReadFile("testdata/github-commit-event.json")
|
||||
require.NoError(t, err)
|
||||
@@ -1164,7 +1164,7 @@ func TestHandleEvent(t *testing.T) {
|
||||
|
||||
// Create payload with the changed file
|
||||
payload := createTestPayload(ttc.changedFile)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/api/webhook", http.NoBody)
|
||||
req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/v1/webhook", http.NoBody)
|
||||
req.Header.Set("X-GitHub-Event", "push")
|
||||
req.Body = io.NopCloser(bytes.NewReader(payload))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user