// 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" ) // 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 { 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 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 { Customizations *Customizations `json:"customizations,omitempty"` Distribution string `json:"distribution"` ImageRequest ImageRequest `json:"image_request"` } // 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"` PayloadRepositories *[]Repository `json:"payload_repositories,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"` } // GCPUploadOptions defines model for GCPUploadOptions. type GCPUploadOptions 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"` // 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 ImageTypes `json:"image_type"` Ostree *OSTree `json:"ostree,omitempty"` Repositories []Repository `json:"repositories"` UploadOptions UploadOptions `json:"upload_options"` } // 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" ) // ImageTypes defines model for ImageTypes. type ImageTypes string // List of ImageTypes const ( ImageTypes_aws ImageTypes = "aws" ImageTypes_azure ImageTypes = "azure" ImageTypes_edge_commit ImageTypes = "edge-commit" ImageTypes_edge_container ImageTypes = "edge-container" ImageTypes_edge_installer ImageTypes = "edge-installer" ImageTypes_gcp ImageTypes = "gcp" ImageTypes_guest_image ImageTypes = "guest-image" ImageTypes_image_installer ImageTypes = "image-installer" ImageTypes_vsphere ImageTypes = "vsphere" ) // 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"` CheckGpg *bool `json:"check_gpg,omitempty"` GpgKey *string `json:"gpg_key,omitempty"` IgnoreSsl *bool `json:"ignore_ssl,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"` } // UploadOptions defines model for UploadOptions. type UploadOptions interface{} // 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 /composes/{id}) GetComposeStatus(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 } // 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("/composes/:id", wrapper.GetComposeStatus) router.GET("/composes/: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/+xbe28bOZL/KkTvAZ7BdUuyZDmOgMGs43iz3ps8YDmzuIsNgWKX1Nx0kx2SbUUJ9N0P", "fHSrH5Ql73hmMYD/iSWRrPpVsapYVWS+B4RnOWfAlAwm34McC5yBAuG+LUH/jUESQXNFOQsmwQe8BERZ", "DF+DMICvOMtTaEy/x2kBwSQ4DjabMKB6zZcCxDoIA4YzPWJmhoEkCWRYL1HrXP8ulaBsaZZJ+s3D+12R", "zUEgvkBUQSYRZQgwSZAjWEdTEqjQDAY78Zi5D+HZlIOG9Pk/p5cXw495ynH83kCz8gueg1DU8hewNJi/", "l6iCSQBFtAKpouMgbLMIA5lgAbMVVckME8ILtyXV6k/B8XB0Mj59cfZycDwM7sLA6MADtyKOhcBrQ5vh", "XCZczazAdUzZOipHu6g2YSDgS0EFxBqAk8mP9a5azef/AqI037qmpgqrwqMonNEmIpzRaEDORoMXL0cv", "XozHL8fxydynsUequCWM5lvR2AF+OnraXfbrcw/zXYorROr3nToLPclL/1shYI9wNMNLqEym5Yk4A+2H", "KgFUGDIQI7Ogh64Uygqp0BxQweiXQocLM3FJ74EhAZIXggBaCl7kvVt2tUCaCaIS8YwqBTFaCJ6ZJVoW", "kCpEGAnMYp4hzgDNsYQYcYYw+vjx6jWi8pYtgYHACuLeLdvGAmvhBpjPhFJOsHI72BTwFzeCVgkIMFgM", "FSQTXqSxEa6UG7MY6b2UCoTh/3e+QoqjlEqFcJqiko2c3LJEqVxO+v2YE9nLKBFc8oXqEZ71gUWF7JOU", "9rHenr7zrZ/vKax+Mj9FJKVRihVI9Rf8rXS+mWY0q5gctRSgrREKvbV+L7LbMTPb8fBON7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DAxRiahFY7mPfn/uHxkuVMIF/WbvN3IQOm9DlXFaJCd/BJLPjK9YtQ9WCeM/wgQ+", "MviaA1EQI9BzECekENot6rHWHGNllP10t7kLA1lkGdaFWxk0yuCi15WRRva/03hjTjHfleIbUPa6xhzK", "5nIRucMfcWEopqChOXLmyslYCkmLGCRaJaASEHoy45ZWqUOTYkAMcTfevAHVfMYQNt5Df/K/9aoIW7CK", "o6W5xDTvjHWM3T4zdo+d6vGl/uj4yZ/+3HWC1+Cpg1fV4utYUFMv/7HYVQaO57D1HLYOCls3rcCzO36Z", "HkzZ2HswkJUTLcUFZVQmrfAFCL5iopDOOLVXU86QAFUIBjGKQVdBEnFWfxNdPri297gPhLOqAfkc0PYG", "tO27v6513dS3snzvYd+0l1v5HOee49yfI851YpM2aFwzZB3vDHFZi2+dELN98tYJLj7JtlP65oppV+uo", "Ns/cQf2urr+VwWft9jUxXyCnjGc3+8+4mTX0P5+T4cqAcJqinEtJ5ylU1rR1s/1FEWa2zcRI9T9yLLLt", "i8L5Gpmj0++oh2UAFd3feuqP/uAzvNrKZx999tHH+KhdWydt/LJqmu4+/967KX6rboJ15Iy3IsqQ1oF7", "ePlnzBweFGdTXTbaONPsduOc9vRymVD3X9hwTvv20YxpqYOIygfR/fth0JbirXv8yOOC2Be7lpfJJ7qs", "pMJL+E0MpwovKVt22TySjtE1K99gBpu7zf8HAAD//xaq+MiDPwAA", } // 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 }