debian-forge-composer/internal/cloudapi/v2/openapi.v2.gen.go
Miguel Martín 98847f7494 Expose the FIPS blueprint customization
Expose the FIPS blueprint customization through
the cloud API.

Signed-off-by: Miguel Martín <mmartinv@redhat.com>
2023-12-13 10:19:47 +01:00

1322 lines
51 KiB
Go

// 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 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 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"
ImageTypesIotCommit ImageTypes = "iot-commit"
ImageTypesIotContainer ImageTypes = "iot-container"
ImageTypesIotInstaller ImageTypes = "iot-installer"
ImageTypesIotRawImage ImageTypes = "iot-raw-image"
ImageTypesLiveInstaller ImageTypes = "live-installer"
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"
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 {
// 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"`
}
// AzureUploadStatus defines model for AzureUploadStatus.
type AzureUploadStatus struct {
ImageName string `json:"image_name"`
}
// 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 {
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"`
}
// 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"`
Name *string `json:"name,omitempty"`
Priority *int `json:"priority,omitempty"`
SslVerify *bool `json:"ssl_verify,omitempty"`
}
// Customizations defines model for Customizations.
type Customizations struct {
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"`
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"`
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
// 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 {
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 *struct {
// List of services to disable
Disabled *[]string `json:"disabled,omitempty"`
// List of services to enable
Enabled *[]string `json:"enabled,omitempty"`
} `json:"services,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-<uuid>' 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"`
}
// 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
// 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 struct {
// This is used in combination with the OSBUILD_LOCALSAVE environmental
// variable on the server to enable saving the compose locally. This
// is for development use only, and is not available to users.
LocalSave bool `json:"local_save"`
}
// 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 {
ProfileId string `json:"profile_id"`
Tailoring *OpenSCAPTailoring `json:"tailoring,omitempty"`
}
// OpenSCAPTailoring defines model for OpenSCAPTailoring.
type OpenSCAPTailoring struct {
Selected *[]string `json:"selected,omitempty"`
Unselected *[]string `json:"unselected,omitempty"`
}
// PackageMetadata defines model for PackageMetadata.
type PackageMetadata struct {
Arch string `json:"arch"`
Epoch *string `json:"epoch,omitempty"`
Name string `json:"name"`
Release string `json:"release"`
Sigmd5 string `json:"sigmd5"`
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"`
}
// 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"`
// 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"`
}
// 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"`
}
// 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"`
}
// 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
// GetErrorListParams defines parameters for GetErrorList.
type GetErrorListParams struct {
// Page index
Page *Page `json:"page,omitempty"`
// Number of items in each page
Size *Size `json:"size,omitempty"`
}
// PostComposeJSONRequestBody defines body for PostCompose for application/json ContentType.
type PostComposeJSONRequestBody PostComposeJSONBody
// PostCloneComposeJSONRequestBody defines body for PostCloneCompose for application/json ContentType.
type PostCloneComposeJSONRequestBody PostCloneComposeJSONBody
// 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 a list of all possible errors
// (GET /errors)
GetErrorList(ctx echo.Context, params GetErrorListParams) error
// Get error description
// (GET /errors/{id})
GetError(ctx echo.Context, id string) error
// Get the openapi spec in json format
// (GET /openapi)
GetOpenapi(ctx echo.Context) error
}
// ServerInterfaceWrapper converts echo contexts to parameters.
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
// GetCloneStatus converts echo context to params.
func (w *ServerInterfaceWrapper) GetCloneStatus(ctx echo.Context) error {
var err error
// ------------- Path parameter "id" -------------
var id string
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
}
ctx.Set(BearerScopes, []string{""})
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetCloneStatus(ctx, id)
return err
}
// PostCompose converts echo context to params.
func (w *ServerInterfaceWrapper) PostCompose(ctx echo.Context) error {
var err error
ctx.Set(BearerScopes, []string{""})
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.PostCompose(ctx)
return err
}
// GetComposeStatus converts echo context to params.
func (w *ServerInterfaceWrapper) GetComposeStatus(ctx echo.Context) error {
var err error
// ------------- Path parameter "id" -------------
var id string
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
}
ctx.Set(BearerScopes, []string{""})
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetComposeStatus(ctx, id)
return err
}
// PostCloneCompose converts echo context to params.
func (w *ServerInterfaceWrapper) PostCloneCompose(ctx echo.Context) error {
var err error
// ------------- Path parameter "id" -------------
var id string
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
}
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.PostCloneCompose(ctx, id)
return err
}
// GetComposeLogs converts echo context to params.
func (w *ServerInterfaceWrapper) GetComposeLogs(ctx echo.Context) error {
var err error
// ------------- Path parameter "id" -------------
var id string
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
}
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetComposeLogs(ctx, id)
return err
}
// GetComposeManifests converts echo context to params.
func (w *ServerInterfaceWrapper) GetComposeManifests(ctx echo.Context) error {
var err error
// ------------- Path parameter "id" -------------
var id string
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
}
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetComposeManifests(ctx, id)
return err
}
// GetComposeMetadata converts echo context to params.
func (w *ServerInterfaceWrapper) GetComposeMetadata(ctx echo.Context) error {
var err error
// ------------- Path parameter "id" -------------
var id string
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
}
ctx.Set(BearerScopes, []string{""})
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetComposeMetadata(ctx, id)
return err
}
// 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(), &params.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(), &params.Size)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter size: %s", err))
}
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetErrorList(ctx, params)
return err
}
// GetError converts echo context to params.
func (w *ServerInterfaceWrapper) GetError(ctx echo.Context) error {
var err error
// ------------- Path parameter "id" -------------
var id string
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
}
ctx.Set(BearerScopes, []string{""})
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetError(ctx, id)
return err
}
// GetOpenapi converts echo context to params.
func (w *ServerInterfaceWrapper) GetOpenapi(ctx echo.Context) error {
var err error
ctx.Set(BearerScopes, []string{""})
// Invoke the callback with all the unmarshalled arguments
err = w.Handler.GetOpenapi(ctx)
return err
}
// This is a simple interface which specifies echo.Route addition functions which
// are present on both echo.Echo and echo.Group, since we want to allow using
// either of them for path registration
type EchoRouter interface {
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}
// RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlers(router EchoRouter, si ServerInterface) {
RegisterHandlersWithBaseURL(router, si, "")
}
// Registers handlers, and prepends BaseURL to the paths, so that the paths
// can be served under a prefix.
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) {
wrapper := ServerInterfaceWrapper{
Handler: si,
}
router.GET(baseURL+"/clones/:id", wrapper.GetCloneStatus)
router.POST(baseURL+"/compose", wrapper.PostCompose)
router.GET(baseURL+"/composes/:id", wrapper.GetComposeStatus)
router.POST(baseURL+"/composes/:id/clone", wrapper.PostCloneCompose)
router.GET(baseURL+"/composes/:id/logs", wrapper.GetComposeLogs)
router.GET(baseURL+"/composes/:id/manifests", wrapper.GetComposeManifests)
router.GET(baseURL+"/composes/:id/metadata", wrapper.GetComposeMetadata)
router.GET(baseURL+"/errors", wrapper.GetErrorList)
router.GET(baseURL+"/errors/:id", wrapper.GetError)
router.GET(baseURL+"/openapi", wrapper.GetOpenapi)
}
// Base64 encoded, gzipped, json marshaled Swagger object
var swaggerSpec = []string{
"H4sIAAAAAAAC/+y9eXPiOtY4/FVUPG9Vd1fYl4R01a15CCEJCWSDrENXRtjCVrAlR5Ih5FZ/97ck2cYG",
"s3X3vfPM/Pr+cTvY0tHRkXT2I/+ZMajrUYKI4Jmvf2Y8yKCLBGLBLwvJf03EDYY9gSnJfM1cQwsBTEz0",
"nslm0Dt0PQclmk+g46PM10wp8/17NoNlnzcfsVkmmyHQlW9Uy2yGGzZyoewiZp58zgXDxFLdOP5IGfvS",
"d4eIAToCWCCXA0wAgoYNAoBxbEIAETbF4kp8VNt1+HwPXyrQjYdeq1luOpSgpiQfVwNB08QSTehcM+oh",
"JrBEZAQdjrIZL/bozwxDlprP0kDZDLchQy9TLOwXaBjUDxYmmFnm6z8zpXKlWts/qB8WS+XMt2xGUSIV",
"VvAAMgZnau4MvfmYIVOCCXD4FjWjw1dkCNlPz+/Ocyg0rxTp+Q9PMEI8g/zcFHGRK2Wyf+e0sxlOoMdt",
"Kl70asdxcme58O0yVukES8d1Exl7Agpfn5IEoaCLkxhBF+eKRr1SPDisHBzUaoc1szpMo9iOJF6YjBw3",
"u2EP9Co/swU8f+hgQx/hEfQdEbVLHun2CHAkgKBAvQafhY1A0AWow/slCyBwKLGygA5HPjegQCa4u+0M",
"COaAIeEzgsw8aAsO0LuHGZSggYstW4AhApxSghgQNiRgRBmgwkYM+GpuAyIgs5Dg+QEZkDkugvlIDstt",
"ygRicjQQGwxAYg4ITg6IOZC4c+giALkaSv6ODwfmo82XaEipgyD5+UXdbjlXbUWfOemsOD6EbJQK/8Nn",
"6Ge2C3ahhaITusD1JUXpSFFT0xG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X+LfWdyKn8SY1f8hLvIX6F6LX7D8u7WvtO9dpmwpdS8Wms6v",
"YhkiVfmhP9CTztcEehcFdUlkEp+UL9Vvx72qv2qAtLP5PSG1JVkSl5CtOQBOUGj4I1J8hAnmdkyIg7Uy",
"HIu56NaFZSoE4SIBASZ6D2NKABxSX4SfB/YdsU7MqzrJ30J+o5APvo+ZejTkFojuitPRq8hAxAQQqm/E",
"N3wHsuByLPBZ2NS37CB+dN67uvyS/687SKfqIjQrDOyFuzztGCW+9bn2LEUttzhOt+rz91zluUef5JLI",
"KBs8YGck/i314K6MqLFB1cGK6tWD5QvvCoECxN2xwee1dNYYJOHntnIhuHxtzVGcf0P193nceB7nxFpx",
"KBPLvXQw/zvPWvJ4bHHoYvVS689cVJ8pj9zSOdPXNKJ3aIiEIGLq+CETmEhf/0ATZy1y/atLdtadjBDP",
"3wdj88GIPtO74lyES7nLufhtpP42Uv+vGalLvCmN3yngcZ1iicXMv/WwxFzSZjZvUlCXY6zK9Ii1U7dn",
"/KVHfz6HtN2uP/5NRyAgxu9j9u85Znqj/+cdMhhtIOg4IEo2C3fT/Jht9mhDopMeiBElhmrM5tdYD2dA",
"ic70g7q9/wgFzX9K6lf+Zhm+cinVCxB/9vsU/z7Fu5xitLyD5MmNknxWS8iroMlP7vvF/KuliQaoKF4g",
"rXIJIvwQyn+gXrJ2Ot+jqoc0LtYN7uOmpm/oS+SjK9GSKWDQw3n1HUwbj3S5CfSw/kJ9TnkeEMuFHwMo",
"TMpKW1lITBPQwsRaNwAX0EI/OUzwzdHgvvBomE1wvn3//wMAAP//WK0jTPGVAAA=",
}
// 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
}