// 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" "encoding/json" "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" "github.com/pkg/errors" ) 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"` } // ComposeList defines model for ComposeList. type ComposeList struct { // Embedded struct due to allOf(#/components/schemas/List) List `yaml:",inline"` // Embedded fields due to inline allOf schema Items []ComposeStatus `json:"items"` } // 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"` } // DistributionList defines model for DistributionList. type DistributionList struct { // Distribution name Map *DistributionList_Map `json:"map,omitempty"` } // Distribution name type DistributionList_Map struct { AdditionalProperties map[string]interface{} `json:"-"` } // 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"` } // PackageDetails defines model for PackageDetails. type PackageDetails struct { Arch string `json:"arch"` Buildtime *string `json:"buildtime,omitempty"` Description *string `json:"description,omitempty"` Epoch *string `json:"epoch,omitempty"` License *string `json:"license,omitempty"` Name string `json:"name"` Release string `json:"release"` Summary *string `json:"summary,omitempty"` Url *string `json:"url,omitempty"` Version string `json:"version"` } // 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"` } // SearchPackagesRequest defines model for SearchPackagesRequest. type SearchPackagesRequest struct { Architecture string `json:"architecture"` Distribution string `json:"distribution"` // Array of package names to search for. Supports * wildcards for // names, but not for versions. Packages []string `json:"packages"` Repositories *[]Repository `json:"repositories,omitempty"` } // SearchPackagesResponse defines model for SearchPackagesResponse. type SearchPackagesResponse struct { // Detailed package information from DNF Packages []PackageDetails `json:"packages"` } // 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"` } // PostSearchPackagesJSONBody defines parameters for PostSearchPackages. type PostSearchPackagesJSONBody SearchPackagesRequest // 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 // PostSearchPackagesJSONRequestBody defines body for PostSearchPackages for application/json ContentType. type PostSearchPackagesJSONRequestBody PostSearchPackagesJSONBody // Getter for additional properties for DistributionList_Map. Returns the specified // element and whether it was found func (a DistributionList_Map) Get(fieldName string) (value interface{}, found bool) { if a.AdditionalProperties != nil { value, found = a.AdditionalProperties[fieldName] } return } // Setter for additional properties for DistributionList_Map func (a *DistributionList_Map) Set(fieldName string, value interface{}) { if a.AdditionalProperties == nil { a.AdditionalProperties = make(map[string]interface{}) } a.AdditionalProperties[fieldName] = value } // Override default JSON handling for DistributionList_Map to handle AdditionalProperties func (a *DistributionList_Map) UnmarshalJSON(b []byte) error { object := make(map[string]json.RawMessage) err := json.Unmarshal(b, &object) if err != nil { return err } if len(object) != 0 { a.AdditionalProperties = make(map[string]interface{}) for fieldName, fieldBuf := range object { var fieldVal interface{} err := json.Unmarshal(fieldBuf, &fieldVal) if err != nil { return errors.Wrap(err, fmt.Sprintf("error unmarshaling field %s", fieldName)) } a.AdditionalProperties[fieldName] = fieldVal } } return nil } // Override default JSON handling for DistributionList_Map to handle AdditionalProperties func (a DistributionList_Map) MarshalJSON() ([]byte, error) { var err error object := make(map[string]json.RawMessage) for fieldName, field := range a.AdditionalProperties { object[fieldName], err = json.Marshal(field) if err != nil { return nil, errors.Wrap(err, fmt.Sprintf("error marshaling '%s'", fieldName)) } } return json.Marshal(object) } // 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 list of composes // (GET /composes/) GetComposeList(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 all of the supported distribution repository details // (GET /distributions) GetDistributionList(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 // Search for detailed information on a list of package names // (POST /search/packages) PostSearchPackages(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 } // GetComposeList converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeList(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeList(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 } // GetDistributionList converts echo context to params. func (w *ServerInterfaceWrapper) GetDistributionList(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetDistributionList(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 } // PostSearchPackages converts echo context to params. func (w *ServerInterfaceWrapper) PostSearchPackages(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.PostSearchPackages(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/", wrapper.GetComposeList) 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+"/distributions", wrapper.GetDistributionList) router.GET(baseURL+"/errors", wrapper.GetErrorList) router.GET(baseURL+"/errors/:id", wrapper.GetError) router.GET(baseURL+"/openapi", wrapper.GetOpenapi) router.POST(baseURL+"/search/packages", wrapper.PostSearchPackages) } // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ "H4sIAAAAAAAC/+x9eXPbOLL4V0Hpl6pMXnTfdtXUPlm+ZFu+5CP2KuWFSEiCRQI0AEqW5+W7/woHKVKi", "rjiZ2dnNH7sTizgaDXSjb/yRsqjrUYKI4KndP1IeZNBFAjHz1wDJ/9qIWwx7AlOS2k1dwgECmNjoNZVO", "oVfoeg6KNR9Dx0ep3VQh9e1bOoVlnxcfsWkqnSLQlV9Uy3SKW0PkQtlFTD35OxcMk4HqxvFbwtznvttD", "DNA+wAK5HGACELSGwAwYhSYYIIQmn18Kj2q7Cp5vwUc1dOO+c9AsNh1KUFOij6uJoG1jCSZ0Lhn1EBNY", "AtKHDkfplBf56Y8UQwO1noWJ0ik+hAw9TbAYPkHLor7ZGLOy1O4/U4ViqVyp1uo7+UIx9TWdUphIHMv8", "ABmDU7V2hl58zJAthzEwfA2b0d4zsoTsp9d36zkU2hcK9fy7FxgCnkJ+ZoK4yBRS6T9z2ekUJ9DjQyqe", "9G5HYXKnmeDrIlTJCEuGdR0aOwIKX1NJDFHQxXGIoIszeateytd2SrVapbJTscu9JIxtieK5xch502vO", "QKf0niPg+T0HW5qE+9B3RNguTtKtPuBIAEGB+gx+E0METBegiPdTGkDgUDJIA9r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JV2Wwg7/cvosX", "5t/l1gqOkq6gxHRseEiRxkUUTSiN3lcLF8d+pOHP9pcuzJVEKJE2IJaB+zcTLKDjhM/yBFUugZ24uimw", "g0xauXdq1pWbpmA3uzV31SctedYkp8rNLwtPj7RT9eh/6v07W0MSuwg9nwYZv/jUXyPYawr4+4n1szfX", "JR2GiTXBaZqR2XofOiRhIemAoDVks4rUvSlQ8msyoW7usUKm+btE79KfLEgv3Ur1AUR/+0XFv6h4GypG", "iydIUm4YwL/8hrwwTd557udzKxYWakBRvEDq6nIIo6f/HS0hK5cjUa+LsOSidUaW63/xqiU/SflLLnvz", "J6uAS+qzJGyWbgkCSHTeUaAT2rOCKn+qWsgDoH4phX9TpbATFkcyhwjZMT8KJRGRKFZaSQMU1idYkE7a", "5o18VeQEU/IJhI+HxdO2oIez6jWCIe7rkhnQwzn9SKHyYSKWMfYklhsXlRYyRxsCDjAZrJqACzhA75zG", "0o+Hmjf8w2nWjfP12/8PAAD//8sZBmaa4QAA", } // 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 }