// Package v2 provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen version v1.8.2 DO NOT EDIT. package v2 import ( "bytes" "compress/gzip" "encoding/base64" "fmt" "net/http" "net/url" "path" "strings" "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/getkin/kin-openapi/openapi3" "github.com/labstack/echo/v4" ) const ( BearerScopes = "Bearer.Scopes" ) // Defines values for AzureUploadOptionsHyperVGeneration. const ( AzureUploadOptionsHyperVGenerationV1 AzureUploadOptionsHyperVGeneration = "V1" AzureUploadOptionsHyperVGenerationV2 AzureUploadOptionsHyperVGeneration = "V2" ) // Defines values for BlueprintCustomizationsPartitioningMode. const ( BlueprintCustomizationsPartitioningModeAutoLvm BlueprintCustomizationsPartitioningMode = "auto-lvm" BlueprintCustomizationsPartitioningModeLvm BlueprintCustomizationsPartitioningMode = "lvm" BlueprintCustomizationsPartitioningModeRaw BlueprintCustomizationsPartitioningMode = "raw" ) // Defines values for ComposeStatusValue. const ( ComposeStatusValueFailure ComposeStatusValue = "failure" ComposeStatusValuePending ComposeStatusValue = "pending" ComposeStatusValueSuccess ComposeStatusValue = "success" ) // Defines values for CustomizationsPartitioningMode. const ( CustomizationsPartitioningModeAutoLvm CustomizationsPartitioningMode = "auto-lvm" CustomizationsPartitioningModeLvm CustomizationsPartitioningMode = "lvm" CustomizationsPartitioningModeRaw CustomizationsPartitioningMode = "raw" ) // Defines values for ImageSBOMPipelinePurpose. const ( ImageSBOMPipelinePurposeBuildroot ImageSBOMPipelinePurpose = "buildroot" ImageSBOMPipelinePurposeImage ImageSBOMPipelinePurpose = "image" ) // Defines values for ImageSBOMSbomType. const ( ImageSBOMSbomTypeSpdx ImageSBOMSbomType = "spdx" ) // Defines values for ImageStatusValue. const ( ImageStatusValueBuilding ImageStatusValue = "building" ImageStatusValueFailure ImageStatusValue = "failure" ImageStatusValuePending ImageStatusValue = "pending" ImageStatusValueRegistering ImageStatusValue = "registering" ImageStatusValueSuccess ImageStatusValue = "success" ImageStatusValueUploading ImageStatusValue = "uploading" ) // Defines values for ImageTypes. const ( ImageTypesAws ImageTypes = "aws" ImageTypesAwsHaRhui ImageTypes = "aws-ha-rhui" ImageTypesAwsRhui ImageTypes = "aws-rhui" ImageTypesAwsSapRhui ImageTypes = "aws-sap-rhui" ImageTypesAzure ImageTypes = "azure" ImageTypesAzureEap7Rhui ImageTypes = "azure-eap7-rhui" ImageTypesAzureRhui ImageTypes = "azure-rhui" ImageTypesAzureSapRhui ImageTypes = "azure-sap-rhui" ImageTypesEdgeCommit ImageTypes = "edge-commit" ImageTypesEdgeContainer ImageTypes = "edge-container" ImageTypesEdgeInstaller ImageTypes = "edge-installer" ImageTypesGcp ImageTypes = "gcp" ImageTypesGcpRhui ImageTypes = "gcp-rhui" ImageTypesGuestImage ImageTypes = "guest-image" ImageTypesImageInstaller ImageTypes = "image-installer" ImageTypesIotBootableContainer ImageTypes = "iot-bootable-container" ImageTypesIotCommit ImageTypes = "iot-commit" ImageTypesIotContainer ImageTypes = "iot-container" ImageTypesIotInstaller ImageTypes = "iot-installer" ImageTypesIotRawImage ImageTypes = "iot-raw-image" ImageTypesIotSimplifiedInstaller ImageTypes = "iot-simplified-installer" ImageTypesLiveInstaller ImageTypes = "live-installer" ImageTypesMinimalRaw ImageTypes = "minimal-raw" ImageTypesOci ImageTypes = "oci" ImageTypesVsphere ImageTypes = "vsphere" ImageTypesVsphereOva ImageTypes = "vsphere-ova" ImageTypesWsl ImageTypes = "wsl" ) // Defines values for UploadStatusValue. const ( UploadStatusValueFailure UploadStatusValue = "failure" UploadStatusValuePending UploadStatusValue = "pending" UploadStatusValueRunning UploadStatusValue = "running" UploadStatusValueSuccess UploadStatusValue = "success" ) // Defines values for UploadTypes. const ( UploadTypesAws UploadTypes = "aws" UploadTypesAwsS3 UploadTypes = "aws.s3" UploadTypesAzure UploadTypes = "azure" UploadTypesContainer UploadTypes = "container" UploadTypesGcp UploadTypes = "gcp" UploadTypesLocal UploadTypes = "local" UploadTypesOciObjectstorage UploadTypes = "oci.objectstorage" UploadTypesPulpOstree UploadTypes = "pulp.ostree" ) // AWSEC2CloneCompose defines model for AWSEC2CloneCompose. type AWSEC2CloneCompose struct { Region string `json:"region"` ShareWithAccounts *[]string `json:"share_with_accounts,omitempty"` } // AWSEC2UploadOptions defines model for AWSEC2UploadOptions. type AWSEC2UploadOptions struct { Region string `json:"region"` ShareWithAccounts []string `json:"share_with_accounts"` SnapshotName *string `json:"snapshot_name,omitempty"` } // AWSEC2UploadStatus defines model for AWSEC2UploadStatus. type AWSEC2UploadStatus struct { Ami string `json:"ami"` Region string `json:"region"` } // AWSS3UploadOptions defines model for AWSS3UploadOptions. type AWSS3UploadOptions struct { // If set to false (the default value), a long, obfuscated URL // is returned. Its expiration might be sooner than for other upload // targets. // // If set to true, a shorter URL is returned and // its expiration is the same as for the other upload targets. Public *bool `json:"public,omitempty"` Region string `json:"region"` } // AWSS3UploadStatus defines model for AWSS3UploadStatus. type AWSS3UploadStatus struct { Url string `json:"url"` } // AzureUploadOptions defines model for AzureUploadOptions. type AzureUploadOptions struct { // Choose the VM Image HyperV generation, different features on Azure are available // depending on the HyperV generation. HyperVGeneration *AzureUploadOptionsHyperVGeneration `json:"hyper_v_generation,omitempty"` // Name of the uploaded image. It must be unique in the given resource group. // If name is omitted from the request, a random one based on a UUID is // generated. ImageName *string `json:"image_name,omitempty"` // Location of the provided resource_group, where the image should be uploaded and registered. // How to list all locations: // https://docs.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az_account_list_locations' // If the location is not specified, it is deducted from the provided resource_group. Location *string `json:"location,omitempty"` // Name of the resource group where the image should be uploaded. ResourceGroup string `json:"resource_group"` // ID of subscription where the image should be uploaded. SubscriptionId string `json:"subscription_id"` // ID of the tenant where the image should be uploaded. // How to find it in the Azure Portal: // https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant TenantId string `json:"tenant_id"` } // Choose the VM Image HyperV generation, different features on Azure are available // depending on the HyperV generation. type AzureUploadOptionsHyperVGeneration string // AzureUploadStatus defines model for AzureUploadStatus. type AzureUploadStatus struct { ImageName string `json:"image_name"` } // Blueprint defines model for Blueprint. type Blueprint struct { // Container images to embed into the final artfact Containers *[]Container `json:"containers,omitempty"` Customizations *BlueprintCustomizations `json:"customizations,omitempty"` Description *string `json:"description,omitempty"` // The distribution to use for the compose. If left empty the host // distro will be used. Distro *string `json:"distro,omitempty"` // Package groups to be installed Groups *[]PackageGroup `json:"groups,omitempty"` // An alias for packages, retained for backwards compatability Modules *[]Package `json:"modules,omitempty"` Name string `json:"name"` // Packages to be installed Packages *[]Package `json:"packages,omitempty"` // A semver version number Version *string `json:"version,omitempty"` } // BlueprintCustomizations defines model for BlueprintCustomizations. type BlueprintCustomizations struct { Cacerts *CACertsCustomization `json:"cacerts,omitempty"` // Directories to create in the final artifact Directories *[]Directory `json:"directories,omitempty"` // FIDO device onboard configuration Fdo *FDO `json:"fdo,omitempty"` // Files to create in the final artifact Files *[]BlueprintFile `json:"files,omitempty"` // List of filesystem mountpoints to create Filesystem *[]BlueprintFilesystem `json:"filesystem,omitempty"` // Enable FIPS mode Fips *bool `json:"fips,omitempty"` // Firewalld configuration Firewall *BlueprintFirewall `json:"firewall,omitempty"` // List of groups to create Group *[]Group `json:"group,omitempty"` // Configures the hostname Hostname *string `json:"hostname,omitempty"` // Ignition configuration Ignition *Ignition `json:"ignition,omitempty"` // Name of the installation device, currently only useful for the edge-simplified-installer type InstallationDevice *string `json:"installation_device,omitempty"` Installer *Installer `json:"installer,omitempty"` Kernel *Kernel `json:"kernel,omitempty"` // Locale configuration Locale *Locale `json:"locale,omitempty"` Openscap *BlueprintOpenSCAP `json:"openscap,omitempty"` // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. PartitioningMode *BlueprintCustomizationsPartitioningMode `json:"partitioning_mode,omitempty"` // Repositories to write to /etc/yum.repos.d/ in the final image. Note // that these are not used at build time. Repositories *[]BlueprintRepository `json:"repositories,omitempty"` Rhsm *RHSMCustomization `json:"rhsm,omitempty"` Rpm *RPMCustomization `json:"rpm,omitempty"` Services *Services `json:"services,omitempty"` // List of ssh keys Sshkey *[]SSHKey `json:"sshkey,omitempty"` // Timezone configuration Timezone *Timezone `json:"timezone,omitempty"` // List of users to create User *[]BlueprintUser `json:"user,omitempty"` } // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. type BlueprintCustomizationsPartitioningMode string // A custom file to create in the final artifact. type BlueprintFile struct { // Contents of the file as plain text Data *string `json:"data,omitempty"` // Group of the file as a gid or a group name Group *interface{} `json:"group,omitempty"` // Permissions string for the file in octal format Mode *string `json:"mode,omitempty"` // Path to the file Path string `json:"path"` // Owner of the file as a uid or a user name User *interface{} `json:"user,omitempty"` } // BlueprintFilesystem defines model for BlueprintFilesystem. type BlueprintFilesystem struct { // size of the filesystem in bytes Minsize uint64 `json:"minsize"` Mountpoint string `json:"mountpoint"` } // Firewalld configuration type BlueprintFirewall struct { // List of ports (or port ranges) and protocols to open Ports *[]string `json:"ports,omitempty"` // Firewalld services to enable or disable Services *FirewallServices `json:"services,omitempty"` Zones *[]FirewallZones `json:"zones,omitempty"` } // BlueprintOpenSCAP defines model for BlueprintOpenSCAP. type BlueprintOpenSCAP struct { Datastream *string `json:"datastream,omitempty"` JsonTailoring *OpenSCAPJSONTailoring `json:"json_tailoring,omitempty"` // Puts a specified policy ID in the RHSM facts, so that any instances registered to // insights will be automatically connected to the compliance policy in the console. PolicyId *string `json:"policy_id,omitempty"` ProfileId string `json:"profile_id"` Tailoring *OpenSCAPTailoring `json:"tailoring,omitempty"` } // BlueprintRepository defines model for BlueprintRepository. type BlueprintRepository struct { Baseurls *[]string `json:"baseurls,omitempty"` Enabled *bool `json:"enabled,omitempty"` Filename *string `json:"filename,omitempty"` Gpgcheck *bool `json:"gpgcheck,omitempty"` Gpgkeys *[]string `json:"gpgkeys,omitempty"` Id string `json:"id"` Metalink *string `json:"metalink,omitempty"` Mirrorlist *string `json:"mirrorlist,omitempty"` // Disables modularity filtering for this repository. ModuleHotfixes *bool `json:"module_hotfixes,omitempty"` Name *string `json:"name,omitempty"` Priority *int `json:"priority,omitempty"` RepoGpgcheck *bool `json:"repo_gpgcheck,omitempty"` Sslverify *bool `json:"sslverify,omitempty"` } // BlueprintUser defines model for BlueprintUser. type BlueprintUser struct { Description *string `json:"description,omitempty"` // Group id to use instead of the default Gid *int `json:"gid,omitempty"` // A list of additional groups to add the user to Groups *[]string `json:"groups,omitempty"` // The user's home directory Home *string `json:"home,omitempty"` // ssh public key Key *string `json:"key,omitempty"` Name string `json:"name"` // If the password starts with $6$, $5$, or $2b$ it will be stored as // an encrypted password. Otherwise it will be treated as a plain text // password. Password *string `json:"password,omitempty"` // Login shell to use Shell *string `json:"shell,omitempty"` // User id to use instead of the default Uid *int `json:"uid,omitempty"` } // CACertsCustomization defines model for CACertsCustomization. type CACertsCustomization struct { PemCerts []string `json:"pem_certs"` } // CloneComposeBody defines model for CloneComposeBody. type CloneComposeBody interface{} // CloneComposeResponse defines model for CloneComposeResponse. type CloneComposeResponse struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Id string `json:"id"` } // CloneStatus defines model for CloneStatus. type CloneStatus struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded struct due to allOf(#/components/schemas/UploadStatus) UploadStatus `yaml:",inline"` } // ComposeId defines model for ComposeId. type ComposeId struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Id string `json:"id"` } // ComposeLogs defines model for ComposeLogs. type ComposeLogs struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema ImageBuilds []interface{} `json:"image_builds"` Koji *KojiLogs `json:"koji,omitempty"` } // ComposeManifests defines model for ComposeManifests. type ComposeManifests struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Manifests []interface{} `json:"manifests"` } // ComposeMetadata defines model for ComposeMetadata. type ComposeMetadata struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema // ID (hash) of the built commit OstreeCommit *string `json:"ostree_commit,omitempty"` // Package list including NEVRA Packages *[]PackageMetadata `json:"packages,omitempty"` } // ComposeRequest defines model for ComposeRequest. type ComposeRequest struct { Blueprint *Blueprint `json:"blueprint,omitempty"` Customizations *Customizations `json:"customizations,omitempty"` Distribution string `json:"distribution"` ImageRequest *ImageRequest `json:"image_request,omitempty"` ImageRequests *[]ImageRequest `json:"image_requests,omitempty"` Koji *Koji `json:"koji,omitempty"` } // ComposeSBOMs defines model for ComposeSBOMs. type ComposeSBOMs struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema // The SBOM documents for each image built in the compose. Items [][]ImageSBOM `json:"items"` } // ComposeStatus defines model for ComposeStatus. type ComposeStatus struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema ImageStatus ImageStatus `json:"image_status"` ImageStatuses *[]ImageStatus `json:"image_statuses,omitempty"` KojiStatus *KojiStatus `json:"koji_status,omitempty"` Status ComposeStatusValue `json:"status"` } // ComposeStatusError defines model for ComposeStatusError. type ComposeStatusError struct { Details *interface{} `json:"details,omitempty"` Id int `json:"id"` Reason string `json:"reason"` } // ComposeStatusValue defines model for ComposeStatusValue. type ComposeStatusValue string // Container defines model for Container. type Container struct { // Name to use for the container from the image Name *string `json:"name,omitempty"` // Reference to the container to embed Source string `json:"source"` // Control TLS verifification TlsVerify *bool `json:"tls_verify,omitempty"` } // ContainerUploadOptions defines model for ContainerUploadOptions. type ContainerUploadOptions struct { // Name for the created container image Name *string `json:"name,omitempty"` // Tag for the created container image Tag *string `json:"tag,omitempty"` } // ContainerUploadStatus defines model for ContainerUploadStatus. type ContainerUploadStatus struct { // Digest of the manifest of the uploaded container on the registry Digest string `json:"digest"` // FQDN of the uploaded image Url string `json:"url"` } // CustomRepository defines model for CustomRepository. type CustomRepository struct { Baseurl *[]string `json:"baseurl,omitempty"` CheckGpg *bool `json:"check_gpg,omitempty"` CheckRepoGpg *bool `json:"check_repo_gpg,omitempty"` Enabled *bool `json:"enabled,omitempty"` Filename *string `json:"filename,omitempty"` Gpgkey *[]string `json:"gpgkey,omitempty"` Id string `json:"id"` Metalink *string `json:"metalink,omitempty"` Mirrorlist *string `json:"mirrorlist,omitempty"` ModuleHotfixes *bool `json:"module_hotfixes,omitempty"` Name *string `json:"name,omitempty"` Priority *int `json:"priority,omitempty"` SslVerify *bool `json:"ssl_verify,omitempty"` } // Customizations defines model for Customizations. type Customizations struct { Cacerts *CACertsCustomization `json:"cacerts,omitempty"` Containers *[]Container `json:"containers,omitempty"` // Extra repositories for packages specified in customizations. These // repositories will be used to depsolve and retrieve packages. Additionally, // these packages will be saved and imported to the `/etc/yum.repos.d/` directory // on the image CustomRepositories *[]CustomRepository `json:"custom_repositories,omitempty"` Directories *[]Directory `json:"directories,omitempty"` // FIDO device onboard configuration Fdo *FDO `json:"fdo,omitempty"` Files *[]File `json:"files,omitempty"` Filesystem *[]Filesystem `json:"filesystem,omitempty"` // System FIPS mode setup Fips *FIPS `json:"fips,omitempty"` // Firewalld configuration Firewall *FirewallCustomization `json:"firewall,omitempty"` // List of groups to create Groups *[]Group `json:"groups,omitempty"` // Configures the hostname Hostname *string `json:"hostname,omitempty"` // Ignition configuration Ignition *Ignition `json:"ignition,omitempty"` // Name of the installation device, currently only useful for the edge-simplified-installer type InstallationDevice *string `json:"installation_device,omitempty"` Installer *Installer `json:"installer,omitempty"` Kernel *Kernel `json:"kernel,omitempty"` // Locale configuration Locale *Locale `json:"locale,omitempty"` Openscap *OpenSCAP `json:"openscap,omitempty"` Packages *[]string `json:"packages,omitempty"` // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. PartitioningMode *CustomizationsPartitioningMode `json:"partitioning_mode,omitempty"` // Extra repositories for packages specified in customizations. These // repositories will only be used to depsolve and retrieve packages // for the OS itself (they will not be available for the build root or // any other part of the build process). The package_sets field for these // repositories is ignored. PayloadRepositories *[]Repository `json:"payload_repositories,omitempty"` Rhsm *RHSMCustomization `json:"rhsm,omitempty"` Rpm *RPMCustomization `json:"rpm,omitempty"` Services *Services `json:"services,omitempty"` Subscription *Subscription `json:"subscription,omitempty"` // Timezone configuration Timezone *Timezone `json:"timezone,omitempty"` Users *[]User `json:"users,omitempty"` } // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. type CustomizationsPartitioningMode string // DNFPluginConfig defines model for DNFPluginConfig. type DNFPluginConfig struct { Enabled *bool `json:"enabled,omitempty"` } // DepsolveRequest defines model for DepsolveRequest. type DepsolveRequest struct { Architecture string `json:"architecture"` Blueprint Blueprint `json:"blueprint"` Distribution string `json:"distribution"` Repositories *[]Repository `json:"repositories,omitempty"` } // DepsolveResponse defines model for DepsolveResponse. type DepsolveResponse struct { // Package list including NEVRA Packages []PackageMetadata `json:"packages"` } // A custom directory to create in the final artifact. type Directory struct { // Ensure that the parent directories exist EnsureParents *bool `json:"ensure_parents,omitempty"` // Group of the directory as a group name or a gid Group *interface{} `json:"group,omitempty"` // Permissions string for the directory in octal format Mode *string `json:"mode,omitempty"` // Path to the directory Path string `json:"path"` // Owner of the directory as a user name or a uid User *interface{} `json:"user,omitempty"` } // Error defines model for Error. type Error struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Code string `json:"code"` Details *interface{} `json:"details,omitempty"` OperationId string `json:"operation_id"` Reason string `json:"reason"` } // ErrorList defines model for ErrorList. type ErrorList struct { // Embedded struct due to allOf(#/components/schemas/List) List `yaml:",inline"` // Embedded fields due to inline allOf schema Items []Error `json:"items"` } // FIDO device onboard configuration type FDO struct { DiMfgStringTypeMacIface *string `json:"di_mfg_string_type_mac_iface,omitempty"` DiunPubKeyHash *string `json:"diun_pub_key_hash,omitempty"` DiunPubKeyInsecure *string `json:"diun_pub_key_insecure,omitempty"` DiunPubKeyRootCerts *string `json:"diun_pub_key_root_certs,omitempty"` ManufacturingServerUrl *string `json:"manufacturing_server_url,omitempty"` } // System FIPS mode setup type FIPS struct { // Enables the system FIPS mode Enabled *bool `json:"enabled,omitempty"` } // A custom file to create in the final artifact. type File struct { // Contents of the file as plain text Data *string `json:"data,omitempty"` // Ensure that the parent directories exist EnsureParents *bool `json:"ensure_parents,omitempty"` // Group of the file as a gid or a group name Group *interface{} `json:"group,omitempty"` // Permissions string for the file in octal format Mode *string `json:"mode,omitempty"` // Path to the file Path string `json:"path"` // Owner of the file as a uid or a user name User *interface{} `json:"user,omitempty"` } // Filesystem defines model for Filesystem. type Filesystem struct { // size of the filesystem in bytes MinSize uint64 `json:"min_size"` Mountpoint string `json:"mountpoint"` } // Firewalld configuration type FirewallCustomization struct { // List of ports (or port ranges) and protocols to open Ports *[]string `json:"ports,omitempty"` // Firewalld services to enable or disable Services *FirewallServices `json:"services,omitempty"` } // Firewalld services to enable or disable type FirewallServices struct { // List of services to disable Disabled *[]string `json:"disabled,omitempty"` // List of services to enable Enabled *[]string `json:"enabled,omitempty"` } // Bind a list of network sources to a zone to restrict traffic from // those sources based on the settings of the zone. type FirewallZones struct { // name of the zone, if left empty the sources will apply to // the default zone. Name *string `json:"name,omitempty"` // List of sources for the zone Sources *[]string `json:"sources,omitempty"` } // GCPUploadOptions defines model for GCPUploadOptions. type GCPUploadOptions struct { // Name of an existing STANDARD Storage class Bucket. Bucket *string `json:"bucket,omitempty"` // The name to use for the imported and shared Compute Engine image. // The image name must be unique within the GCP project, which is used // for the OS image upload and import. If not specified a random // 'composer-api-' string is used as the image name. ImageName *string `json:"image_name,omitempty"` // The GCP region where the OS image will be imported to and shared from. // The value must be a valid GCP location. See https://cloud.google.com/storage/docs/locations. // If not specified, the multi-region location closest to the source // (source Storage Bucket location) is chosen automatically. Region string `json:"region"` // List of valid Google accounts to share the imported Compute Engine image with. // Each string must contain a specifier of the account type. Valid formats are: // - 'user:{emailid}': An email address that represents a specific // Google account. For example, 'alice@example.com'. // - 'serviceAccount:{emailid}': An email address that represents a // service account. For example, 'my-other-app@appspot.gserviceaccount.com'. // - 'group:{emailid}': An email address that represents a Google group. // For example, 'admins@example.com'. // - 'domain:{domain}': The G Suite domain (primary) that represents all // the users of that domain. For example, 'google.com' or 'example.com'. // If not specified, the imported Compute Engine image is not shared with any // account. ShareWithAccounts *[]string `json:"share_with_accounts,omitempty"` } // GCPUploadStatus defines model for GCPUploadStatus. type GCPUploadStatus struct { ImageName string `json:"image_name"` ProjectId string `json:"project_id"` } // Group defines model for Group. type Group struct { // Group id of the group to create (optional) Gid *int `json:"gid,omitempty"` // Name of the group to create Name string `json:"name"` } // Ignition configuration type Ignition struct { Embedded *IgnitionEmbedded `json:"embedded,omitempty"` Firstboot *IgnitionFirstboot `json:"firstboot,omitempty"` } // IgnitionEmbedded defines model for IgnitionEmbedded. type IgnitionEmbedded struct { Config string `json:"config"` } // IgnitionFirstboot defines model for IgnitionFirstboot. type IgnitionFirstboot struct { // Provisioning URL Url string `json:"url"` } // ImageRequest defines model for ImageRequest. type ImageRequest struct { Architecture string `json:"architecture"` ImageType ImageTypes `json:"image_type"` Ostree *OSTree `json:"ostree,omitempty"` Repositories []Repository `json:"repositories"` // Size of image, in bytes. When set to 0 the image size is a minimum // defined by the image type. Size *uint64 `json:"size,omitempty"` // Options for a given upload destination. // This should really be oneOf but AWSS3UploadOptions is a subset of // AWSEC2UploadOptions. This means that all AWSEC2UploadOptions objects // are also valid AWSS3UploadOptionas objects which violates the oneOf // rules. Therefore, we have to use anyOf here but be aware that it isn't // possible to mix and match more schemas together. UploadOptions *UploadOptions `json:"upload_options,omitempty"` // The type and options for multiple upload targets. Each item defines // a separate upload destination with its own options. Multiple // different targets as well as multiple targets of the same kind are // supported. UploadTargets *[]UploadTarget `json:"upload_targets,omitempty"` } // ImageSBOM defines model for ImageSBOM. type ImageSBOM struct { // The name of the osbuild pipeline which has the packages described // in the SBOM installed. PipelineName string `json:"pipeline_name"` // The purpose of the pipeline. The `buildroot` pipeline was used for // the build environment dueing the image build. The `image` pipeline // represents the actual content of the image. Due to the nature of // some image types, there may be multiple pipelines of the same // purpose. PipelinePurpose ImageSBOMPipelinePurpose `json:"pipeline_purpose"` // The SBOM document in the 'sbom_type' format. Sbom interface{} `json:"sbom"` // The type of the SBOM document. Currently only SPDX is supported. SbomType ImageSBOMSbomType `json:"sbom_type"` } // The purpose of the pipeline. The `buildroot` pipeline was used for // the build environment dueing the image build. The `image` pipeline // represents the actual content of the image. Due to the nature of // some image types, there may be multiple pipelines of the same // purpose. type ImageSBOMPipelinePurpose string // The type of the SBOM document. Currently only SPDX is supported. type ImageSBOMSbomType string // ImageStatus defines model for ImageStatus. type ImageStatus struct { Error *ComposeStatusError `json:"error,omitempty"` Status ImageStatusValue `json:"status"` UploadStatus *UploadStatus `json:"upload_status,omitempty"` UploadStatuses *[]UploadStatus `json:"upload_statuses,omitempty"` } // ImageStatusValue defines model for ImageStatusValue. type ImageStatusValue string // ImageTypes defines model for ImageTypes. type ImageTypes string // ImportKeys defines model for ImportKeys. type ImportKeys struct { Files *[]string `json:"files,omitempty"` } // Installer defines model for Installer. type Installer struct { SudoNopasswd *[]string `json:"sudo-nopasswd,omitempty"` Unattended *bool `json:"unattended,omitempty"` } // Kernel defines model for Kernel. type Kernel struct { // Appends arguments to the bootloader kernel command line Append *string `json:"append,omitempty"` // Name of the kernel to use Name *string `json:"name,omitempty"` } // Koji defines model for Koji. type Koji struct { Name string `json:"name"` Release string `json:"release"` Server string `json:"server"` TaskId int `json:"task_id"` Version string `json:"version"` } // KojiLogs defines model for KojiLogs. type KojiLogs struct { Import interface{} `json:"import"` Init interface{} `json:"init"` } // KojiStatus defines model for KojiStatus. type KojiStatus struct { BuildId *int `json:"build_id,omitempty"` } // List defines model for List. type List struct { Kind string `json:"kind"` Page int `json:"page"` Size int `json:"size"` Total int `json:"total"` } // LocalUploadOptions defines model for LocalUploadOptions. type LocalUploadOptions map[string]interface{} // LocalUploadStatus defines model for LocalUploadStatus. type LocalUploadStatus struct { ArtifactPath string `json:"artifact_path"` } // Locale configuration type Locale struct { // Sets the keyboard layout Keyboard *string `json:"keyboard,omitempty"` // List of locales to be installed, the first one becomes primary, subsequent ones are secondary Languages *[]string `json:"languages,omitempty"` } // OCIUploadOptions defines model for OCIUploadOptions. type OCIUploadOptions map[string]interface{} // OCIUploadStatus defines model for OCIUploadStatus. type OCIUploadStatus struct { Url string `json:"url"` } // OSTree defines model for OSTree. type OSTree struct { // A URL which, if set, is used for fetching content. Implies that `url` is set as well, // which will be used for metadata only. Contenturl *string `json:"contenturl,omitempty"` // Can be either a commit (example: 02604b2da6e954bd34b8b82a835e5a77d2b60ffa), or a branch-like reference (example: rhel/8/x86_64/edge) Parent *string `json:"parent,omitempty"` Ref *string `json:"ref,omitempty"` // Determines whether a valid subscription manager (candlepin) identity is required to // access this repository. Consumer certificates will be used as client certificates when // fetching metadata and content. Rhsm *bool `json:"rhsm,omitempty"` Url *string `json:"url,omitempty"` } // ObjectReference defines model for ObjectReference. type ObjectReference struct { Href string `json:"href"` Id string `json:"id"` Kind string `json:"kind"` } // OpenSCAP defines model for OpenSCAP. type OpenSCAP struct { JsonTailoring *OpenSCAPJSONTailoring `json:"json_tailoring,omitempty"` // Puts a specified policy ID in the RHSM facts, so that any instances registered to // insights will be automatically connected to the compliance policy in the console. PolicyId *string `json:"policy_id,omitempty"` ProfileId string `json:"profile_id"` Tailoring *OpenSCAPTailoring `json:"tailoring,omitempty"` } // OpenSCAPJSONTailoring defines model for OpenSCAPJSONTailoring. type OpenSCAPJSONTailoring struct { Filepath string `json:"filepath"` ProfileId string `json:"profile_id"` } // OpenSCAPTailoring defines model for OpenSCAPTailoring. type OpenSCAPTailoring struct { Selected *[]string `json:"selected,omitempty"` Unselected *[]string `json:"unselected,omitempty"` } // Package defines model for Package. type Package struct { // Name of the package to install. File globbing is supported, // eg. 'openssh-*' Name string `json:"name"` // Optional version of the package to install. If left blank the // latest available version will be used. Wildcards are supported // eg. '4.11.*' Version *string `json:"version,omitempty"` } // PackageGroup defines model for PackageGroup. type PackageGroup struct { // Package group name Name string `json:"name"` } // PackageMetadata defines model for PackageMetadata. type PackageMetadata struct { Arch string `json:"arch"` // Optional package checksum using ALGO:HASH form Checksum *string `json:"checksum,omitempty"` Epoch *string `json:"epoch,omitempty"` Name string `json:"name"` Release string `json:"release"` Sigmd5 *string `json:"sigmd5,omitempty"` Signature *string `json:"signature,omitempty"` Type string `json:"type"` Version string `json:"version"` } // PulpOSTreeUploadOptions defines model for PulpOSTreeUploadOptions. type PulpOSTreeUploadOptions struct { // Basepath for distributing the repository Basepath string `json:"basepath"` // Repository to import the ostree commit to Repository *string `json:"repository,omitempty"` ServerAddress *string `json:"server_address,omitempty"` } // PulpOSTreeUploadStatus defines model for PulpOSTreeUploadStatus. type PulpOSTreeUploadStatus struct { RepoUrl string `json:"repo_url"` } // RHSMConfig defines model for RHSMConfig. type RHSMConfig struct { DnfPlugins *SubManDNFPluginsConfig `json:"dnf_plugins,omitempty"` SubscriptionManager *SubManConfig `json:"subscription_manager,omitempty"` } // RHSMCustomization defines model for RHSMCustomization. type RHSMCustomization struct { Config *RHSMConfig `json:"config,omitempty"` } // RPMCustomization defines model for RPMCustomization. type RPMCustomization struct { ImportKeys *ImportKeys `json:"import_keys,omitempty"` } // Repository configuration. // At least one of the 'baseurl', 'mirrorlist', 'metalink' properties must // be specified. If more of them are specified, the order of precedence is // the same as listed above. type Repository struct { Baseurl *string `json:"baseurl,omitempty"` CheckGpg *bool `json:"check_gpg,omitempty"` // Enables gpg verification of the repository metadata CheckRepoGpg *bool `json:"check_repo_gpg,omitempty"` // GPG key used to sign packages in this repository. Gpgkey *string `json:"gpgkey,omitempty"` IgnoreSsl *bool `json:"ignore_ssl,omitempty"` Metalink *string `json:"metalink,omitempty"` Mirrorlist *string `json:"mirrorlist,omitempty"` // Disables modularity filtering for this repository. ModuleHotfixes *bool `json:"module_hotfixes,omitempty"` // Naming package sets for a repository assigns it to a specific part // (pipeline) of the build process. PackageSets *[]string `json:"package_sets,omitempty"` // Determines whether a valid subscription is required to access this repository. Rhsm *bool `json:"rhsm,omitempty"` } // SSHKey defines model for SSHKey. type SSHKey struct { // Adds the key to the user's authorized_keys file Key string `json:"key"` // User to configure the ssh key for User string `json:"user"` } // Services defines model for Services. type Services struct { // List of services to disable by default Disabled *[]string `json:"disabled,omitempty"` // List of services to enable by default Enabled *[]string `json:"enabled,omitempty"` // List of services to mask by default Masked *[]string `json:"masked,omitempty"` } // SubManConfig defines model for SubManConfig. type SubManConfig struct { Rhsm *SubManRHSMConfig `json:"rhsm,omitempty"` Rhsmcertd *SubManRHSMCertdConfig `json:"rhsmcertd,omitempty"` } // SubManDNFPluginsConfig defines model for SubManDNFPluginsConfig. type SubManDNFPluginsConfig struct { ProductId *DNFPluginConfig `json:"product_id,omitempty"` SubscriptionManager *DNFPluginConfig `json:"subscription_manager,omitempty"` } // SubManRHSMCertdConfig defines model for SubManRHSMCertdConfig. type SubManRHSMCertdConfig struct { AutoRegistration *bool `json:"auto_registration,omitempty"` } // SubManRHSMConfig defines model for SubManRHSMConfig. type SubManRHSMConfig struct { ManageRepos *bool `json:"manage_repos,omitempty"` } // Subscription defines model for Subscription. type Subscription struct { ActivationKey string `json:"activation_key"` BaseUrl string `json:"base_url"` Insights bool `json:"insights"` Organization string `json:"organization"` // Optional flag to use rhc to register the system, which also always enables Insights. Rhc *bool `json:"rhc,omitempty"` ServerUrl string `json:"server_url"` } // Timezone configuration type Timezone struct { // List of ntp servers Ntpservers *[]string `json:"ntpservers,omitempty"` // Name of the timezone, defaults to UTC Timezone *string `json:"timezone,omitempty"` } // Options for a given upload destination. // This should really be oneOf but AWSS3UploadOptions is a subset of // AWSEC2UploadOptions. This means that all AWSEC2UploadOptions objects // are also valid AWSS3UploadOptionas objects which violates the oneOf // rules. Therefore, we have to use anyOf here but be aware that it isn't // possible to mix and match more schemas together. type UploadOptions interface{} // UploadStatus defines model for UploadStatus. type UploadStatus struct { Options interface{} `json:"options"` Status UploadStatusValue `json:"status"` Type UploadTypes `json:"type"` } // UploadStatusValue defines model for UploadStatusValue. type UploadStatusValue string // UploadTarget defines model for UploadTarget. type UploadTarget struct { Type UploadTypes `json:"type"` // Options for a given upload destination. // This should really be oneOf but AWSS3UploadOptions is a subset of // AWSEC2UploadOptions. This means that all AWSEC2UploadOptions objects // are also valid AWSS3UploadOptionas objects which violates the oneOf // rules. Therefore, we have to use anyOf here but be aware that it isn't // possible to mix and match more schemas together. UploadOptions UploadOptions `json:"upload_options"` } // UploadTypes defines model for UploadTypes. type UploadTypes string // User defines model for User. type User struct { Groups *[]string `json:"groups,omitempty"` Key *string `json:"key,omitempty"` Name string `json:"name"` // If the password starts with $6$, $5$, or $2b$ it will be stored as // an encrypted password. Otherwise it will be treated as a plain text // password. Password *string `json:"password,omitempty"` } // Page defines model for page. type Page string // Size defines model for size. type Size string // PostComposeJSONBody defines parameters for PostCompose. type PostComposeJSONBody ComposeRequest // PostCloneComposeJSONBody defines parameters for PostCloneCompose. type PostCloneComposeJSONBody CloneComposeBody // PostDepsolveBlueprintJSONBody defines parameters for PostDepsolveBlueprint. type PostDepsolveBlueprintJSONBody DepsolveRequest // GetErrorListParams defines parameters for GetErrorList. type GetErrorListParams struct { // Page index Page *Page `json:"page,omitempty"` // Number of items in each page Size *Size `json:"size,omitempty"` } // PostComposeJSONRequestBody defines body for PostCompose for application/json ContentType. type PostComposeJSONRequestBody PostComposeJSONBody // PostCloneComposeJSONRequestBody defines body for PostCloneCompose for application/json ContentType. type PostCloneComposeJSONRequestBody PostCloneComposeJSONBody // PostDepsolveBlueprintJSONRequestBody defines body for PostDepsolveBlueprint for application/json ContentType. type PostDepsolveBlueprintJSONRequestBody PostDepsolveBlueprintJSONBody // ServerInterface represents all server handlers. type ServerInterface interface { // The status of a cloned compose // (GET /clones/{id}) GetCloneStatus(ctx echo.Context, id string) error // Create compose // (POST /compose) PostCompose(ctx echo.Context) error // The status of a compose // (GET /composes/{id}) GetComposeStatus(ctx echo.Context, id string) error // Clone an existing compose // (POST /composes/{id}/clone) PostCloneCompose(ctx echo.Context, id string) error // Get logs for a compose. // (GET /composes/{id}/logs) GetComposeLogs(ctx echo.Context, id string) error // Get the manifests for a compose. // (GET /composes/{id}/manifests) GetComposeManifests(ctx echo.Context, id string) error // Get the metadata for a compose. // (GET /composes/{id}/metadata) GetComposeMetadata(ctx echo.Context, id string) error // Get the SBOMs for a compose. // (GET /composes/{id}/sboms) GetComposeSBOMs(ctx echo.Context, id string) error // Depsolve one or more blueprints // (POST /depsolve/blueprint) PostDepsolveBlueprint(ctx echo.Context) error // Get a list of all possible errors // (GET /errors) GetErrorList(ctx echo.Context, params GetErrorListParams) error // Get error description // (GET /errors/{id}) GetError(ctx echo.Context, id string) error // Get the openapi spec in json format // (GET /openapi) GetOpenapi(ctx echo.Context) error } // ServerInterfaceWrapper converts echo contexts to parameters. type ServerInterfaceWrapper struct { Handler ServerInterface } // GetCloneStatus converts echo context to params. func (w *ServerInterfaceWrapper) GetCloneStatus(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetCloneStatus(ctx, id) return err } // PostCompose converts echo context to params. func (w *ServerInterfaceWrapper) PostCompose(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.PostCompose(ctx) return err } // GetComposeStatus converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeStatus(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeStatus(ctx, id) return err } // PostCloneCompose converts echo context to params. func (w *ServerInterfaceWrapper) PostCloneCompose(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.PostCloneCompose(ctx, id) return err } // GetComposeLogs converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeLogs(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeLogs(ctx, id) return err } // GetComposeManifests converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeManifests(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeManifests(ctx, id) return err } // GetComposeMetadata converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeMetadata(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeMetadata(ctx, id) return err } // GetComposeSBOMs converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeSBOMs(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeSBOMs(ctx, id) return err } // PostDepsolveBlueprint converts echo context to params. func (w *ServerInterfaceWrapper) PostDepsolveBlueprint(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.PostDepsolveBlueprint(ctx) return err } // GetErrorList converts echo context to params. func (w *ServerInterfaceWrapper) GetErrorList(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Parameter object where we will unmarshal all parameters from the context var params GetErrorListParams // ------------- Optional query parameter "page" ------------- err = runtime.BindQueryParameter("form", true, false, "page", ctx.QueryParams(), ¶ms.Page) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter page: %s", err)) } // ------------- Optional query parameter "size" ------------- err = runtime.BindQueryParameter("form", true, false, "size", ctx.QueryParams(), ¶ms.Size) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter size: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetErrorList(ctx, params) return err } // GetError converts echo context to params. func (w *ServerInterfaceWrapper) GetError(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetError(ctx, id) return err } // GetOpenapi converts echo context to params. func (w *ServerInterfaceWrapper) GetOpenapi(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetOpenapi(ctx) return err } // This is a simple interface which specifies echo.Route addition functions which // are present on both echo.Echo and echo.Group, since we want to allow using // either of them for path registration type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route } // RegisterHandlers adds each server route to the EchoRouter. func RegisterHandlers(router EchoRouter, si ServerInterface) { RegisterHandlersWithBaseURL(router, si, "") } // Registers handlers, and prepends BaseURL to the paths, so that the paths // can be served under a prefix. func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) { wrapper := ServerInterfaceWrapper{ Handler: si, } router.GET(baseURL+"/clones/:id", wrapper.GetCloneStatus) router.POST(baseURL+"/compose", wrapper.PostCompose) router.GET(baseURL+"/composes/:id", wrapper.GetComposeStatus) router.POST(baseURL+"/composes/:id/clone", wrapper.PostCloneCompose) router.GET(baseURL+"/composes/:id/logs", wrapper.GetComposeLogs) router.GET(baseURL+"/composes/:id/manifests", wrapper.GetComposeManifests) router.GET(baseURL+"/composes/:id/metadata", wrapper.GetComposeMetadata) router.GET(baseURL+"/composes/:id/sboms", wrapper.GetComposeSBOMs) router.POST(baseURL+"/depsolve/blueprint", wrapper.PostDepsolveBlueprint) router.GET(baseURL+"/errors", wrapper.GetErrorList) router.GET(baseURL+"/errors/:id", wrapper.GetError) router.GET(baseURL+"/openapi", wrapper.GetOpenapi) } // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ "H4sIAAAAAAAC/+x9eXPbOLL4V0HpTVVmftF9WLKrpvbJ8iXftmQ79irlhUiIgkUCDABKluflu/8KBylS", "oq44mdnZzR+7E4tAo9FAN7ob3Y0/Mhb1fEoQETyz90fGhwx6SCBm/nKQ/K+NuMWwLzAlmb3MNXQQwMRG", "r5lsBr1Cz3dRovkYugHK7GVKma9fsxks+3wJEJtmshkCPflFtcxmuDVEHpRdxNSXv3PBMHFUN47fUsa+", "DLw+YoAOABbI4wATgKA1BAZgHJsQQIRNsbgUH9V2FT5fw48KdPOhc9gqt1xKUEuSj6uBoG1jiSZ0rxn1", "ERNYIjKALkfZjB/76Y8MQ46az8JA2QwfQoaeJ1gMn6Fl0cAsjJlZZu+fmVK5Uq3t1Bu7xVI58zmbUZRI", "hWV+gIzBqZo7Q18CzJAtwRgcPkfNaP8FWUL20/O7810K7StFev7NE4wQz6AgN0Fc5EqZ7J857WyGE+jz", "IRXPerXjOHn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9jCkB", "sE8DYYL9eeCKVce8qjny85Bfe8grOi1hDbkFogrv+jYvMhAxAYTq10OtwIXM1HUDv4ohDZyhuU877Vxd", "/pb/j2OkY1W+3AkvOsNdnsZGHiR4gLhYz0tRyw3Y6RaJgBGuspHCfgoZZYMbcUYMqyj5bipcRo0tqhgr", "qv1kli+s8AkFiLtjTcFGHdsLScH8nQvB5WsrWPEiIsFPflzLjzNiLWHKxHIvMOZ/Jq8l2WMDpotlQq/m", "uahOi2S5BT7TjyugV2iJxEHEFPshG9hIl1KjCV6LXP+qNO4qzgjx/MkY6xkjevZ0CV+ES7kNX/w0Un8a", "qf9uRuqCbFov73ifessVjFBZgEDHTiVL5PI1ekOPzDWHLGqjqunOCvoudbntX11sefhLnHTAlRZzIITx", "X+J6U7NdIunUx/+243826XlWCN/xLyReJV/utgmf8d6PPf39I5wg88+yb+QDKf6A4Zf7P8I2dpQ65uLw", "LuhPPCrDFfx5GbV4YP5dTq1wK+kCGUxHrEYcqQPsCgp4/KBaODFmD1svHBdpM5s1KajyqMsCL2PtVP3U", "HyrDZ3NI23LRE4+GGD/3+l+jHOqN/vdTDWdvhELXBVHIeLibZmy2/h4WkqjwYXg7oTGbVVDsT4HSgdIZ", "dfNbD2Sav0t9q/zJytjSpVQfQPy3n1z8k4u34WK0uIMk50ahqctPyCvT5J37fj5qeGGiBhUlC6S9J0GE", "j7j/Da3pldP5GuUupkmxC/P2o0rzVQ+WRkXxk4HL0Md5VWVziAc6aRT6uKAf31D+csRy4cOzhXFZaStz", "4dQCOpg4qwbgAjroncNY+lEc8zZlNMw6OJ+//v8AAAD//yY6FGcI0gAA", } // 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: %s", err) } zr, err := gzip.NewReader(bytes.NewReader(zipped)) if err != nil { return nil, fmt.Errorf("error decompressing spec: %s", err) } var buf bytes.Buffer _, err = buf.ReadFrom(zr) if err != nil { return nil, fmt.Errorf("error decompressing spec: %s", 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) { var 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) { var resolvePath = PathToRawSpec("") loader := openapi3.NewLoader() loader.IsExternalRefsAllowed = true loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { var 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 }