go.mod: Update oapi-codegen and kin-openapi
This commit is contained in:
parent
add17bba45
commit
a83cf95d5b
156 changed files with 29663 additions and 2248 deletions
|
|
@ -1,13 +1,43 @@
|
|||
// Package api provides primitives to interact the openapi HTTP API.
|
||||
// Package api provides primitives to interact with the openapi HTTP API.
|
||||
//
|
||||
// Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
|
||||
// Code generated by github.com/deepmap/oapi-codegen version v1.8.2 DO NOT EDIT.
|
||||
package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/deepmap/oapi-codegen/pkg/runtime"
|
||||
"github.com/labstack/echo/v4"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Defines values for ComposeStatusValue.
|
||||
const (
|
||||
ComposeStatusValueFailure ComposeStatusValue = "failure"
|
||||
|
||||
ComposeStatusValuePending ComposeStatusValue = "pending"
|
||||
|
||||
ComposeStatusValueRegistering ComposeStatusValue = "registering"
|
||||
|
||||
ComposeStatusValueSuccess ComposeStatusValue = "success"
|
||||
)
|
||||
|
||||
// Defines values for ImageStatusValue.
|
||||
const (
|
||||
ImageStatusValueBuilding ImageStatusValue = "building"
|
||||
|
||||
ImageStatusValueFailure ImageStatusValue = "failure"
|
||||
|
||||
ImageStatusValuePending ImageStatusValue = "pending"
|
||||
|
||||
ImageStatusValueSuccess ImageStatusValue = "success"
|
||||
|
||||
ImageStatusValueUploading ImageStatusValue = "uploading"
|
||||
)
|
||||
|
||||
// Defines values for StatusStatus.
|
||||
const (
|
||||
StatusStatusOK StatusStatus = "OK"
|
||||
)
|
||||
|
||||
// ComposeLogs defines model for ComposeLogs.
|
||||
|
|
@ -35,12 +65,15 @@ type ComposeResponse struct {
|
|||
|
||||
// ComposeStatus defines model for ComposeStatus.
|
||||
type ComposeStatus struct {
|
||||
ImageStatuses []ImageStatus `json:"image_statuses"`
|
||||
KojiBuildId *int `json:"koji_build_id,omitempty"`
|
||||
KojiTaskId int `json:"koji_task_id"`
|
||||
Status string `json:"status"`
|
||||
ImageStatuses []ImageStatus `json:"image_statuses"`
|
||||
KojiBuildId *int `json:"koji_build_id,omitempty"`
|
||||
KojiTaskId int `json:"koji_task_id"`
|
||||
Status ComposeStatusValue `json:"status"`
|
||||
}
|
||||
|
||||
// ComposeStatusValue defines model for ComposeStatusValue.
|
||||
type ComposeStatusValue string
|
||||
|
||||
// ImageRequest defines model for ImageRequest.
|
||||
type ImageRequest struct {
|
||||
Architecture string `json:"architecture"`
|
||||
|
|
@ -50,9 +83,12 @@ type ImageRequest struct {
|
|||
|
||||
// ImageStatus defines model for ImageStatus.
|
||||
type ImageStatus struct {
|
||||
Status string `json:"status"`
|
||||
Status ImageStatusValue `json:"status"`
|
||||
}
|
||||
|
||||
// ImageStatusValue defines model for ImageStatusValue.
|
||||
type ImageStatusValue string
|
||||
|
||||
// Koji defines model for Koji.
|
||||
type Koji struct {
|
||||
Server string `json:"server"`
|
||||
|
|
@ -67,13 +103,16 @@ type Repository struct {
|
|||
|
||||
// Status defines model for Status.
|
||||
type Status struct {
|
||||
Status string `json:"status"`
|
||||
Status StatusStatus `json:"status"`
|
||||
}
|
||||
|
||||
// StatusStatus defines model for Status.Status.
|
||||
type StatusStatus string
|
||||
|
||||
// PostComposeJSONBody defines parameters for PostCompose.
|
||||
type PostComposeJSONBody ComposeRequest
|
||||
|
||||
// PostComposeRequestBody defines body for PostCompose for application/json ContentType.
|
||||
// PostComposeJSONRequestBody defines body for PostCompose for application/json ContentType.
|
||||
type PostComposeJSONRequestBody PostComposeJSONBody
|
||||
|
||||
// ServerInterface represents all server handlers.
|
||||
|
|
@ -115,7 +154,7 @@ func (w *ServerInterfaceWrapper) GetComposeId(ctx echo.Context) error {
|
|||
// ------------- Path parameter "id" -------------
|
||||
var id string
|
||||
|
||||
err = runtime.BindStyledParameter("simple", false, "id", ctx.Param("id"), &id)
|
||||
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
|
||||
}
|
||||
|
|
@ -131,7 +170,7 @@ func (w *ServerInterfaceWrapper) GetComposeIdLogs(ctx echo.Context) error {
|
|||
// ------------- Path parameter "id" -------------
|
||||
var id string
|
||||
|
||||
err = runtime.BindStyledParameter("simple", false, "id", ctx.Param("id"), &id)
|
||||
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
|
||||
}
|
||||
|
|
@ -147,7 +186,7 @@ func (w *ServerInterfaceWrapper) GetComposeIdManifests(ctx echo.Context) error {
|
|||
// ------------- Path parameter "id" -------------
|
||||
var id string
|
||||
|
||||
err = runtime.BindStyledParameter("simple", false, "id", ctx.Param("id"), &id)
|
||||
err = runtime.BindStyledParameterWithLocation("simple", false, "id", runtime.ParamLocationPath, ctx.Param("id"), &id)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter id: %s", err))
|
||||
}
|
||||
|
|
@ -183,15 +222,21 @@ type EchoRouter interface {
|
|||
|
||||
// RegisterHandlers adds each server route to the EchoRouter.
|
||||
func RegisterHandlers(router EchoRouter, si ServerInterface) {
|
||||
RegisterHandlersWithBaseURL(router, si, "")
|
||||
}
|
||||
|
||||
// Registers handlers, and prepends BaseURL to the paths, so that the paths
|
||||
// can be served under a prefix.
|
||||
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string) {
|
||||
|
||||
wrapper := ServerInterfaceWrapper{
|
||||
Handler: si,
|
||||
}
|
||||
|
||||
router.POST("/compose", wrapper.PostCompose)
|
||||
router.GET("/compose/:id", wrapper.GetComposeId)
|
||||
router.GET("/compose/:id/logs", wrapper.GetComposeIdLogs)
|
||||
router.GET("/compose/:id/manifests", wrapper.GetComposeIdManifests)
|
||||
router.GET("/status", wrapper.GetStatus)
|
||||
router.POST(baseURL+"/compose", wrapper.PostCompose)
|
||||
router.GET(baseURL+"/compose/:id", wrapper.GetComposeId)
|
||||
router.GET(baseURL+"/compose/:id/logs", wrapper.GetComposeIdLogs)
|
||||
router.GET(baseURL+"/compose/:id/manifests", wrapper.GetComposeIdManifests)
|
||||
router.GET(baseURL+"/status", wrapper.GetStatus)
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue