v2

package
v0.0.0-...-2846eb4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Overview

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.

Index

Constants

View Source
const (
	BearerScopes = "Bearer.Scopes"
)
View Source
const TenantCtxKey string = "tenant"

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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 HTTPError

func HTTPError(code ServiceErrorCode) error

Make an echo compatible error out of a service error

func HTTPErrorHandler

func HTTPErrorHandler(echoError error, c echo.Context)

Convert an echo error into an AOC compliant one so we send a correct json error response

func HTTPErrorWithDetails

func HTTPErrorWithDetails(code ServiceErrorCode, internalErr error, details string) error

instead of sending a ServiceErrorCode as he.Message, send the validation error string (see above)

func HTTPErrorWithInternal

func HTTPErrorWithInternal(code ServiceErrorCode, internalErr error) error

echo.HTTPError has a message interface{} field, which can be used to include the ServiceErrorCode

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type AWSEC2CloneCompose

type AWSEC2CloneCompose struct {
	Region            string    `json:"region"`
	ShareWithAccounts *[]string `json:"share_with_accounts,omitempty"`
}

AWSEC2CloneCompose defines model for AWSEC2CloneCompose.

type AWSEC2UploadOptions

type AWSEC2UploadOptions struct {
	Region            string   `json:"region"`
	ShareWithAccounts []string `json:"share_with_accounts"`
	SnapshotName      *string  `json:"snapshot_name,omitempty"`
}

AWSEC2UploadOptions defines model for AWSEC2UploadOptions.

type AWSEC2UploadStatus

type AWSEC2UploadStatus struct {
	Ami    string `json:"ami"`
	Region string `json:"region"`
}

AWSEC2UploadStatus defines model for AWSEC2UploadStatus.

type 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"`
}

AWSS3UploadOptions defines model for AWSS3UploadOptions.

type AWSS3UploadStatus

type AWSS3UploadStatus struct {
	Url string `json:"url"`
}

AWSS3UploadStatus defines model for AWSS3UploadStatus.

type AzureUploadOptions

type AzureUploadOptions struct {
	// Choose the VM Image HyperV generation, different features on Azure are available
	// depending on the HyperV generation.
	HyperVGeneration *AzureUploadOptionsHyperVGeneration `json:"hyper_v_generation,omitempty"`

	// Name of the uploaded image. It must be unique in the given resource group.
	// If name is omitted from the request, a random one based on a UUID is
	// generated.
	ImageName *string `json:"image_name,omitempty"`

	// Location of the provided resource_group, where the image should be uploaded and registered.
	// How to list all locations:
	// https://docs.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az_account_list_locations'
	// If the location is not specified, it is deducted from the provided resource_group.
	Location *string `json:"location,omitempty"`

	// Name of the resource group where the image should be uploaded.
	ResourceGroup string `json:"resource_group"`

	// ID of subscription where the image should be uploaded.
	SubscriptionId string `json:"subscription_id"`

	// ID of the tenant where the image should be uploaded.
	// How to find it in the Azure Portal:
	// https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-to-find-tenant
	TenantId string `json:"tenant_id"`
}

AzureUploadOptions defines model for AzureUploadOptions.

type AzureUploadOptionsHyperVGeneration

type AzureUploadOptionsHyperVGeneration string

Choose the VM Image HyperV generation, different features on Azure are available depending on the HyperV generation.

const (
	AzureUploadOptionsHyperVGenerationV1 AzureUploadOptionsHyperVGeneration = "V1"

	AzureUploadOptionsHyperVGenerationV2 AzureUploadOptionsHyperVGeneration = "V2"
)

Defines values for AzureUploadOptionsHyperVGeneration.

type AzureUploadStatus

type AzureUploadStatus struct {
	ImageName string `json:"image_name"`
}

AzureUploadStatus defines model for AzureUploadStatus.

type 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"`
}

Blueprint defines model for Blueprint.

type 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"`
	Rhsm         *RHSMCustomization     `json:"rhsm,omitempty"`
	Rpm          *RPMCustomization      `json:"rpm,omitempty"`
	Services     *Services              `json:"services,omitempty"`

	// List of ssh keys
	Sshkey *[]SSHKey `json:"sshkey,omitempty"`

	// Timezone configuration
	Timezone *Timezone `json:"timezone,omitempty"`

	// List of users to create
	User *[]BlueprintUser `json:"user,omitempty"`
}

BlueprintCustomizations defines model for BlueprintCustomizations.

type BlueprintCustomizationsPartitioningMode

type BlueprintCustomizationsPartitioningMode string

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.

const (
	BlueprintCustomizationsPartitioningModeAutoLvm BlueprintCustomizationsPartitioningMode = "auto-lvm"

	BlueprintCustomizationsPartitioningModeLvm BlueprintCustomizationsPartitioningMode = "lvm"

	BlueprintCustomizationsPartitioningModeRaw BlueprintCustomizationsPartitioningMode = "raw"
)

Defines values for BlueprintCustomizationsPartitioningMode.

func (BlueprintCustomizationsPartitioningMode) String

Return the string representation of the partitioning mode default to auto-lvm (should never happen)

type BlueprintFile

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"`
}

A custom file to create in the final artifact.

type BlueprintFilesystem

type BlueprintFilesystem struct {
	// size of the filesystem in bytes
	Minsize    uint64 `json:"minsize"`
	Mountpoint string `json:"mountpoint"`
}

BlueprintFilesystem defines model for BlueprintFilesystem.

type BlueprintFirewall

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"`
}

Firewalld configuration

type BlueprintOpenSCAP

type BlueprintOpenSCAP struct {
	Datastream    *string                `json:"datastream,omitempty"`
	JsonTailoring *OpenSCAPJSONTailoring `json:"json_tailoring,omitempty"`

	// Puts a specified policy ID in the RHSM facts, so that any instances registered to
	// insights will be automatically connected to the compliance policy in the console.
	PolicyId  *string            `json:"policy_id,omitempty"`
	ProfileId string             `json:"profile_id"`
	Tailoring *OpenSCAPTailoring `json:"tailoring,omitempty"`
}

BlueprintOpenSCAP defines model for BlueprintOpenSCAP.

type 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"`
}

BlueprintRepository defines model for BlueprintRepository.

type 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"`
}

BlueprintUser defines model for BlueprintUser.

type CloneComposeBody

type CloneComposeBody interface{}

CloneComposeBody defines model for CloneComposeBody.

type 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"`
}

CloneComposeResponse defines model for CloneComposeResponse.

type 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"`
}

CloneStatus defines model for CloneStatus.

type ComposeHandlerFunc

type ComposeHandlerFunc func(ctx echo.Context, id string) error

type 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"`
}

ComposeId defines model for ComposeId.

type 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"`
}

ComposeLogs defines model for ComposeLogs.

type 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"`
}

ComposeManifests defines model for ComposeManifests.

type 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"`
}

ComposeMetadata defines model for ComposeMetadata.

type 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"`
}

ComposeRequest defines model for ComposeRequest.

func (*ComposeRequest) GetBlueprint

func (request *ComposeRequest) GetBlueprint() (blueprint.Blueprint, error)

GetBlueprint returns a blueprint If the compose request includes a blueprint, return it, otherwise if it has customizations create a blueprint with those customizations. If it has neither return an empty blueprint.

func (*ComposeRequest) GetBlueprintFromCompose

func (request *ComposeRequest) GetBlueprintFromCompose() (blueprint.Blueprint, error)

GetBlueprintFromCompose returns a base blueprint It is either constructed from the Blueprint passed in with the request, or it is an empty blueprint

func (*ComposeRequest) GetBlueprintFromCustomizations

func (request *ComposeRequest) GetBlueprintFromCustomizations() (blueprint.Blueprint, error)

GetBlueprintFromCustomizations returns a new Blueprint with all of the customizations set from the ComposeRequest.Customizations

func (*ComposeRequest) GetCustomizationsFromBlueprintRequest

func (request *ComposeRequest) GetCustomizationsFromBlueprintRequest() (*blueprint.Customizations, error)

GetCustomizationsFromBlueprintRequest populates a blueprint customization struct with the data from the blueprint section of a ComposeRequest, which is similar but slightly different from the Cloudapi's Customizations section This starts with a new empty blueprint.Customization object If there are no customizations, it returns nil

func (*ComposeRequest) GetImageRequests

func (request *ComposeRequest) GetImageRequests(distroFactory *distrofactory.Factory, repoRegistry *reporegistry.RepoRegistry) ([]imageRequest, error)

