// 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 // Download the artifact for a compose. // (GET /composes/{id}/download) GetComposeDownload(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 } // GetComposeDownload converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeDownload(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.GetComposeDownload(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/download", wrapper.GetComposeDownload) 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/+x9eXPbOLL4V0HpN1WZvOi+7aqpfbJ8ybZ8yUfsVcoLkZAEiwQYAJQsz8t3/xUOUqRE", "XXEys9n1H7sTizgaDXSjb/yZsqjrUYKI4KndP1MeZNBFAjHz1wDJ/9qIWwx7AlOS2k1dwgECmNjoJZVO", "oRfoeg6KNR9Dx0ep3VQh9e1bOoVln68+YtNUOkWgK7+olukUt4bIhbKLmHrydy4YJgPVjePXhLnPfbeH", "GKB9gAVyOcAEIGgNgRkwCk0wQAhNPr8UHtV2FTzfgo9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PqDoYm0OelcnH/M/sdd/EfqCaQB34CMXEhwH3GxnpbClhuQ0zUSPiNcpdcH/RQwyjpvxC9iSEXJo6ZK", "ftjYooqwwvqxZvuCVwKgAFFHrSn6rpPVIMmZvzPBcNnKClJshyh4p8e19DhD1jLBJLrdmwomvzitxclj", "A6KLlPZZTXNhrcdEKVs/0IZe5I0ZvYiYIj9kAxvpcsw0RmthUIB6XmMVZQRwvhPGesIIcPUusL8L7P/J", "AvsCb1rP73iPussFjEBYgEBHVcef2eBr5IYumWsOWdhGvcgxexRkqYtg76K95eUvYdKh2JrNgWCM/xJX", "gVrtEk6nPv63Xf+zRc+Tgo08Tp0xyvUcH3nMvH2+3My8b9rvhc1/jtE2mGer2JT8T5h+ub02aDPLF1aF", "I/7qqzLYwfcwlcUL85cxMwV7qCq+MZ3LElKkcWlHE+Cj99XCxbEfafiz4zsW5koilEgbEKsY8IsJFtBx", "wmfEgqq8wE5c3RTYQea/3Ds168pNU7Cb3Zq76pOWPGuSU89jLEunibRT72f81Pt3toYkdhFGahhkvPOp", "v0ew1xTw64n1MDxAkg7DRMDgNM3IbH3MDyRh4fuAoDVkswr6vSlQ8msyoW7uYUem+ZtE79JfLEgv3Ur1", "AUR/e6fidyrehorR4gmSlBsmHC2/IS9Mkzee+/lcsIWFGlAUL5C6uhzC6Om/oiVk5XIk6nXRqFy0LtJy", "/S9eZeknKX/JZbr+YhVwST2phM3SLUEAic6TDHRCe1YA6i9VC3kA1LtS+IsqhZ2wmJs5RMiO+VEoiYhE", "sVJwGqCwnsqCdNKGmIDfTVEmTMlHED52GE8zhR7OqtdThrivS/xAD+f0o6rKh4lYxtiTWG5cVFrIHG0I", "OMBksGoCLuAAvXEaSz92DGzqQlUmUE+zbpwv3/5/AAAA//9po7E9SuYAAA==", } // 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 }