mirror of https://github.com/harness/drone.git
5935 lines
220 KiB
Go
5935 lines
220 KiB
Go
// 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.
|
|
package artifact
|
|
|
|
import (
|
|
"bytes"
|
|
"compress/gzip"
|
|
"context"
|
|
"encoding/base64"
|
|
"encoding/json"
|
|
"fmt"
|
|
"net/http"
|
|
"net/url"
|
|
"path"
|
|
"strings"
|
|
|
|
"github.com/getkin/kin-openapi/openapi3"
|
|
"github.com/go-chi/chi/v5"
|
|
"github.com/oapi-codegen/runtime"
|
|
strictnethttp "github.com/oapi-codegen/runtime/strictmiddleware/nethttp"
|
|
)
|
|
|
|
// ServerInterface represents all server handlers.
|
|
type ServerInterface interface {
|
|
// Create Registry.
|
|
// (POST /registry)
|
|
CreateRegistry(w http.ResponseWriter, r *http.Request, params CreateRegistryParams)
|
|
// Delete a Registry
|
|
// (DELETE /registry/{registry_ref})
|
|
DeleteRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam)
|
|
// Returns Registry Details
|
|
// (GET /registry/{registry_ref})
|
|
GetRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam)
|
|
// Updates a Registry
|
|
// (PUT /registry/{registry_ref})
|
|
ModifyRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam)
|
|
// List Artifact Labels
|
|
// (GET /registry/{registry_ref}/artifact/labels)
|
|
ListArtifactLabels(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params ListArtifactLabelsParams)
|
|
// Get Artifact Stats
|
|
// (GET /registry/{registry_ref}/artifact/stats)
|
|
GetArtifactStatsForRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetArtifactStatsForRegistryParams)
|
|
// Delete Artifact
|
|
// (DELETE /registry/{registry_ref}/artifact/{artifact})
|
|
DeleteArtifact(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam)
|
|
// Update Artifact Labels
|
|
// (PUT /registry/{registry_ref}/artifact/{artifact}/labels)
|
|
UpdateArtifactLabels(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam)
|
|
// Get Artifact Stats
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/stats)
|
|
GetArtifactStats(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, params GetArtifactStatsParams)
|
|
// Get Artifact Summary
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/summary)
|
|
GetArtifactSummary(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam)
|
|
// Delete an Artifact Version
|
|
// (DELETE /registry/{registry_ref}/artifact/{artifact}/version/{version})
|
|
DeleteArtifactVersion(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam)
|
|
// Describe Artifact Details
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/details)
|
|
GetArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetArtifactDetailsParams)
|
|
// Describe Docker Artifact Detail
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details)
|
|
GetDockerArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactDetailsParams)
|
|
// Describe Docker Artifact Layers
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers)
|
|
GetDockerArtifactLayers(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactLayersParams)
|
|
// Describe Docker Artifact Manifest
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest)
|
|
GetDockerArtifactManifest(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactManifestParams)
|
|
// Describe Docker Artifact Manifests
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests)
|
|
GetDockerArtifactManifests(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam)
|
|
// Describe Artifact files
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/files)
|
|
GetArtifactFiles(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetArtifactFilesParams)
|
|
// Describe Helm Artifact Detail
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details)
|
|
GetHelmArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam)
|
|
// Describe Helm Artifact Manifest
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest)
|
|
GetHelmArtifactManifest(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam)
|
|
// Get Artifact Version Summary
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/summary)
|
|
GetArtifactVersionSummary(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam)
|
|
// List Artifact Versions
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/versions)
|
|
GetAllArtifactVersions(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, params GetAllArtifactVersionsParams)
|
|
// List Artifacts for Registry
|
|
// (GET /registry/{registry_ref}/artifacts)
|
|
GetAllArtifactsByRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetAllArtifactsByRegistryParams)
|
|
// Returns CLI Client Setup Details
|
|
// (GET /registry/{registry_ref}/client-setup-details)
|
|
GetClientSetupDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetClientSetupDetailsParams)
|
|
// ListWebhooks
|
|
// (GET /registry/{registry_ref}/webhooks)
|
|
ListWebhooks(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params ListWebhooksParams)
|
|
// CreateWebhook
|
|
// (POST /registry/{registry_ref}/webhooks)
|
|
CreateWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam)
|
|
// DeleteWebhook
|
|
// (DELETE /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
DeleteWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam)
|
|
// GetWebhook
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
GetWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam)
|
|
// UpdateWebhook
|
|
// (PUT /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
UpdateWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam)
|
|
// ListWebhookExecutions
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions)
|
|
ListWebhookExecutions(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, params ListWebhookExecutionsParams)
|
|
// GetWebhookExecution
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id})
|
|
GetWebhookExecution(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, webhookExecutionId WebhookExecutionIdPathParam)
|
|
// 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
|
|
// (GET /spaces/{space_ref}/artifact/stats)
|
|
GetArtifactStatsForSpace(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetArtifactStatsForSpaceParams)
|
|
// List Artifacts
|
|
// (GET /spaces/{space_ref}/artifacts)
|
|
GetAllArtifacts(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllArtifactsParams)
|
|
// List Registries
|
|
// (GET /spaces/{space_ref}/registries)
|
|
GetAllRegistries(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllRegistriesParams)
|
|
}
|
|
|
|
// Unimplemented server implementation that returns http.StatusNotImplemented for each endpoint.
|
|
|
|
type Unimplemented struct{}
|
|
|
|
// Create Registry.
|
|
// (POST /registry)
|
|
func (_ Unimplemented) CreateRegistry(w http.ResponseWriter, r *http.Request, params CreateRegistryParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Delete a Registry
|
|
// (DELETE /registry/{registry_ref})
|
|
func (_ Unimplemented) DeleteRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Returns Registry Details
|
|
// (GET /registry/{registry_ref})
|
|
func (_ Unimplemented) GetRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Updates a Registry
|
|
// (PUT /registry/{registry_ref})
|
|
func (_ Unimplemented) ModifyRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List Artifact Labels
|
|
// (GET /registry/{registry_ref}/artifact/labels)
|
|
func (_ Unimplemented) ListArtifactLabels(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params ListArtifactLabelsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Get Artifact Stats
|
|
// (GET /registry/{registry_ref}/artifact/stats)
|
|
func (_ Unimplemented) GetArtifactStatsForRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetArtifactStatsForRegistryParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Delete Artifact
|
|
// (DELETE /registry/{registry_ref}/artifact/{artifact})
|
|
func (_ Unimplemented) DeleteArtifact(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Update Artifact Labels
|
|
// (PUT /registry/{registry_ref}/artifact/{artifact}/labels)
|
|
func (_ Unimplemented) UpdateArtifactLabels(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Get Artifact Stats
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/stats)
|
|
func (_ Unimplemented) GetArtifactStats(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, params GetArtifactStatsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Get Artifact Summary
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/summary)
|
|
func (_ Unimplemented) GetArtifactSummary(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Delete an Artifact Version
|
|
// (DELETE /registry/{registry_ref}/artifact/{artifact}/version/{version})
|
|
func (_ Unimplemented) DeleteArtifactVersion(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Artifact Details
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/details)
|
|
func (_ Unimplemented) GetArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetArtifactDetailsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Docker Artifact Detail
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details)
|
|
func (_ Unimplemented) GetDockerArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactDetailsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Docker Artifact Layers
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers)
|
|
func (_ Unimplemented) GetDockerArtifactLayers(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactLayersParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Docker Artifact Manifest
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest)
|
|
func (_ Unimplemented) GetDockerArtifactManifest(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactManifestParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Docker Artifact Manifests
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests)
|
|
func (_ Unimplemented) GetDockerArtifactManifests(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Artifact files
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/files)
|
|
func (_ Unimplemented) GetArtifactFiles(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetArtifactFilesParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Helm Artifact Detail
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details)
|
|
func (_ Unimplemented) GetHelmArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Describe Helm Artifact Manifest
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest)
|
|
func (_ Unimplemented) GetHelmArtifactManifest(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Get Artifact Version Summary
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/summary)
|
|
func (_ Unimplemented) GetArtifactVersionSummary(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List Artifact Versions
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/versions)
|
|
func (_ Unimplemented) GetAllArtifactVersions(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, params GetAllArtifactVersionsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List Artifacts for Registry
|
|
// (GET /registry/{registry_ref}/artifacts)
|
|
func (_ Unimplemented) GetAllArtifactsByRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetAllArtifactsByRegistryParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// Returns CLI Client Setup Details
|
|
// (GET /registry/{registry_ref}/client-setup-details)
|
|
func (_ Unimplemented) GetClientSetupDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetClientSetupDetailsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// ListWebhooks
|
|
// (GET /registry/{registry_ref}/webhooks)
|
|
func (_ Unimplemented) ListWebhooks(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params ListWebhooksParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// CreateWebhook
|
|
// (POST /registry/{registry_ref}/webhooks)
|
|
func (_ Unimplemented) CreateWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// DeleteWebhook
|
|
// (DELETE /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
func (_ Unimplemented) DeleteWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// GetWebhook
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
func (_ Unimplemented) GetWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// UpdateWebhook
|
|
// (PUT /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
func (_ Unimplemented) UpdateWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// ListWebhookExecutions
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions)
|
|
func (_ Unimplemented) ListWebhookExecutions(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, params ListWebhookExecutionsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// GetWebhookExecution
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id})
|
|
func (_ Unimplemented) GetWebhookExecution(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, webhookExecutionId WebhookExecutionIdPathParam) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// ReTriggerWebhookExecution
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}/retrigger)
|
|
func (_ Unimplemented) ReTriggerWebhookExecution(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, webhookExecutionId WebhookExecutionIdPathParam) {
|
|
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
|
|
// (GET /spaces/{space_ref}/artifacts)
|
|
func (_ Unimplemented) GetAllArtifacts(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllArtifactsParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// List Registries
|
|
// (GET /spaces/{space_ref}/registries)
|
|
func (_ Unimplemented) GetAllRegistries(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllRegistriesParams) {
|
|
w.WriteHeader(http.StatusNotImplemented)
|
|
}
|
|
|
|
// ServerInterfaceWrapper converts contexts to parameters.
|
|
type ServerInterfaceWrapper struct {
|
|
Handler ServerInterface
|
|
HandlerMiddlewares []MiddlewareFunc
|
|
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
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
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params CreateRegistryParams
|
|
|
|
// ------------- 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.CreateRegistry(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// DeleteRegistry operation middleware
|
|
func (siw *ServerInterfaceWrapper) DeleteRegistry(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DeleteRegistry(w, r, registryRef)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetRegistry operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetRegistry(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetRegistry(w, r, registryRef)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// ModifyRegistry operation middleware
|
|
func (siw *ServerInterfaceWrapper) ModifyRegistry(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ModifyRegistry(w, r, registryRef)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// ListArtifactLabels operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListArtifactLabels(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListArtifactLabelsParams
|
|
|
|
// ------------- 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 "search_term" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "search_term", r.URL.Query(), ¶ms.SearchTerm)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search_term", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListArtifactLabels(w, r, registryRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetArtifactStatsForRegistry operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetArtifactStatsForRegistry(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetArtifactStatsForRegistryParams
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetArtifactStatsForRegistry(w, r, registryRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// DeleteArtifact operation middleware
|
|
func (siw *ServerInterfaceWrapper) DeleteArtifact(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DeleteArtifact(w, r, registryRef, artifact)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// UpdateArtifactLabels operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateArtifactLabels(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateArtifactLabels(w, r, registryRef, artifact)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetArtifactStats operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetArtifactStats(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetArtifactStatsParams
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetArtifactStats(w, r, registryRef, artifact, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetArtifactSummary operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetArtifactSummary(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetArtifactSummary(w, r, registryRef, artifact)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// DeleteArtifactVersion operation middleware
|
|
func (siw *ServerInterfaceWrapper) DeleteArtifactVersion(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DeleteArtifactVersion(w, r, registryRef, artifact, version)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetArtifactDetails operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetArtifactDetails(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetArtifactDetailsParams
|
|
|
|
// ------------- Optional query parameter "childVersion" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "childVersion", r.URL.Query(), ¶ms.ChildVersion)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "childVersion", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetArtifactDetails(w, r, registryRef, artifact, version, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetDockerArtifactDetails operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetDockerArtifactDetails(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetDockerArtifactDetailsParams
|
|
|
|
// ------------- Required query parameter "digest" -------------
|
|
|
|
if paramValue := r.URL.Query().Get("digest"); paramValue != "" {
|
|
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "digest"})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindQueryParameter("form", true, true, "digest", r.URL.Query(), ¶ms.Digest)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "digest", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetDockerArtifactDetails(w, r, registryRef, artifact, version, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetDockerArtifactLayers operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetDockerArtifactLayers(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetDockerArtifactLayersParams
|
|
|
|
// ------------- Required query parameter "digest" -------------
|
|
|
|
if paramValue := r.URL.Query().Get("digest"); paramValue != "" {
|
|
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "digest"})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindQueryParameter("form", true, true, "digest", r.URL.Query(), ¶ms.Digest)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "digest", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetDockerArtifactLayers(w, r, registryRef, artifact, version, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetDockerArtifactManifest operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetDockerArtifactManifest(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetDockerArtifactManifestParams
|
|
|
|
// ------------- Required query parameter "digest" -------------
|
|
|
|
if paramValue := r.URL.Query().Get("digest"); paramValue != "" {
|
|
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "digest"})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindQueryParameter("form", true, true, "digest", r.URL.Query(), ¶ms.Digest)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "digest", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetDockerArtifactManifest(w, r, registryRef, artifact, version, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetDockerArtifactManifests operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetDockerArtifactManifests(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetDockerArtifactManifests(w, r, registryRef, artifact, version)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetArtifactFiles operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetArtifactFiles(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetArtifactFilesParams
|
|
|
|
// ------------- 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
|
|
}
|
|
|
|
// ------------- Optional query parameter "search_term" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "search_term", r.URL.Query(), ¶ms.SearchTerm)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search_term", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetArtifactFiles(w, r, registryRef, artifact, version, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetHelmArtifactDetails operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetHelmArtifactDetails(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetHelmArtifactDetails(w, r, registryRef, artifact, version)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetHelmArtifactManifest operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetHelmArtifactManifest(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetHelmArtifactManifest(w, r, registryRef, artifact, version)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetArtifactVersionSummary operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetArtifactVersionSummary(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "version" -------------
|
|
var version VersionPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "version", chi.URLParam(r, "version"), &version, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetArtifactVersionSummary(w, r, registryRef, artifact, version)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetAllArtifactVersions operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetAllArtifactVersions(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "artifact" -------------
|
|
var artifact ArtifactPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "artifact", chi.URLParam(r, "artifact"), &artifact, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetAllArtifactVersionsParams
|
|
|
|
// ------------- 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
|
|
}
|
|
|
|
// ------------- Optional query parameter "search_term" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "search_term", r.URL.Query(), ¶ms.SearchTerm)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search_term", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetAllArtifactVersions(w, r, registryRef, artifact, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetAllArtifactsByRegistry operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetAllArtifactsByRegistry(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetAllArtifactsByRegistryParams
|
|
|
|
// ------------- Optional query parameter "label" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "label", r.URL.Query(), ¶ms.Label)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "label", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- 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
|
|
}
|
|
|
|
// ------------- Optional query parameter "search_term" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "search_term", r.URL.Query(), ¶ms.SearchTerm)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search_term", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetAllArtifactsByRegistry(w, r, registryRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetClientSetupDetails operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetClientSetupDetails(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetClientSetupDetailsParams
|
|
|
|
// ------------- Optional query parameter "artifact" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "artifact", r.URL.Query(), ¶ms.Artifact)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "artifact", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "version" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "version", r.URL.Query(), ¶ms.Version)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "version", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetClientSetupDetails(w, r, registryRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// ListWebhooks operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListWebhooks(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListWebhooksParams
|
|
|
|
// ------------- 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
|
|
}
|
|
|
|
// ------------- Optional query parameter "search_term" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "search_term", r.URL.Query(), ¶ms.SearchTerm)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search_term", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListWebhooks(w, r, registryRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// CreateWebhook operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateWebhook(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateWebhook(w, r, registryRef)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// DeleteWebhook operation middleware
|
|
func (siw *ServerInterfaceWrapper) DeleteWebhook(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_identifier" -------------
|
|
var webhookIdentifier WebhookIdentifierPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_identifier", chi.URLParam(r, "webhook_identifier"), &webhookIdentifier, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_identifier", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DeleteWebhook(w, r, registryRef, webhookIdentifier)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetWebhook operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetWebhook(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_identifier" -------------
|
|
var webhookIdentifier WebhookIdentifierPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_identifier", chi.URLParam(r, "webhook_identifier"), &webhookIdentifier, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_identifier", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetWebhook(w, r, registryRef, webhookIdentifier)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// UpdateWebhook operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateWebhook(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_identifier" -------------
|
|
var webhookIdentifier WebhookIdentifierPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_identifier", chi.URLParam(r, "webhook_identifier"), &webhookIdentifier, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_identifier", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateWebhook(w, r, registryRef, webhookIdentifier)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// ListWebhookExecutions operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListWebhookExecutions(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_identifier" -------------
|
|
var webhookIdentifier WebhookIdentifierPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_identifier", chi.URLParam(r, "webhook_identifier"), &webhookIdentifier, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_identifier", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListWebhookExecutionsParams
|
|
|
|
// ------------- 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
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListWebhookExecutions(w, r, registryRef, webhookIdentifier, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetWebhookExecution operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetWebhookExecution(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_identifier" -------------
|
|
var webhookIdentifier WebhookIdentifierPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_identifier", chi.URLParam(r, "webhook_identifier"), &webhookIdentifier, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_identifier", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_execution_id" -------------
|
|
var webhookExecutionId WebhookExecutionIdPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_execution_id", chi.URLParam(r, "webhook_execution_id"), &webhookExecutionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_execution_id", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetWebhookExecution(w, r, registryRef, webhookIdentifier, webhookExecutionId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// ReTriggerWebhookExecution operation middleware
|
|
func (siw *ServerInterfaceWrapper) ReTriggerWebhookExecution(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "registry_ref" -------------
|
|
var registryRef RegistryRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "registry_ref", chi.URLParam(r, "registry_ref"), ®istryRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "registry_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_identifier" -------------
|
|
var webhookIdentifier WebhookIdentifierPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_identifier", chi.URLParam(r, "webhook_identifier"), &webhookIdentifier, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_identifier", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "webhook_execution_id" -------------
|
|
var webhookExecutionId WebhookExecutionIdPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "webhook_execution_id", chi.URLParam(r, "webhook_execution_id"), &webhookExecutionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "webhook_execution_id", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ReTriggerWebhookExecution(w, r, registryRef, webhookIdentifier, webhookExecutionId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetArtifactStatsForSpace operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetArtifactStatsForSpace(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "space_ref" -------------
|
|
var spaceRef SpaceRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "space_ref", chi.URLParam(r, "space_ref"), &spaceRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "space_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetArtifactStatsForSpaceParams
|
|
|
|
// ------------- Optional query parameter "from" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "from", r.URL.Query(), ¶ms.From)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "from", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "to" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "to", r.URL.Query(), ¶ms.To)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "to", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetArtifactStatsForSpace(w, r, spaceRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetAllArtifacts operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetAllArtifacts(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "space_ref" -------------
|
|
var spaceRef SpaceRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "space_ref", chi.URLParam(r, "space_ref"), &spaceRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "space_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetAllArtifactsParams
|
|
|
|
// ------------- Optional query parameter "reg_identifier" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "reg_identifier", r.URL.Query(), ¶ms.RegIdentifier)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "reg_identifier", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- 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
|
|
}
|
|
|
|
// ------------- Optional query parameter "search_term" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "search_term", r.URL.Query(), ¶ms.SearchTerm)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search_term", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "latest_version" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "latest_version", r.URL.Query(), ¶ms.LatestVersion)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "latest_version", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "package_type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "package_type", r.URL.Query(), ¶ms.PackageType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "package_type", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetAllArtifacts(w, r, spaceRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
// GetAllRegistries operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetAllRegistries(w http.ResponseWriter, r *http.Request) {
|
|
ctx := r.Context()
|
|
|
|
var err error
|
|
|
|
// ------------- Path parameter "space_ref" -------------
|
|
var spaceRef SpaceRefPathParam
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "space_ref", chi.URLParam(r, "space_ref"), &spaceRef, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "space_ref", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetAllRegistriesParams
|
|
|
|
// ------------- Optional query parameter "package_type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "package_type", r.URL.Query(), ¶ms.PackageType)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "package_type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "type" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "type", r.URL.Query(), ¶ms.Type)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- 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
|
|
}
|
|
|
|
// ------------- Optional query parameter "search_term" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "search_term", r.URL.Query(), ¶ms.SearchTerm)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "search_term", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "recursive" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "recursive", r.URL.Query(), ¶ms.Recursive)
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "recursive", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetAllRegistries(w, r, spaceRef, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r.WithContext(ctx))
|
|
}
|
|
|
|
type UnescapedCookieParamError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *UnescapedCookieParamError) Error() string {
|
|
return fmt.Sprintf("error unescaping cookie parameter '%s'", e.ParamName)
|
|
}
|
|
|
|
func (e *UnescapedCookieParamError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type UnmarshalingParamError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *UnmarshalingParamError) Error() string {
|
|
return fmt.Sprintf("Error unmarshaling parameter %s as JSON: %s", e.ParamName, e.Err.Error())
|
|
}
|
|
|
|
func (e *UnmarshalingParamError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type RequiredParamError struct {
|
|
ParamName string
|
|
}
|
|
|
|
func (e *RequiredParamError) Error() string {
|
|
return fmt.Sprintf("Query argument %s is required, but not found", e.ParamName)
|
|
}
|
|
|
|
type RequiredHeaderError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *RequiredHeaderError) Error() string {
|
|
return fmt.Sprintf("Header parameter %s is required, but not found", e.ParamName)
|
|
}
|
|
|
|
func (e *RequiredHeaderError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type InvalidParamFormatError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *InvalidParamFormatError) Error() string {
|
|
return fmt.Sprintf("Invalid format for parameter %s: %s", e.ParamName, e.Err.Error())
|
|
}
|
|
|
|
func (e *InvalidParamFormatError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type TooManyValuesForParamError struct {
|
|
ParamName string
|
|
Count int
|
|
}
|
|
|
|
func (e *TooManyValuesForParamError) Error() string {
|
|
return fmt.Sprintf("Expected one value for %s, got %d", e.ParamName, e.Count)
|
|
}
|
|
|
|
// Handler creates http.Handler with routing matching OpenAPI spec.
|
|
func Handler(si ServerInterface) http.Handler {
|
|
return HandlerWithOptions(si, ChiServerOptions{})
|
|
}
|
|
|
|
type ChiServerOptions struct {
|
|
BaseURL string
|
|
BaseRouter chi.Router
|
|
Middlewares []MiddlewareFunc
|
|
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
// HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
|
|
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler {
|
|
return HandlerWithOptions(si, ChiServerOptions{
|
|
BaseRouter: r,
|
|
})
|
|
}
|
|
|
|
func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler {
|
|
return HandlerWithOptions(si, ChiServerOptions{
|
|
BaseURL: baseURL,
|
|
BaseRouter: r,
|
|
})
|
|
}
|
|
|
|
// HandlerWithOptions creates http.Handler with additional options
|
|
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler {
|
|
r := options.BaseRouter
|
|
|
|
if r == nil {
|
|
r = chi.NewRouter()
|
|
}
|
|
if options.ErrorHandlerFunc == nil {
|
|
options.ErrorHandlerFunc = func(w http.ResponseWriter, r *http.Request, err error) {
|
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
|
}
|
|
}
|
|
wrapper := ServerInterfaceWrapper{
|
|
Handler: si,
|
|
HandlerMiddlewares: options.Middlewares,
|
|
ErrorHandlerFunc: options.ErrorHandlerFunc,
|
|
}
|
|
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/registry", wrapper.CreateRegistry)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Delete(options.BaseURL+"/registry/{registry_ref}", wrapper.DeleteRegistry)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}", wrapper.GetRegistry)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Put(options.BaseURL+"/registry/{registry_ref}", wrapper.ModifyRegistry)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/labels", wrapper.ListArtifactLabels)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/stats", wrapper.GetArtifactStatsForRegistry)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Delete(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}", wrapper.DeleteArtifact)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Put(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/labels", wrapper.UpdateArtifactLabels)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/stats", wrapper.GetArtifactStats)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/summary", wrapper.GetArtifactSummary)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Delete(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}", wrapper.DeleteArtifactVersion)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/details", wrapper.GetArtifactDetails)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details", wrapper.GetDockerArtifactDetails)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers", wrapper.GetDockerArtifactLayers)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest", wrapper.GetDockerArtifactManifest)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests", wrapper.GetDockerArtifactManifests)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/files", wrapper.GetArtifactFiles)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details", wrapper.GetHelmArtifactDetails)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest", wrapper.GetHelmArtifactManifest)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/version/{version}/summary", wrapper.GetArtifactVersionSummary)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifact/{artifact}/versions", wrapper.GetAllArtifactVersions)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/artifacts", wrapper.GetAllArtifactsByRegistry)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/client-setup-details", wrapper.GetClientSetupDetails)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/webhooks", wrapper.ListWebhooks)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Post(options.BaseURL+"/registry/{registry_ref}/webhooks", wrapper.CreateWebhook)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Delete(options.BaseURL+"/registry/{registry_ref}/webhooks/{webhook_identifier}", wrapper.DeleteWebhook)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/webhooks/{webhook_identifier}", wrapper.GetWebhook)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Put(options.BaseURL+"/registry/{registry_ref}/webhooks/{webhook_identifier}", wrapper.UpdateWebhook)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/webhooks/{webhook_identifier}/executions", wrapper.ListWebhookExecutions)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}", wrapper.GetWebhookExecution)
|
|
})
|
|
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+"/spaces/{space_ref}/artifact/stats", wrapper.GetArtifactStatsForSpace)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/spaces/{space_ref}/artifacts", wrapper.GetAllArtifacts)
|
|
})
|
|
r.Group(func(r chi.Router) {
|
|
r.Get(options.BaseURL+"/spaces/{space_ref}/registries", wrapper.GetAllRegistries)
|
|
})
|
|
|
|
return r
|
|
}
|
|
|
|
type ArtifactDetailResponseJSONResponse struct {
|
|
// Data Artifact Detail
|
|
Data ArtifactDetail `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ArtifactLabelResponseJSONResponse struct {
|
|
// Data Harness Artifact Summary
|
|
Data ArtifactSummary `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ArtifactStatsResponseJSONResponse struct {
|
|
// Data Harness Artifact Stats
|
|
Data ArtifactStats `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ArtifactSummaryResponseJSONResponse struct {
|
|
// Data Harness Artifact Summary
|
|
Data ArtifactSummary `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ArtifactVersionSummaryResponseJSONResponse struct {
|
|
// Data Docker Artifact Version Summary
|
|
Data ArtifactVersionSummary `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type BadRequestJSONResponse Error
|
|
|
|
type ClientSetupDetailsResponseJSONResponse struct {
|
|
// Data Client Setup Details
|
|
Data ClientSetupDetails `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type DockerArtifactDetailResponseJSONResponse struct {
|
|
// Data Docker Artifact Detail
|
|
Data DockerArtifactDetail `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type DockerArtifactManifestResponseJSONResponse struct {
|
|
// Data Docker Artifact Manifest
|
|
Data DockerArtifactManifest `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type DockerLayersResponseJSONResponse struct {
|
|
// Data Harness Layers Summary
|
|
Data DockerLayersSummary `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type DockerManifestsResponseJSONResponse struct {
|
|
// Data Harness Manifests
|
|
Data DockerManifests `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type FileDetailResponseJSONResponse struct {
|
|
// Files A list of Harness Artifact Files
|
|
Files []FileDetail `json:"files"`
|
|
|
|
// ItemCount The total number of items
|
|
ItemCount *int64 `json:"itemCount,omitempty"`
|
|
|
|
// PageCount The total number of pages
|
|
PageCount *int64 `json:"pageCount,omitempty"`
|
|
|
|
// PageIndex The current page
|
|
PageIndex *int64 `json:"pageIndex,omitempty"`
|
|
|
|
// PageSize The number of items per page
|
|
PageSize *int `json:"pageSize,omitempty"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type HelmArtifactDetailResponseJSONResponse struct {
|
|
// Data Helm Artifact Detail
|
|
Data HelmArtifactDetail `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type HelmArtifactManifestResponseJSONResponse struct {
|
|
// Data Helm Artifact Manifest
|
|
Data HelmArtifactManifest `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type InternalServerErrorJSONResponse Error
|
|
|
|
type ListArtifactLabelResponseJSONResponse struct {
|
|
// Data A list of Harness Artifact Labels
|
|
Data ListArtifactLabel `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ListArtifactResponseJSONResponse struct {
|
|
// Data A list of Artifacts
|
|
Data ListArtifact `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ListArtifactVersionResponseJSONResponse struct {
|
|
// Data A list of Artifact versions
|
|
Data ListArtifactVersion `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"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ListRegistryResponseJSONResponse struct {
|
|
// Data A list of Harness Artifact Registries
|
|
Data ListRegistry `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"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type ListWebhooksResponseJSONResponse struct {
|
|
// Data A list of Harness Registries webhooks
|
|
Data ListWebhooks `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type NotFoundJSONResponse Error
|
|
|
|
type RegistryResponseJSONResponse struct {
|
|
// Data Harness Artifact Registry
|
|
Data Registry `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"`
|
|
}
|
|
|
|
type UnauthenticatedJSONResponse Error
|
|
|
|
type UnauthorizedJSONResponse Error
|
|
|
|
type WebhookExecutionResponseJSONResponse struct {
|
|
// Data Harness Regstries Webhook Execution
|
|
Data WebhookExecution `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type WebhookResponseJSONResponse struct {
|
|
// Data Harness Regstries Webhook
|
|
Data Webhook `json:"data"`
|
|
|
|
// Status Indicates if the request was successful or not
|
|
Status Status `json:"status"`
|
|
}
|
|
|
|
type CreateRegistryRequestObject struct {
|
|
Params CreateRegistryParams
|
|
Body *CreateRegistryJSONRequestBody
|
|
}
|
|
|
|
type CreateRegistryResponseObject interface {
|
|
VisitCreateRegistryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CreateRegistry201JSONResponse struct{ RegistryResponseJSONResponse }
|
|
|
|
func (response CreateRegistry201JSONResponse) VisitCreateRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateRegistry400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response CreateRegistry400JSONResponse) VisitCreateRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateRegistry401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response CreateRegistry401JSONResponse) VisitCreateRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateRegistry403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response CreateRegistry403JSONResponse) VisitCreateRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateRegistry500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response CreateRegistry500JSONResponse) VisitCreateRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteRegistryRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
}
|
|
|
|
type DeleteRegistryResponseObject interface {
|
|
VisitDeleteRegistryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type DeleteRegistry200JSONResponse struct{ SuccessJSONResponse }
|
|
|
|
func (response DeleteRegistry200JSONResponse) VisitDeleteRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteRegistry400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response DeleteRegistry400JSONResponse) VisitDeleteRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteRegistry401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response DeleteRegistry401JSONResponse) VisitDeleteRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteRegistry403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response DeleteRegistry403JSONResponse) VisitDeleteRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteRegistry404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response DeleteRegistry404JSONResponse) VisitDeleteRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteRegistry500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response DeleteRegistry500JSONResponse) VisitDeleteRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetRegistryRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
}
|
|
|
|
type GetRegistryResponseObject interface {
|
|
VisitGetRegistryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetRegistry200JSONResponse struct{ RegistryResponseJSONResponse }
|
|
|
|
func (response GetRegistry200JSONResponse) VisitGetRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetRegistry400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetRegistry400JSONResponse) VisitGetRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetRegistry401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetRegistry401JSONResponse) VisitGetRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetRegistry403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetRegistry403JSONResponse) VisitGetRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetRegistry404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetRegistry404JSONResponse) VisitGetRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetRegistry500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetRegistry500JSONResponse) VisitGetRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ModifyRegistryRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Body *ModifyRegistryJSONRequestBody
|
|
}
|
|
|
|
type ModifyRegistryResponseObject interface {
|
|
VisitModifyRegistryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ModifyRegistry200JSONResponse struct{ RegistryResponseJSONResponse }
|
|
|
|
func (response ModifyRegistry200JSONResponse) VisitModifyRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ModifyRegistry400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response ModifyRegistry400JSONResponse) VisitModifyRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ModifyRegistry401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response ModifyRegistry401JSONResponse) VisitModifyRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ModifyRegistry403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response ModifyRegistry403JSONResponse) VisitModifyRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ModifyRegistry404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response ModifyRegistry404JSONResponse) VisitModifyRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ModifyRegistry500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response ModifyRegistry500JSONResponse) VisitModifyRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListArtifactLabelsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Params ListArtifactLabelsParams
|
|
}
|
|
|
|
type ListArtifactLabelsResponseObject interface {
|
|
VisitListArtifactLabelsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListArtifactLabels200JSONResponse struct {
|
|
ListArtifactLabelResponseJSONResponse
|
|
}
|
|
|
|
func (response ListArtifactLabels200JSONResponse) VisitListArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListArtifactLabels400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response ListArtifactLabels400JSONResponse) VisitListArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListArtifactLabels401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response ListArtifactLabels401JSONResponse) VisitListArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListArtifactLabels403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response ListArtifactLabels403JSONResponse) VisitListArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListArtifactLabels404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response ListArtifactLabels404JSONResponse) VisitListArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListArtifactLabels500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response ListArtifactLabels500JSONResponse) VisitListArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForRegistryRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Params GetArtifactStatsForRegistryParams
|
|
}
|
|
|
|
type GetArtifactStatsForRegistryResponseObject interface {
|
|
VisitGetArtifactStatsForRegistryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetArtifactStatsForRegistry200JSONResponse struct {
|
|
ArtifactStatsResponseJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactStatsForRegistry200JSONResponse) VisitGetArtifactStatsForRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForRegistry400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetArtifactStatsForRegistry400JSONResponse) VisitGetArtifactStatsForRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForRegistry401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetArtifactStatsForRegistry401JSONResponse) VisitGetArtifactStatsForRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForRegistry403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetArtifactStatsForRegistry403JSONResponse) VisitGetArtifactStatsForRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForRegistry404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetArtifactStatsForRegistry404JSONResponse) VisitGetArtifactStatsForRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForRegistry500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactStatsForRegistry500JSONResponse) VisitGetArtifactStatsForRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifactRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
}
|
|
|
|
type DeleteArtifactResponseObject interface {
|
|
VisitDeleteArtifactResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type DeleteArtifact200JSONResponse struct{ SuccessJSONResponse }
|
|
|
|
func (response DeleteArtifact200JSONResponse) VisitDeleteArtifactResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifact400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response DeleteArtifact400JSONResponse) VisitDeleteArtifactResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifact401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response DeleteArtifact401JSONResponse) VisitDeleteArtifactResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifact403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response DeleteArtifact403JSONResponse) VisitDeleteArtifactResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifact404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response DeleteArtifact404JSONResponse) VisitDeleteArtifactResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifact500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response DeleteArtifact500JSONResponse) VisitDeleteArtifactResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateArtifactLabelsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Body *UpdateArtifactLabelsJSONRequestBody
|
|
}
|
|
|
|
type UpdateArtifactLabelsResponseObject interface {
|
|
VisitUpdateArtifactLabelsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type UpdateArtifactLabels200JSONResponse struct {
|
|
ArtifactLabelResponseJSONResponse
|
|
}
|
|
|
|
func (response UpdateArtifactLabels200JSONResponse) VisitUpdateArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateArtifactLabels400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response UpdateArtifactLabels400JSONResponse) VisitUpdateArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateArtifactLabels401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response UpdateArtifactLabels401JSONResponse) VisitUpdateArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateArtifactLabels403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response UpdateArtifactLabels403JSONResponse) VisitUpdateArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateArtifactLabels404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response UpdateArtifactLabels404JSONResponse) VisitUpdateArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateArtifactLabels500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response UpdateArtifactLabels500JSONResponse) VisitUpdateArtifactLabelsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Params GetArtifactStatsParams
|
|
}
|
|
|
|
type GetArtifactStatsResponseObject interface {
|
|
VisitGetArtifactStatsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetArtifactStats200JSONResponse struct {
|
|
ArtifactStatsResponseJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactStats200JSONResponse) VisitGetArtifactStatsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStats400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetArtifactStats400JSONResponse) VisitGetArtifactStatsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStats401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetArtifactStats401JSONResponse) VisitGetArtifactStatsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStats403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetArtifactStats403JSONResponse) VisitGetArtifactStatsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStats404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetArtifactStats404JSONResponse) VisitGetArtifactStatsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStats500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactStats500JSONResponse) VisitGetArtifactStatsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactSummaryRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
}
|
|
|
|
type GetArtifactSummaryResponseObject interface {
|
|
VisitGetArtifactSummaryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetArtifactSummary200JSONResponse struct {
|
|
ArtifactSummaryResponseJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactSummary200JSONResponse) VisitGetArtifactSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactSummary400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetArtifactSummary400JSONResponse) VisitGetArtifactSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactSummary401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetArtifactSummary401JSONResponse) VisitGetArtifactSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactSummary403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetArtifactSummary403JSONResponse) VisitGetArtifactSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactSummary404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetArtifactSummary404JSONResponse) VisitGetArtifactSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactSummary500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactSummary500JSONResponse) VisitGetArtifactSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifactVersionRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
}
|
|
|
|
type DeleteArtifactVersionResponseObject interface {
|
|
VisitDeleteArtifactVersionResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type DeleteArtifactVersion200JSONResponse struct{ SuccessJSONResponse }
|
|
|
|
func (response DeleteArtifactVersion200JSONResponse) VisitDeleteArtifactVersionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifactVersion400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response DeleteArtifactVersion400JSONResponse) VisitDeleteArtifactVersionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifactVersion401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response DeleteArtifactVersion401JSONResponse) VisitDeleteArtifactVersionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifactVersion403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response DeleteArtifactVersion403JSONResponse) VisitDeleteArtifactVersionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifactVersion404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response DeleteArtifactVersion404JSONResponse) VisitDeleteArtifactVersionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteArtifactVersion500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response DeleteArtifactVersion500JSONResponse) VisitDeleteArtifactVersionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactDetailsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
Params GetArtifactDetailsParams
|
|
}
|
|
|
|
type GetArtifactDetailsResponseObject interface {
|
|
VisitGetArtifactDetailsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetArtifactDetails200JSONResponse struct {
|
|
ArtifactDetailResponseJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactDetails200JSONResponse) VisitGetArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactDetails400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetArtifactDetails400JSONResponse) VisitGetArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactDetails401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetArtifactDetails401JSONResponse) VisitGetArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactDetails403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetArtifactDetails403JSONResponse) VisitGetArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactDetails404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetArtifactDetails404JSONResponse) VisitGetArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactDetails500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactDetails500JSONResponse) VisitGetArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactDetailsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
Params GetDockerArtifactDetailsParams
|
|
}
|
|
|
|
type GetDockerArtifactDetailsResponseObject interface {
|
|
VisitGetDockerArtifactDetailsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetDockerArtifactDetails200JSONResponse struct {
|
|
DockerArtifactDetailResponseJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactDetails200JSONResponse) VisitGetDockerArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactDetails400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetDockerArtifactDetails400JSONResponse) VisitGetDockerArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactDetails401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetDockerArtifactDetails401JSONResponse) VisitGetDockerArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactDetails403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetDockerArtifactDetails403JSONResponse) VisitGetDockerArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactDetails404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetDockerArtifactDetails404JSONResponse) VisitGetDockerArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactDetails500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactDetails500JSONResponse) VisitGetDockerArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactLayersRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
Params GetDockerArtifactLayersParams
|
|
}
|
|
|
|
type GetDockerArtifactLayersResponseObject interface {
|
|
VisitGetDockerArtifactLayersResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetDockerArtifactLayers200JSONResponse struct {
|
|
DockerLayersResponseJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactLayers200JSONResponse) VisitGetDockerArtifactLayersResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactLayers400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetDockerArtifactLayers400JSONResponse) VisitGetDockerArtifactLayersResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactLayers401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetDockerArtifactLayers401JSONResponse) VisitGetDockerArtifactLayersResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactLayers403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetDockerArtifactLayers403JSONResponse) VisitGetDockerArtifactLayersResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactLayers404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetDockerArtifactLayers404JSONResponse) VisitGetDockerArtifactLayersResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactLayers500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactLayers500JSONResponse) VisitGetDockerArtifactLayersResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifestRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
Params GetDockerArtifactManifestParams
|
|
}
|
|
|
|
type GetDockerArtifactManifestResponseObject interface {
|
|
VisitGetDockerArtifactManifestResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetDockerArtifactManifest200JSONResponse struct {
|
|
DockerArtifactManifestResponseJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactManifest200JSONResponse) VisitGetDockerArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifest400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifest400JSONResponse) VisitGetDockerArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifest401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifest401JSONResponse) VisitGetDockerArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifest403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifest403JSONResponse) VisitGetDockerArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifest404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifest404JSONResponse) VisitGetDockerArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifest500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactManifest500JSONResponse) VisitGetDockerArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifestsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
}
|
|
|
|
type GetDockerArtifactManifestsResponseObject interface {
|
|
VisitGetDockerArtifactManifestsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetDockerArtifactManifests200JSONResponse struct {
|
|
DockerManifestsResponseJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactManifests200JSONResponse) VisitGetDockerArtifactManifestsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifests400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifests400JSONResponse) VisitGetDockerArtifactManifestsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifests401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifests401JSONResponse) VisitGetDockerArtifactManifestsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifests403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifests403JSONResponse) VisitGetDockerArtifactManifestsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifests404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetDockerArtifactManifests404JSONResponse) VisitGetDockerArtifactManifestsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetDockerArtifactManifests500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetDockerArtifactManifests500JSONResponse) VisitGetDockerArtifactManifestsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactFilesRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
Params GetArtifactFilesParams
|
|
}
|
|
|
|
type GetArtifactFilesResponseObject interface {
|
|
VisitGetArtifactFilesResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetArtifactFiles200JSONResponse struct{ FileDetailResponseJSONResponse }
|
|
|
|
func (response GetArtifactFiles200JSONResponse) VisitGetArtifactFilesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactFiles400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetArtifactFiles400JSONResponse) VisitGetArtifactFilesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactFiles401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetArtifactFiles401JSONResponse) VisitGetArtifactFilesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactFiles403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetArtifactFiles403JSONResponse) VisitGetArtifactFilesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactFiles404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetArtifactFiles404JSONResponse) VisitGetArtifactFilesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactFiles500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactFiles500JSONResponse) VisitGetArtifactFilesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactDetailsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
}
|
|
|
|
type GetHelmArtifactDetailsResponseObject interface {
|
|
VisitGetHelmArtifactDetailsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetHelmArtifactDetails200JSONResponse struct {
|
|
HelmArtifactDetailResponseJSONResponse
|
|
}
|
|
|
|
func (response GetHelmArtifactDetails200JSONResponse) VisitGetHelmArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactDetails400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetHelmArtifactDetails400JSONResponse) VisitGetHelmArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactDetails401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetHelmArtifactDetails401JSONResponse) VisitGetHelmArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactDetails403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetHelmArtifactDetails403JSONResponse) VisitGetHelmArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactDetails404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetHelmArtifactDetails404JSONResponse) VisitGetHelmArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactDetails500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetHelmArtifactDetails500JSONResponse) VisitGetHelmArtifactDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactManifestRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
}
|
|
|
|
type GetHelmArtifactManifestResponseObject interface {
|
|
VisitGetHelmArtifactManifestResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetHelmArtifactManifest200JSONResponse struct {
|
|
HelmArtifactManifestResponseJSONResponse
|
|
}
|
|
|
|
func (response GetHelmArtifactManifest200JSONResponse) VisitGetHelmArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactManifest400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetHelmArtifactManifest400JSONResponse) VisitGetHelmArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactManifest401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetHelmArtifactManifest401JSONResponse) VisitGetHelmArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactManifest403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetHelmArtifactManifest403JSONResponse) VisitGetHelmArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactManifest404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetHelmArtifactManifest404JSONResponse) VisitGetHelmArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetHelmArtifactManifest500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetHelmArtifactManifest500JSONResponse) VisitGetHelmArtifactManifestResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactVersionSummaryRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Version VersionPathParam `json:"version"`
|
|
}
|
|
|
|
type GetArtifactVersionSummaryResponseObject interface {
|
|
VisitGetArtifactVersionSummaryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetArtifactVersionSummary200JSONResponse struct {
|
|
ArtifactVersionSummaryResponseJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactVersionSummary200JSONResponse) VisitGetArtifactVersionSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactVersionSummary400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetArtifactVersionSummary400JSONResponse) VisitGetArtifactVersionSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactVersionSummary401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetArtifactVersionSummary401JSONResponse) VisitGetArtifactVersionSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactVersionSummary403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetArtifactVersionSummary403JSONResponse) VisitGetArtifactVersionSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactVersionSummary404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetArtifactVersionSummary404JSONResponse) VisitGetArtifactVersionSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactVersionSummary500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactVersionSummary500JSONResponse) VisitGetArtifactVersionSummaryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactVersionsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Artifact ArtifactPathParam `json:"artifact"`
|
|
Params GetAllArtifactVersionsParams
|
|
}
|
|
|
|
type GetAllArtifactVersionsResponseObject interface {
|
|
VisitGetAllArtifactVersionsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetAllArtifactVersions200JSONResponse struct {
|
|
ListArtifactVersionResponseJSONResponse
|
|
}
|
|
|
|
func (response GetAllArtifactVersions200JSONResponse) VisitGetAllArtifactVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactVersions400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetAllArtifactVersions400JSONResponse) VisitGetAllArtifactVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactVersions401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetAllArtifactVersions401JSONResponse) VisitGetAllArtifactVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactVersions403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetAllArtifactVersions403JSONResponse) VisitGetAllArtifactVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactVersions404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetAllArtifactVersions404JSONResponse) VisitGetAllArtifactVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactVersions500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetAllArtifactVersions500JSONResponse) VisitGetAllArtifactVersionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactsByRegistryRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Params GetAllArtifactsByRegistryParams
|
|
}
|
|
|
|
type GetAllArtifactsByRegistryResponseObject interface {
|
|
VisitGetAllArtifactsByRegistryResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetAllArtifactsByRegistry200JSONResponse struct {
|
|
ListRegistryArtifactResponseJSONResponse
|
|
}
|
|
|
|
func (response GetAllArtifactsByRegistry200JSONResponse) VisitGetAllArtifactsByRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactsByRegistry400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetAllArtifactsByRegistry400JSONResponse) VisitGetAllArtifactsByRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactsByRegistry401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetAllArtifactsByRegistry401JSONResponse) VisitGetAllArtifactsByRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactsByRegistry403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetAllArtifactsByRegistry403JSONResponse) VisitGetAllArtifactsByRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactsByRegistry404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetAllArtifactsByRegistry404JSONResponse) VisitGetAllArtifactsByRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactsByRegistry500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetAllArtifactsByRegistry500JSONResponse) VisitGetAllArtifactsByRegistryResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientSetupDetailsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Params GetClientSetupDetailsParams
|
|
}
|
|
|
|
type GetClientSetupDetailsResponseObject interface {
|
|
VisitGetClientSetupDetailsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetClientSetupDetails200JSONResponse struct {
|
|
ClientSetupDetailsResponseJSONResponse
|
|
}
|
|
|
|
func (response GetClientSetupDetails200JSONResponse) VisitGetClientSetupDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientSetupDetails400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetClientSetupDetails400JSONResponse) VisitGetClientSetupDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientSetupDetails401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetClientSetupDetails401JSONResponse) VisitGetClientSetupDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientSetupDetails403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetClientSetupDetails403JSONResponse) VisitGetClientSetupDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientSetupDetails404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetClientSetupDetails404JSONResponse) VisitGetClientSetupDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetClientSetupDetails500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetClientSetupDetails500JSONResponse) VisitGetClientSetupDetailsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhooksRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Params ListWebhooksParams
|
|
}
|
|
|
|
type ListWebhooksResponseObject interface {
|
|
VisitListWebhooksResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListWebhooks200JSONResponse struct {
|
|
ListWebhooksResponseJSONResponse
|
|
}
|
|
|
|
func (response ListWebhooks200JSONResponse) VisitListWebhooksResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhooks400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response ListWebhooks400JSONResponse) VisitListWebhooksResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhooks401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response ListWebhooks401JSONResponse) VisitListWebhooksResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhooks403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response ListWebhooks403JSONResponse) VisitListWebhooksResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhooks500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response ListWebhooks500JSONResponse) VisitListWebhooksResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateWebhookRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
Body *CreateWebhookJSONRequestBody
|
|
}
|
|
|
|
type CreateWebhookResponseObject interface {
|
|
VisitCreateWebhookResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type CreateWebhook201JSONResponse struct{ WebhookResponseJSONResponse }
|
|
|
|
func (response CreateWebhook201JSONResponse) VisitCreateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateWebhook400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response CreateWebhook400JSONResponse) VisitCreateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateWebhook401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response CreateWebhook401JSONResponse) VisitCreateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateWebhook403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response CreateWebhook403JSONResponse) VisitCreateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type CreateWebhook500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response CreateWebhook500JSONResponse) VisitCreateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteWebhookRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
WebhookIdentifier WebhookIdentifierPathParam `json:"webhook_identifier"`
|
|
}
|
|
|
|
type DeleteWebhookResponseObject interface {
|
|
VisitDeleteWebhookResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type DeleteWebhook200JSONResponse struct{ SuccessJSONResponse }
|
|
|
|
func (response DeleteWebhook200JSONResponse) VisitDeleteWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteWebhook400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response DeleteWebhook400JSONResponse) VisitDeleteWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteWebhook401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response DeleteWebhook401JSONResponse) VisitDeleteWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteWebhook403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response DeleteWebhook403JSONResponse) VisitDeleteWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteWebhook404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response DeleteWebhook404JSONResponse) VisitDeleteWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type DeleteWebhook500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response DeleteWebhook500JSONResponse) VisitDeleteWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhookRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
WebhookIdentifier WebhookIdentifierPathParam `json:"webhook_identifier"`
|
|
}
|
|
|
|
type GetWebhookResponseObject interface {
|
|
VisitGetWebhookResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetWebhook200JSONResponse struct{ WebhookResponseJSONResponse }
|
|
|
|
func (response GetWebhook200JSONResponse) VisitGetWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhook400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetWebhook400JSONResponse) VisitGetWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhook401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetWebhook401JSONResponse) VisitGetWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhook403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetWebhook403JSONResponse) VisitGetWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhook500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetWebhook500JSONResponse) VisitGetWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateWebhookRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
WebhookIdentifier WebhookIdentifierPathParam `json:"webhook_identifier"`
|
|
Body *UpdateWebhookJSONRequestBody
|
|
}
|
|
|
|
type UpdateWebhookResponseObject interface {
|
|
VisitUpdateWebhookResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type UpdateWebhook201JSONResponse struct{ WebhookResponseJSONResponse }
|
|
|
|
func (response UpdateWebhook201JSONResponse) VisitUpdateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(201)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateWebhook400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response UpdateWebhook400JSONResponse) VisitUpdateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateWebhook401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response UpdateWebhook401JSONResponse) VisitUpdateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateWebhook403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response UpdateWebhook403JSONResponse) VisitUpdateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type UpdateWebhook500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response UpdateWebhook500JSONResponse) VisitUpdateWebhookResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhookExecutionsRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
WebhookIdentifier WebhookIdentifierPathParam `json:"webhook_identifier"`
|
|
Params ListWebhookExecutionsParams
|
|
}
|
|
|
|
type ListWebhookExecutionsResponseObject interface {
|
|
VisitListWebhookExecutionsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ListWebhookExecutions200JSONResponse struct {
|
|
ListWebhooksExecutionResponseJSONResponse
|
|
}
|
|
|
|
func (response ListWebhookExecutions200JSONResponse) VisitListWebhookExecutionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhookExecutions400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response ListWebhookExecutions400JSONResponse) VisitListWebhookExecutionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhookExecutions401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response ListWebhookExecutions401JSONResponse) VisitListWebhookExecutionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhookExecutions403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response ListWebhookExecutions403JSONResponse) VisitListWebhookExecutionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ListWebhookExecutions500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response ListWebhookExecutions500JSONResponse) VisitListWebhookExecutionsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhookExecutionRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
WebhookIdentifier WebhookIdentifierPathParam `json:"webhook_identifier"`
|
|
WebhookExecutionId WebhookExecutionIdPathParam `json:"webhook_execution_id"`
|
|
}
|
|
|
|
type GetWebhookExecutionResponseObject interface {
|
|
VisitGetWebhookExecutionResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetWebhookExecution200JSONResponse struct {
|
|
WebhookExecutionResponseJSONResponse
|
|
}
|
|
|
|
func (response GetWebhookExecution200JSONResponse) VisitGetWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhookExecution400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetWebhookExecution400JSONResponse) VisitGetWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhookExecution401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetWebhookExecution401JSONResponse) VisitGetWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhookExecution403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetWebhookExecution403JSONResponse) VisitGetWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetWebhookExecution500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetWebhookExecution500JSONResponse) VisitGetWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ReTriggerWebhookExecutionRequestObject struct {
|
|
RegistryRef RegistryRefPathParam `json:"registry_ref"`
|
|
WebhookIdentifier WebhookIdentifierPathParam `json:"webhook_identifier"`
|
|
WebhookExecutionId WebhookExecutionIdPathParam `json:"webhook_execution_id"`
|
|
}
|
|
|
|
type ReTriggerWebhookExecutionResponseObject interface {
|
|
VisitReTriggerWebhookExecutionResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type ReTriggerWebhookExecution200JSONResponse struct {
|
|
WebhookExecutionResponseJSONResponse
|
|
}
|
|
|
|
func (response ReTriggerWebhookExecution200JSONResponse) VisitReTriggerWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ReTriggerWebhookExecution400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response ReTriggerWebhookExecution400JSONResponse) VisitReTriggerWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ReTriggerWebhookExecution401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response ReTriggerWebhookExecution401JSONResponse) VisitReTriggerWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ReTriggerWebhookExecution403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response ReTriggerWebhookExecution403JSONResponse) VisitReTriggerWebhookExecutionResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type ReTriggerWebhookExecution500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response ReTriggerWebhookExecution500JSONResponse) VisitReTriggerWebhookExecutionResponse(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
|
|
}
|
|
|
|
type GetArtifactStatsForSpaceResponseObject interface {
|
|
VisitGetArtifactStatsForSpaceResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetArtifactStatsForSpace200JSONResponse struct {
|
|
ArtifactStatsResponseJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactStatsForSpace200JSONResponse) VisitGetArtifactStatsForSpaceResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForSpace400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetArtifactStatsForSpace400JSONResponse) VisitGetArtifactStatsForSpaceResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForSpace401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetArtifactStatsForSpace401JSONResponse) VisitGetArtifactStatsForSpaceResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForSpace403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetArtifactStatsForSpace403JSONResponse) VisitGetArtifactStatsForSpaceResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForSpace404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetArtifactStatsForSpace404JSONResponse) VisitGetArtifactStatsForSpaceResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetArtifactStatsForSpace500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetArtifactStatsForSpace500JSONResponse) VisitGetArtifactStatsForSpaceResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifactsRequestObject struct {
|
|
SpaceRef SpaceRefPathParam `json:"space_ref"`
|
|
Params GetAllArtifactsParams
|
|
}
|
|
|
|
type GetAllArtifactsResponseObject interface {
|
|
VisitGetAllArtifactsResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetAllArtifacts200JSONResponse struct {
|
|
ListArtifactResponseJSONResponse
|
|
}
|
|
|
|
func (response GetAllArtifacts200JSONResponse) VisitGetAllArtifactsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifacts400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetAllArtifacts400JSONResponse) VisitGetAllArtifactsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifacts401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetAllArtifacts401JSONResponse) VisitGetAllArtifactsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifacts403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetAllArtifacts403JSONResponse) VisitGetAllArtifactsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifacts404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetAllArtifacts404JSONResponse) VisitGetAllArtifactsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllArtifacts500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetAllArtifacts500JSONResponse) VisitGetAllArtifactsResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllRegistriesRequestObject struct {
|
|
SpaceRef SpaceRefPathParam `json:"space_ref"`
|
|
Params GetAllRegistriesParams
|
|
}
|
|
|
|
type GetAllRegistriesResponseObject interface {
|
|
VisitGetAllRegistriesResponse(w http.ResponseWriter) error
|
|
}
|
|
|
|
type GetAllRegistries200JSONResponse struct {
|
|
ListRegistryResponseJSONResponse
|
|
}
|
|
|
|
func (response GetAllRegistries200JSONResponse) VisitGetAllRegistriesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(200)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllRegistries400JSONResponse struct{ BadRequestJSONResponse }
|
|
|
|
func (response GetAllRegistries400JSONResponse) VisitGetAllRegistriesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(400)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllRegistries401JSONResponse struct{ UnauthenticatedJSONResponse }
|
|
|
|
func (response GetAllRegistries401JSONResponse) VisitGetAllRegistriesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(401)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllRegistries403JSONResponse struct{ UnauthorizedJSONResponse }
|
|
|
|
func (response GetAllRegistries403JSONResponse) VisitGetAllRegistriesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(403)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllRegistries404JSONResponse struct{ NotFoundJSONResponse }
|
|
|
|
func (response GetAllRegistries404JSONResponse) VisitGetAllRegistriesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(404)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
type GetAllRegistries500JSONResponse struct {
|
|
InternalServerErrorJSONResponse
|
|
}
|
|
|
|
func (response GetAllRegistries500JSONResponse) VisitGetAllRegistriesResponse(w http.ResponseWriter) error {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.WriteHeader(500)
|
|
|
|
return json.NewEncoder(w).Encode(response)
|
|
}
|
|
|
|
// StrictServerInterface represents all server handlers.
|
|
type StrictServerInterface interface {
|
|
// Create Registry.
|
|
// (POST /registry)
|
|
CreateRegistry(ctx context.Context, request CreateRegistryRequestObject) (CreateRegistryResponseObject, error)
|
|
// Delete a Registry
|
|
// (DELETE /registry/{registry_ref})
|
|
DeleteRegistry(ctx context.Context, request DeleteRegistryRequestObject) (DeleteRegistryResponseObject, error)
|
|
// Returns Registry Details
|
|
// (GET /registry/{registry_ref})
|
|
GetRegistry(ctx context.Context, request GetRegistryRequestObject) (GetRegistryResponseObject, error)
|
|
// Updates a Registry
|
|
// (PUT /registry/{registry_ref})
|
|
ModifyRegistry(ctx context.Context, request ModifyRegistryRequestObject) (ModifyRegistryResponseObject, error)
|
|
// List Artifact Labels
|
|
// (GET /registry/{registry_ref}/artifact/labels)
|
|
ListArtifactLabels(ctx context.Context, request ListArtifactLabelsRequestObject) (ListArtifactLabelsResponseObject, error)
|
|
// Get Artifact Stats
|
|
// (GET /registry/{registry_ref}/artifact/stats)
|
|
GetArtifactStatsForRegistry(ctx context.Context, request GetArtifactStatsForRegistryRequestObject) (GetArtifactStatsForRegistryResponseObject, error)
|
|
// Delete Artifact
|
|
// (DELETE /registry/{registry_ref}/artifact/{artifact})
|
|
DeleteArtifact(ctx context.Context, request DeleteArtifactRequestObject) (DeleteArtifactResponseObject, error)
|
|
// Update Artifact Labels
|
|
// (PUT /registry/{registry_ref}/artifact/{artifact}/labels)
|
|
UpdateArtifactLabels(ctx context.Context, request UpdateArtifactLabelsRequestObject) (UpdateArtifactLabelsResponseObject, error)
|
|
// Get Artifact Stats
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/stats)
|
|
GetArtifactStats(ctx context.Context, request GetArtifactStatsRequestObject) (GetArtifactStatsResponseObject, error)
|
|
// Get Artifact Summary
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/summary)
|
|
GetArtifactSummary(ctx context.Context, request GetArtifactSummaryRequestObject) (GetArtifactSummaryResponseObject, error)
|
|
// Delete an Artifact Version
|
|
// (DELETE /registry/{registry_ref}/artifact/{artifact}/version/{version})
|
|
DeleteArtifactVersion(ctx context.Context, request DeleteArtifactVersionRequestObject) (DeleteArtifactVersionResponseObject, error)
|
|
// Describe Artifact Details
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/details)
|
|
GetArtifactDetails(ctx context.Context, request GetArtifactDetailsRequestObject) (GetArtifactDetailsResponseObject, error)
|
|
// Describe Docker Artifact Detail
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/details)
|
|
GetDockerArtifactDetails(ctx context.Context, request GetDockerArtifactDetailsRequestObject) (GetDockerArtifactDetailsResponseObject, error)
|
|
// Describe Docker Artifact Layers
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/layers)
|
|
GetDockerArtifactLayers(ctx context.Context, request GetDockerArtifactLayersRequestObject) (GetDockerArtifactLayersResponseObject, error)
|
|
// Describe Docker Artifact Manifest
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifest)
|
|
GetDockerArtifactManifest(ctx context.Context, request GetDockerArtifactManifestRequestObject) (GetDockerArtifactManifestResponseObject, error)
|
|
// Describe Docker Artifact Manifests
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/docker/manifests)
|
|
GetDockerArtifactManifests(ctx context.Context, request GetDockerArtifactManifestsRequestObject) (GetDockerArtifactManifestsResponseObject, error)
|
|
// Describe Artifact files
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/files)
|
|
GetArtifactFiles(ctx context.Context, request GetArtifactFilesRequestObject) (GetArtifactFilesResponseObject, error)
|
|
// Describe Helm Artifact Detail
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/details)
|
|
GetHelmArtifactDetails(ctx context.Context, request GetHelmArtifactDetailsRequestObject) (GetHelmArtifactDetailsResponseObject, error)
|
|
// Describe Helm Artifact Manifest
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/helm/manifest)
|
|
GetHelmArtifactManifest(ctx context.Context, request GetHelmArtifactManifestRequestObject) (GetHelmArtifactManifestResponseObject, error)
|
|
// Get Artifact Version Summary
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/version/{version}/summary)
|
|
GetArtifactVersionSummary(ctx context.Context, request GetArtifactVersionSummaryRequestObject) (GetArtifactVersionSummaryResponseObject, error)
|
|
// List Artifact Versions
|
|
// (GET /registry/{registry_ref}/artifact/{artifact}/versions)
|
|
GetAllArtifactVersions(ctx context.Context, request GetAllArtifactVersionsRequestObject) (GetAllArtifactVersionsResponseObject, error)
|
|
// List Artifacts for Registry
|
|
// (GET /registry/{registry_ref}/artifacts)
|
|
GetAllArtifactsByRegistry(ctx context.Context, request GetAllArtifactsByRegistryRequestObject) (GetAllArtifactsByRegistryResponseObject, error)
|
|
// Returns CLI Client Setup Details
|
|
// (GET /registry/{registry_ref}/client-setup-details)
|
|
GetClientSetupDetails(ctx context.Context, request GetClientSetupDetailsRequestObject) (GetClientSetupDetailsResponseObject, error)
|
|
// ListWebhooks
|
|
// (GET /registry/{registry_ref}/webhooks)
|
|
ListWebhooks(ctx context.Context, request ListWebhooksRequestObject) (ListWebhooksResponseObject, error)
|
|
// CreateWebhook
|
|
// (POST /registry/{registry_ref}/webhooks)
|
|
CreateWebhook(ctx context.Context, request CreateWebhookRequestObject) (CreateWebhookResponseObject, error)
|
|
// DeleteWebhook
|
|
// (DELETE /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
DeleteWebhook(ctx context.Context, request DeleteWebhookRequestObject) (DeleteWebhookResponseObject, error)
|
|
// GetWebhook
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
GetWebhook(ctx context.Context, request GetWebhookRequestObject) (GetWebhookResponseObject, error)
|
|
// UpdateWebhook
|
|
// (PUT /registry/{registry_ref}/webhooks/{webhook_identifier})
|
|
UpdateWebhook(ctx context.Context, request UpdateWebhookRequestObject) (UpdateWebhookResponseObject, error)
|
|
// ListWebhookExecutions
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions)
|
|
ListWebhookExecutions(ctx context.Context, request ListWebhookExecutionsRequestObject) (ListWebhookExecutionsResponseObject, error)
|
|
// GetWebhookExecution
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id})
|
|
GetWebhookExecution(ctx context.Context, request GetWebhookExecutionRequestObject) (GetWebhookExecutionResponseObject, error)
|
|
// ReTriggerWebhookExecution
|
|
// (GET /registry/{registry_ref}/webhooks/{webhook_identifier}/executions/{webhook_execution_id}/retrigger)
|
|
ReTriggerWebhookExecution(ctx context.Context, request ReTriggerWebhookExecutionRequestObject) (ReTriggerWebhookExecutionResponseObject, error)
|
|
// Get Artifact Stats
|
|
// (GET /spaces/{space_ref}/artifact/stats)
|
|
GetArtifactStatsForSpace(ctx context.Context, request GetArtifactStatsForSpaceRequestObject) (GetArtifactStatsForSpaceResponseObject, error)
|
|
// List Artifacts
|
|
// (GET /spaces/{space_ref}/artifacts)
|
|
GetAllArtifacts(ctx context.Context, request GetAllArtifactsRequestObject) (GetAllArtifactsResponseObject, error)
|
|
// List Registries
|
|
// (GET /spaces/{space_ref}/registries)
|
|
GetAllRegistries(ctx context.Context, request GetAllRegistriesRequestObject) (GetAllRegistriesResponseObject, error)
|
|
}
|
|
|
|
type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
|
|
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc
|
|
|
|
type StrictHTTPServerOptions struct {
|
|
RequestErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface {
|
|
return &strictHandler{ssi: ssi, middlewares: middlewares, options: StrictHTTPServerOptions{
|
|
RequestErrorHandlerFunc: func(w http.ResponseWriter, r *http.Request, err error) {
|
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
|
},
|
|
ResponseErrorHandlerFunc: func(w http.ResponseWriter, r *http.Request, err error) {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
},
|
|
}}
|
|
}
|
|
|
|
func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface {
|
|
return &strictHandler{ssi: ssi, middlewares: middlewares, options: options}
|
|
}
|
|
|
|
type strictHandler struct {
|
|
ssi StrictServerInterface
|
|
middlewares []StrictMiddlewareFunc
|
|
options StrictHTTPServerOptions
|
|
}
|
|
|
|
// CreateRegistry operation middleware
|
|
func (sh *strictHandler) CreateRegistry(w http.ResponseWriter, r *http.Request, params CreateRegistryParams) {
|
|
var request CreateRegistryRequestObject
|
|
|
|
request.Params = params
|
|
|
|
var body CreateRegistryJSONRequestBody
|
|
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.CreateRegistry(ctx, request.(CreateRegistryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CreateRegistry")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CreateRegistryResponseObject); ok {
|
|
if err := validResponse.VisitCreateRegistryResponse(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))
|
|
}
|
|
}
|
|
|
|
// DeleteRegistry operation middleware
|
|
func (sh *strictHandler) DeleteRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
var request DeleteRegistryRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.DeleteRegistry(ctx, request.(DeleteRegistryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "DeleteRegistry")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(DeleteRegistryResponseObject); ok {
|
|
if err := validResponse.VisitDeleteRegistryResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetRegistry operation middleware
|
|
func (sh *strictHandler) GetRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
var request GetRegistryRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetRegistry(ctx, request.(GetRegistryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetRegistry")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetRegistryResponseObject); ok {
|
|
if err := validResponse.VisitGetRegistryResponse(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))
|
|
}
|
|
}
|
|
|
|
// ModifyRegistry operation middleware
|
|
func (sh *strictHandler) ModifyRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
var request ModifyRegistryRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
|
|
var body ModifyRegistryJSONRequestBody
|
|
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.ModifyRegistry(ctx, request.(ModifyRegistryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ModifyRegistry")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ModifyRegistryResponseObject); ok {
|
|
if err := validResponse.VisitModifyRegistryResponse(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))
|
|
}
|
|
}
|
|
|
|
// ListArtifactLabels operation middleware
|
|
func (sh *strictHandler) ListArtifactLabels(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params ListArtifactLabelsParams) {
|
|
var request ListArtifactLabelsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListArtifactLabels(ctx, request.(ListArtifactLabelsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListArtifactLabels")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListArtifactLabelsResponseObject); ok {
|
|
if err := validResponse.VisitListArtifactLabelsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetArtifactStatsForRegistry operation middleware
|
|
func (sh *strictHandler) GetArtifactStatsForRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetArtifactStatsForRegistryParams) {
|
|
var request GetArtifactStatsForRegistryRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetArtifactStatsForRegistry(ctx, request.(GetArtifactStatsForRegistryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetArtifactStatsForRegistry")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetArtifactStatsForRegistryResponseObject); ok {
|
|
if err := validResponse.VisitGetArtifactStatsForRegistryResponse(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))
|
|
}
|
|
}
|
|
|
|
// DeleteArtifact operation middleware
|
|
func (sh *strictHandler) DeleteArtifact(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam) {
|
|
var request DeleteArtifactRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.DeleteArtifact(ctx, request.(DeleteArtifactRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "DeleteArtifact")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(DeleteArtifactResponseObject); ok {
|
|
if err := validResponse.VisitDeleteArtifactResponse(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))
|
|
}
|
|
}
|
|
|
|
// UpdateArtifactLabels operation middleware
|
|
func (sh *strictHandler) UpdateArtifactLabels(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam) {
|
|
var request UpdateArtifactLabelsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
|
|
var body UpdateArtifactLabelsJSONRequestBody
|
|
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.UpdateArtifactLabels(ctx, request.(UpdateArtifactLabelsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "UpdateArtifactLabels")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(UpdateArtifactLabelsResponseObject); ok {
|
|
if err := validResponse.VisitUpdateArtifactLabelsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetArtifactStats operation middleware
|
|
func (sh *strictHandler) GetArtifactStats(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, params GetArtifactStatsParams) {
|
|
var request GetArtifactStatsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetArtifactStats(ctx, request.(GetArtifactStatsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetArtifactStats")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetArtifactStatsResponseObject); ok {
|
|
if err := validResponse.VisitGetArtifactStatsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetArtifactSummary operation middleware
|
|
func (sh *strictHandler) GetArtifactSummary(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam) {
|
|
var request GetArtifactSummaryRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetArtifactSummary(ctx, request.(GetArtifactSummaryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetArtifactSummary")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetArtifactSummaryResponseObject); ok {
|
|
if err := validResponse.VisitGetArtifactSummaryResponse(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))
|
|
}
|
|
}
|
|
|
|
// DeleteArtifactVersion operation middleware
|
|
func (sh *strictHandler) DeleteArtifactVersion(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
var request DeleteArtifactVersionRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.DeleteArtifactVersion(ctx, request.(DeleteArtifactVersionRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "DeleteArtifactVersion")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(DeleteArtifactVersionResponseObject); ok {
|
|
if err := validResponse.VisitDeleteArtifactVersionResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetArtifactDetails operation middleware
|
|
func (sh *strictHandler) GetArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetArtifactDetailsParams) {
|
|
var request GetArtifactDetailsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetArtifactDetails(ctx, request.(GetArtifactDetailsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetArtifactDetails")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetArtifactDetailsResponseObject); ok {
|
|
if err := validResponse.VisitGetArtifactDetailsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetDockerArtifactDetails operation middleware
|
|
func (sh *strictHandler) GetDockerArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactDetailsParams) {
|
|
var request GetDockerArtifactDetailsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetDockerArtifactDetails(ctx, request.(GetDockerArtifactDetailsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetDockerArtifactDetails")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetDockerArtifactDetailsResponseObject); ok {
|
|
if err := validResponse.VisitGetDockerArtifactDetailsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetDockerArtifactLayers operation middleware
|
|
func (sh *strictHandler) GetDockerArtifactLayers(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactLayersParams) {
|
|
var request GetDockerArtifactLayersRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetDockerArtifactLayers(ctx, request.(GetDockerArtifactLayersRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetDockerArtifactLayers")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetDockerArtifactLayersResponseObject); ok {
|
|
if err := validResponse.VisitGetDockerArtifactLayersResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetDockerArtifactManifest operation middleware
|
|
func (sh *strictHandler) GetDockerArtifactManifest(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetDockerArtifactManifestParams) {
|
|
var request GetDockerArtifactManifestRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetDockerArtifactManifest(ctx, request.(GetDockerArtifactManifestRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetDockerArtifactManifest")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetDockerArtifactManifestResponseObject); ok {
|
|
if err := validResponse.VisitGetDockerArtifactManifestResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetDockerArtifactManifests operation middleware
|
|
func (sh *strictHandler) GetDockerArtifactManifests(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
var request GetDockerArtifactManifestsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetDockerArtifactManifests(ctx, request.(GetDockerArtifactManifestsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetDockerArtifactManifests")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetDockerArtifactManifestsResponseObject); ok {
|
|
if err := validResponse.VisitGetDockerArtifactManifestsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetArtifactFiles operation middleware
|
|
func (sh *strictHandler) GetArtifactFiles(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam, params GetArtifactFilesParams) {
|
|
var request GetArtifactFilesRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetArtifactFiles(ctx, request.(GetArtifactFilesRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetArtifactFiles")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetArtifactFilesResponseObject); ok {
|
|
if err := validResponse.VisitGetArtifactFilesResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetHelmArtifactDetails operation middleware
|
|
func (sh *strictHandler) GetHelmArtifactDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
var request GetHelmArtifactDetailsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetHelmArtifactDetails(ctx, request.(GetHelmArtifactDetailsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetHelmArtifactDetails")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetHelmArtifactDetailsResponseObject); ok {
|
|
if err := validResponse.VisitGetHelmArtifactDetailsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetHelmArtifactManifest operation middleware
|
|
func (sh *strictHandler) GetHelmArtifactManifest(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
var request GetHelmArtifactManifestRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetHelmArtifactManifest(ctx, request.(GetHelmArtifactManifestRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetHelmArtifactManifest")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetHelmArtifactManifestResponseObject); ok {
|
|
if err := validResponse.VisitGetHelmArtifactManifestResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetArtifactVersionSummary operation middleware
|
|
func (sh *strictHandler) GetArtifactVersionSummary(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, version VersionPathParam) {
|
|
var request GetArtifactVersionSummaryRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Version = version
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetArtifactVersionSummary(ctx, request.(GetArtifactVersionSummaryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetArtifactVersionSummary")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetArtifactVersionSummaryResponseObject); ok {
|
|
if err := validResponse.VisitGetArtifactVersionSummaryResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetAllArtifactVersions operation middleware
|
|
func (sh *strictHandler) GetAllArtifactVersions(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, artifact ArtifactPathParam, params GetAllArtifactVersionsParams) {
|
|
var request GetAllArtifactVersionsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Artifact = artifact
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetAllArtifactVersions(ctx, request.(GetAllArtifactVersionsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetAllArtifactVersions")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetAllArtifactVersionsResponseObject); ok {
|
|
if err := validResponse.VisitGetAllArtifactVersionsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetAllArtifactsByRegistry operation middleware
|
|
func (sh *strictHandler) GetAllArtifactsByRegistry(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetAllArtifactsByRegistryParams) {
|
|
var request GetAllArtifactsByRegistryRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetAllArtifactsByRegistry(ctx, request.(GetAllArtifactsByRegistryRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetAllArtifactsByRegistry")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetAllArtifactsByRegistryResponseObject); ok {
|
|
if err := validResponse.VisitGetAllArtifactsByRegistryResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetClientSetupDetails operation middleware
|
|
func (sh *strictHandler) GetClientSetupDetails(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params GetClientSetupDetailsParams) {
|
|
var request GetClientSetupDetailsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetClientSetupDetails(ctx, request.(GetClientSetupDetailsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetClientSetupDetails")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetClientSetupDetailsResponseObject); ok {
|
|
if err := validResponse.VisitGetClientSetupDetailsResponse(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))
|
|
}
|
|
}
|
|
|
|
// ListWebhooks operation middleware
|
|
func (sh *strictHandler) ListWebhooks(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, params ListWebhooksParams) {
|
|
var request ListWebhooksRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListWebhooks(ctx, request.(ListWebhooksRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListWebhooks")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListWebhooksResponseObject); ok {
|
|
if err := validResponse.VisitListWebhooksResponse(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))
|
|
}
|
|
}
|
|
|
|
// CreateWebhook operation middleware
|
|
func (sh *strictHandler) CreateWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam) {
|
|
var request CreateWebhookRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
|
|
var body CreateWebhookJSONRequestBody
|
|
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.CreateWebhook(ctx, request.(CreateWebhookRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "CreateWebhook")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(CreateWebhookResponseObject); ok {
|
|
if err := validResponse.VisitCreateWebhookResponse(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))
|
|
}
|
|
}
|
|
|
|
// DeleteWebhook operation middleware
|
|
func (sh *strictHandler) DeleteWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam) {
|
|
var request DeleteWebhookRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.WebhookIdentifier = webhookIdentifier
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.DeleteWebhook(ctx, request.(DeleteWebhookRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "DeleteWebhook")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(DeleteWebhookResponseObject); ok {
|
|
if err := validResponse.VisitDeleteWebhookResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetWebhook operation middleware
|
|
func (sh *strictHandler) GetWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam) {
|
|
var request GetWebhookRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.WebhookIdentifier = webhookIdentifier
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetWebhook(ctx, request.(GetWebhookRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetWebhook")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetWebhookResponseObject); ok {
|
|
if err := validResponse.VisitGetWebhookResponse(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))
|
|
}
|
|
}
|
|
|
|
// UpdateWebhook operation middleware
|
|
func (sh *strictHandler) UpdateWebhook(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam) {
|
|
var request UpdateWebhookRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.WebhookIdentifier = webhookIdentifier
|
|
|
|
var body UpdateWebhookJSONRequestBody
|
|
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.UpdateWebhook(ctx, request.(UpdateWebhookRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "UpdateWebhook")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(UpdateWebhookResponseObject); ok {
|
|
if err := validResponse.VisitUpdateWebhookResponse(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))
|
|
}
|
|
}
|
|
|
|
// ListWebhookExecutions operation middleware
|
|
func (sh *strictHandler) ListWebhookExecutions(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, params ListWebhookExecutionsParams) {
|
|
var request ListWebhookExecutionsRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.WebhookIdentifier = webhookIdentifier
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ListWebhookExecutions(ctx, request.(ListWebhookExecutionsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ListWebhookExecutions")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ListWebhookExecutionsResponseObject); ok {
|
|
if err := validResponse.VisitListWebhookExecutionsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetWebhookExecution operation middleware
|
|
func (sh *strictHandler) GetWebhookExecution(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, webhookExecutionId WebhookExecutionIdPathParam) {
|
|
var request GetWebhookExecutionRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.WebhookIdentifier = webhookIdentifier
|
|
request.WebhookExecutionId = webhookExecutionId
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetWebhookExecution(ctx, request.(GetWebhookExecutionRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetWebhookExecution")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetWebhookExecutionResponseObject); ok {
|
|
if err := validResponse.VisitGetWebhookExecutionResponse(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))
|
|
}
|
|
}
|
|
|
|
// ReTriggerWebhookExecution operation middleware
|
|
func (sh *strictHandler) ReTriggerWebhookExecution(w http.ResponseWriter, r *http.Request, registryRef RegistryRefPathParam, webhookIdentifier WebhookIdentifierPathParam, webhookExecutionId WebhookExecutionIdPathParam) {
|
|
var request ReTriggerWebhookExecutionRequestObject
|
|
|
|
request.RegistryRef = registryRef
|
|
request.WebhookIdentifier = webhookIdentifier
|
|
request.WebhookExecutionId = webhookExecutionId
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.ReTriggerWebhookExecution(ctx, request.(ReTriggerWebhookExecutionRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "ReTriggerWebhookExecution")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(ReTriggerWebhookExecutionResponseObject); ok {
|
|
if err := validResponse.VisitReTriggerWebhookExecutionResponse(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
|
|
|
|
request.SpaceRef = spaceRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetArtifactStatsForSpace(ctx, request.(GetArtifactStatsForSpaceRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetArtifactStatsForSpace")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetArtifactStatsForSpaceResponseObject); ok {
|
|
if err := validResponse.VisitGetArtifactStatsForSpaceResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetAllArtifacts operation middleware
|
|
func (sh *strictHandler) GetAllArtifacts(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllArtifactsParams) {
|
|
var request GetAllArtifactsRequestObject
|
|
|
|
request.SpaceRef = spaceRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetAllArtifacts(ctx, request.(GetAllArtifactsRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetAllArtifacts")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetAllArtifactsResponseObject); ok {
|
|
if err := validResponse.VisitGetAllArtifactsResponse(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))
|
|
}
|
|
}
|
|
|
|
// GetAllRegistries operation middleware
|
|
func (sh *strictHandler) GetAllRegistries(w http.ResponseWriter, r *http.Request, spaceRef SpaceRefPathParam, params GetAllRegistriesParams) {
|
|
var request GetAllRegistriesRequestObject
|
|
|
|
request.SpaceRef = spaceRef
|
|
request.Params = params
|
|
|
|
handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
|
|
return sh.ssi.GetAllRegistries(ctx, request.(GetAllRegistriesRequestObject))
|
|
}
|
|
for _, middleware := range sh.middlewares {
|
|
handler = middleware(handler, "GetAllRegistries")
|
|
}
|
|
|
|
response, err := handler(r.Context(), w, r, request)
|
|
|
|
if err != nil {
|
|
sh.options.ResponseErrorHandlerFunc(w, r, err)
|
|
} else if validResponse, ok := response.(GetAllRegistriesResponseObject); ok {
|
|
if err := validResponse.VisitGetAllRegistriesResponse(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))
|
|
}
|
|
}
|
|
|
|
// Base64 encoded, gzipped, json marshaled Swagger object
|
|
var swaggerSpec = []string{
|
|
|
|
"H4sIAAAAAAAC/+xd3XLbOpJ+FRZ3LxnLZya7F75TbDlRHcfRynKmUqdSLpiEJE4okgcA7WhSevct/JEg",
|
|
"CZCgJEtyzKs4In4aja8bDaC78cv1k1WaxDAm2L345aYAgRUkELH/3YBHGOEJ/Y3+N4DYR2FKwiR2L/jH",
|
|
"M9dzQ/q/vzOI1q7nxmAF3Qs3oh9dz8X+Eq4ArRwSuGKNknVKS2CCwnjhbjz5A0AIrN3NxnOncBFigtbj",
|
|
"AMYknIcQGUiQBZ2ipIEeBBcPoVpoJ8Jm6xS2kUTLGIgh/FNBAoyzlXvxl/t1PJ3dD29cz72f3M2mo+Fn",
|
|
"97tXpWvjuQCRcA58YqBhyD4TQ++ycomCpj7I0tDPLVhBJ5k7smgOhhSQpbZDBP/OQgQD94KgDDYT4C/D",
|
|
"KPgKEQ6T2EDAJS3iPPEyThj7ADOCrhL/B0Q5XdiEUrWLFnYE4QJiE8Ov2EdTL7xqx9HPUbK6AsQEM/rp",
|
|
"zLlO0AoQ553z+fPg6mrw7du3bwYaaHMtI4wAgZhIbmjEnX52xHfnOowIRGbxp4UfnsysfUySCIKY9ZwC",
|
|
"/wdYQBupmvCiTdIlWnuoSVkHQU/BAt5mq0eINKDLEIIxcWgZJ+aFTJQsyhQEcA6yiLgXf3junM2de+GG",
|
|
"Mfnf925ORBgTuIAoJ+Mu/A/UiB7rl2KdjcpJIXJEdzpKMG1ES8k/zu1IQdDPEA6fTDP0ryUkS4gckjhR",
|
|
"iImD+IyFEDt51Wh9ZlTPooieyDmIMPR00BHdrKdw3qCo7uPw7wxKmtYO1U8GZSXLPCA47yiyGALkL2cQ",
|
|
"aSjg3xz60cQDXuSB0PotHSWIXIcwCjT95J8MnSSIPMxFgbY+vqBAJwDFp4Y+ElGgsY8U+NBq5ljJpmlj",
|
|
"BbaZM0HC/9Eh2NJgGrdCQ1OfJNmjYidJS29PjStosfjpGn+yWhrzHloNhaFYkOUqYpjMotsuU/kMH5dJ",
|
|
"8mP0E/oZ7XcctONK1HGgrOQURqKBOFHlIa/yEAbbUaqat7aEWpNXMnbtidvwwhCTD0kQQrZcylljBv+U",
|
|
"f6W/+0lMYMz+BGkahT6gNA/+jbn5UHTy31QmLtz/GhR7jQH/igfaxhkdZT4Iquj6kqUBIDC37hy218Cu",
|
|
"Yp/vm8hquw30zRPk+AgyAuNA0ipXFUrkv/gM7ZvGSrOdSRTAEasqTpMYl6f/ChIQRlPxqRPdKUpSiIjA",
|
|
"UwCINSx4p5RtmACS4bZ6d7yUxDEH/V+yssf7LvZUyeO/oW9gFh8nBdwCkgJtAaOIwa2C3YMy5i5brQAH",
|
|
"1KlwhsmhIz+rDKJ940MziPZ5SuyhTWE9e/hc9gjCBUmSSmEpHIdF5c5PgFNB+WAjP/pQGPcBBPteWkYI",
|
|
"JUhH3gcQOEguOJ57GYUwJneQZCnX24eS+XrHx5wrtr4yihxMSVKXDH4ydZQlVdf1CUI6yAkrE/wZxOEc",
|
|
"YnIUbsnOT5BfK4U0TvQNWEOED8on3uVJ2iSUsII3ciIPy56819NkzXUYwb2ponkYCfaU7yT4sWAydz4B",
|
|
"FEOMi8OAa1bDK85nm/hS0Fo/uOVNXCYZp7pMwGxJWUBAJM5s87NT13PhT7BKI2h3LsuPZTv0QouXezk/",
|
|
"t+5nHAfwp74fXzmIVpu3b1x/tkzbjs3nyyqz6s3uEd2ewNJOKOdNbDz3E4xWR1l36x2fgBZYwmilW3NV",
|
|
"Yg+84uq6PjlOqavtOCYQxSC6g+gJIm4kv7jJLTt1MOvVgbyg596EmBzjQKLW77FNb7bOaA4HVUKPwJuT",
|
|
"YkuVH2KjewS2yAuIU+CO2E1j1adBckoeAR8BQdWuTxJJxRH5wflyEvxQT/gpceI4HufXUQdkTK3vY+w7",
|
|
"GFfEpQIuLtjKJ6AqtUdg0Ekg51kh5jYh10kWBy9vR1AjH6fQD+chDOicJBnyofMMsBMnxJkzKkpXageZ",
|
|
"nVORaX4/5vG9hP4e7y7zfYjxDgzZxwBtRiYodaaK5N3HICNLGBNKLDwA4Kod5jQkKPzP4QgQvRX3sIdW",
|
|
"0NVuj4D0uteDqpPzi+RDsuNE5V29FBcEsCtxJk9/wvUd9BEkf8J1ffBAltF6HIJyC4r/skXpuxT4cMxE",
|
|
"xuKgR1d5AshS2xOWA2qhKC/XjZZyNQMV1ZnVkPR947nDOInXq4QhRrkwFEcsBqdonziigOcGIf2+CmNA",
|
|
"+M59BdKUUnDxy736cvnnaNrlKuUyiefhwvXcj6Pb0XR8aar7EcYQhb6h8qfRzWf7g6S82ufh19Gtqd5n",
|
|
"8ARjQ8XbibG729TU2+Tb7NMXY3eTNVkm+v42nhSS9W3JWZe58248N4nhl7l78Vf3m6y8h66HcZYVm6at",
|
|
"ra55AtpqNvKyuapp+jbfvYqm4rovGBKtpIuvH/R6LEie4ygBQX4cbqEEVknArE5Dh9yRTfNBxUrLIjEp",
|
|
"wwqLc+5ak0+Ft3uzEgpXYAEZZr2SeyI3ByfcBS9DVK2oZNbXIc/oTleeFHFu1c1tXaVYNNBEwWdIgFyj",
|
|
"DcoyL1IFjZx43GXmuw+K1sHks0DMofCSZlF0maxWINZ3iWoBSo3FjKutNfxijjxNv9W4jUqvTdPPPaRq",
|
|
"c1+7n+PlTADoMv+yjrx3sqjCLtPuSIKU6yqLalnaqZ9NE5vErbYFo0TJbgp2K0kq9JGuyW3krEUrbytM",
|
|
"DXrUVlEKaFtoKxmcZNZaLBQrZ7QZoZ0mYx5GsJsa/H1VmmGpPYQ+q3jr1UMruOdMDS0msW2Wse2nYkej",
|
|
"o1VsMrKUVFXkpDiAoeMWAXIy+PQeQzQBGD8nKHA93R5X3XPV41I99zKCIM7SSRKFvob/4rPDv7Ntd02F",
|
|
"TvOwsdp0wJ9piOAVWGO96LYJzQTBefizm1KUoS2dq+oWFI2XooZHzG+QFXJkqSonViCMP0EQmPfmzV/5",
|
|
"lYA6Gkvnyjtet9X2VAhUyVE6/97MH9lRM39kqeat/Pj2Znw7shkdgWm+x50NP9yZ6szAY7VCfWdLOm1p",
|
|
"9WS07fF0hNS2d8ttkUIsVJuYAu1aT0waqjLYtlmmRWomFV/KtkMx4xZfCjUyv9yNI5WOcs60cUFZnFuY",
|
|
"4ciinm7PqN9ogCgzLMvtdDFcbTFHmMB06wnqrFJzZhsoLRWqrn10ixP6rueyYx5A4Cz5AWPtIqd1o261",
|
|
"NfJDxyPvDF7Iyre3L7sajvxU5VTObhpOHuuwY78zM0fv415f2JuZuGklKHeba8VjXrJuWxRNNLM1L2lm",
|
|
"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+DRHJQOQkyLlPMUEQrFQ91eTMmr8LZGChbC/3Y5VPChnKC1L25MVaba25dIXW",
|
|
"uueqjbul+iSTvQdq7ZTCfiExi2u+oewUEtWiYbfzAdy/Wm5VETvc0JpuXqX83ZluYLsDxHIZECpfHVNl",
|
|
"UaDNNCHLGNjZ2x3Hsix2QSjdq01p+dY7fY3lYGsztFn/tCLd1eXvGIVn0HkqFpNMKFTdGmLQ651envNc",
|
|
"1d2/gdBS9msR8yFdrrtSJsI3RESGlqg8b0g1VWLAcs1gJ5yXnLueAXYwz4kzzxjn4oSo3uD3l5ejuzvX",
|
|
"c6+H45v7Ke19NJ1+mWq7V4MwNPtx8Ch85LHOR355+ECdGvw0USQtw3B8aV5UFmzwaE9uiW92hKJwsdC5",
|
|
"0SkiIooUkzmczsbXw8vZw+V0NJyN2dY4/+1qdDNiv+kmtmKfGPbAGeLRdNpwNtnEBCU/dRdjIONLn515",
|
|
"VYrQa7OuilC91pL1SL/N943HiLNRlnnAIXs2LEM+VN+05G6qy+zR9dzLDBP2DuHwGY98OkvsFOkSxgQB",
|
|
"uruarCehdi6sVu2c4JqS9dyf70qK551wnizUHZ1wlb/1bF02mXrwFgl6sEVengxDZPAdrjAhL0mnsGyQ",
|
|
"d0Cw3KLY3O5mFZDvGCYpD9GNJvkULsSBtCy6Q0aTPZjoMAaPUckqzl8o9FxYuP/aq0bVZ1h3UN6MwTDG",
|
|
"0M8Q1BMUigTC+q98C6zmRGMPMFof7osKO2R5OaqYieWjwyIm1hvNLFm4h9o9vGkwLvl5lDjPkBhUZv+7",
|
|
"Wbb4TOUblDYx+zSbTaSsObJeVeYek0Dvpr4swG+v1pspLzLTdSRdVNwL7UW6OsOnSxEPYZNspC5CDUZO",
|
|
"LX+f1nadjmbT8fDDzeiB267Ump0Nbx7Mlmztks5eBTsjhRatMrZVtmI1siwOZSiKZgNp2QQqBMFayeVP",
|
|
"HiEFi/YqMs+1iLbXrwgKZfVlbj1QUYOqCr36FwVsrD5F8+XvWW6da6f+JmKXQIjXtgS/1bWvuppJJpWW",
|
|
"L8MSp8/oGcbzRCYoFY5h4h1U8/ntOyeATzCi8MKijwt3SUiKLwaD5+fnsyWvehYmbGghiZobHE7GSgDH",
|
|
"hfvH2fnZOTs0T2EM0tC9cP/JfuJHnYyvA6RcYaaJbh2+FE905h2duaxJrh/p1Isi6hUnQGAFCZtFw2ay",
|
|
"KDLQPH68+a4+ALs2QaD0Rmz9edTKC6L/OP/D3JAoN6glmt547vvz8/aKyoN3rIpFX5pcxO/P/2lbr0gh",
|
|
"/D829OmeCWH5ZGW4sZxpdZ4JWNApdJVt13daKcfN4Jf6UvmGwyeCRGMVXbHfFSA5IQ92BL6fZDF/EJb+",
|
|
"fxE+wdjh8YJloPEmtgaa9pV2DrUSTCy4KbNuvwJ0vD9/314pz/i+PzjV5tuEJ89dQI3imUKSoRgXcBGx",
|
|
"xd1h8xGSU8DMa1QtxwKPafLNGEozDYbuWf5svJPSYdeN65cA0N7Xtx6EewVhHT1bLIkDeR8/KC4Ltfru",
|
|
"JsSkGoJXt7VqgX14T4j0WuulYAFvmU+nbWl2Y25RFkOA/OUMom1Vq/nVsR7eRnjrAKcAvAhhscQ3lol8",
|
|
"tfD+CEkll++ZbqEuZQW+TtCe9W47FucoWV0BAq0rkEQpvhV69e/T98g1IreOpV1w+0v+ZbN9ka2fGTYn",
|
|
"SuTWYfAqie93NIfa0ShTvAfMKWZBgwnbbhjwckcyDUwg7Gjhat8k2OyiUntjoJOtu09zQIH4/i2DYyK7",
|
|
"tyF6G6IJ7EX+Rgu488LNgC8SPb4qi6JCfw/KrqDM530fsBQXQ4Nf4o8uxq58o6DN6P2qvA5wsspZJtPv",
|
|
"7eVD3QDENSC9FKYHSr7OduVbnCkbda/y9sFrQnR7HX8ZRsFXWXF3Jc8Z1et4G6mggHyEOhy+kFAw32cr",
|
|
"2dAnjNeKiC4J+W8oKDw/8y4iomNULygdBMX4ioEUl0qBvUpNkTPdWmjyxOQtMlMkMO9FRicynD+9qOwg",
|
|
"KjnEDiEqao5ca2FRMu62iIuam7cXmKY1RnKqF50dREeB2yGFB28lPdhefPCb2J5XXsroJWEPkvDi68g8",
|
|
"jKDl3p0Xbdi5X4sCv9lS8YJOOAkiX1Bg1zAtfB3CKDiIe0/xNkgvx9scMEhheZnjhSWMVlaHC7oXP7Qy",
|
|
"XH9G4m0sWvVx93jvgHfDizIS9aXPe4S+1bbH+MxII/hf65ZnZ/T3O5id8a/Zv7yABHS67a48dd546115",
|
|
"Rv0tCIB+6L0IdLw3rz+ov0e7p9l/Hzsgilg8SZUag09TFA2rr6ScNNLf5PZD8zJOL5Rd4wsUfG8rjl1l",
|
|
"D7PoLiWCoEn+8If1wWMNuJNlL3xtwlfNZtxLX0fpq0lC5yg2nkvxHcul+K5tsy+jNy9vxk7pgX4ZwvsI",
|
|
"MAycJJaZ5GVWxpqAKskEj3cQ0NUK3N4CrA+3h7p9sLAJbtvgXX2ipRHjN+KBEpmByHSsVXrJ5zcI2Tzt",
|
|
"FUNy+g2m8agATSI//4kFy2tTvUhIt0GZJwpRsh4eKSC+kq5pq3wveRtvNN1LMYsaoNgoyMEv8ddDkTPJ",
|
|
"Lg9M0bXOp3y/8GpXO3n2MDmI3kH8QA7ijRBsSQ7Tpqo+QvLqgfR2VVRp9vQLWbYDOHjM48nho18FDwix",
|
|
"Kgb2uQoOyk8bWimyPIFpvlem9lzTbmJUelrx6BB+uU3JzpsBNZ/0G94VlADzQngvvue/PYTBZnsxaFjZ",
|
|
"Szl/XwH+nytkj4M9WQhvGd96OBwW3YM8tXETznkJbcbqMsKnUKS27XHe47w46zSDwoB2ll8XD36xfw+R",
|
|
"s4sleN46DXCfaeMtZdpgWLFAaue73zZ/C3wYgE5rL3y+mcP79tLll06tBpk/YbeLCKsOHb0Ed71L7iC9",
|
|
"qLhusxPf4n7OJL/lF6BeXoDrkLMX+k6Vfn9xR9DPEA6fdpbdPolxR9ktCU1deNnTHLQBLkbVLUvuNcIf",
|
|
"qRiANBw8/cHmT7RVe1R8MuYvcLI7Js/J2Cmb50SUGKQSI97JUAikQNK3toBENAEUXSRaKNRTYwOO8F1x",
|
|
"krnDIy91jdWi26zbXMJopWux4nptbk/LsufiPle0l9v4m++b/w8AAP//zFKjCD7lAAA=",
|
|
}
|
|
|
|
// GetSwagger returns the content of the embedded swagger specification file
|
|
// or error if failed to decode
|
|
func decodeSpec() ([]byte, error) {
|
|
zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, ""))
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error base64 decoding spec: %w", err)
|
|
}
|
|
zr, err := gzip.NewReader(bytes.NewReader(zipped))
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error decompressing spec: %w", err)
|
|
}
|
|
var buf bytes.Buffer
|
|
_, err = buf.ReadFrom(zr)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error decompressing spec: %w", err)
|
|
}
|
|
|
|
return buf.Bytes(), nil
|
|
}
|
|
|
|
var rawSpec = decodeSpecCached()
|
|
|
|
// a naive cached of a decoded swagger spec
|
|
func decodeSpecCached() func() ([]byte, error) {
|
|
data, err := decodeSpec()
|
|
return func() ([]byte, error) {
|
|
return data, err
|
|
}
|
|
}
|
|
|
|
// Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
|
|
func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) {
|
|
res := make(map[string]func() ([]byte, error))
|
|
if len(pathToFile) > 0 {
|
|
res[pathToFile] = rawSpec
|
|
}
|
|
|
|
return res
|
|
}
|
|
|
|
// GetSwagger returns the Swagger specification corresponding to the generated code
|
|
// in this file. The external references of Swagger specification are resolved.
|
|
// The logic of resolving external references is tightly connected to "import-mapping" feature.
|
|
// Externally referenced files must be embedded in the corresponding golang packages.
|
|
// Urls can be supported but this task was out of the scope.
|
|
func GetSwagger() (swagger *openapi3.T, err error) {
|
|
resolvePath := PathToRawSpec("")
|
|
|
|
loader := openapi3.NewLoader()
|
|
loader.IsExternalRefsAllowed = true
|
|
loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) {
|
|
pathToFile := url.String()
|
|
pathToFile = path.Clean(pathToFile)
|
|
getSpec, ok := resolvePath[pathToFile]
|
|
if !ok {
|
|
err1 := fmt.Errorf("path not found: %s", pathToFile)
|
|
return nil, err1
|
|
}
|
|
return getSpec()
|
|
}
|
|
var specData []byte
|
|
specData, err = rawSpec()
|
|
if err != nil {
|
|
return
|
|
}
|
|
swagger, err = loader.LoadFromData(specData)
|
|
if err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|