GetImageRequests converts a composeRequest structure from the API to an intermediate imageRequest structure that's used for generating manifests and orchestrating worker jobs.

func (*ComposeRequest) GetPartitioningMode

func (request *ComposeRequest) GetPartitioningMode() (disk.PartitioningMode, error)

GetPartitioningMode returns the partitioning mode included in the request or defaults to AutoLVMPartitioningMode if not included

func (*ComposeRequest) GetPayloadRepositories

func (request *ComposeRequest) GetPayloadRepositories() (repos []Repository)

GetPayloadRepositories returns the custom repos If there are none it returns a nil slice

func (*ComposeRequest) GetSubscription

func (request *ComposeRequest) GetSubscription() (sub *subscription.ImageOptions)

GetSubscription returns an ImageOptions struct populated by the subscription information included in the request, or nil if it has not been included.

type ComposeSBOMs

type ComposeSBOMs struct {
	// Embedded struct due to allOf(#/components/schemas/ObjectReference)
	ObjectReference `yaml:",inline"`
	// Embedded fields due to inline allOf schema
	// The SBOM documents for each image built in the compose.
	Items [][]ImageSBOM `json:"items"`
}

ComposeSBOMs defines model for ComposeSBOMs.

type 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"`
}

ComposeStatus defines model for ComposeStatus.

type ComposeStatusError

type ComposeStatusError struct {
	Details *interface{} `json:"details,omitempty"`
	Id      int          `json:"id"`
	Reason  string       `json:"reason"`
}

ComposeStatusError defines model for ComposeStatusError.

type ComposeStatusValue

type ComposeStatusValue string

ComposeStatusValue defines model for ComposeStatusValue.

const (
	ComposeStatusValueFailure ComposeStatusValue = "failure"

	ComposeStatusValuePending ComposeStatusValue = "pending"

	ComposeStatusValueSuccess ComposeStatusValue = "success"
)

Defines values for ComposeStatusValue.

type 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"`
}

Container defines model for Container.

type 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"`
}

ContainerUploadOptions defines model for ContainerUploadOptions.

type 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"`
}

ContainerUploadStatus defines model for ContainerUploadStatus.

type 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"`
}

CustomRepository defines model for CustomRepository.

type 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"`
	Rhsm                *RHSMCustomization `json:"rhsm,omitempty"`
	Rpm                 *RPMCustomization  `json:"rpm,omitempty"`
	Services            *Services          `json:"services,omitempty"`
	Subscription        *Subscription      `json:"subscription,omitempty"`

	// Timezone configuration
	Timezone *Timezone `json:"timezone,omitempty"`
	Users    *[]User   `json:"users,omitempty"`
}

Customizations defines model for Customizations.

type CustomizationsPartitioningMode

type CustomizationsPartitioningMode string

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.

const (
	CustomizationsPartitioningModeAutoLvm CustomizationsPartitioningMode = "auto-lvm"

	CustomizationsPartitioningModeLvm CustomizationsPartitioningMode = "lvm"

	CustomizationsPartitioningModeRaw CustomizationsPartitioningMode = "raw"
)

Defines values for CustomizationsPartitioningMode.

type DNFPluginConfig

type DNFPluginConfig struct {
	Enabled *bool `json:"enabled,omitempty"`
}

DNFPluginConfig defines model for DNFPluginConfig.

type Directory

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"`
}

A custom directory to create in the final artifact.

type EchoRouter

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
}

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 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"`
}

Error defines model for Error.

func APIError

func APIError(serviceError *serviceError, c echo.Context, details interface{}) *Error

Convert a ServiceErrorCode into an Error as defined in openapi.v2.yml serviceError is optional, prevents multiple find() calls

type 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"`
}

ErrorList defines model for ErrorList.

func APIErrorList

func APIErrorList(page int, pageSize int, c echo.Context) *ErrorList

Helper to make the ErrorList as defined in openapi.v2.yml

type FDO

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"`
}

FIDO device onboard configuration

type FIPS

type FIPS struct {
	// Enables the system FIPS mode
	Enabled *bool `json:"enabled,omitempty"`
}

System FIPS mode setup

type File

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"`
}

A custom file to create in the final artifact.

type Filesystem

type Filesystem struct {
	// size of the filesystem in bytes
	MinSize    uint64 `json:"min_size"`
	Mountpoint string `json:"mountpoint"`
}

Filesystem defines model for Filesystem.

type FirewallCustomization

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 configuration

type FirewallServices

type FirewallServices struct {
	// List of services to disable
	Disabled *[]string `json:"disabled,omitempty"`

	// List of services to enable
	Enabled *[]string `json:"enabled,omitempty"`
}

Firewalld services to enable or disable

type FirewallZones

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"`
}

Bind a list of network sources to a zone to restrict traffic from those sources based on the settings of the zone.

type 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"`
}

GCPUploadOptions defines model for GCPUploadOptions.

type GCPUploadStatus

type GCPUploadStatus struct {
	ImageName string `json:"image_name"`
	ProjectId string `json:"project_id"`
}

GCPUploadStatus defines model for GCPUploadStatus.

type GetErrorListParams

type GetErrorListParams struct {
	// Page index
	Page *Page `json:"page,omitempty"`

	// Number of items in each page
	Size *Size `json:"size,omitempty"`
}

GetErrorListParams defines parameters for GetErrorList.

type 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"`
}

Group defines model for Group.

type Ignition

type Ignition struct {
	Embedded  *IgnitionEmbedded  `json:"embedded,omitempty"`
	Firstboot *IgnitionFirstboot `json:"firstboot,omitempty"`
}

Ignition configuration

type IgnitionEmbedded

type IgnitionEmbedded struct {
	Config string `json:"config"`
}

IgnitionEmbedded defines model for IgnitionEmbedded.

type IgnitionFirstboot

type IgnitionFirstboot struct {
	// Provisioning URL
	Url string `json:"url"`
}

IgnitionFirstboot defines model for IgnitionFirstboot.

type 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"`
}

ImageRequest defines model for ImageRequest.

func (*ImageRequest) GetImageOptions

func (ir *ImageRequest) GetImageOptions(imageType distro.ImageType, bp blueprint.Blueprint) distro.ImageOptions

GetImageOptions returns the initial ImageOptions with Size and PartitioningMode set The size is set to the largest of:

  • Default size for the image type
  • Blueprint filesystem customizations
  • Requested size

The partitioning mode is set to AutoLVM which will select LVM if there are additional mountpoints

func (*ImageRequest) GetOSTreeOptions

func (ir *ImageRequest) GetOSTreeOptions() (ostreeOptions *ostree.ImageOptions, err error)

GetOSTreeOptions returns the image ostree options when included in the request or nil if they are not present.

func (*ImageRequest) GetTargets

func (ir *ImageRequest) GetTargets(request *ComposeRequest, imageType distro.ImageType) ([]*target.Target, error)

GetTargets returns the targets for the ImageRequest. Merges the UploadTargets with the top-level default UploadOptions if specified.

type ImageSBOM

type ImageSBOM struct {
	// The name of the osbuild pipeline which has the packages described
	// in the SBOM installed.
	PipelineName string `json:"pipeline_name"`

	// The purpose of the pipeline. The `buildroot` pipeline was used for
	// the build environment dueing the image build. The `image` pipeline
	// represents the actual content of the image. Due to the nature of
	// some image types, there may be multiple pipelines of the same
	// purpose.
	PipelinePurpose ImageSBOMPipelinePurpose `json:"pipeline_purpose"`

	// The SBOM document in the 'sbom_type' format.
	Sbom interface{} `json:"sbom"`

	// The type of the SBOM document. Currently only SPDX is supported.
	SbomType ImageSBOMSbomType `json:"sbom_type"`
}

ImageSBOM defines model for ImageSBOM.

type ImageSBOMPipelinePurpose

type ImageSBOMPipelinePurpose string

The purpose of the pipeline. The `buildroot` pipeline was used for the build environment dueing the image build. The `image` pipeline represents the actual content of the image. Due to the nature of some image types, there may be multiple pipelines of the same purpose.

const (
	ImageSBOMPipelinePurposeBuildroot ImageSBOMPipelinePurpose = "buildroot"

	ImageSBOMPipelinePurposeImage ImageSBOMPipelinePurpose = "image"
)

Defines values for ImageSBOMPipelinePurpose.

type ImageSBOMSbomType

type ImageSBOMSbomType string

The type of the SBOM document. Currently only SPDX is supported.

const (
	ImageSBOMSbomTypeSpdx ImageSBOMSbomType = "spdx"
)

