This allows the compose status to reflect that it was saved locally, not uploaded to a remote service. Without this it returns an error of 'Compose has unknown upload target'
1597 lines
61 KiB
Go
1597 lines
61 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 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 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 {
|
|
// 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"`
|
|
}
|
|
|
|
// 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 {
|
|
// 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"`
|
|
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"`
|
|
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"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// 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 {
|
|
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"`
|
|
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 {
|
|
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-<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
|
|
|
|
// 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 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"`
|
|
}
|
|
|
|
// Package defines model for Package.
|
|
type Package struct {
|
|
// Name of the package to install. File globbing is supported,
|
|
// eg. 'openssh-*'
|
|
Name string `json:"name"`
|
|
|
|
// Optional version of the package to install. If left blank the
|
|
// latest available version will be used. Wildcards are supported
|
|
// eg. '4.11.*'
|
|
Version *string `json:"version,omitempty"`
|
|
}
|
|
|
|
// PackageGroup defines model for PackageGroup.
|
|
type PackageGroup struct {
|
|
// Package group name
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// PackageMetadata defines model for PackageMetadata.
|
|
type PackageMetadata struct {
|
|
Arch string `json:"arch"`
|
|
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"`
|
|
|
|
// Disables modularity filtering for this repository.
|
|
ModuleHotfixes *bool `json:"module_hotfixes,omitempty"`
|
|
|
|
// Naming package sets for a repository assigns it to a specific part
|
|
// (pipeline) of the build process.
|
|
PackageSets *[]string `json:"package_sets,omitempty"`
|
|
|
|
// Determines whether a valid subscription is required to access this repository.
|
|
Rhsm *bool `json:"rhsm,omitempty"`
|
|
}
|
|
|
|
// SSHKey defines model for SSHKey.
|
|
type SSHKey struct {
|
|
// Adds the key to the user's authorized_keys file
|
|
Key string `json:"key"`
|
|
|
|
// User to configure the ssh key for
|
|
User string `json:"user"`
|
|
}
|
|
|
|
// Services defines model for Services.
|
|
type Services struct {
|
|
// List of services to disable by default
|
|
Disabled *[]string `json:"disabled,omitempty"`
|
|
|
|
// List of services to enable by default
|
|
Enabled *[]string `json:"enabled,omitempty"`
|
|
|
|
// List of services to mask by default
|
|
Masked *[]string `json:"masked,omitempty"`
|
|
}
|
|
|
|
// 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(), ¶ms.Page)
|
|
if err != nil {
|
|
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter page: %s", err))
|
|
}
|
|
|
|
// ------------- Optional query parameter "size" -------------
|
|
|
|
err = runtime.BindQueryParameter("form", true, false, "size", ctx.QueryParams(), ¶ms.Size)
|
|
if err != nil {
|
|
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter size: %s", err))
|
|
}
|
|
|
|
// Invoke the callback with all the unmarshalled arguments
|
|
err = w.Handler.GetErrorList(ctx, params)
|
|
return err
|
|
}
|
|
|
|
// GetError converts echo context to params.
|
|
func (w *ServerInterfaceWrapper) GetError(ctx echo.Context) error {
|
|
var err error
|
|
// ------------- Path parameter "id" -------------
|
|
var id string
|
|
|
|
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
|
|
if err != nil {
|
|
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
|
|
}
|
|
|
|
ctx.Set(BearerScopes, []string{""})
|
|
|
|
// Invoke the callback with all the unmarshalled arguments
|
|
err = w.Handler.GetError(ctx, id)
|
|
return err
|
|
}
|
|
|
|
// GetOpenapi converts echo context to params.
|
|
func (w *ServerInterfaceWrapper) GetOpenapi(ctx echo.Context) error {
|
|
var err error
|
|
|
|
ctx.Set(BearerScopes, []string{""})
|
|
|
|
// Invoke the callback with all the unmarshalled arguments
|
|
err = w.Handler.GetOpenapi(ctx)
|
|
return err
|
|
}
|
|
|
|
// This is a simple interface which specifies echo.Route addition functions which
|
|
// are present on both echo.Echo and echo.Group, since we want to allow using
|
|
// either of them for path registration
|
|
type EchoRouter interface {
|
|
CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
|
|
}
|
|
|
|
// RegisterHandlers adds each server route to the EchoRouter.
|
|
func RegisterHandlers(router EchoRouter, si ServerInterface) {
|
|
RegisterHandlersWithBaseURL(router, si, "")
|
|
}
|
|
|
|
// Registers handlers, and prepends BaseURL to the paths, so that the paths
|
|
// can be served under a prefix.
|
|
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) {
|
|
|
|
wrapper := ServerInterfaceWrapper{
|
|
Handler: si,
|
|
}
|
|
|
|
router.GET(baseURL+"/clones/:id", wrapper.GetCloneStatus)
|
|
router.POST(baseURL+"/compose", wrapper.PostCompose)
|
|
router.GET(baseURL+"/composes/:id", wrapper.GetComposeStatus)
|
|
router.POST(baseURL+"/composes/:id/clone", wrapper.PostCloneCompose)
|
|
router.GET(baseURL+"/composes/:id/logs", wrapper.GetComposeLogs)
|
|
router.GET(baseURL+"/composes/:id/manifests", wrapper.GetComposeManifests)
|
|
router.GET(baseURL+"/composes/:id/metadata", wrapper.GetComposeMetadata)
|
|
router.GET(baseURL+"/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/+x9eXPbtrb4V8HodSbtL9oXW85M5z1Z3uTdlmzHvsr4QiREwiIBBgAly3357r/BQoqU",
|
|
"qC1xe3vvS/9oLBLLwSHOwdnxR86ifkAJIoLnPv2RCyCDPhKImV8Okv/aiFsMBwJTkvuUu4YOApjY6DWX",
|
|
"z6FX6AceSjUfQy9EuU+5Su7bt3wOyz5fQ8S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YrwkYAAE72HMSUADmgoTBgzDz2x6phX+eA/D/m1",
|
|
"h7y5FTyTNOQWiKt7ai9WrCBiAgjVl+hYoQeZKWcIfhUuDR3X+JFOu1eXvxX/4wjpWJWudCIHX7TLs8go",
|
|
"dcP5SlqKW25ATrdIhIxwlWcRXxAqgVE6uGFn0a2gir+b6kZxY4sqworrcpjPF1V3ggIkzbHmsk8dtQhJ",
|
|
"dPlnIRqu2FhBirOb43/S41p6nCFrCVGmPvcCYf5n0lqaPDYgukS+3mqai/PQJckt0JkurIteoSVSBxFT",
|
|
"5IdsYCNd5oamaC02/auyaKsoI4LzJ2GsJ4wIV8voIvqU29DFTyX1p5L6d1NSF3hTFr9TgydligUWM7se",
|
|
"aoG5ZK1s1qSkigAti/hItFNVgv5U0p+tIWu3xxclGGT8JLN/DZnpjf7vR2Szmzag54E46CzaTTMyW2/R",
|
|
"hkQHPRArDhDVkM0uHhhMgTo6swl1c/sRMs1/6NSv/cVn+NJPqV6A5LOfVPyTirehYrS4gyTlxkE+y0/I",
|
|
"K9PkB/f9fPzVwkINKIoXSK1cDhFdhfZvKJesXM63OPshi4tdmBsUqB1a+tqPuPRjOgQMBrioquq4eKjT",
|
|
"TmCAS7oCrLI8IFaIrm8pjatKWpkLTBPQwcRZNQEX0EE/OI253Nzc8BBPs26cL9/+fwAAAP//wK7WmZO4",
|
|
"AAA=",
|
|
}
|
|
|
|
// 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
|
|
}
|