// Package v2 provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen version v1.8.2 DO NOT EDIT. package v2 import ( "bytes" "compress/gzip" "encoding/base64" "fmt" "net/http" "net/url" "path" "strings" "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/getkin/kin-openapi/openapi3" "github.com/labstack/echo/v4" ) const ( BearerScopes = "Bearer.Scopes" ) // Defines values for AzureUploadOptionsHyperVGeneration. const ( AzureUploadOptionsHyperVGenerationV1 AzureUploadOptionsHyperVGeneration = "V1" AzureUploadOptionsHyperVGenerationV2 AzureUploadOptionsHyperVGeneration = "V2" ) // Defines values for BlueprintCustomizationsPartitioningMode. const ( BlueprintCustomizationsPartitioningModeAutoLvm BlueprintCustomizationsPartitioningMode = "auto-lvm" BlueprintCustomizationsPartitioningModeLvm BlueprintCustomizationsPartitioningMode = "lvm" BlueprintCustomizationsPartitioningModeRaw BlueprintCustomizationsPartitioningMode = "raw" ) // Defines values for ComposeStatusValue. const ( ComposeStatusValueFailure ComposeStatusValue = "failure" ComposeStatusValuePending ComposeStatusValue = "pending" ComposeStatusValueSuccess ComposeStatusValue = "success" ) // Defines values for CustomizationsPartitioningMode. const ( CustomizationsPartitioningModeAutoLvm CustomizationsPartitioningMode = "auto-lvm" CustomizationsPartitioningModeLvm CustomizationsPartitioningMode = "lvm" CustomizationsPartitioningModeRaw CustomizationsPartitioningMode = "raw" ) // Defines values for ImageSBOMPipelinePurpose. const ( ImageSBOMPipelinePurposeBuildroot ImageSBOMPipelinePurpose = "buildroot" ImageSBOMPipelinePurposeImage ImageSBOMPipelinePurpose = "image" ) // Defines values for ImageSBOMSbomType. const ( ImageSBOMSbomTypeSpdx ImageSBOMSbomType = "spdx" ) // Defines values for ImageStatusValue. const ( ImageStatusValueBuilding ImageStatusValue = "building" ImageStatusValueFailure ImageStatusValue = "failure" ImageStatusValuePending ImageStatusValue = "pending" ImageStatusValueRegistering ImageStatusValue = "registering" ImageStatusValueSuccess ImageStatusValue = "success" ImageStatusValueUploading ImageStatusValue = "uploading" ) // Defines values for ImageTypes. const ( ImageTypesAws ImageTypes = "aws" ImageTypesAwsHaRhui ImageTypes = "aws-ha-rhui" ImageTypesAwsRhui ImageTypes = "aws-rhui" ImageTypesAwsSapRhui ImageTypes = "aws-sap-rhui" ImageTypesAzure ImageTypes = "azure" ImageTypesAzureEap7Rhui ImageTypes = "azure-eap7-rhui" ImageTypesAzureRhui ImageTypes = "azure-rhui" ImageTypesAzureSapRhui ImageTypes = "azure-sap-rhui" ImageTypesEdgeCommit ImageTypes = "edge-commit" ImageTypesEdgeContainer ImageTypes = "edge-container" ImageTypesEdgeInstaller ImageTypes = "edge-installer" ImageTypesGcp ImageTypes = "gcp" ImageTypesGcpRhui ImageTypes = "gcp-rhui" ImageTypesGuestImage ImageTypes = "guest-image" ImageTypesImageInstaller ImageTypes = "image-installer" ImageTypesIotBootableContainer ImageTypes = "iot-bootable-container" ImageTypesIotCommit ImageTypes = "iot-commit" ImageTypesIotContainer ImageTypes = "iot-container" ImageTypesIotInstaller ImageTypes = "iot-installer" ImageTypesIotRawImage ImageTypes = "iot-raw-image" ImageTypesIotSimplifiedInstaller ImageTypes = "iot-simplified-installer" ImageTypesLiveInstaller ImageTypes = "live-installer" ImageTypesMinimalRaw ImageTypes = "minimal-raw" ImageTypesOci ImageTypes = "oci" ImageTypesVsphere ImageTypes = "vsphere" ImageTypesVsphereOva ImageTypes = "vsphere-ova" ImageTypesWsl ImageTypes = "wsl" ) // Defines values for UploadStatusValue. const ( UploadStatusValueFailure UploadStatusValue = "failure" UploadStatusValuePending UploadStatusValue = "pending" UploadStatusValueRunning UploadStatusValue = "running" UploadStatusValueSuccess UploadStatusValue = "success" ) // Defines values for UploadTypes. const ( UploadTypesAws UploadTypes = "aws" UploadTypesAwsS3 UploadTypes = "aws.s3" UploadTypesAzure UploadTypes = "azure" UploadTypesContainer UploadTypes = "container" UploadTypesGcp UploadTypes = "gcp" UploadTypesLocal UploadTypes = "local" UploadTypesOciObjectstorage UploadTypes = "oci.objectstorage" UploadTypesPulpOstree UploadTypes = "pulp.ostree" ) // AWSEC2CloneCompose defines model for AWSEC2CloneCompose. type AWSEC2CloneCompose struct { Region string `json:"region"` ShareWithAccounts *[]string `json:"share_with_accounts,omitempty"` } // AWSEC2UploadOptions defines model for AWSEC2UploadOptions. type AWSEC2UploadOptions struct { Region string `json:"region"` ShareWithAccounts []string `json:"share_with_accounts"` SnapshotName *string `json:"snapshot_name,omitempty"` } // AWSEC2UploadStatus defines model for AWSEC2UploadStatus. type AWSEC2UploadStatus struct { Ami string `json:"ami"` Region string `json:"region"` } // AWSS3UploadOptions defines model for AWSS3UploadOptions. type AWSS3UploadOptions struct { // If set to false (the default value), a long, obfuscated URL // is returned. Its expiration might be sooner than for other upload // targets. // // If set to true, a shorter URL is returned and // its expiration is the same as for the other upload targets. Public *bool `json:"public,omitempty"` Region string `json:"region"` } // AWSS3UploadStatus defines model for AWSS3UploadStatus. type AWSS3UploadStatus struct { Url string `json:"url"` } // AzureUploadOptions defines model for AzureUploadOptions. type AzureUploadOptions struct { // Choose the VM Image HyperV generation, different features on Azure are available // depending on the HyperV generation. HyperVGeneration *AzureUploadOptionsHyperVGeneration `json:"hyper_v_generation,omitempty"` // Name of the uploaded image. It must be unique in the given resource group. // If name is omitted from the request, a random one based on a UUID is // generated. ImageName *string `json:"image_name,omitempty"` // Location of the provided resource_group, where the image should be uploaded and registered. // How to list all locations: // https://docs.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az_account_list_locations' // If the location is not specified, it is deducted from the provided resource_group. Location *string `json:"location,omitempty"` // Name of the resource group where the image should be uploaded. ResourceGroup string `json:"resource_group"` // ID of subscription where the image should be uploaded. SubscriptionId string `json:"subscription_id"` // ID of the tenant where the image should be uploaded. // How to find it in the Azure Portal: // https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant TenantId string `json:"tenant_id"` } // Choose the VM Image HyperV generation, different features on Azure are available // depending on the HyperV generation. type AzureUploadOptionsHyperVGeneration string // AzureUploadStatus defines model for AzureUploadStatus. type AzureUploadStatus struct { ImageName string `json:"image_name"` } // Blueprint defines model for Blueprint. type Blueprint struct { // Container images to embed into the final artfact Containers *[]Container `json:"containers,omitempty"` Customizations *BlueprintCustomizations `json:"customizations,omitempty"` Description *string `json:"description,omitempty"` // The distribution to use for the compose. If left empty the host // distro will be used. Distro *string `json:"distro,omitempty"` // Package groups to be installed Groups *[]PackageGroup `json:"groups,omitempty"` // An alias for packages, retained for backwards compatability Modules *[]Package `json:"modules,omitempty"` Name string `json:"name"` // Packages to be installed Packages *[]Package `json:"packages,omitempty"` // A semver version number Version *string `json:"version,omitempty"` } // BlueprintCustomizations defines model for BlueprintCustomizations. type BlueprintCustomizations struct { Cacerts *CACertsCustomization `json:"cacerts,omitempty"` // Directories to create in the final artifact Directories *[]Directory `json:"directories,omitempty"` // FIDO device onboard configuration Fdo *FDO `json:"fdo,omitempty"` // Files to create in the final artifact Files *[]BlueprintFile `json:"files,omitempty"` // List of filesystem mountpoints to create Filesystem *[]BlueprintFilesystem `json:"filesystem,omitempty"` // Enable FIPS mode Fips *bool `json:"fips,omitempty"` // Firewalld configuration Firewall *BlueprintFirewall `json:"firewall,omitempty"` // List of groups to create Group *[]Group `json:"group,omitempty"` // Configures the hostname Hostname *string `json:"hostname,omitempty"` // Ignition configuration Ignition *Ignition `json:"ignition,omitempty"` // Name of the installation device, currently only useful for the edge-simplified-installer type InstallationDevice *string `json:"installation_device,omitempty"` Installer *Installer `json:"installer,omitempty"` Kernel *Kernel `json:"kernel,omitempty"` // Locale configuration Locale *Locale `json:"locale,omitempty"` Openscap *BlueprintOpenSCAP `json:"openscap,omitempty"` // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. PartitioningMode *BlueprintCustomizationsPartitioningMode `json:"partitioning_mode,omitempty"` // Repositories to write to /etc/yum.repos.d/ in the final image. Note // that these are not used at build time. Repositories *[]BlueprintRepository `json:"repositories,omitempty"` Rhsm *RHSMCustomization `json:"rhsm,omitempty"` Rpm *RPMCustomization `json:"rpm,omitempty"` Services *Services `json:"services,omitempty"` // List of ssh keys Sshkey *[]SSHKey `json:"sshkey,omitempty"` // Timezone configuration Timezone *Timezone `json:"timezone,omitempty"` // List of users to create User *[]BlueprintUser `json:"user,omitempty"` } // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. type BlueprintCustomizationsPartitioningMode string // A custom file to create in the final artifact. type BlueprintFile struct { // Contents of the file as plain text Data *string `json:"data,omitempty"` // Group of the file as a gid or a group name Group *interface{} `json:"group,omitempty"` // Permissions string for the file in octal format Mode *string `json:"mode,omitempty"` // Path to the file Path string `json:"path"` // Owner of the file as a uid or a user name User *interface{} `json:"user,omitempty"` } // BlueprintFilesystem defines model for BlueprintFilesystem. type BlueprintFilesystem struct { // size of the filesystem in bytes Minsize uint64 `json:"minsize"` Mountpoint string `json:"mountpoint"` } // Firewalld configuration type BlueprintFirewall struct { // List of ports (or port ranges) and protocols to open Ports *[]string `json:"ports,omitempty"` // Firewalld services to enable or disable Services *FirewallServices `json:"services,omitempty"` Zones *[]FirewallZones `json:"zones,omitempty"` } // BlueprintOpenSCAP defines model for BlueprintOpenSCAP. type BlueprintOpenSCAP struct { Datastream *string `json:"datastream,omitempty"` JsonTailoring *OpenSCAPJSONTailoring `json:"json_tailoring,omitempty"` // Puts a specified policy ID in the RHSM facts, so that any instances registered to // insights will be automatically connected to the compliance policy in the console. PolicyId *string `json:"policy_id,omitempty"` ProfileId string `json:"profile_id"` Tailoring *OpenSCAPTailoring `json:"tailoring,omitempty"` } // BlueprintRepository defines model for BlueprintRepository. type BlueprintRepository struct { Baseurls *[]string `json:"baseurls,omitempty"` Enabled *bool `json:"enabled,omitempty"` Filename *string `json:"filename,omitempty"` Gpgcheck *bool `json:"gpgcheck,omitempty"` Gpgkeys *[]string `json:"gpgkeys,omitempty"` Id string `json:"id"` Metalink *string `json:"metalink,omitempty"` Mirrorlist *string `json:"mirrorlist,omitempty"` // Disables modularity filtering for this repository. ModuleHotfixes *bool `json:"module_hotfixes,omitempty"` Name *string `json:"name,omitempty"` Priority *int `json:"priority,omitempty"` RepoGpgcheck *bool `json:"repo_gpgcheck,omitempty"` Sslverify *bool `json:"sslverify,omitempty"` } // BlueprintUser defines model for BlueprintUser. type BlueprintUser struct { Description *string `json:"description,omitempty"` // Group id to use instead of the default Gid *int `json:"gid,omitempty"` // A list of additional groups to add the user to Groups *[]string `json:"groups,omitempty"` // The user's home directory Home *string `json:"home,omitempty"` // ssh public key Key *string `json:"key,omitempty"` Name string `json:"name"` // If the password starts with $6$, $5$, or $2b$ it will be stored as // an encrypted password. Otherwise it will be treated as a plain text // password. Password *string `json:"password,omitempty"` // Login shell to use Shell *string `json:"shell,omitempty"` // User id to use instead of the default Uid *int `json:"uid,omitempty"` } // CACertsCustomization defines model for CACertsCustomization. type CACertsCustomization struct { PemCerts []string `json:"pem_certs"` } // CloneComposeBody defines model for CloneComposeBody. type CloneComposeBody interface{} // CloneComposeResponse defines model for CloneComposeResponse. type CloneComposeResponse struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Id string `json:"id"` } // CloneStatus defines model for CloneStatus. type CloneStatus struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded struct due to allOf(#/components/schemas/UploadStatus) UploadStatus `yaml:",inline"` } // ComposeId defines model for ComposeId. type ComposeId struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Id string `json:"id"` } // ComposeLogs defines model for ComposeLogs. type ComposeLogs struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema ImageBuilds []interface{} `json:"image_builds"` Koji *KojiLogs `json:"koji,omitempty"` } // ComposeManifests defines model for ComposeManifests. type ComposeManifests struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Manifests []interface{} `json:"manifests"` } // ComposeMetadata defines model for ComposeMetadata. type ComposeMetadata struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema // ID (hash) of the built commit OstreeCommit *string `json:"ostree_commit,omitempty"` // Package list including NEVRA Packages *[]PackageMetadata `json:"packages,omitempty"` } // ComposeRequest defines model for ComposeRequest. type ComposeRequest struct { Blueprint *Blueprint `json:"blueprint,omitempty"` Customizations *Customizations `json:"customizations,omitempty"` Distribution string `json:"distribution"` ImageRequest *ImageRequest `json:"image_request,omitempty"` ImageRequests *[]ImageRequest `json:"image_requests,omitempty"` Koji *Koji `json:"koji,omitempty"` } // ComposeSBOMs defines model for ComposeSBOMs. type ComposeSBOMs struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema // The SBOM documents for each image built in the compose. Items [][]ImageSBOM `json:"items"` } // ComposeStatus defines model for ComposeStatus. type ComposeStatus struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema ImageStatus ImageStatus `json:"image_status"` ImageStatuses *[]ImageStatus `json:"image_statuses,omitempty"` KojiStatus *KojiStatus `json:"koji_status,omitempty"` Status ComposeStatusValue `json:"status"` } // ComposeStatusError defines model for ComposeStatusError. type ComposeStatusError struct { Details *interface{} `json:"details,omitempty"` Id int `json:"id"` Reason string `json:"reason"` } // ComposeStatusValue defines model for ComposeStatusValue. type ComposeStatusValue string // Container defines model for Container. type Container struct { // Name to use for the container from the image Name *string `json:"name,omitempty"` // Reference to the container to embed Source string `json:"source"` // Control TLS verifification TlsVerify *bool `json:"tls_verify,omitempty"` } // ContainerUploadOptions defines model for ContainerUploadOptions. type ContainerUploadOptions struct { // Name for the created container image Name *string `json:"name,omitempty"` // Tag for the created container image Tag *string `json:"tag,omitempty"` } // ContainerUploadStatus defines model for ContainerUploadStatus. type ContainerUploadStatus struct { // Digest of the manifest of the uploaded container on the registry Digest string `json:"digest"` // FQDN of the uploaded image Url string `json:"url"` } // CustomRepository defines model for CustomRepository. type CustomRepository struct { Baseurl *[]string `json:"baseurl,omitempty"` CheckGpg *bool `json:"check_gpg,omitempty"` CheckRepoGpg *bool `json:"check_repo_gpg,omitempty"` Enabled *bool `json:"enabled,omitempty"` Filename *string `json:"filename,omitempty"` Gpgkey *[]string `json:"gpgkey,omitempty"` Id string `json:"id"` Metalink *string `json:"metalink,omitempty"` Mirrorlist *string `json:"mirrorlist,omitempty"` ModuleHotfixes *bool `json:"module_hotfixes,omitempty"` Name *string `json:"name,omitempty"` Priority *int `json:"priority,omitempty"` SslVerify *bool `json:"ssl_verify,omitempty"` } // Customizations defines model for Customizations. type Customizations struct { Cacerts *CACertsCustomization `json:"cacerts,omitempty"` Containers *[]Container `json:"containers,omitempty"` // Extra repositories for packages specified in customizations. These // repositories will be used to depsolve and retrieve packages. Additionally, // these packages will be saved and imported to the `/etc/yum.repos.d/` directory // on the image CustomRepositories *[]CustomRepository `json:"custom_repositories,omitempty"` Directories *[]Directory `json:"directories,omitempty"` // FIDO device onboard configuration Fdo *FDO `json:"fdo,omitempty"` Files *[]File `json:"files,omitempty"` Filesystem *[]Filesystem `json:"filesystem,omitempty"` // System FIPS mode setup Fips *FIPS `json:"fips,omitempty"` // Firewalld configuration Firewall *FirewallCustomization `json:"firewall,omitempty"` // List of groups to create Groups *[]Group `json:"groups,omitempty"` // Configures the hostname Hostname *string `json:"hostname,omitempty"` // Ignition configuration Ignition *Ignition `json:"ignition,omitempty"` // Name of the installation device, currently only useful for the edge-simplified-installer type InstallationDevice *string `json:"installation_device,omitempty"` Installer *Installer `json:"installer,omitempty"` Kernel *Kernel `json:"kernel,omitempty"` // Locale configuration Locale *Locale `json:"locale,omitempty"` Openscap *OpenSCAP `json:"openscap,omitempty"` Packages *[]string `json:"packages,omitempty"` // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. PartitioningMode *CustomizationsPartitioningMode `json:"partitioning_mode,omitempty"` // Extra repositories for packages specified in customizations. These // repositories will only be used to depsolve and retrieve packages // for the OS itself (they will not be available for the build root or // any other part of the build process). The package_sets field for these // repositories is ignored. PayloadRepositories *[]Repository `json:"payload_repositories,omitempty"` Rhsm *RHSMCustomization `json:"rhsm,omitempty"` Rpm *RPMCustomization `json:"rpm,omitempty"` Services *Services `json:"services,omitempty"` Subscription *Subscription `json:"subscription,omitempty"` // Timezone configuration Timezone *Timezone `json:"timezone,omitempty"` Users *[]User `json:"users,omitempty"` } // Select how the disk image will be partitioned. 'auto-lvm' will use raw unless // there are one or more mountpoints in which case it will use LVM. 'lvm' always // uses LVM, even when there are no extra mountpoints. 'raw' uses raw partitions // even when there are one or more mountpoints. type CustomizationsPartitioningMode string // DNFPluginConfig defines model for DNFPluginConfig. type DNFPluginConfig struct { Enabled *bool `json:"enabled,omitempty"` } // DepsolveRequest defines model for DepsolveRequest. type DepsolveRequest struct { Architecture string `json:"architecture"` Blueprint Blueprint `json:"blueprint"` Distribution string `json:"distribution"` Repositories *[]Repository `json:"repositories,omitempty"` } // DepsolveResponse defines model for DepsolveResponse. type DepsolveResponse struct { // Package list including NEVRA Packages []PackageMetadata `json:"packages"` } // A custom directory to create in the final artifact. type Directory struct { // Ensure that the parent directories exist EnsureParents *bool `json:"ensure_parents,omitempty"` // Group of the directory as a group name or a gid Group *interface{} `json:"group,omitempty"` // Permissions string for the directory in octal format Mode *string `json:"mode,omitempty"` // Path to the directory Path string `json:"path"` // Owner of the directory as a user name or a uid User *interface{} `json:"user,omitempty"` } // Error defines model for Error. type Error struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference `yaml:",inline"` // Embedded fields due to inline allOf schema Code string `json:"code"` Details *interface{} `json:"details,omitempty"` OperationId string `json:"operation_id"` Reason string `json:"reason"` } // ErrorList defines model for ErrorList. type ErrorList struct { // Embedded struct due to allOf(#/components/schemas/List) List `yaml:",inline"` // Embedded fields due to inline allOf schema Items []Error `json:"items"` } // FIDO device onboard configuration type FDO struct { DiMfgStringTypeMacIface *string `json:"di_mfg_string_type_mac_iface,omitempty"` DiunPubKeyHash *string `json:"diun_pub_key_hash,omitempty"` DiunPubKeyInsecure *string `json:"diun_pub_key_insecure,omitempty"` DiunPubKeyRootCerts *string `json:"diun_pub_key_root_certs,omitempty"` ManufacturingServerUrl *string `json:"manufacturing_server_url,omitempty"` } // System FIPS mode setup type FIPS struct { // Enables the system FIPS mode Enabled *bool `json:"enabled,omitempty"` } // A custom file to create in the final artifact. type File struct { // Contents of the file as plain text Data *string `json:"data,omitempty"` // Ensure that the parent directories exist EnsureParents *bool `json:"ensure_parents,omitempty"` // Group of the file as a gid or a group name Group *interface{} `json:"group,omitempty"` // Permissions string for the file in octal format Mode *string `json:"mode,omitempty"` // Path to the file Path string `json:"path"` // Owner of the file as a uid or a user name User *interface{} `json:"user,omitempty"` } // Filesystem defines model for Filesystem. type Filesystem struct { // size of the filesystem in bytes MinSize uint64 `json:"min_size"` Mountpoint string `json:"mountpoint"` } // Firewalld configuration type FirewallCustomization struct { // List of ports (or port ranges) and protocols to open Ports *[]string `json:"ports,omitempty"` // Firewalld services to enable or disable Services *FirewallServices `json:"services,omitempty"` } // Firewalld services to enable or disable type FirewallServices struct { // List of services to disable Disabled *[]string `json:"disabled,omitempty"` // List of services to enable Enabled *[]string `json:"enabled,omitempty"` } // Bind a list of network sources to a zone to restrict traffic from // those sources based on the settings of the zone. type FirewallZones struct { // name of the zone, if left empty the sources will apply to // the default zone. Name *string `json:"name,omitempty"` // List of sources for the zone Sources *[]string `json:"sources,omitempty"` } // GCPUploadOptions defines model for GCPUploadOptions. type GCPUploadOptions struct { // Name of an existing STANDARD Storage class Bucket. Bucket *string `json:"bucket,omitempty"` // The name to use for the imported and shared Compute Engine image. // The image name must be unique within the GCP project, which is used // for the OS image upload and import. If not specified a random // 'composer-api-' string is used as the image name. ImageName *string `json:"image_name,omitempty"` // The GCP region where the OS image will be imported to and shared from. // The value must be a valid GCP location. See https://cloud.google.com/storage/docs/locations. // If not specified, the multi-region location closest to the source // (source Storage Bucket location) is chosen automatically. Region string `json:"region"` // List of valid Google accounts to share the imported Compute Engine image with. // Each string must contain a specifier of the account type. Valid formats are: // - 'user:{emailid}': An email address that represents a specific // Google account. For example, 'alice@example.com'. // - 'serviceAccount:{emailid}': An email address that represents a // service account. For example, 'my-other-app@appspot.gserviceaccount.com'. // - 'group:{emailid}': An email address that represents a Google group. // For example, 'admins@example.com'. // - 'domain:{domain}': The G Suite domain (primary) that represents all // the users of that domain. For example, 'google.com' or 'example.com'. // If not specified, the imported Compute Engine image is not shared with any // account. ShareWithAccounts *[]string `json:"share_with_accounts,omitempty"` } // GCPUploadStatus defines model for GCPUploadStatus. type GCPUploadStatus struct { ImageName string `json:"image_name"` ProjectId string `json:"project_id"` } // Group defines model for Group. type Group struct { // Group id of the group to create (optional) Gid *int `json:"gid,omitempty"` // Name of the group to create Name string `json:"name"` } // Ignition configuration type Ignition struct { Embedded *IgnitionEmbedded `json:"embedded,omitempty"` Firstboot *IgnitionFirstboot `json:"firstboot,omitempty"` } // IgnitionEmbedded defines model for IgnitionEmbedded. type IgnitionEmbedded struct { Config string `json:"config"` } // IgnitionFirstboot defines model for IgnitionFirstboot. type IgnitionFirstboot struct { // Provisioning URL Url string `json:"url"` } // ImageRequest defines model for ImageRequest. type ImageRequest struct { Architecture string `json:"architecture"` ImageType ImageTypes `json:"image_type"` Ostree *OSTree `json:"ostree,omitempty"` Repositories []Repository `json:"repositories"` // Size of image, in bytes. When set to 0 the image size is a minimum // defined by the image type. Size *uint64 `json:"size,omitempty"` // Options for a given upload destination. // This should really be oneOf but AWSS3UploadOptions is a subset of // AWSEC2UploadOptions. This means that all AWSEC2UploadOptions objects // are also valid AWSS3UploadOptionas objects which violates the oneOf // rules. Therefore, we have to use anyOf here but be aware that it isn't // possible to mix and match more schemas together. UploadOptions *UploadOptions `json:"upload_options,omitempty"` // The type and options for multiple upload targets. Each item defines // a separate upload destination with its own options. Multiple // different targets as well as multiple targets of the same kind are // supported. UploadTargets *[]UploadTarget `json:"upload_targets,omitempty"` } // ImageSBOM defines model for ImageSBOM. type ImageSBOM struct { // The name of the osbuild pipeline which has the packages described // in the SBOM installed. PipelineName string `json:"pipeline_name"` // The purpose of the pipeline. The `buildroot` pipeline was used for // the build environment dueing the image build. The `image` pipeline // represents the actual content of the image. Due to the nature of // some image types, there may be multiple pipelines of the same // purpose. PipelinePurpose ImageSBOMPipelinePurpose `json:"pipeline_purpose"` // The SBOM document in the 'sbom_type' format. Sbom interface{} `json:"sbom"` // The type of the SBOM document. Currently only SPDX is supported. SbomType ImageSBOMSbomType `json:"sbom_type"` } // The purpose of the pipeline. The `buildroot` pipeline was used for // the build environment dueing the image build. The `image` pipeline // represents the actual content of the image. Due to the nature of // some image types, there may be multiple pipelines of the same // purpose. type ImageSBOMPipelinePurpose string // The type of the SBOM document. Currently only SPDX is supported. type ImageSBOMSbomType string // ImageStatus defines model for ImageStatus. type ImageStatus struct { Error *ComposeStatusError `json:"error,omitempty"` Status ImageStatusValue `json:"status"` UploadStatus *UploadStatus `json:"upload_status,omitempty"` UploadStatuses *[]UploadStatus `json:"upload_statuses,omitempty"` } // ImageStatusValue defines model for ImageStatusValue. type ImageStatusValue string // ImageTypes defines model for ImageTypes. type ImageTypes string // ImportKeys defines model for ImportKeys. type ImportKeys struct { Files *[]string `json:"files,omitempty"` } // Installer defines model for Installer. type Installer struct { SudoNopasswd *[]string `json:"sudo-nopasswd,omitempty"` Unattended *bool `json:"unattended,omitempty"` } // Kernel defines model for Kernel. type Kernel struct { // Appends arguments to the bootloader kernel command line Append *string `json:"append,omitempty"` // Name of the kernel to use Name *string `json:"name,omitempty"` } // Koji defines model for Koji. type Koji struct { Name string `json:"name"` Release string `json:"release"` Server string `json:"server"` TaskId int `json:"task_id"` Version string `json:"version"` } // KojiLogs defines model for KojiLogs. type KojiLogs struct { Import interface{} `json:"import"` Init interface{} `json:"init"` } // KojiStatus defines model for KojiStatus. type KojiStatus struct { BuildId *int `json:"build_id,omitempty"` } // List defines model for List. type List struct { Kind string `json:"kind"` Page int `json:"page"` Size int `json:"size"` Total int `json:"total"` } // LocalUploadOptions defines model for LocalUploadOptions. type LocalUploadOptions map[string]interface{} // LocalUploadStatus defines model for LocalUploadStatus. type LocalUploadStatus struct { ArtifactPath string `json:"artifact_path"` } // Locale configuration type Locale struct { // Sets the keyboard layout Keyboard *string `json:"keyboard,omitempty"` // List of locales to be installed, the first one becomes primary, subsequent ones are secondary Languages *[]string `json:"languages,omitempty"` } // OCIUploadOptions defines model for OCIUploadOptions. type OCIUploadOptions map[string]interface{} // OCIUploadStatus defines model for OCIUploadStatus. type OCIUploadStatus struct { Url string `json:"url"` } // OSTree defines model for OSTree. type OSTree struct { // A URL which, if set, is used for fetching content. Implies that `url` is set as well, // which will be used for metadata only. Contenturl *string `json:"contenturl,omitempty"` // Can be either a commit (example: 02604b2da6e954bd34b8b82a835e5a77d2b60ffa), or a branch-like reference (example: rhel/8/x86_64/edge) Parent *string `json:"parent,omitempty"` Ref *string `json:"ref,omitempty"` // Determines whether a valid subscription manager (candlepin) identity is required to // access this repository. Consumer certificates will be used as client certificates when // fetching metadata and content. Rhsm *bool `json:"rhsm,omitempty"` Url *string `json:"url,omitempty"` } // ObjectReference defines model for ObjectReference. type ObjectReference struct { Href string `json:"href"` Id string `json:"id"` Kind string `json:"kind"` } // OpenSCAP defines model for OpenSCAP. type OpenSCAP struct { JsonTailoring *OpenSCAPJSONTailoring `json:"json_tailoring,omitempty"` // Puts a specified policy ID in the RHSM facts, so that any instances registered to // insights will be automatically connected to the compliance policy in the console. PolicyId *string `json:"policy_id,omitempty"` ProfileId string `json:"profile_id"` Tailoring *OpenSCAPTailoring `json:"tailoring,omitempty"` } // OpenSCAPJSONTailoring defines model for OpenSCAPJSONTailoring. type OpenSCAPJSONTailoring struct { Filepath string `json:"filepath"` ProfileId string `json:"profile_id"` } // OpenSCAPTailoring defines model for OpenSCAPTailoring. type OpenSCAPTailoring struct { Selected *[]string `json:"selected,omitempty"` Unselected *[]string `json:"unselected,omitempty"` } // Package defines model for Package. type Package struct { // Name of the package to install. File globbing is supported, // eg. 'openssh-*' Name string `json:"name"` // Optional version of the package to install. If left blank the // latest available version will be used. Wildcards are supported // eg. '4.11.*' Version *string `json:"version,omitempty"` } // 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 // ServerInterface represents all server handlers. type ServerInterface interface { // The status of a cloned compose // (GET /clones/{id}) GetCloneStatus(ctx echo.Context, id string) error // Create compose // (POST /compose) PostCompose(ctx echo.Context) error // The status of a compose // (GET /composes/{id}) GetComposeStatus(ctx echo.Context, id string) error // Clone an existing compose // (POST /composes/{id}/clone) PostCloneCompose(ctx echo.Context, id string) error // Get logs for a compose. // (GET /composes/{id}/logs) GetComposeLogs(ctx echo.Context, id string) error // Get the manifests for a compose. // (GET /composes/{id}/manifests) GetComposeManifests(ctx echo.Context, id string) error // Get the metadata for a compose. // (GET /composes/{id}/metadata) GetComposeMetadata(ctx echo.Context, id string) error // Get the SBOMs for a compose. // (GET /composes/{id}/sboms) GetComposeSBOMs(ctx echo.Context, id string) error // Depsolve one or more blueprints // (POST /depsolve/blueprint) PostDepsolveBlueprint(ctx echo.Context) error // Get a list of all possible errors // (GET /errors) GetErrorList(ctx echo.Context, params GetErrorListParams) error // Get error description // (GET /errors/{id}) GetError(ctx echo.Context, id string) error // Get the openapi spec in json format // (GET /openapi) GetOpenapi(ctx echo.Context) error // 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 } // GetComposeStatus converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeStatus(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeStatus(ctx, id) return err } // PostCloneCompose converts echo context to params. func (w *ServerInterfaceWrapper) PostCloneCompose(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.PostCloneCompose(ctx, id) return err } // GetComposeLogs converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeLogs(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeLogs(ctx, id) return err } // GetComposeManifests converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeManifests(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeManifests(ctx, id) return err } // GetComposeMetadata converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeMetadata(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeMetadata(ctx, id) return err } // GetComposeSBOMs converts echo context to params. func (w *ServerInterfaceWrapper) GetComposeSBOMs(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeSBOMs(ctx, id) return err } // PostDepsolveBlueprint converts echo context to params. func (w *ServerInterfaceWrapper) PostDepsolveBlueprint(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.PostDepsolveBlueprint(ctx) return err } // GetErrorList converts echo context to params. func (w *ServerInterfaceWrapper) GetErrorList(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Parameter object where we will unmarshal all parameters from the context var params GetErrorListParams // ------------- Optional query parameter "page" ------------- err = runtime.BindQueryParameter("form", true, false, "page", ctx.QueryParams(), ¶ms.Page) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter page: %s", err)) } // ------------- Optional query parameter "size" ------------- err = runtime.BindQueryParameter("form", true, false, "size", ctx.QueryParams(), ¶ms.Size) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter size: %s", err)) } // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetErrorList(ctx, params) return err } // GetError converts echo context to params. func (w *ServerInterfaceWrapper) GetError(ctx echo.Context) error { var err error // ------------- Path parameter "id" ------------- var id string err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetError(ctx, id) return err } // GetOpenapi converts echo context to params. func (w *ServerInterfaceWrapper) GetOpenapi(ctx echo.Context) error { var err error ctx.Set(BearerScopes, []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetOpenapi(ctx) return err } // 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/:id", wrapper.GetComposeStatus) router.POST(baseURL+"/composes/:id/clone", wrapper.PostCloneCompose) router.GET(baseURL+"/composes/:id/logs", wrapper.GetComposeLogs) router.GET(baseURL+"/composes/:id/manifests", wrapper.GetComposeManifests) router.GET(baseURL+"/composes/:id/metadata", wrapper.GetComposeMetadata) router.GET(baseURL+"/composes/:id/sboms", wrapper.GetComposeSBOMs) router.POST(baseURL+"/depsolve/blueprint", wrapper.PostDepsolveBlueprint) router.GET(baseURL+"/errors", wrapper.GetErrorList) router.GET(baseURL+"/errors/:id", wrapper.GetError) router.GET(baseURL+"/openapi", wrapper.GetOpenapi) router.POST(baseURL+"/search/packages", wrapper.PostSearchPackages) } // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ "H4sIAAAAAAAC/+x9eXPbOLL4V0HpN1WZedF9WLKrpvbJ8iXftmQ79irlhUiIgkUCDABKluflu/8KBylS", "oq44mdnZzR+7E4s4Gg10o2/8kbGo51OCiOCZvT8yPmTQQwIx85eD5H9txC2GfYEpyexlrqGDACY2es1k", "M+gVer6LEs3H0A1QZi9Tynz9ms1g2edLgNg0k80Q6MkvqmU2w60h8qDsIqa+/J0LhomjunH8ljL3ZeD1", "EQN0ALBAHgeYAAStITADxqEJB4igKRaXwqParoLna/hRDd186By2yi2XEtSS6ONqImjbWIIJ3WtGfcQE", "loAMoMtRNuPHfvojw5Cj1rMwUTbDh5Ch5wkWw2doWTQwG2NWltn7Z6ZUrlRrO/XGbrFUznzOZhQmUscy", "P0DG4FStnaEvAWbIlsMYGD5HzWj/BVlC9tPru/NdCu0rhXr+zQuMAM+gIDdBXORKmeyfuexshhPo8yEV", "z3q34zB501z4dRGqdISlw7oOjR0BRaCpJIEo6OEkRNDDuaLVqBTru5V6vVbbrdnVfhrGtkTx3GLkvNk1", "Z6BTec8R8IO+iy1NwgMYuCJqlyTp9gBwJICgQH0Gv4ohAqYLUMT7WxZA4FLiZAHtDwJuQYFscHd73iOY", "A4ZEwAiy86AtOECvPmZQDg087AwF6CPAKSWIATGEBAwoA1QMEQOBWluPCMgcJHi+R3pkBotgAZLT8iFl", "AjE5G4hNBiCxewQnJ8QcSNg59BCAXE0l/45PB2azzbaoT6mLIHn/pm62ncuOYsDcdFYcn0I2Sh3/LWDo", "PcdlOPURex4/O4ggjc/E0cncy+UnT05rSClHCsf3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YR0rB46cEJHZ3jK08jIgwQPEBfraSlq", "uQE53SIRMMJVEl3YTwGjdHDDzoghFcXfTS3cqLFFFWFFVeLM9oW1gKEAcXOsKe2qQ9IhKZi/c+Fw+doK", "UryIUPCTHtfS4wxZS4gysd0LhPmfSWtJ8tiA6GIJ/KtpLqroJElugc70MyzoFVoicRExRX7IBjbSRRdp", "gtYi078qor2KMkI4fxLGesKIHkheQhfhVm5DFz+V1J9K6r+bkrrAm9bzO96n3nIBIxQWINCxU8li2nyN", "3NAjc80hi9qoutuz0t9LTW77VxdbXv4SJh1wpdkcCMf4LzG9qdUu4XTq43/b9T9b9Dwp2OYB/8Ls1f+V", "Zpvwwf/9qPmPMYKE82zlgSr+gOmX2z/CNrOsIBeHvqA/8aoMd/CnM2rxwvy73FrhUdJ1XZiOWI0oUgfY", "FdTg8Ytq4caYPYG/cF2krWzWpKAKKS8LvIy1U5WWfygPn60h7chFj8EaZPw863+NcKgP+t9PNJy9Jgxd", "F0Qh4+FpmpHZej8sJFGJ1NA7oSGb1VrtT4GSgdIJdXOvBzLN3yW+Vf5kYWzpVqoPIP7bTyr+ScXbUDFa", "PEGScqPQ1OU35JVp8s5zPx81vLBQA4riBVLfk0MYXe/vqE2vXI5EvS4vUIhn0C/XIZL5+D9IgUgv6PAn", "qxFLKg+kbJZuCUJIdER9qFfYs1IBf6pqwUOgfioWf1PFohOV/TCHCNkJWzwlMZEoUTREAxRl3i5IJxfm", "9WeVvq+eLI+exUkmJEAf51Wd7SEe6GRw6OOCfn5L+cEQy4VPzxfGZaWFzNGGgA4mzqoJuIAOeuc0ln4W", "z7xOHU2zbpzPX/9/AAAA//8DQH51CtoAAA==", } // 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 }