Defines values for ImageSBOMSbomType.

type 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"`
}

ImageStatus defines model for ImageStatus.

type ImageStatusValue

type ImageStatusValue string

ImageStatusValue defines model for ImageStatusValue.

const (
	ImageStatusValueBuilding ImageStatusValue = "building"

	ImageStatusValueFailure ImageStatusValue = "failure"

	ImageStatusValuePending ImageStatusValue = "pending"

	ImageStatusValueRegistering ImageStatusValue = "registering"

	ImageStatusValueSuccess ImageStatusValue = "success"

	ImageStatusValueUploading ImageStatusValue = "uploading"
)

Defines values for ImageStatusValue.

type ImageTypes

type ImageTypes string

ImageTypes defines model 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 ImageTypes.

type ImportKeys

type ImportKeys struct {
	Files *[]string `json:"files,omitempty"`
}

ImportKeys defines model for ImportKeys.

type Installer

type Installer struct {
	SudoNopasswd *[]string `json:"sudo-nopasswd,omitempty"`
	Unattended   *bool     `json:"unattended,omitempty"`
}

Installer defines model for Installer.

type 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"`
}

Kernel defines model for Kernel.

type 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"`
}

Koji defines model for Koji.

type KojiLogs

type KojiLogs struct {
	Import interface{} `json:"import"`
	Init   interface{} `json:"init"`
}

KojiLogs defines model for KojiLogs.

type KojiStatus

type KojiStatus struct {
	BuildId *int `json:"build_id,omitempty"`
}

KojiStatus defines model for KojiStatus.

type List

type List struct {
	Kind  string `json:"kind"`
	Page  int    `json:"page"`
	Size  int    `json:"size"`
	Total int    `json:"total"`
}

List defines model for List.

type 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"`
}

LocalUploadOptions defines model for LocalUploadOptions.

type Locale

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"`
}

Locale configuration

type OCIUploadOptions

type OCIUploadOptions map[string]interface{}

OCIUploadOptions defines model for OCIUploadOptions.

type OCIUploadStatus

type OCIUploadStatus struct {
	Url string `json:"url"`
}

OCIUploadStatus defines model for OCIUploadStatus.

type 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"`
}

OSTree defines model for OSTree.

type ObjectReference

type ObjectReference struct {
	Href string `json:"href"`
	Id   string `json:"id"`
	Kind string `json:"kind"`
}

ObjectReference defines model for ObjectReference.

type OpenSCAP

type OpenSCAP struct {
	JsonTailoring *OpenSCAPJSONTailoring `json:"json_tailoring,omitempty"`

	// Puts a specified policy ID in the RHSM facts, so that any instances registered to
	// insights will be automatically connected to the compliance policy in the console.
	PolicyId  *string            `json:"policy_id,omitempty"`
	ProfileId string             `json:"profile_id"`
	Tailoring *OpenSCAPTailoring `json:"tailoring,omitempty"`
}

OpenSCAP defines model for OpenSCAP.

type OpenSCAPJSONTailoring

type OpenSCAPJSONTailoring struct {
	Filepath  string `json:"filepath"`
	ProfileId string `json:"profile_id"`
}

OpenSCAPJSONTailoring defines model for OpenSCAPJSONTailoring.

type OpenSCAPTailoring

type OpenSCAPTailoring struct {
	Selected   *[]string `json:"selected,omitempty"`
	Unselected *[]string `json:"unselected,omitempty"`
}

OpenSCAPTailoring defines model for OpenSCAPTailoring.

type 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"`
}

Package defines model for Package.

type PackageGroup

type PackageGroup struct {
	// Package group name
	Name string `json:"name"`
}

PackageGroup defines model for PackageGroup.

type 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"`
}

PackageMetadata defines model for PackageMetadata.

type Page

type Page string

Page defines model for page.

type PostCloneComposeJSONBody

type PostCloneComposeJSONBody CloneComposeBody

PostCloneComposeJSONBody defines parameters for PostCloneCompose.

type PostCloneComposeJSONRequestBody

type PostCloneComposeJSONRequestBody PostCloneComposeJSONBody

PostCloneComposeJSONRequestBody defines body for PostCloneCompose for application/json ContentType.

type PostComposeJSONBody

type PostComposeJSONBody ComposeRequest

