// Package v2 provides primitives to interact the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT. package v2 import ( "bytes" "compress/gzip" "encoding/base64" "fmt" "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/getkin/kin-openapi/openapi3" "github.com/labstack/echo/v4" "net/http" "strings" ) // AWSS3UploadRequestOptions defines model for AWSS3UploadRequestOptions. type AWSS3UploadRequestOptions struct { Region string `json:"region"` S3 AWSUploadRequestOptionsS3 `json:"s3"` } // AWSS3UploadStatus defines model for AWSS3UploadStatus. type AWSS3UploadStatus struct { Url string `json:"url"` } // AWSUploadRequestOptions defines model for AWSUploadRequestOptions. type AWSUploadRequestOptions struct { Ec2 AWSUploadRequestOptionsEc2 `json:"ec2"` Region string `json:"region"` S3 AWSUploadRequestOptionsS3 `json:"s3"` } // AWSUploadRequestOptionsEc2 defines model for AWSUploadRequestOptionsEc2. type AWSUploadRequestOptionsEc2 struct { AccessKeyId string `json:"access_key_id"` SecretAccessKey string `json:"secret_access_key"` ShareWithAccounts *[]string `json:"share_with_accounts,omitempty"` SnapshotName *string `json:"snapshot_name,omitempty"` } // AWSUploadRequestOptionsS3 defines model for AWSUploadRequestOptionsS3. type AWSUploadRequestOptionsS3 struct { AccessKeyId string `json:"access_key_id"` Bucket string `json:"bucket"` SecretAccessKey string `json:"secret_access_key"` } // AWSUploadStatus defines model for AWSUploadStatus. type AWSUploadStatus struct { Ami string `json:"ami"` Region string `json:"region"` } // AzureUploadRequestOptions defines model for AzureUploadRequestOptions. type AzureUploadRequestOptions 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 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' Location string `json:"location"` // 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"` } // ComposeId defines model for ComposeId. type ComposeId struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference // Embedded fields due to inline allOf schema Id string `json:"id"` } // ComposeMetadata defines model for ComposeMetadata. type ComposeMetadata struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference // 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 { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference // Embedded fields due to inline allOf schema Customizations *Customizations `json:"customizations,omitempty"` Distribution string `json:"distribution"` ImageRequests []ImageRequest `json:"image_requests"` } // ComposeStatus defines model for ComposeStatus. type ComposeStatus struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference // Embedded fields due to inline allOf schema ImageStatus ImageStatus `json:"image_status"` } // Customizations defines model for Customizations. type Customizations struct { Packages *[]string `json:"packages,omitempty"` Subscription *Subscription `json:"subscription,omitempty"` Users *[]User `json:"users,omitempty"` } // Error defines model for Error. type Error struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference // Embedded fields due to inline allOf schema Code string `json:"code"` 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 // Embedded fields due to inline allOf schema Items []Error `json:"items"` } // GCPUploadRequestOptions defines model for GCPUploadRequestOptions. type GCPUploadRequestOptions struct { // Name of an existing STANDARD Storage class Bucket. Bucket string `json:"bucket"` // The name to use for the imported and shared Compute Engine image. // The image name must be unique within the GCP project, which is used // for the OS image upload and import. If not specified a random // 'composer-api-' string is used as the image name. ImageName *string `json:"image_name,omitempty"` // The GCP region where the OS image will be imported to and shared from. // The value must be a valid GCP location. See https://cloud.google.com/storage/docs/locations. // If not specified, the multi-region location closest to the source // (source Storage Bucket location) is chosen automatically. Region *string `json:"region,omitempty"` // 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"` } // ImageRequest defines model for ImageRequest. type ImageRequest struct { Architecture string `json:"architecture"` ImageType string `json:"image_type"` Ostree *OSTree `json:"ostree,omitempty"` Repositories []Repository `json:"repositories"` UploadRequest UploadRequest `json:"upload_request"` } // ImageStatus defines model for ImageStatus. type ImageStatus struct { Status ImageStatusValue `json:"status"` UploadStatus *UploadStatus `json:"upload_status,omitempty"` } // ImageStatusValue defines model for ImageStatusValue. type ImageStatusValue string // List of ImageStatusValue const ( ImageStatusValue_building ImageStatusValue = "building" ImageStatusValue_failure ImageStatusValue = "failure" ImageStatusValue_pending ImageStatusValue = "pending" ImageStatusValue_registering ImageStatusValue = "registering" ImageStatusValue_success ImageStatusValue = "success" ImageStatusValue_uploading ImageStatusValue = "uploading" ) // List defines model for List. type List struct { Kind string `json:"kind"` Page int `json:"page"` Size int `json:"size"` Total int `json:"total"` } // OSTree defines model for OSTree. type OSTree struct { Ref *string `json:"ref,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"` } // 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"` } // Repository defines model for Repository. type Repository struct { Baseurl *string `json:"baseurl,omitempty"` Metalink *string `json:"metalink,omitempty"` Mirrorlist *string `json:"mirrorlist,omitempty"` Rhsm bool `json:"rhsm"` } // 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"` ServerUrl string `json:"server_url"` } // UploadRequest defines model for UploadRequest. type UploadRequest struct { Options interface{} `json:"options"` Type UploadTypes `json:"type"` } // UploadStatus defines model for UploadStatus. type UploadStatus struct { Options interface{} `json:"options"` Status string `json:"status"` Type UploadTypes `json:"type"` } // UploadTypes defines model for UploadTypes. type UploadTypes string // List of UploadTypes const ( UploadTypes_aws UploadTypes = "aws" UploadTypes_aws_s3 UploadTypes = "aws.s3" UploadTypes_azure UploadTypes = "azure" UploadTypes_gcp UploadTypes = "gcp" ) // User defines model for User. type User struct { // Embedded struct due to allOf(#/components/schemas/ObjectReference) ObjectReference // Embedded fields due to inline allOf schema 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 // 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"` } // PostComposeRequestBody defines body for PostCompose for application/json ContentType. type PostComposeJSONRequestBody PostComposeJSONBody // ServerInterface represents all server handlers. type ServerInterface interface { // Create compose // (POST /compose) PostCompose(ctx echo.Context) error // The status of a compose // (GET /compose/{id}) GetComposeStatus(ctx echo.Context, id string) error // Get the metadata for a compose. // (GET /compose/{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 } // PostCompose converts echo context to params. func (w *ServerInterfaceWrapper) PostCompose(ctx echo.Context) error { var err error ctx.Set("Bearer.Scopes", []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.BindStyledParameter("simple", false, "id", ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set("Bearer.Scopes", []string{""}) // Invoke the callback with all the unmarshalled arguments err = w.Handler.GetComposeStatus(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.BindStyledParameter("simple", false, "id", ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set("Bearer.Scopes", []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("Bearer.Scopes", []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.BindStyledParameter("simple", false, "id", ctx.Param("id"), &id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err)) } ctx.Set("Bearer.Scopes", []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("Bearer.Scopes", []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) { wrapper := ServerInterfaceWrapper{ Handler: si, } router.POST("/compose", wrapper.PostCompose) router.GET("/compose/:id", wrapper.GetComposeStatus) router.GET("/compose/:id/metadata", wrapper.GetComposeMetadata) router.GET("/errors", wrapper.GetErrorList) router.GET("/errors/:id", wrapper.GetError) router.GET("/openapi", wrapper.GetOpenapi) } // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ "H4sIAAAAAAAC/+xbe28bt7L/KsSeC7jF3dVbtiOg6FFsN0dtYgeW057e2DCo3ZGWJ7vkhuRaVgJ99ws+", "drUvPdy67SngfxJJJOfxm+FwZkh/dXwWJ4wClcIZfXUSzHEMErj9tgD1fwDC5ySRhFFn5LzHC0CEBvDo", "uA484jiJoDT9AUcpOCOn66zXrkPUms8p8JXjOhTHakTPdB3hhxBjtUSuEvW7kJzQhV4myJcG3pdpPAOO", "2BwRCbFAhCLAfogswaI0GYFcmk5nqzx67i551tmgJj3+ZTrtf0gihoNr+JyCkFdaQIMCZwlwSYwUHBZa", "8q+ZbM7IgdRbgpBe13GrjFxH9NXk/+Ewd0bOP9ob87StAO3xL9Mm3tO+Vo/D55RwCJzRx4y5JnqX82Kz", "/4AvFa+CHlOJZdogf8qjZvsU+ahJW+gfhhL4vd+o9YXfc7Q0/yUwu1qXJ4BxYVQv44F9H4S4/wSrexKU", "tRr/NBlPrqY/XJ1fXp5c/Hv87v3bi0YFwecg7zeUymSWP+KI//uDpD9cvJu0fzp5d35x+aY9e/94PSdn", "v1q6P1386rjOnPEYS71rhVgyHjSyCzGH+yWRoWLJUhtPcoYfnW6vPxgen5y+6nQ1QHoDN/hWThxzjlea", "NsWJCJm8N7u1qEa88rLRulQVM5VBbULoCWab9v8Qq81S/xPImo7257/azE8GNFdoJ7LbYg+OSVkbHBOv", "45/2Oyev+icnw+GrYTCYNaHyxHBQ1SsmTk6jUfIvKYfDIhuJ8QJyx60cZjgGdZTJEFCqqUGA9IIWmkgU", "p0KiGaCUks+pOnH1xAV5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gtXnxMAmfkvGdCWtUc4wcg5GsWrMytjE4J9Y5KkoiYRmr7", "P/bCZfNeded1ZvladV32N5UKmBcsCVO2UNR6ne5zc58EhnEFcjOIQiyQkJhLCJQZB53Os/G3dzl13hNq", "msTW0tkrKcO/+8fzH6dSOcknoIgIRIw0hnv/j+f+geJUhoyTL+a6IQGuMkmUO6eRZPBnSPKJsiXN7WBA", "GP4ZLvCBwmMCvoQAgZqDmO+nXG2LYqzVx1gWZT/ere9cR6RxjFW9lwWNLLiodVmkaX8lwVofYk0XfG9A", "mssTfSbrqz5kz37EuCYYgZLMUtMXQNpR/CgNQKBlCDIEriZTZmhlEOoMAwII6uHmDcjyAwC39Ob/Y/Nj", "rJywEVYytNBXivotvQqxm6f09jVSMbwUH9Y/+9ucu1rs6jx37MpbcDUHKuPyl4WuLG68RK2XqHVQ1Lqp", "BJ6t4Uv3hLJu4M44lk00BOeEEhFWohcgeMS+RCrfVJuaMIo4yJRTCFAAqgYSiNHim+XsQbS5VN0RzfKu", "5Us82xvPNu/y6s51UzRl9vjCvDnPTPkS5l7C3N8jzNVik3JoXHBkFe40cVGIb7UQs3mGVgsuTZptprT1", "vdS2xlFhnr64+kO3/kaHJm83r33ZHFkwXrbZX7PNjKP//TYZzh0IRxFKmBBkFkHuTZtttr8mwtQ0maif", "/8WMkWzzvG+2QvrobN6oh2UAOd3fe+r3/+QzPDflyx592aNP2aNmbZG03pd5y3T7+XdlpzR7dVlYS07v", "VkQoUhjYV5B/x8xhpzrr/PLTxJlyrxsnpKWWi5DYPzHDCcmKK95+6DlVud/Zt4csSH3zYNZQ1xlEnbiQ", "eAFPZDGVeEHook5470qNIM2eOTrru/X/BwAA///lfr/IPEIAAA==", } // GetSwagger returns the Swagger specification corresponding to the generated code // in this file. func GetSwagger() (*openapi3.Swagger, 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) } swagger, err := openapi3.NewSwaggerLoader().LoadSwaggerFromData(buf.Bytes()) if err != nil { return nil, fmt.Errorf("error loading Swagger: %s", err) } return swagger, nil }