From 970a9e8a04346a4d2906a44fb68e14423fb46304 Mon Sep 17 00:00:00 2001 From: Arvind Choudhary Date: Fri, 4 Apr 2025 00:24:42 +0000 Subject: [PATCH] feat: [AH-1168]: Added replication rule and migration API handlers (#3621) * [AH-1168]: Updated properties * [AH-1168]: Updated properties * [AH-1168]: Updated description and params * [AH-1168]: Added replication rule and migration API handlers * [AH-1168]: Updated OpenAPI spec for all CRUDs --- .../api/controller/metadata/replication.go | 93 + registry/app/api/openapi/api.yaml | 633 ++++++- .../contracts/artifact/services.gen.go | 1608 +++++++++++++++-- .../openapi/contracts/artifact/types.gen.go | 252 ++- 4 files changed, 2352 insertions(+), 234 deletions(-) create mode 100644 registry/app/api/controller/metadata/replication.go diff --git a/registry/app/api/controller/metadata/replication.go b/registry/app/api/controller/metadata/replication.go new file mode 100644 index 000000000..17f2526a4 --- /dev/null +++ b/registry/app/api/controller/metadata/replication.go @@ -0,0 +1,93 @@ +// Copyright 2023 Harness, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package metadata + +import ( + "context" + + "github.com/harness/gitness/registry/app/api/openapi/contracts/artifact" +) + +func (c *APIController) ListReplicationRules( + _ context.Context, + _ artifact.ListReplicationRulesRequestObject, +) (artifact.ListReplicationRulesResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) CreateReplicationRule( + _ context.Context, + _ artifact.CreateReplicationRuleRequestObject, +) (artifact.CreateReplicationRuleResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) DeleteReplicationRule( + _ context.Context, + _ artifact.DeleteReplicationRuleRequestObject, +) (artifact.DeleteReplicationRuleResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) GetReplicationRule( + _ context.Context, + _ artifact.GetReplicationRuleRequestObject, +) (artifact.GetReplicationRuleResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) UpdateReplicationRule( + _ context.Context, + _ artifact.UpdateReplicationRuleRequestObject, +) (artifact.UpdateReplicationRuleResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) ListMigrationImages( + _ context.Context, + _ artifact.ListMigrationImagesRequestObject, +) (artifact.ListMigrationImagesResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) GetMigrationLogsForImage( + _ context.Context, + _ artifact.GetMigrationLogsForImageRequestObject, +) (artifact.GetMigrationLogsForImageResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) StartMigration( + _ context.Context, + _ artifact.StartMigrationRequestObject, +) (artifact.StartMigrationResponseObject, error) { + // TODO implement me + panic("implement me") +} + +func (c *APIController) StopMigration( + _ context.Context, + _ artifact.StopMigrationRequestObject, +) (artifact.StopMigrationResponseObject, error) { + // TODO implement me + panic("implement me") +} diff --git a/registry/app/api/openapi/api.yaml b/registry/app/api/openapi/api.yaml index 4334081bf..b5fee0100 100644 --- a/registry/app/api/openapi/api.yaml +++ b/registry/app/api/openapi/api.yaml @@ -24,10 +24,11 @@ servers: description: Registry paths: + #Tag: Spaces /spaces/{space_ref}/registries: get: - summary: List Registries - description: Lists all the Registries. + summary: List registries + description: Lists all the registries. operationId: GetAllRegistries tags: - Spaces @@ -54,6 +55,300 @@ paths: $ref: "#/components/responses/NotFound" 500: $ref: "#/components/responses/InternalServerError" + /spaces/{space_ref}/artifacts: + get: + summary: List artifacts + description: Lists all the artifacts + operationId: GetAllArtifacts + tags: + - Spaces + parameters: + - $ref: "#/components/parameters/spaceRefPathParam" + - $ref: "#/components/parameters/RegistryIdentifierParam" + - $ref: "#/components/parameters/pageNumber" + - $ref: "#/components/parameters/pageSize" + - $ref: "#/components/parameters/sortOrder" + - $ref: "#/components/parameters/sortField" + - $ref: "#/components/parameters/searchTerm" + - $ref: "#/components/parameters/latestVersion" + - $ref: "#/components/parameters/packageTypeParam" + responses: + 200: + $ref: "#/components/responses/ListArtifactResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + /spaces/{space_ref}/artifact/stats: + get: + summary: Get artifact stats + description: Get artifact stats + operationId: GetArtifactStatsForSpace + tags: + - Spaces + parameters: + - $ref: "#/components/parameters/spaceRefPathParam" + - $ref: "#/components/parameters/fromDateParam" + - $ref: "#/components/parameters/toDateParam" + responses: + 200: + $ref: "#/components/responses/ArtifactStatsResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + + #Tag: Replication + /replication/rules: + get: + summary: List replication rules + description: List all replication rules + operationId: listReplicationRules + tags: + - Replication + parameters: + - $ref: "#/components/parameters/spaceRefQueryParam" + responses: + 200: + $ref: "#/components/responses/ListReplicationRuleResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + post: + summary: Create a replication rule + description: Create a replication rule + operationId: createReplicationRule + tags: + - Replication + parameters: + - $ref: "#/components/parameters/spaceRefQueryParam" + requestBody: + $ref: "#/components/requestBodies/ReplicationRuleRequest" + responses: + 200: + $ref: "#/components/responses/ReplicationRuleResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + /replication/rules/{id}: + get: + summary: Get a replication rule + description: Get a replication rule + operationId: getReplicationRule + tags: + - Replication + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + 200: + $ref: "#/components/responses/ReplicationRuleResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + put: + summary: Update a replication rule + description: Update a replication rule + operationId: updateReplicationRule + tags: + - Replication + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/ReplicationRuleRequest" + responses: + 200: + $ref: "#/components/responses/ReplicationRuleResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + + delete: + summary: Delete a replication rule + description: Delete a replication rule + operationId: deleteReplicationRule + tags: + - Replication + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + 200: + $ref: "#/components/responses/Success" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + /replication/rules/{id}/migration/start: + post: + summary: Start migration + description: Start migration given an id + operationId: startMigration + tags: + - Replication + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + 200: + $ref: "#/components/responses/Success" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + /replication/rules/{id}/migration/stop: + post: + summary: Stop migration + description: Stop migration given an id + operationId: stopMigration + tags: + - Replication + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + 200: + $ref: "#/components/responses/Success" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + /replication/rules/{id}/migration/images: + get: + summary: List migration images + description: List migration images given an id + operationId: listMigrationImages + tags: + - Replication + parameters: + - name: id + in: path + required: true + schema: + type: string + - $ref: "#/components/parameters/pageNumber" + - $ref: "#/components/parameters/pageSize" + - $ref: "#/components/parameters/sortOrder" + - $ref: "#/components/parameters/sortField" + responses: + 200: + $ref: "#/components/responses/ListMigrationImageResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + /replication/rules/{id}/migration/images/{image_id}/logs: + get: + summary: Get migration logs for an image + operationId: getMigrationLogsForImage + tags: + - Replication + parameters: + - name: id + in: path + required: true + schema: + type: string + - name: image_id + in: path + required: true + schema: + type: string + responses: + 200: + $ref: "#/components/responses/PlainTextResponse" + 400: + $ref: "#/components/responses/BadRequest" + 401: + $ref: "#/components/responses/Unauthenticated" + 403: + $ref: "#/components/responses/Unauthorized" + 404: + $ref: "#/components/responses/NotFound" + 500: + $ref: "#/components/responses/InternalServerError" + + #Tag: Registries /registry: post: summary: Create Registry. @@ -76,7 +371,6 @@ paths: $ref: "#/components/responses/Unauthorized" 500: $ref: "#/components/responses/InternalServerError" - /registry/{registry_ref}: get: summary: Returns Registry Details @@ -167,36 +461,6 @@ paths: $ref: "#/components/responses/NotFound" 500: $ref: "#/components/responses/InternalServerError" - /spaces/{space_ref}/artifacts: - get: - summary: List Artifacts - description: Lists all the Artifacts. - operationId: GetAllArtifacts - tags: - - Spaces - parameters: - - $ref: "#/components/parameters/spaceRefPathParam" - - $ref: "#/components/parameters/RegistryIdentifierParam" - - $ref: "#/components/parameters/pageNumber" - - $ref: "#/components/parameters/pageSize" - - $ref: "#/components/parameters/sortOrder" - - $ref: "#/components/parameters/sortField" - - $ref: "#/components/parameters/searchTerm" - - $ref: "#/components/parameters/latestVersion" - - $ref: "#/components/parameters/packageTypeParam" - responses: - 200: - $ref: "#/components/responses/ListArtifactResponse" - 400: - $ref: "#/components/responses/BadRequest" - 401: - $ref: "#/components/responses/Unauthenticated" - 403: - $ref: "#/components/responses/Unauthorized" - 404: - $ref: "#/components/responses/NotFound" - 500: - $ref: "#/components/responses/InternalServerError" /registry/{registry_ref}/artifacts: get: summary: List Artifacts for Registry @@ -225,30 +489,8 @@ paths: $ref: "#/components/responses/NotFound" 500: $ref: "#/components/responses/InternalServerError" - /spaces/{space_ref}/artifact/stats: - get: - summary: Get Artifact Stats - description: Get Artifact Stats. - operationId: GetArtifactStatsForSpace - tags: - - Spaces - parameters: - - $ref: "#/components/parameters/spaceRefPathParam" - - $ref: "#/components/parameters/fromDateParam" - - $ref: "#/components/parameters/toDateParam" - responses: - 200: - $ref: "#/components/responses/ArtifactStatsResponse" - 400: - $ref: "#/components/responses/BadRequest" - 401: - $ref: "#/components/responses/Unauthenticated" - 403: - $ref: "#/components/responses/Unauthorized" - 404: - $ref: "#/components/responses/NotFound" - 500: - $ref: "#/components/responses/InternalServerError" + + #Tag: Artifacts /registry/{registry_ref}/artifact/labels: get: summary: List Artifact Labels @@ -495,7 +737,6 @@ paths: $ref: "#/components/responses/NotFound" 500: $ref: "#/components/responses/InternalServerError" - /registry/{registry_ref}/artifact/{artifact}/version/{version}/files: get: summary: Describe Artifact files @@ -525,6 +766,9 @@ paths: $ref: "#/components/responses/NotFound" 500: $ref: "#/components/responses/InternalServerError" + + + #Tag: Docker Artifacts /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details: get: summary: Describe Docker Artifact Detail @@ -624,6 +868,8 @@ paths: $ref: "#/components/responses/NotFound" 500: $ref: "#/components/responses/InternalServerError" + + #Tag: Helm Artifacts /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details: get: summary: Describe Helm Artifact Detail @@ -672,6 +918,8 @@ paths: $ref: "#/components/responses/NotFound" 500: $ref: "#/components/responses/InternalServerError" + + #Tag: Webhooks /registry/{registry_ref}/webhooks: post: summary: CreateWebhook @@ -850,6 +1098,7 @@ paths: $ref: "#/components/responses/Unauthorized" 500: $ref: "#/components/responses/InternalServerError" + components: requestBodies: RegistryRequest: @@ -870,6 +1119,12 @@ components: application/json: schema: $ref: "#/components/schemas/WebhookRequest" + ReplicationRuleRequest: + description: request for create and update replication rule + content: + application/json: + schema: + $ref: "#/components/schemas/ReplicationRuleRequest" responses: ArtifactStatsResponse: description: response to get artifact stats response @@ -1160,6 +1415,34 @@ components: required: - status - data + ReplicationRuleResponse: + description: Response for replication rule update + content: + application/json: + schema: + type: object + properties: + status: + $ref: "#/components/schemas/Status" + data: + $ref: "#/components/schemas/ReplicationRule" + required: + - status + - data + ListReplicationRuleResponse: + description: Response for list replication rules + content: + application/json: + schema: + type: object + properties: + status: + $ref: "#/components/schemas/Status" + data: + $ref: "#/components/schemas/ListReplicationRule" + required: + - status + - data ListWebhooksResponse: description: response for list webhooks content: @@ -1188,6 +1471,20 @@ components: required: - status - data + ListMigrationImageResponse: + description: Response for list migration images + content: + application/json: + schema: + type: object + properties: + status: + $ref: "#/components/schemas/Status" + data: + $ref: "#/components/schemas/ListMigrationImage" + required: + - status + - data ListRegistryArtifactResponse: description: response for list artifact content: @@ -1257,7 +1554,174 @@ components: application/json: schema: $ref: '#/components/schemas/Error' + PlainTextResponse: + description: A plain text response + content: + text/plain; charset=utf-8: + schema: + type: string + example: "Hello, world!" schemas: + ListMigrationImage: + type: object + description: A list of migration images + properties: + pageCount: + type: integer + format: int64 + description: The total number of pages + example: 100 + itemCount: + type: integer + format: int64 + description: The total number of items + example: 1 + pageSize: + type: integer + description: The number of items per page + example: 1 + pageIndex: + type: integer + description: The current page + format: int64 + example: 0 + images: + type: array + description: A list of Artifact versions + items: + $ref: "#/components/schemas/MigrationImage" + required: + - pageCount + - itemCount + - pageSize + - pageIndex + - images + MigrationImage: + type: object + properties: + imageId: + type: string + imageTag: + type: string + status: + type: string + progress: + type: integer + MigrationLog: + type: object + properties: + timestamp: + type: string + message: + type: string + ReplicationRule: + type: object + properties: + identifier: + type: string + source: + $ref: "#/components/schemas/ReplicationRegistry" + destination: + $ref: "#/components/schemas/ReplicationRegistry" + sourceType: + type: string + enum: + - Local + - Jfrog + - GCP + destinationType: + type: string + enum: + - Local + - Jfrog + - GCP + allowedPatterns: + type: array + items: + type: string + blockedPatterns: + type: array + items: + type: string + createdAt: + type: string + modifiedAt: + type: string + parentRef: + type: string + required: + - identifier + - source + - destination + - sourceType + - destinationType + - allowedPatterns + - blockedPatterns + - parentRef + - modifiedAt + - createdAt + ReplicationRuleRequest: + type: object + properties: + source: + $ref: "#/components/schemas/ReplicationRegistry" + destination: + $ref: "#/components/schemas/ReplicationRegistry" + sourceType: + type: string + enum: + - Local + - Jfrog + - GCP + destinationType: + type: string + enum: + - Local + - Jfrog + - GCP + allowedPatterns: + type: array + items: + type: string + blockedPatterns: + type: array + items: + type: string + required: + - source + - destination + - sourceType + - destinationType + - allowedPatterns + - blockedPatterns + ReplicationRegistry: + oneOf: + - $ref: "#/components/schemas/LocalReplicationRegistry" + - $ref: "#/components/schemas/JfrogReplicationRegistry" + LocalReplicationRegistry: + type: object + properties: + registryIdentifier: + type: string + required: + - registryIdentifier + JfrogReplicationRegistry: + type: object + properties: + url: + type: string + format: uri + namespace: + type: string + username: + type: string + passwordSecretId: + type: string + passwordSecretSpaceId: + type: string + required: + - url + - namespace ArtifactStats: type: object description: Harness Artifact Stats @@ -1274,6 +1738,40 @@ components: totalStorageSize: type: integer format: int64 + ListReplicationRule: + type: object + description: A list of replication rules + properties: + pageCount: + type: integer + format: int64 + description: The total number of pages + example: 100 + itemCount: + type: integer + format: int64 + description: The total number of items + example: 1 + pageSize: + type: integer + description: The number of items per page + example: 10 + pageIndex: + type: integer + format: int64 + description: The current page + example: 0 + rules: + type: array + description: A list of Replication Rules + items: + $ref: "#/components/schemas/ReplicationRule" + required: + - pageCount + - itemCount + - pageSize + - pageIndex + - rules ListRegistry: type: object description: A list of Harness Artifact Registries @@ -1789,8 +2287,8 @@ components: description: Config for python artifact details properties: metadata: - type: object - additionalProperties: true + type: object + additionalProperties: true NpmArtifactDetailConfig: type: object description: Config for npm artifact details @@ -2378,7 +2876,10 @@ components: name: space_ref in: query required: false - description: Unique space path + description: > + Unique path identifier for the final space in the branch. + The value can be provided either as a fully URL-encoded path (e.g., `organization%2Fproject`) + or as a plain path ending with a trailing plus sign (`+`) as separator (e.g., `organization/project/+`). schema: type: string packageTypeParam: @@ -2421,7 +2922,10 @@ components: name: space_ref in: path required: true - description: Unique space path. + description: > + Unique path identifier for the final space in the branch. + The value can be provided either as a fully URL-encoded path (e.g., `organization%2Fproject`) + or as a plain path ending with a trailing plus sign (`+`) as separator (e.g., `organization/project/+`). schema: type: string LabelsParam: @@ -2437,7 +2941,10 @@ components: name: registry_ref in: path required: true - description: Unique registry path. + description: > + Unique path identifier for the final registry in the branch. + The value can be provided either as a fully URL-encoded path (e.g., `organization%2Fproject%2Fregistry`) + or as a plain path ending with a trailing plus sign (`+`) as separator (e.g., `organization/project/registry/+`). schema: type: string webhookIdentifierPathParam: diff --git a/registry/app/api/openapi/contracts/artifact/services.gen.go b/registry/app/api/openapi/contracts/artifact/services.gen.go index 07e4a3f50..30ab98e15 100644 --- a/registry/app/api/openapi/contracts/artifact/services.gen.go +++ b/registry/app/api/openapi/contracts/artifact/services.gen.go @@ -1,6 +1,6 @@ // Package artifact provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package artifact import ( @@ -10,6 +10,7 @@ import ( "encoding/base64" "encoding/json" "fmt" + "io" "net/http" "net/url" "path" @@ -116,13 +117,40 @@ type ServerInterface interface { // ReTriggerWebhookExecution // (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}/retrigger) ReTriggerWebhookExecution(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, webhookExecutionId WebhookExecutionIdPathParam) - // Get Artifact Stats + // List replication rules + // (GET /replication/rules) + ListReplicationRules(w http.ResponseWriter, r *http.Request, params ListReplicationRulesParams) + // Create a replication rule + // (POST /replication/rules) + CreateReplicationRule(w http.ResponseWriter, r *http.Request, params CreateReplicationRuleParams) + // Delete a replication rule + // (DELETE /replication/rules/{id}) + DeleteReplicationRule(w http.ResponseWriter, r *http.Request, id string) + // Get a replication rule + // (GET /replication/rules/{id}) + GetReplicationRule(w http.ResponseWriter, r *http.Request, id string) + // Update a replication rule + // (PUT /replication/rules/{id}) + UpdateReplicationRule(w http.ResponseWriter, r *http.Request, id string) + // List migration images + // (GET /replication/rules/{id}/migration/images) + ListMigrationImages(w http.ResponseWriter, r *http.Request, id string, params ListMigrationImagesParams) + // Get migration logs for an image + // (GET /replication/rules/{id}/migration/images/{image_id}/logs) + GetMigrationLogsForImage(w http.ResponseWriter, r *http.Request, id string, imageId string) + // Start migration + // (POST /replication/rules/{id}/migration/start) + StartMigration(w http.ResponseWriter, r *http.Request, id string) + // Stop migration + // (POST /replication/rules/{id}/migration/stop) + StopMigration(w http.ResponseWriter, r *http.Request, id string) + // Get artifact stats // (GET /spaces/{space_ref}/artifact/stats) GetArtifactStatsForSpace(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetArtifactStatsForSpaceParams) - // List Artifacts + // List artifacts // (GET /spaces/{space_ref}/artifacts) GetAllArtifacts(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllArtifactsParams) - // List Registries + // List registries // (GET /spaces/{space_ref}/registries) GetAllRegistries(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllRegistriesParams) } @@ -317,19 +345,73 @@ func (_ Unimplemented) ReTriggerWebhookExecution(w http.ResponseWriter, r *http. w.WriteHeader(http.StatusNotImplemented) } -// Get Artifact Stats +// List replication rules +// (GET /replication/rules) +func (_ Unimplemented) ListReplicationRules(w http.ResponseWriter, r *http.Request, params ListReplicationRulesParams) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Create a replication rule +// (POST /replication/rules) +func (_ Unimplemented) CreateReplicationRule(w http.ResponseWriter, r *http.Request, params CreateReplicationRuleParams) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Delete a replication rule +// (DELETE /replication/rules/{id}) +func (_ Unimplemented) DeleteReplicationRule(w http.ResponseWriter, r *http.Request, id string) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Get a replication rule +// (GET /replication/rules/{id}) +func (_ Unimplemented) GetReplicationRule(w http.ResponseWriter, r *http.Request, id string) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Update a replication rule +// (PUT /replication/rules/{id}) +func (_ Unimplemented) UpdateReplicationRule(w http.ResponseWriter, r *http.Request, id string) { + w.WriteHeader(http.StatusNotImplemented) +} + +// List migration images +// (GET /replication/rules/{id}/migration/images) +func (_ Unimplemented) ListMigrationImages(w http.ResponseWriter, r *http.Request, id string, params ListMigrationImagesParams) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Get migration logs for an image +// (GET /replication/rules/{id}/migration/images/{image_id}/logs) +func (_ Unimplemented) GetMigrationLogsForImage(w http.ResponseWriter, r *http.Request, id string, imageId string) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Start migration +// (POST /replication/rules/{id}/migration/start) +func (_ Unimplemented) StartMigration(w http.ResponseWriter, r *http.Request, id string) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Stop migration +// (POST /replication/rules/{id}/migration/stop) +func (_ Unimplemented) StopMigration(w http.ResponseWriter, r *http.Request, id string) { + w.WriteHeader(http.StatusNotImplemented) +} + +// Get artifact stats // (GET /spaces/{space_ref}/artifact/stats) func (_ Unimplemented) GetArtifactStatsForSpace(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetArtifactStatsForSpaceParams) { w.WriteHeader(http.StatusNotImplemented) } -// List Artifacts +// List artifacts // (GET /spaces/{space_ref}/artifacts) func (_ Unimplemented) GetAllArtifacts(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllArtifactsParams) { w.WriteHeader(http.StatusNotImplemented) } -// List Registries +// List registries // (GET /spaces/{space_ref}/registries) func (_ Unimplemented) GetAllRegistries(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllRegistriesParams) { w.WriteHeader(http.StatusNotImplemented) @@ -346,7 +428,6 @@ type MiddlewareFunc func(http.Handler) http.Handler // CreateRegistry operation middleware func (siw *ServerInterfaceWrapper) CreateRegistry(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -369,12 +450,11 @@ func (siw *ServerInterfaceWrapper) CreateRegistry(w http.ResponseWriter, r *http handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // DeleteRegistry operation middleware func (siw *ServerInterfaceWrapper) DeleteRegistry(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -395,12 +475,11 @@ func (siw *ServerInterfaceWrapper) DeleteRegistry(w http.ResponseWriter, r *http handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetRegistry operation middleware func (siw *ServerInterfaceWrapper) GetRegistry(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -421,12 +500,11 @@ func (siw *ServerInterfaceWrapper) GetRegistry(w http.ResponseWriter, r *http.Re handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // ModifyRegistry operation middleware func (siw *ServerInterfaceWrapper) ModifyRegistry(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -447,12 +525,11 @@ func (siw *ServerInterfaceWrapper) ModifyRegistry(w http.ResponseWriter, r *http handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // ListArtifactLabels operation middleware func (siw *ServerInterfaceWrapper) ListArtifactLabels(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -500,12 +577,11 @@ func (siw *ServerInterfaceWrapper) ListArtifactLabels(w http.ResponseWriter, r * handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetArtifactStatsForRegistry operation middleware func (siw *ServerInterfaceWrapper) GetArtifactStatsForRegistry(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -545,12 +621,11 @@ func (siw *ServerInterfaceWrapper) GetArtifactStatsForRegistry(w http.ResponseWr handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // DeleteArtifact operation middleware func (siw *ServerInterfaceWrapper) DeleteArtifact(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -580,12 +655,11 @@ func (siw *ServerInterfaceWrapper) DeleteArtifact(w http.ResponseWriter, r *http handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // UpdateArtifactLabels operation middleware func (siw *ServerInterfaceWrapper) UpdateArtifactLabels(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -615,12 +689,11 @@ func (siw *ServerInterfaceWrapper) UpdateArtifactLabels(w http.ResponseWriter, r handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetArtifactStats operation middleware func (siw *ServerInterfaceWrapper) GetArtifactStats(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -669,12 +742,11 @@ func (siw *ServerInterfaceWrapper) GetArtifactStats(w http.ResponseWriter, r *ht handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetArtifactSummary operation middleware func (siw *ServerInterfaceWrapper) GetArtifactSummary(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -704,12 +776,11 @@ func (siw *ServerInterfaceWrapper) GetArtifactSummary(w http.ResponseWriter, r * handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // DeleteArtifactVersion operation middleware func (siw *ServerInterfaceWrapper) DeleteArtifactVersion(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -748,12 +819,11 @@ func (siw *ServerInterfaceWrapper) DeleteArtifactVersion(w http.ResponseWriter, handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetArtifactDetails operation middleware func (siw *ServerInterfaceWrapper) GetArtifactDetails(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -803,12 +873,11 @@ func (siw *ServerInterfaceWrapper) GetArtifactDetails(w http.ResponseWriter, r * handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetDockerArtifactDetails operation middleware func (siw *ServerInterfaceWrapper) GetDockerArtifactDetails(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -865,12 +934,11 @@ func (siw *ServerInterfaceWrapper) GetDockerArtifactDetails(w http.ResponseWrite handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetDockerArtifactLayers operation middleware func (siw *ServerInterfaceWrapper) GetDockerArtifactLayers(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -927,12 +995,11 @@ func (siw *ServerInterfaceWrapper) GetDockerArtifactLayers(w http.ResponseWriter handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetDockerArtifactManifest operation middleware func (siw *ServerInterfaceWrapper) GetDockerArtifactManifest(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -989,12 +1056,11 @@ func (siw *ServerInterfaceWrapper) GetDockerArtifactManifest(w http.ResponseWrit handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetDockerArtifactManifests operation middleware func (siw *ServerInterfaceWrapper) GetDockerArtifactManifests(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1033,12 +1099,11 @@ func (siw *ServerInterfaceWrapper) GetDockerArtifactManifests(w http.ResponseWri handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetArtifactFiles operation middleware func (siw *ServerInterfaceWrapper) GetArtifactFiles(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1120,12 +1185,11 @@ func (siw *ServerInterfaceWrapper) GetArtifactFiles(w http.ResponseWriter, r *ht handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetHelmArtifactDetails operation middleware func (siw *ServerInterfaceWrapper) GetHelmArtifactDetails(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1164,12 +1228,11 @@ func (siw *ServerInterfaceWrapper) GetHelmArtifactDetails(w http.ResponseWriter, handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetHelmArtifactManifest operation middleware func (siw *ServerInterfaceWrapper) GetHelmArtifactManifest(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1208,12 +1271,11 @@ func (siw *ServerInterfaceWrapper) GetHelmArtifactManifest(w http.ResponseWriter handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetArtifactVersionSummary operation middleware func (siw *ServerInterfaceWrapper) GetArtifactVersionSummary(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1252,12 +1314,11 @@ func (siw *ServerInterfaceWrapper) GetArtifactVersionSummary(w http.ResponseWrit handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetAllArtifactVersions operation middleware func (siw *ServerInterfaceWrapper) GetAllArtifactVersions(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1330,12 +1391,11 @@ func (siw *ServerInterfaceWrapper) GetAllArtifactVersions(w http.ResponseWriter, handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetAllArtifactsByRegistry operation middleware func (siw *ServerInterfaceWrapper) GetAllArtifactsByRegistry(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1407,12 +1467,11 @@ func (siw *ServerInterfaceWrapper) GetAllArtifactsByRegistry(w http.ResponseWrit handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetClientSetupDetails operation middleware func (siw *ServerInterfaceWrapper) GetClientSetupDetails(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1452,12 +1511,11 @@ func (siw *ServerInterfaceWrapper) GetClientSetupDetails(w http.ResponseWriter, handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // ListWebhooks operation middleware func (siw *ServerInterfaceWrapper) ListWebhooks(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1521,12 +1579,11 @@ func (siw *ServerInterfaceWrapper) ListWebhooks(w http.ResponseWriter, r *http.R handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // CreateWebhook operation middleware func (siw *ServerInterfaceWrapper) CreateWebhook(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1547,12 +1604,11 @@ func (siw *ServerInterfaceWrapper) CreateWebhook(w http.ResponseWriter, r *http. handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // DeleteWebhook operation middleware func (siw *ServerInterfaceWrapper) DeleteWebhook(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1582,12 +1638,11 @@ func (siw *ServerInterfaceWrapper) DeleteWebhook(w http.ResponseWriter, r *http. handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetWebhook operation middleware func (siw *ServerInterfaceWrapper) GetWebhook(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1617,12 +1672,11 @@ func (siw *ServerInterfaceWrapper) GetWebhook(w http.ResponseWriter, r *http.Req handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // UpdateWebhook operation middleware func (siw *ServerInterfaceWrapper) UpdateWebhook(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1652,12 +1706,11 @@ func (siw *ServerInterfaceWrapper) UpdateWebhook(w http.ResponseWriter, r *http. handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // ListWebhookExecutions operation middleware func (siw *ServerInterfaceWrapper) ListWebhookExecutions(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1706,12 +1759,11 @@ func (siw *ServerInterfaceWrapper) ListWebhookExecutions(w http.ResponseWriter, handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetWebhookExecution operation middleware func (siw *ServerInterfaceWrapper) GetWebhookExecution(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1750,12 +1802,11 @@ func (siw *ServerInterfaceWrapper) GetWebhookExecution(w http.ResponseWriter, r handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // ReTriggerWebhookExecution operation middleware func (siw *ServerInterfaceWrapper) ReTriggerWebhookExecution(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1794,12 +1845,284 @@ func (siw *ServerInterfaceWrapper) ReTriggerWebhookExecution(w http.ResponseWrit handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) +} + +// ListReplicationRules operation middleware +func (siw *ServerInterfaceWrapper) ListReplicationRules(w http.ResponseWriter, r *http.Request) { + + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params ListReplicationRulesParams + + // ------------- Optional query parameter "space_ref" ------------- + + err = runtime.BindQueryParameter("form", true, false, "space_ref", r.URL.Query(), ¶ms.SpaceRef) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "space_ref", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.ListReplicationRules(w, r, params) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// CreateReplicationRule operation middleware +func (siw *ServerInterfaceWrapper) CreateReplicationRule(w http.ResponseWriter, r *http.Request) { + + var err error + + // Parameter object where we will unmarshal all parameters from the context + var params CreateReplicationRuleParams + + // ------------- Optional query parameter "space_ref" ------------- + + err = runtime.BindQueryParameter("form", true, false, "space_ref", r.URL.Query(), ¶ms.SpaceRef) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "space_ref", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.CreateReplicationRule(w, r, params) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// DeleteReplicationRule operation middleware +func (siw *ServerInterfaceWrapper) DeleteReplicationRule(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "id" ------------- + var id string + + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.DeleteReplicationRule(w, r, id) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// GetReplicationRule operation middleware +func (siw *ServerInterfaceWrapper) GetReplicationRule(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "id" ------------- + var id string + + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.GetReplicationRule(w, r, id) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// UpdateReplicationRule operation middleware +func (siw *ServerInterfaceWrapper) UpdateReplicationRule(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "id" ------------- + var id string + + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.UpdateReplicationRule(w, r, id) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// ListMigrationImages operation middleware +func (siw *ServerInterfaceWrapper) ListMigrationImages(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "id" ------------- + var id string + + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) + return + } + + // Parameter object where we will unmarshal all parameters from the context + var params ListMigrationImagesParams + + // ------------- Optional query parameter "page" ------------- + + err = runtime.BindQueryParameter("form", true, false, "page", r.URL.Query(), ¶ms.Page) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "page", Err: err}) + return + } + + // ------------- Optional query parameter "size" ------------- + + err = runtime.BindQueryParameter("form", true, false, "size", r.URL.Query(), ¶ms.Size) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "size", Err: err}) + return + } + + // ------------- Optional query parameter "sort_order" ------------- + + err = runtime.BindQueryParameter("form", true, false, "sort_order", r.URL.Query(), ¶ms.SortOrder) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sort_order", Err: err}) + return + } + + // ------------- Optional query parameter "sort_field" ------------- + + err = runtime.BindQueryParameter("form", true, false, "sort_field", r.URL.Query(), ¶ms.SortField) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sort_field", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.ListMigrationImages(w, r, id, params) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// GetMigrationLogsForImage operation middleware +func (siw *ServerInterfaceWrapper) GetMigrationLogsForImage(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "id" ------------- + var id string + + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) + return + } + + // ------------- Path parameter "image_id" ------------- + var imageId string + + err = runtime.BindStyledParameterWithOptions("simple", "image_id", chi.URLParam(r, "image_id"), &imageId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "image_id", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.GetMigrationLogsForImage(w, r, id, imageId) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// StartMigration operation middleware +func (siw *ServerInterfaceWrapper) StartMigration(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "id" ------------- + var id string + + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.StartMigration(w, r, id) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) +} + +// StopMigration operation middleware +func (siw *ServerInterfaceWrapper) StopMigration(w http.ResponseWriter, r *http.Request) { + + var err error + + // ------------- Path parameter "id" ------------- + var id string + + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + if err != nil { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) + return + } + + handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + siw.Handler.StopMigration(w, r, id) + })) + + for _, middleware := range siw.HandlerMiddlewares { + handler = middleware(handler) + } + + handler.ServeHTTP(w, r) } // GetArtifactStatsForSpace operation middleware func (siw *ServerInterfaceWrapper) GetArtifactStatsForSpace(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1839,12 +2162,11 @@ func (siw *ServerInterfaceWrapper) GetArtifactStatsForSpace(w http.ResponseWrite handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetAllArtifacts operation middleware func (siw *ServerInterfaceWrapper) GetAllArtifacts(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -1932,12 +2254,11 @@ func (siw *ServerInterfaceWrapper) GetAllArtifacts(w http.ResponseWriter, r *htt handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } // GetAllRegistries operation middleware func (siw *ServerInterfaceWrapper) GetAllRegistries(w http.ResponseWriter, r *http.Request) { - ctx := r.Context() var err error @@ -2025,7 +2346,7 @@ func (siw *ServerInterfaceWrapper) GetAllRegistries(w http.ResponseWriter, r *ht handler = middleware(handler) } - handler.ServeHTTP(w, r.WithContext(ctx)) + handler.ServeHTTP(w, r) } type UnescapedCookieParamError struct { @@ -2234,6 +2555,33 @@ func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handl r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}/retrigger", wrapper.ReTriggerWebhookExecution) }) + r.Group(func(r chi.Router) { + r.Get(options.BaseURL+"/replication/rules", wrapper.ListReplicationRules) + }) + r.Group(func(r chi.Router) { + r.Post(options.BaseURL+"/replication/rules", wrapper.CreateReplicationRule) + }) + r.Group(func(r chi.Router) { + r.Delete(options.BaseURL+"/replication/rules/{id}", wrapper.DeleteReplicationRule) + }) + r.Group(func(r chi.Router) { + r.Get(options.BaseURL+"/replication/rules/{id}", wrapper.GetReplicationRule) + }) + r.Group(func(r chi.Router) { + r.Put(options.BaseURL+"/replication/rules/{id}", wrapper.UpdateReplicationRule) + }) + r.Group(func(r chi.Router) { + r.Get(options.BaseURL+"/replication/rules/{id}/migration/images", wrapper.ListMigrationImages) + }) + r.Group(func(r chi.Router) { + r.Get(options.BaseURL+"/replication/rules/{id}/migration/images/{image_id}/logs", wrapper.GetMigrationLogsForImage) + }) + r.Group(func(r chi.Router) { + r.Post(options.BaseURL+"/replication/rules/{id}/migration/start", wrapper.StartMigration) + }) + r.Group(func(r chi.Router) { + r.Post(options.BaseURL+"/replication/rules/{id}/migration/stop", wrapper.StopMigration) + }) r.Group(func(r chi.Router) { r.Get(options.BaseURL+"/spaces/{space_ref}/artifact/stats", wrapper.GetArtifactStatsForSpace) }) @@ -2391,6 +2739,14 @@ type ListArtifactVersionResponseJSONResponse struct { Status Status `json:"status"` } +type ListMigrationImageResponseJSONResponse struct { + // Data A list of migration images + Data ListMigrationImage `json:"data"` + + // Status Indicates if the request was successful or not + Status Status `json:"status"` +} + type ListRegistryArtifactResponseJSONResponse struct { // Data A list of Artifacts Data ListRegistryArtifact `json:"data"` @@ -2407,6 +2763,14 @@ type ListRegistryResponseJSONResponse struct { Status Status `json:"status"` } +type ListReplicationRuleResponseJSONResponse struct { + // Data A list of replication rules + Data ListReplicationRule `json:"data"` + + // Status Indicates if the request was successful or not + Status Status `json:"status"` +} + type ListWebhooksExecutionResponseJSONResponse struct { // Data A list of Harness Registries webhooks executions Data ListWebhooksExecutions `json:"data"` @@ -2425,6 +2789,12 @@ type ListWebhooksResponseJSONResponse struct { type NotFoundJSONResponse Error +type PlainTextResponseTextplainCharsetUtf8Response struct { + Body io.Reader + + ContentLength int64 +} + type RegistryResponseJSONResponse struct { // Data Harness Artifact Registry Data Registry `json:"data"` @@ -2433,6 +2803,13 @@ type RegistryResponseJSONResponse struct { Status Status `json:"status"` } +type ReplicationRuleResponseJSONResponse struct { + Data ReplicationRule `json:"data"` + + // Status Indicates if the request was successful or not + Status Status `json:"status"` +} + type SuccessJSONResponse struct { // Status Indicates if the request was successful or not Status Status `json:"status"` @@ -4461,6 +4838,605 @@ func (response ReTriggerWebhookExecution500JSONResponse) VisitReTriggerWebhookEx return json.NewEncoder(w).Encode(response) } +type ListReplicationRulesRequestObject struct { + Params ListReplicationRulesParams +} + +type ListReplicationRulesResponseObject interface { + VisitListReplicationRulesResponse(w http.ResponseWriter) error +} + +type ListReplicationRules200JSONResponse struct { + ListReplicationRuleResponseJSONResponse +} + +func (response ListReplicationRules200JSONResponse) VisitListReplicationRulesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type ListReplicationRules400JSONResponse struct{ BadRequestJSONResponse } + +func (response ListReplicationRules400JSONResponse) VisitListReplicationRulesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type ListReplicationRules401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response ListReplicationRules401JSONResponse) VisitListReplicationRulesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type ListReplicationRules403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response ListReplicationRules403JSONResponse) VisitListReplicationRulesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type ListReplicationRules404JSONResponse struct{ NotFoundJSONResponse } + +func (response ListReplicationRules404JSONResponse) VisitListReplicationRulesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type ListReplicationRules500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response ListReplicationRules500JSONResponse) VisitListReplicationRulesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type CreateReplicationRuleRequestObject struct { + Params CreateReplicationRuleParams + Body *CreateReplicationRuleJSONRequestBody +} + +type CreateReplicationRuleResponseObject interface { + VisitCreateReplicationRuleResponse(w http.ResponseWriter) error +} + +type CreateReplicationRule200JSONResponse struct { + ReplicationRuleResponseJSONResponse +} + +func (response CreateReplicationRule200JSONResponse) VisitCreateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type CreateReplicationRule400JSONResponse struct{ BadRequestJSONResponse } + +func (response CreateReplicationRule400JSONResponse) VisitCreateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type CreateReplicationRule401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response CreateReplicationRule401JSONResponse) VisitCreateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type CreateReplicationRule403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response CreateReplicationRule403JSONResponse) VisitCreateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type CreateReplicationRule404JSONResponse struct{ NotFoundJSONResponse } + +func (response CreateReplicationRule404JSONResponse) VisitCreateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type CreateReplicationRule500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response CreateReplicationRule500JSONResponse) VisitCreateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type DeleteReplicationRuleRequestObject struct { + Id string `json:"id"` +} + +type DeleteReplicationRuleResponseObject interface { + VisitDeleteReplicationRuleResponse(w http.ResponseWriter) error +} + +type DeleteReplicationRule200JSONResponse struct{ SuccessJSONResponse } + +func (response DeleteReplicationRule200JSONResponse) VisitDeleteReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type DeleteReplicationRule400JSONResponse struct{ BadRequestJSONResponse } + +func (response DeleteReplicationRule400JSONResponse) VisitDeleteReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type DeleteReplicationRule401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response DeleteReplicationRule401JSONResponse) VisitDeleteReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type DeleteReplicationRule403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response DeleteReplicationRule403JSONResponse) VisitDeleteReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type DeleteReplicationRule404JSONResponse struct{ NotFoundJSONResponse } + +func (response DeleteReplicationRule404JSONResponse) VisitDeleteReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type DeleteReplicationRule500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response DeleteReplicationRule500JSONResponse) VisitDeleteReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type GetReplicationRuleRequestObject struct { + Id string `json:"id"` +} + +type GetReplicationRuleResponseObject interface { + VisitGetReplicationRuleResponse(w http.ResponseWriter) error +} + +type GetReplicationRule200JSONResponse struct { + ReplicationRuleResponseJSONResponse +} + +func (response GetReplicationRule200JSONResponse) VisitGetReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type GetReplicationRule400JSONResponse struct{ BadRequestJSONResponse } + +func (response GetReplicationRule400JSONResponse) VisitGetReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type GetReplicationRule401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response GetReplicationRule401JSONResponse) VisitGetReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type GetReplicationRule403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response GetReplicationRule403JSONResponse) VisitGetReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type GetReplicationRule404JSONResponse struct{ NotFoundJSONResponse } + +func (response GetReplicationRule404JSONResponse) VisitGetReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type GetReplicationRule500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response GetReplicationRule500JSONResponse) VisitGetReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type UpdateReplicationRuleRequestObject struct { + Id string `json:"id"` + Body *UpdateReplicationRuleJSONRequestBody +} + +type UpdateReplicationRuleResponseObject interface { + VisitUpdateReplicationRuleResponse(w http.ResponseWriter) error +} + +type UpdateReplicationRule200JSONResponse struct { + ReplicationRuleResponseJSONResponse +} + +func (response UpdateReplicationRule200JSONResponse) VisitUpdateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type UpdateReplicationRule400JSONResponse struct{ BadRequestJSONResponse } + +func (response UpdateReplicationRule400JSONResponse) VisitUpdateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type UpdateReplicationRule401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response UpdateReplicationRule401JSONResponse) VisitUpdateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type UpdateReplicationRule403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response UpdateReplicationRule403JSONResponse) VisitUpdateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type UpdateReplicationRule404JSONResponse struct{ NotFoundJSONResponse } + +func (response UpdateReplicationRule404JSONResponse) VisitUpdateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type UpdateReplicationRule500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response UpdateReplicationRule500JSONResponse) VisitUpdateReplicationRuleResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type ListMigrationImagesRequestObject struct { + Id string `json:"id"` + Params ListMigrationImagesParams +} + +type ListMigrationImagesResponseObject interface { + VisitListMigrationImagesResponse(w http.ResponseWriter) error +} + +type ListMigrationImages200JSONResponse struct { + ListMigrationImageResponseJSONResponse +} + +func (response ListMigrationImages200JSONResponse) VisitListMigrationImagesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type ListMigrationImages400JSONResponse struct{ BadRequestJSONResponse } + +func (response ListMigrationImages400JSONResponse) VisitListMigrationImagesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type ListMigrationImages401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response ListMigrationImages401JSONResponse) VisitListMigrationImagesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type ListMigrationImages403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response ListMigrationImages403JSONResponse) VisitListMigrationImagesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type ListMigrationImages404JSONResponse struct{ NotFoundJSONResponse } + +func (response ListMigrationImages404JSONResponse) VisitListMigrationImagesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type ListMigrationImages500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response ListMigrationImages500JSONResponse) VisitListMigrationImagesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type GetMigrationLogsForImageRequestObject struct { + Id string `json:"id"` + ImageId string `json:"image_id"` +} + +type GetMigrationLogsForImageResponseObject interface { + VisitGetMigrationLogsForImageResponse(w http.ResponseWriter) error +} + +type GetMigrationLogsForImage200TextplainCharsetUtf8Response struct { + PlainTextResponseTextplainCharsetUtf8Response +} + +func (response GetMigrationLogsForImage200TextplainCharsetUtf8Response) VisitGetMigrationLogsForImageResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "text/plain; charset=utf-8") + if response.ContentLength != 0 { + w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength)) + } + w.WriteHeader(200) + + if closer, ok := response.Body.(io.ReadCloser); ok { + defer closer.Close() + } + _, err := io.Copy(w, response.Body) + return err +} + +type GetMigrationLogsForImage400JSONResponse struct{ BadRequestJSONResponse } + +func (response GetMigrationLogsForImage400JSONResponse) VisitGetMigrationLogsForImageResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type GetMigrationLogsForImage401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response GetMigrationLogsForImage401JSONResponse) VisitGetMigrationLogsForImageResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type GetMigrationLogsForImage403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response GetMigrationLogsForImage403JSONResponse) VisitGetMigrationLogsForImageResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type GetMigrationLogsForImage404JSONResponse struct{ NotFoundJSONResponse } + +func (response GetMigrationLogsForImage404JSONResponse) VisitGetMigrationLogsForImageResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type GetMigrationLogsForImage500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response GetMigrationLogsForImage500JSONResponse) VisitGetMigrationLogsForImageResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type StartMigrationRequestObject struct { + Id string `json:"id"` +} + +type StartMigrationResponseObject interface { + VisitStartMigrationResponse(w http.ResponseWriter) error +} + +type StartMigration200JSONResponse struct{ SuccessJSONResponse } + +func (response StartMigration200JSONResponse) VisitStartMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type StartMigration400JSONResponse struct{ BadRequestJSONResponse } + +func (response StartMigration400JSONResponse) VisitStartMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type StartMigration401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response StartMigration401JSONResponse) VisitStartMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type StartMigration403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response StartMigration403JSONResponse) VisitStartMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type StartMigration404JSONResponse struct{ NotFoundJSONResponse } + +func (response StartMigration404JSONResponse) VisitStartMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type StartMigration500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response StartMigration500JSONResponse) VisitStartMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + +type StopMigrationRequestObject struct { + Id string `json:"id"` +} + +type StopMigrationResponseObject interface { + VisitStopMigrationResponse(w http.ResponseWriter) error +} + +type StopMigration200JSONResponse struct{ SuccessJSONResponse } + +func (response StopMigration200JSONResponse) VisitStopMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + + return json.NewEncoder(w).Encode(response) +} + +type StopMigration400JSONResponse struct{ BadRequestJSONResponse } + +func (response StopMigration400JSONResponse) VisitStopMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(400) + + return json.NewEncoder(w).Encode(response) +} + +type StopMigration401JSONResponse struct{ UnauthenticatedJSONResponse } + +func (response StopMigration401JSONResponse) VisitStopMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(401) + + return json.NewEncoder(w).Encode(response) +} + +type StopMigration403JSONResponse struct{ UnauthorizedJSONResponse } + +func (response StopMigration403JSONResponse) VisitStopMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + +type StopMigration404JSONResponse struct{ NotFoundJSONResponse } + +func (response StopMigration404JSONResponse) VisitStopMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(404) + + return json.NewEncoder(w).Encode(response) +} + +type StopMigration500JSONResponse struct { + InternalServerErrorJSONResponse +} + +func (response StopMigration500JSONResponse) VisitStopMigrationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(500) + + return json.NewEncoder(w).Encode(response) +} + type GetArtifactStatsForSpaceRequestObject struct { SpaceRef SpaceRefPathParam `json:"space_ref"` Params GetArtifactStatsForSpaceParams @@ -4757,13 +5733,40 @@ type StrictServerInterface interface { // ReTriggerWebhookExecution // (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}/retrigger) ReTriggerWebhookExecution(ctx context.Context, request ReTriggerWebhookExecutionRequestObject) (ReTriggerWebhookExecutionResponseObject, error) - // Get Artifact Stats + // List replication rules + // (GET /replication/rules) + ListReplicationRules(ctx context.Context, request ListReplicationRulesRequestObject) (ListReplicationRulesResponseObject, error) + // Create a replication rule + // (POST /replication/rules) + CreateReplicationRule(ctx context.Context, request CreateReplicationRuleRequestObject) (CreateReplicationRuleResponseObject, error) + // Delete a replication rule + // (DELETE /replication/rules/{id}) + DeleteReplicationRule(ctx context.Context, request DeleteReplicationRuleRequestObject) (DeleteReplicationRuleResponseObject, error) + // Get a replication rule + // (GET /replication/rules/{id}) + GetReplicationRule(ctx context.Context, request GetReplicationRuleRequestObject) (GetReplicationRuleResponseObject, error) + // Update a replication rule + // (PUT /replication/rules/{id}) + UpdateReplicationRule(ctx context.Context, request UpdateReplicationRuleRequestObject) (UpdateReplicationRuleResponseObject, error) + // List migration images + // (GET /replication/rules/{id}/migration/images) + ListMigrationImages(ctx context.Context, request ListMigrationImagesRequestObject) (ListMigrationImagesResponseObject, error) + // Get migration logs for an image + // (GET /replication/rules/{id}/migration/images/{image_id}/logs) + GetMigrationLogsForImage(ctx context.Context, request GetMigrationLogsForImageRequestObject) (GetMigrationLogsForImageResponseObject, error) + // Start migration + // (POST /replication/rules/{id}/migration/start) + StartMigration(ctx context.Context, request StartMigrationRequestObject) (StartMigrationResponseObject, error) + // Stop migration + // (POST /replication/rules/{id}/migration/stop) + StopMigration(ctx context.Context, request StopMigrationRequestObject) (StopMigrationResponseObject, error) + // Get artifact stats // (GET /spaces/{space_ref}/artifact/stats) GetArtifactStatsForSpace(ctx context.Context, request GetArtifactStatsForSpaceRequestObject) (GetArtifactStatsForSpaceResponseObject, error) - // List Artifacts + // List artifacts // (GET /spaces/{space_ref}/artifacts) GetAllArtifacts(ctx context.Context, request GetAllArtifactsRequestObject) (GetAllArtifactsResponseObject, error) - // List Registries + // List registries // (GET /spaces/{space_ref}/registries) GetAllRegistries(ctx context.Context, request GetAllRegistriesRequestObject) (GetAllRegistriesResponseObject, error) } @@ -5684,6 +6687,256 @@ func (sh *strictHandler) ReTriggerWebhookExecution(w http.ResponseWriter, r *htt } } +// ListReplicationRules operation middleware +func (sh *strictHandler) ListReplicationRules(w http.ResponseWriter, r *http.Request, params ListReplicationRulesParams) { + var request ListReplicationRulesRequestObject + + request.Params = params + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.ListReplicationRules(ctx, request.(ListReplicationRulesRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "ListReplicationRules") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(ListReplicationRulesResponseObject); ok { + if err := validResponse.VisitListReplicationRulesResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// CreateReplicationRule operation middleware +func (sh *strictHandler) CreateReplicationRule(w http.ResponseWriter, r *http.Request, params CreateReplicationRuleParams) { + var request CreateReplicationRuleRequestObject + + request.Params = params + + var body CreateReplicationRuleJSONRequestBody + if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err)) + return + } + request.Body = &body + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.CreateReplicationRule(ctx, request.(CreateReplicationRuleRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "CreateReplicationRule") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(CreateReplicationRuleResponseObject); ok { + if err := validResponse.VisitCreateReplicationRuleResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// DeleteReplicationRule operation middleware +func (sh *strictHandler) DeleteReplicationRule(w http.ResponseWriter, r *http.Request, id string) { + var request DeleteReplicationRuleRequestObject + + request.Id = id + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.DeleteReplicationRule(ctx, request.(DeleteReplicationRuleRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "DeleteReplicationRule") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(DeleteReplicationRuleResponseObject); ok { + if err := validResponse.VisitDeleteReplicationRuleResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// GetReplicationRule operation middleware +func (sh *strictHandler) GetReplicationRule(w http.ResponseWriter, r *http.Request, id string) { + var request GetReplicationRuleRequestObject + + request.Id = id + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.GetReplicationRule(ctx, request.(GetReplicationRuleRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "GetReplicationRule") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(GetReplicationRuleResponseObject); ok { + if err := validResponse.VisitGetReplicationRuleResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// UpdateReplicationRule operation middleware +func (sh *strictHandler) UpdateReplicationRule(w http.ResponseWriter, r *http.Request, id string) { + var request UpdateReplicationRuleRequestObject + + request.Id = id + + var body UpdateReplicationRuleJSONRequestBody + if err := json.NewDecoder(r.Body).Decode(&body); err != nil { + sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err)) + return + } + request.Body = &body + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.UpdateReplicationRule(ctx, request.(UpdateReplicationRuleRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "UpdateReplicationRule") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(UpdateReplicationRuleResponseObject); ok { + if err := validResponse.VisitUpdateReplicationRuleResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// ListMigrationImages operation middleware +func (sh *strictHandler) ListMigrationImages(w http.ResponseWriter, r *http.Request, id string, params ListMigrationImagesParams) { + var request ListMigrationImagesRequestObject + + request.Id = id + request.Params = params + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.ListMigrationImages(ctx, request.(ListMigrationImagesRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "ListMigrationImages") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(ListMigrationImagesResponseObject); ok { + if err := validResponse.VisitListMigrationImagesResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// GetMigrationLogsForImage operation middleware +func (sh *strictHandler) GetMigrationLogsForImage(w http.ResponseWriter, r *http.Request, id string, imageId string) { + var request GetMigrationLogsForImageRequestObject + + request.Id = id + request.ImageId = imageId + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.GetMigrationLogsForImage(ctx, request.(GetMigrationLogsForImageRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "GetMigrationLogsForImage") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(GetMigrationLogsForImageResponseObject); ok { + if err := validResponse.VisitGetMigrationLogsForImageResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// StartMigration operation middleware +func (sh *strictHandler) StartMigration(w http.ResponseWriter, r *http.Request, id string) { + var request StartMigrationRequestObject + + request.Id = id + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.StartMigration(ctx, request.(StartMigrationRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "StartMigration") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(StartMigrationResponseObject); ok { + if err := validResponse.VisitStartMigrationResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + +// StopMigration operation middleware +func (sh *strictHandler) StopMigration(w http.ResponseWriter, r *http.Request, id string) { + var request StopMigrationRequestObject + + request.Id = id + + handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) { + return sh.ssi.StopMigration(ctx, request.(StopMigrationRequestObject)) + } + for _, middleware := range sh.middlewares { + handler = middleware(handler, "StopMigration") + } + + response, err := handler(r.Context(), w, r, request) + + if err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } else if validResponse, ok := response.(StopMigrationResponseObject); ok { + if err := validResponse.VisitStopMigrationResponse(w); err != nil { + sh.options.ResponseErrorHandlerFunc(w, r, err) + } + } else if response != nil { + sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response)) + } +} + // GetArtifactStatsForSpace operation middleware func (sh *strictHandler) GetArtifactStatsForSpace(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetArtifactStatsForSpaceParams) { var request GetArtifactStatsForSpaceRequestObject @@ -5768,97 +7021,114 @@ func (sh *strictHandler) GetAllRegistries(w http.ResponseWriter, r *http.Request // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xd3XLbOpJ+FRZ3LxnLZya7F75TbDlR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7sajvxU5VTObhpOHuuwY78zM0fv415f2JuZuGklKHeba8VjXrJuWxRNNLM1L2lm", - "FHMLH8XEavfMfchNmn6HzYZsoYVO3LrR58WM+wWR50O/IV+LlDpWurDGPc0yleAh8i2uTwRV5sFLKBht", - "UuuZalZmZu5speeM47eFRZ6WJZLDEU22s6qBSUWRbtvJldp0B5BUZ8+8idlOUeqYkbu6ViU1MHiTLwlJ", - "uaeqwwopTuTu+3NlfhVMmNA4DIKQ/gkiqUYd8JhkxCFLKLxhNSSvIMZgYSAPQYDpfpj9KWKkQRjBwPVa", - "VQsbjWxdy6yfBIHCyq5kTRE38ayQk2+Tynz9YbhDbjDqVBp/sJ07L6wjUImoqNFHvxltlyX0f+Bs1fGc", - "0c7kaTIljBv9TmdPIiVOMYp65yqxOs413Qk2mQMLXq/dHii1YGUPaIIN6qoKRqtWyzT372y4E9yn2dob", - "pjsZpsZ77SYc6oJA9mGUaiM5WmD40gZpyRW/ITpNlsFGicA21W3D2WpXsX1Q28kFtVVgVuCgDWc38jzG", - "OhSSJ9ysm44HQcA2t4Y9aixR0+COoQuHsVAxebiKUVN9lQU6ttZJc1VvZ3sF9voVWO6F30V3NVzd9QA4", - "dlh2kY5z+zm1UgsSOmZ9UEGjQlkbHE/QfquS1qvB30gN5mFiFiJTSEoR0NWrwVNTg88WM6qfSSttoASz", - "NOq8vN025CkRnNthUAm81DjU2DTe2mgXzpSinnr9eNL6UZlkHUzNQQ1NR04rWqv9zEkWGOvP7BYoydKx", - "7XGUKRKiic44tTgZWykeqSC/lpgoZXi63WoomobGSfl8sxqpNocIOyRxxDGg4rkgApVkCFAenFPEIYmg", - "Is+9vf84momYH51nQ0OwSROrUlbtoNwy709MFmz9thZEUfIMgwkgBKK426nHY5T4P7as61edJC29Y9Ra", - "umbzibIxVwuvtZaj/MYLCM8Nm72FT8gP3XRcr78cKmXPFr5Cdgfxxg3Bq46xqb0NcgiX9f24pL+k53lF", - "nGpTfJc9CkUpUi34TGN+DRHJQOQkyLl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09fGRhCYlUH5q6SORBVr7SGGAtoBe3s4OobsjvLbBlA95HYxKlv8jn7KB", + "5x08rwNbY3obk1myReuFJR293beaiaWFZ2r83sn+K3rotIZPpdWpTCWLVVx22we7D+hukSRfzx9RkOX9", + "XobdikPWAUhV0hBtIU5WuS2q3OJwPUp1H86VUGfyKh6dO3FPojCi7E0SYsRtQjVr3KudiK/570ESMxTz", + "P2GaRjgQsvIvKmzkspN/y2XixPv/o9KhHomvdGRsnNNR5YOkKjeisjSEDBUuDOAONfU0J3TbRNbbbaEv", + "V4MBQZzAOFS0KrNBEFmQMckitH1ajc2vQXLRDiBZhHLS/ynAtW2Sa832JlViXlq9NE1iWkXuW8Qgjiby", + "Uy+6U5KkiDApCiFkzogWneZsowyyjHbVuxGllAgKef1VVfZF3+WeR3KXr0hmZolx5rIyR6wUlJBTxCWl", + "JnY7ZcxNtlxCIQuHwhmuQoD6rDMo75vumkF5n4fEnrwpamaPmMsBQbQkSVEpjZz9sKja+QFwKqxuPBZb", + "kxrj3sBw20vLOSEJMZH3BoaAqAXH984ijGJ2g1iWCr29K5lvdrzPueLrK6cI0JwkfckQO8d7WVJNXR8g", + "pMOCsCrBH2CMZ4iyvXBLdX6A/FpqpAmir+AKEbpTPokuD9ImyQkreaMmcrfsKXo9TNZc4AhtTRXNcCTZ", + "Uz0zFNv2yQy8hyRGlJb7GBe8hl+en7TxpaS1ebAimjhLMkF1lYDpImcBg5E8UynONjzfQ49wmUbI7dxE", + "HJv06CUvXu3l+Ni5n8s4RI/mfgLtoEhv3r1x89lP3nZsP//RmdVsdovo9iWWNkK5aOLJ996jaLmXdbfZ", + "8QFogQWKlqY1Vyd2xyuuqeuD45S+2l7GDJEYRjeI3CMijORnN7lVp4DyXgESBX3vClO2jw2JRr/7Nr35", + "OmPY19QJ3QNvDootdX5IR3cPbFFnJ4fAHelNU/3OkeLUBzwnnAOXSzhHO2RUteM98GnS4NNSkQTwkts2", + "kkdqh38PUlbv+iClrTwB2TlfDoIf+gGOI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C5Sq8pAzjcJPesoItDleLDNmJADch5y70vSp9/+JOUJARiu/R5kfIw+N4Pc+ONaFpCi9/", + "8jlvQIhR/SpMEY0oHj8ewRSP7n/i8yfbqtc5HV/yp+fFY+4+yPguqQ+iBjHSp9CkOgeSubU5YrIJXRfJ", + "Fsp1vbUBIGMiQTIDIqOfqbFG1jTnNhcoWpparKX0sLdnZNlDGSck2yvujjx9efq/AAAA//8cRKqrLBAB", + "AA==", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/registry/app/api/openapi/contracts/artifact/types.gen.go b/registry/app/api/openapi/contracts/artifact/types.gen.go index 4fa152d13..79c5731eb 100644 --- a/registry/app/api/openapi/contracts/artifact/types.gen.go +++ b/registry/app/api/openapi/contracts/artifact/types.gen.go @@ -1,6 +1,6 @@ // Package artifact provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package artifact import ( @@ -41,6 +41,34 @@ const ( RegistryTypeVIRTUAL RegistryType = "VIRTUAL" ) +// Defines values for ReplicationRuleDestinationType. +const ( + ReplicationRuleDestinationTypeGCP ReplicationRuleDestinationType = "GCP" + ReplicationRuleDestinationTypeJfrog ReplicationRuleDestinationType = "Jfrog" + ReplicationRuleDestinationTypeLocal ReplicationRuleDestinationType = "Local" +) + +// Defines values for ReplicationRuleSourceType. +const ( + ReplicationRuleSourceTypeGCP ReplicationRuleSourceType = "GCP" + ReplicationRuleSourceTypeJfrog ReplicationRuleSourceType = "Jfrog" + ReplicationRuleSourceTypeLocal ReplicationRuleSourceType = "Local" +) + +// Defines values for ReplicationRuleRequestDestinationType. +const ( + ReplicationRuleRequestDestinationTypeGCP ReplicationRuleRequestDestinationType = "GCP" + ReplicationRuleRequestDestinationTypeJfrog ReplicationRuleRequestDestinationType = "Jfrog" + ReplicationRuleRequestDestinationTypeLocal ReplicationRuleRequestDestinationType = "Local" +) + +// Defines values for ReplicationRuleRequestSourceType. +const ( + ReplicationRuleRequestSourceTypeGCP ReplicationRuleRequestSourceType = "GCP" + ReplicationRuleRequestSourceTypeJfrog ReplicationRuleRequestSourceType = "Jfrog" + ReplicationRuleRequestSourceTypeLocal ReplicationRuleRequestSourceType = "Local" +) + // Defines values for SectionType. const ( SectionTypeINLINE SectionType = "INLINE" @@ -346,6 +374,15 @@ type HelmArtifactManifest struct { Manifest string `json:"manifest"` } +// JfrogReplicationRegistry defines model for JfrogReplicationRegistry. +type JfrogReplicationRegistry struct { + Namespace string `json:"namespace"` + PasswordSecretId *string `json:"passwordSecretId,omitempty"` + PasswordSecretSpaceId *string `json:"passwordSecretSpaceId,omitempty"` + Url string `json:"url"` + Username *string `json:"username,omitempty"` +} + // ListArtifact A list of Artifacts type ListArtifact struct { // Artifacts A list of Artifact @@ -398,6 +435,24 @@ type ListArtifactVersion struct { PageSize *int `json:"pageSize,omitempty"` } +// ListMigrationImage A list of migration images +type ListMigrationImage struct { + // Images A list of Artifact versions + Images []MigrationImage `json:"images"` + + // ItemCount The total number of items + ItemCount int64 `json:"itemCount"` + + // PageCount The total number of pages + PageCount int64 `json:"pageCount"` + + // PageIndex The current page + PageIndex int64 `json:"pageIndex"` + + // PageSize The number of items per page + PageSize int `json:"pageSize"` +} + // ListRegistry A list of Harness Artifact Registries type ListRegistry struct { // ItemCount The total number of items @@ -434,6 +489,24 @@ type ListRegistryArtifact struct { PageSize *int `json:"pageSize,omitempty"` } +// ListReplicationRule A list of replication rules +type ListReplicationRule struct { + // ItemCount The total number of items + ItemCount int64 `json:"itemCount"` + + // PageCount The total number of pages + PageCount int64 `json:"pageCount"` + + // PageIndex The current page + PageIndex int64 `json:"pageIndex"` + + // PageSize The number of items per page + PageSize int `json:"pageSize"` + + // Rules A list of Replication Rules + Rules []ReplicationRule `json:"rules"` +} + // ListWebhooks A list of Harness Registries webhooks type ListWebhooks struct { // ItemCount The total number of items @@ -470,12 +543,25 @@ type ListWebhooksExecutions struct { PageSize *int `json:"pageSize,omitempty"` } +// LocalReplicationRegistry defines model for LocalReplicationRegistry. +type LocalReplicationRegistry struct { + RegistryIdentifier string `json:"registryIdentifier"` +} + // MavenArtifactDetailConfig Config for maven artifact details type MavenArtifactDetailConfig struct { ArtifactId *string `json:"artifactId,omitempty"` GroupId *string `json:"groupId,omitempty"` } +// MigrationImage defines model for MigrationImage. +type MigrationImage struct { + ImageId *string `json:"imageId,omitempty"` + ImageTag *string `json:"imageTag,omitempty"` + Progress *int `json:"progress,omitempty"` + Status *string `json:"status,omitempty"` +} + // NpmArtifactDetailConfig Config for npm artifact details type NpmArtifactDetailConfig struct { Metadata *map[string]interface{} `json:"metadata,omitempty"` @@ -568,6 +654,47 @@ type RegistryRequest struct { // RegistryType refers to type of registry i.e virtual or upstream type RegistryType string +// ReplicationRegistry defines model for ReplicationRegistry. +type ReplicationRegistry struct { + union json.RawMessage +} + +// ReplicationRule defines model for ReplicationRule. +type ReplicationRule struct { + AllowedPatterns []string `json:"allowedPatterns"` + BlockedPatterns []string `json:"blockedPatterns"` + CreatedAt string `json:"createdAt"` + Destination ReplicationRegistry `json:"destination"` + DestinationType ReplicationRuleDestinationType `json:"destinationType"` + Identifier string `json:"identifier"` + ModifiedAt string `json:"modifiedAt"` + ParentRef string `json:"parentRef"` + Source ReplicationRegistry `json:"source"` + SourceType ReplicationRuleSourceType `json:"sourceType"` +} + +// ReplicationRuleDestinationType defines model for ReplicationRule.DestinationType. +type ReplicationRuleDestinationType string + +// ReplicationRuleSourceType defines model for ReplicationRule.SourceType. +type ReplicationRuleSourceType string + +// ReplicationRuleRequest defines model for ReplicationRuleRequest. +type ReplicationRuleRequest struct { + AllowedPatterns []string `json:"allowedPatterns"` + BlockedPatterns []string `json:"blockedPatterns"` + Destination ReplicationRegistry `json:"destination"` + DestinationType ReplicationRuleRequestDestinationType `json:"destinationType"` + Source ReplicationRegistry `json:"source"` + SourceType ReplicationRuleRequestSourceType `json:"sourceType"` +} + +// ReplicationRuleRequestDestinationType defines model for ReplicationRuleRequest.DestinationType. +type ReplicationRuleRequestDestinationType string + +// ReplicationRuleRequestSourceType defines model for ReplicationRuleRequest.SourceType. +type ReplicationRuleRequestSourceType string + // SectionType refers to client setup section type type SectionType string @@ -932,6 +1059,15 @@ type ListArtifactVersionResponse struct { Status Status `json:"status"` } +// ListMigrationImageResponse defines model for ListMigrationImageResponse. +type ListMigrationImageResponse struct { + // Data A list of migration images + Data ListMigrationImage `json:"data"` + + // Status Indicates if the request was successful or not + Status Status `json:"status"` +} + // ListRegistryArtifactResponse defines model for ListRegistryArtifactResponse. type ListRegistryArtifactResponse struct { // Data A list of Artifacts @@ -950,6 +1086,15 @@ type ListRegistryResponse struct { Status Status `json:"status"` } +// ListReplicationRuleResponse defines model for ListReplicationRuleResponse. +type ListReplicationRuleResponse struct { + // Data A list of replication rules + Data ListReplicationRule `json:"data"` + + // Status Indicates if the request was successful or not + Status Status `json:"status"` +} + // ListWebhooksExecutionResponse defines model for ListWebhooksExecutionResponse. type ListWebhooksExecutionResponse struct { // Data A list of Harness Registries webhooks executions @@ -980,6 +1125,14 @@ type RegistryResponse struct { Status Status `json:"status"` } +// ReplicationRuleResponse defines model for ReplicationRuleResponse. +type ReplicationRuleResponse struct { + Data ReplicationRule `json:"data"` + + // Status Indicates if the request was successful or not + Status Status `json:"status"` +} + // Success defines model for Success. type Success struct { // Status Indicates if the request was successful or not @@ -1012,7 +1165,7 @@ type WebhookResponse struct { // CreateRegistryParams defines parameters for CreateRegistry. type CreateRegistryParams struct { - // SpaceRef Unique space path + // SpaceRef Unique path identifier for the final space in the branch. The value can be provided either as a fully URL-encoded path (e.g., `organization%2Fproject`) or as a plain path ending with a trailing plus sign (`+`) as separator (e.g., `organization/project/+`). SpaceRef *SpaceRefQueryParam `form:"space_ref,omitempty" json:"space_ref,omitempty"` } @@ -1163,6 +1316,33 @@ type ListWebhookExecutionsParams struct { Size *PageSize `form:"size,omitempty" json:"size,omitempty"` } +// ListReplicationRulesParams defines parameters for ListReplicationRules. +type ListReplicationRulesParams struct { + // SpaceRef Unique path identifier for the final space in the branch. The value can be provided either as a fully URL-encoded path (e.g., `organization%2Fproject`) or as a plain path ending with a trailing plus sign (`+`) as separator (e.g., `organization/project/+`). + SpaceRef *SpaceRefQueryParam `form:"space_ref,omitempty" json:"space_ref,omitempty"` +} + +// CreateReplicationRuleParams defines parameters for CreateReplicationRule. +type CreateReplicationRuleParams struct { + // SpaceRef Unique path identifier for the final space in the branch. The value can be provided either as a fully URL-encoded path (e.g., `organization%2Fproject`) or as a plain path ending with a trailing plus sign (`+`) as separator (e.g., `organization/project/+`). + SpaceRef *SpaceRefQueryParam `form:"space_ref,omitempty" json:"space_ref,omitempty"` +} + +// ListMigrationImagesParams defines parameters for ListMigrationImages. +type ListMigrationImagesParams struct { + // Page Current page number + Page *PageNumber `form:"page,omitempty" json:"page,omitempty"` + + // Size Number of items per page + Size *PageSize `form:"size,omitempty" json:"size,omitempty"` + + // SortOrder sortOrder + SortOrder *SortOrder `form:"sort_order,omitempty" json:"sort_order,omitempty"` + + // SortField sortField + SortField *SortField `form:"sort_field,omitempty" json:"sort_field,omitempty"` +} + // GetArtifactStatsForSpaceParams defines parameters for GetArtifactStatsForSpace. type GetArtifactStatsForSpaceParams struct { // From Date. Format - MM/DD/YYYY @@ -1244,6 +1424,12 @@ type CreateWebhookJSONRequestBody WebhookRequest // UpdateWebhookJSONRequestBody defines body for UpdateWebhook for application/json ContentType. type UpdateWebhookJSONRequestBody WebhookRequest +// CreateReplicationRuleJSONRequestBody defines body for CreateReplicationRule for application/json ContentType. +type CreateReplicationRuleJSONRequestBody ReplicationRuleRequest + +// UpdateReplicationRuleJSONRequestBody defines body for UpdateReplicationRule for application/json ContentType. +type UpdateReplicationRuleJSONRequestBody ReplicationRuleRequest + // AsDockerArtifactDetailConfig returns the union data inside the ArtifactDetail as a DockerArtifactDetailConfig func (t ArtifactDetail) AsDockerArtifactDetailConfig() (DockerArtifactDetailConfig, error) { var body DockerArtifactDetailConfig @@ -1874,6 +2060,68 @@ func (t *RegistryConfig) UnmarshalJSON(b []byte) error { return err } +// AsLocalReplicationRegistry returns the union data inside the ReplicationRegistry as a LocalReplicationRegistry +func (t ReplicationRegistry) AsLocalReplicationRegistry() (LocalReplicationRegistry, error) { + var body LocalReplicationRegistry + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLocalReplicationRegistry overwrites any union data inside the ReplicationRegistry as the provided LocalReplicationRegistry +func (t *ReplicationRegistry) FromLocalReplicationRegistry(v LocalReplicationRegistry) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLocalReplicationRegistry performs a merge with any union data inside the ReplicationRegistry, using the provided LocalReplicationRegistry +func (t *ReplicationRegistry) MergeLocalReplicationRegistry(v LocalReplicationRegistry) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsJfrogReplicationRegistry returns the union data inside the ReplicationRegistry as a JfrogReplicationRegistry +func (t ReplicationRegistry) AsJfrogReplicationRegistry() (JfrogReplicationRegistry, error) { + var body JfrogReplicationRegistry + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromJfrogReplicationRegistry overwrites any union data inside the ReplicationRegistry as the provided JfrogReplicationRegistry +func (t *ReplicationRegistry) FromJfrogReplicationRegistry(v JfrogReplicationRegistry) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeJfrogReplicationRegistry performs a merge with any union data inside the ReplicationRegistry, using the provided JfrogReplicationRegistry +func (t *ReplicationRegistry) MergeJfrogReplicationRegistry(v JfrogReplicationRegistry) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t ReplicationRegistry) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *ReplicationRegistry) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + // AsUserPassword returns the union data inside the UpstreamConfig_Auth as a UserPassword func (t UpstreamConfig_Auth) AsUserPassword() (UserPassword, error) { var body UserPassword