PostComposeJSONBody defines parameters for PostCompose.

type PostComposeJSONRequestBody

type PostComposeJSONRequestBody PostComposeJSONBody

PostComposeJSONRequestBody defines body for PostCompose for application/json ContentType.

type 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"`
}

PulpOSTreeUploadOptions defines model for PulpOSTreeUploadOptions.

type PulpOSTreeUploadStatus

type PulpOSTreeUploadStatus struct {
	RepoUrl string `json:"repo_url"`
}

PulpOSTreeUploadStatus defines model for PulpOSTreeUploadStatus.

type RHSMConfig

type RHSMConfig struct {
	DnfPlugins          *SubManDNFPluginsConfig `json:"dnf_plugins,omitempty"`
	SubscriptionManager *SubManConfig           `json:"subscription_manager,omitempty"`
}

RHSMConfig defines model for RHSMConfig.

type RHSMCustomization

type RHSMCustomization struct {
	Config *RHSMConfig `json:"config,omitempty"`
}

RHSMCustomization defines model for RHSMCustomization.

type RPMCustomization

type RPMCustomization struct {
	ImportKeys *ImportKeys `json:"import_keys,omitempty"`
}

RPMCustomization defines model for RPMCustomization.

type Repository

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"`
}

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 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"`
}

SSHKey defines model for SSHKey.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the state of the cloud Server

func NewServer

func NewServer(workers *worker.Server, distros *distrofactory.Factory, repos *reporegistry.RepoRegistry, config ServerConfig) *Server

func (*Server) EnsureJobChannel

func (s *Server) EnsureJobChannel(next ComposeHandlerFunc) ComposeHandlerFunc

Ensures that the job's channel matches the JWT cannel set in the echo.Context

func (*Server) Handler

func (s *Server) Handler(path string) http.Handler

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) ValidateRequest

func (s *Server) ValidateRequest(next echo.HandlerFunc) echo.HandlerFunc

type ServerConfig

type ServerConfig struct {
	TenantProviderFields []string
	JWTEnabled           bool
}

type ServerInterface

type ServerInterface interface {
	// The status of a cloned compose
	// (GET /clones/{id})
	GetCloneStatus(ctx echo.Context, id string) error
	// Create compose
	// (POST /compose)
	PostCompose(ctx echo.Context) error
	// The status of a compose
	// (GET /composes/{id})
	GetComposeStatus(ctx echo.Context, id string) error
	// Clone an existing compose
	// (POST /composes/{id}/clone)
	PostCloneCompose(ctx echo.Context, id string) error
	// Get logs for a compose.
	// (GET /composes/{id}/logs)
	GetComposeLogs(ctx echo.Context, id string) error
	// Get the manifests for a compose.
	// (GET /composes/{id}/manifests)
	GetComposeManifests(ctx echo.Context, id string) error
	// Get the metadata for a compose.
	// (GET /composes/{id}/metadata)
	GetComposeMetadata(ctx echo.Context, id string) error
	// Get the SBOMs for a compose.
	// (GET /composes/{id}/sboms)
	GetComposeSBOMs(ctx echo.Context, id string) error
	// 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
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) GetCloneStatus

func (w *ServerInterfaceWrapper) GetCloneStatus(ctx echo.Context) error

GetCloneStatus converts echo context to params.

func (*ServerInterfaceWrapper) GetComposeLogs

func (w *ServerInterfaceWrapper) GetComposeLogs(ctx echo.Context) error

GetComposeLogs converts echo context to params.

func (*ServerInterfaceWrapper) GetComposeManifests

func (w *ServerInterfaceWrapper) GetComposeManifests(ctx echo.Context) error

GetComposeManifests converts echo context to params.

func (*ServerInterfaceWrapper) GetComposeMetadata

func (w *ServerInterfaceWrapper) GetComposeMetadata(ctx echo.Context) error

GetComposeMetadata converts echo context to params.

func (*ServerInterfaceWrapper) GetComposeSBOMs

func (w *ServerInterfaceWrapper) GetComposeSBOMs(ctx echo.Context) error

GetComposeSBOMs converts echo context to params.

func (*ServerInterfaceWrapper) GetComposeStatus

func (w *ServerInterfaceWrapper) GetComposeStatus(ctx echo.Context) error

GetComposeStatus converts echo context to params.

func (*ServerInterfaceWrapper) GetError

func (w *ServerInterfaceWrapper) GetError(ctx echo.Context) error

GetError converts echo context to params.

func (*ServerInterfaceWrapper) GetErrorList

func (w *ServerInterfaceWrapper) GetErrorList(ctx echo.Context) error

GetErrorList converts echo context to params.

func (*ServerInterfaceWrapper) GetOpenapi

func (w *ServerInterfaceWrapper) GetOpenapi(ctx echo.Context) error

GetOpenapi converts echo context to params.

func (*ServerInterfaceWrapper) PostCloneCompose

func (w *ServerInterfaceWrapper) PostCloneCompose(ctx echo.Context) error

PostCloneCompose converts echo context to params.

func (*ServerInterfaceWrapper) PostCompose

func (w *ServerInterfaceWrapper) PostCompose(ctx echo.Context) error

PostCompose converts echo context to params.

type ServiceErrorCode

type ServiceErrorCode int
const (
	ErrorCodePrefix = "IMAGE-BUILDER-COMPOSER-"
	ErrorHREF       = "/api/image-builder-composer/v2/errors"

	// ocm-sdk sends ErrorUnauthenticated with id 401 & code COMPOSER-401
	ErrorUnauthenticated ServiceErrorCode = 401

	ErrorUnauthorized                 ServiceErrorCode = 2
	ErrorUnsupportedMediaType         ServiceErrorCode = 3
	ErrorUnsupportedDistribution      ServiceErrorCode = 4
	ErrorUnsupportedArchitecture      ServiceErrorCode = 5
	ErrorUnsupportedImageType         ServiceErrorCode = 6
	ErrorInvalidRepository            ServiceErrorCode = 7
	ErrorDNFError                     ServiceErrorCode = 8
	ErrorInvalidOSTreeRef             ServiceErrorCode = 9
	ErrorInvalidOSTreeRepo            ServiceErrorCode = 10
	ErrorFailedToMakeManifest         ServiceErrorCode = 11
	ErrorInvalidComposeId             ServiceErrorCode = 14
	ErrorComposeNotFound              ServiceErrorCode = 15
	ErrorInvalidErrorId               ServiceErrorCode = 16
	ErrorErrorNotFound                ServiceErrorCode = 17
	ErrorInvalidPageParam             ServiceErrorCode = 18
	ErrorInvalidSizeParam             ServiceErrorCode = 19
	ErrorBodyDecodingError            ServiceErrorCode = 20
	ErrorResourceNotFound             ServiceErrorCode = 21
	ErrorMethodNotAllowed             ServiceErrorCode = 22
	ErrorNotAcceptable                ServiceErrorCode = 23
	ErrorNoBaseURLInPayloadRepository ServiceErrorCode = 24
	ErrorInvalidNumberOfImageBuilds   ServiceErrorCode = 25
	ErrorInvalidJobType               ServiceErrorCode = 26
	ErrorInvalidOSTreeParams          ServiceErrorCode = 27
	ErrorTenantNotFound               ServiceErrorCode = 28
	ErrorNoGPGKey                     ServiceErrorCode = 29
	ErrorValidationFailed             ServiceErrorCode = 30
	ErrorComposeBadState              ServiceErrorCode = 31
	ErrorUnsupportedImage             ServiceErrorCode = 32
	ErrorInvalidImageFromComposeId    ServiceErrorCode = 33
	ErrorImageNotFound                ServiceErrorCode = 34
	ErrorInvalidCustomization         ServiceErrorCode = 35
	ErrorLocalSaveNotEnabled          ServiceErrorCode = 36
	ErrorInvalidPartitioningMode      ServiceErrorCode = 37
	ErrorInvalidUploadTarget          ServiceErrorCode = 38
	ErrorBlueprintOrCustomNotBoth     ServiceErrorCode = 39

	// Internal errors, these are bugs
	ErrorFailedToInitializeBlueprint              ServiceErrorCode = 1000
	ErrorFailedToGenerateManifestSeed             ServiceErrorCode = 1001
	ErrorFailedToDepsolve                         ServiceErrorCode = 1002
	ErrorJSONMarshallingError                     ServiceErrorCode = 1003
	ErrorJSONUnMarshallingError                   ServiceErrorCode = 1004
	ErrorEnqueueingJob                            ServiceErrorCode = 1005
	ErrorSeveralUploadTargets                     ServiceErrorCode = 1006
	ErrorUnknownUploadTarget                      ServiceErrorCode = 1007
	ErrorFailedToLoadOpenAPISpec                  ServiceErrorCode = 1008
	ErrorFailedToParseManifestVersion             ServiceErrorCode = 1009
	ErrorUnknownManifestVersion                   ServiceErrorCode = 1010
	ErrorUnableToConvertOSTreeCommitStageMetadata ServiceErrorCode = 1011
	ErrorMalformedOSBuildJobResult                ServiceErrorCode = 1012
	ErrorGettingDepsolveJobStatus                 ServiceErrorCode = 1013
	ErrorDepsolveJobCanceled                      ServiceErrorCode = 1014
	ErrorUnexpectedNumberOfImageBuilds            ServiceErrorCode = 1015
	ErrorGettingBuildDependencyStatus             ServiceErrorCode = 1016
	ErrorGettingOSBuildJobStatus                  ServiceErrorCode = 1017
	ErrorGettingAWSEC2JobStatus                   ServiceErrorCode = 1018
	ErrorGettingJobType                           ServiceErrorCode = 1019
	ErrorTenantNotInContext                       ServiceErrorCode = 1020

	// Errors contained within this file
	ErrorUnspecified          ServiceErrorCode = 10000
	ErrorNotHTTPError         ServiceErrorCode = 10001
	ErrorServiceErrorNotFound ServiceErrorCode = 10002
	ErrorMalformedOperationID ServiceErrorCode = 10003
)

type 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"`
}

Services defines model for Services.

type Size

type Size string

Size defines model for size.

type SubManConfig

type SubManConfig struct {
	Rhsm      *SubManRHSMConfig      `json:"rhsm,omitempty"`
	Rhsmcertd *SubManRHSMCertdConfig `json:"rhsmcertd,omitempty"`
}

SubManConfig defines model for SubManConfig.

type SubManDNFPluginsConfig

type SubManDNFPluginsConfig struct {
	ProductId           *DNFPluginConfig `json:"product_id,omitempty"`
	SubscriptionManager *DNFPluginConfig `json:"subscription_manager,omitempty"`
}

SubManDNFPluginsConfig defines model for SubManDNFPluginsConfig.

type SubManRHSMCertdConfig

type SubManRHSMCertdConfig struct {
	AutoRegistration *bool `json:"auto_registration,omitempty"`
}

SubManRHSMCertdConfig defines model for SubManRHSMCertdConfig.

type SubManRHSMConfig

type SubManRHSMConfig struct {
	ManageRepos *bool `json:"manage_repos,omitempty"`
}

SubManRHSMConfig defines model for SubManRHSMConfig.

type 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"`
}

Subscription defines model for Subscription.

type Timezone

type Timezone struct {
	// List of ntp servers
	Ntpservers *[]string `json:"ntpservers,omitempty"`

	// Name of the timezone, defaults to UTC
	Timezone *string `json:"timezone,omitempty"`
}

Timezone configuration

type UploadOptions

type UploadOptions interface{}

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 UploadStatus

type UploadStatus struct {
	Options interface{}       `json:"options"`
	Status  UploadStatusValue `json:"status"`
	Type    UploadTypes       `json:"type"`
}

UploadStatus defines model for UploadStatus.

type UploadStatusValue

type UploadStatusValue string

UploadStatusValue defines model for UploadStatusValue.

const (
	UploadStatusValueFailure UploadStatusValue = "failure"

	UploadStatusValuePending UploadStatusValue = "pending"

	UploadStatusValueRunning UploadStatusValue = "running"

	UploadStatusValueSuccess UploadStatusValue = "success"
)

Defines values for UploadStatusValue.

type 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"`
}

UploadTarget defines model for UploadTarget.

type UploadTypes

type UploadTypes string

UploadTypes defines model 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"
)

Defines values for UploadTypes.

type User

type User struct {
	Groups *[]string `json:"groups,omitempty"`
	Key    *string   `json:"key,omitempty"`
	Name   string    `json:"name"`

	// If the password starts with $6$, $5$, or $2b$ it will be stored as
	// an encrypted password. Otherwise it will be treated as a plain text
	// password.
	Password *string `json:"password,omitempty"`
}

User defines model for User.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL