gen

package
v0.0.0-...-f0d1bbf Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package gen provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Package gen contains generated code for the file API.

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

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 DeleteFileByName200JSONResponse

type DeleteFileByName200JSONResponse FileDeleteResponse

func (DeleteFileByName200JSONResponse) VisitDeleteFileByNameResponse

func (response DeleteFileByName200JSONResponse) VisitDeleteFileByNameResponse(w http.ResponseWriter) error

type DeleteFileByName400JSONResponse

type DeleteFileByName400JSONResponse externalRef0.ErrorResponse

func (DeleteFileByName400JSONResponse) VisitDeleteFileByNameResponse

func (response DeleteFileByName400JSONResponse) VisitDeleteFileByNameResponse(w http.ResponseWriter) error

type DeleteFileByName401JSONResponse

type DeleteFileByName401JSONResponse externalRef0.ErrorResponse

func (DeleteFileByName401JSONResponse) VisitDeleteFileByNameResponse

func (response DeleteFileByName401JSONResponse) VisitDeleteFileByNameResponse(w http.ResponseWriter) error

type DeleteFileByName403JSONResponse

type DeleteFileByName403JSONResponse externalRef0.ErrorResponse

func (DeleteFileByName403JSONResponse) VisitDeleteFileByNameResponse

func (response DeleteFileByName403JSONResponse) VisitDeleteFileByNameResponse(w http.ResponseWriter) error

type DeleteFileByName404JSONResponse

type DeleteFileByName404JSONResponse externalRef0.ErrorResponse

func (DeleteFileByName404JSONResponse) VisitDeleteFileByNameResponse

func (response DeleteFileByName404JSONResponse) VisitDeleteFileByNameResponse(w http.ResponseWriter) error

type DeleteFileByName500JSONResponse

type DeleteFileByName500JSONResponse externalRef0.ErrorResponse

func (DeleteFileByName500JSONResponse) VisitDeleteFileByNameResponse

func (response DeleteFileByName500JSONResponse) VisitDeleteFileByNameResponse(w http.ResponseWriter) error

type DeleteFileByNameRequestObject

type DeleteFileByNameRequestObject struct {
	Name FileName `json:"name"`
}

type DeleteFileByNameResponseObject

type DeleteFileByNameResponseObject interface {
	VisitDeleteFileByNameResponse(w http.ResponseWriter) error
}

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 ErrorResponse

type ErrorResponse = externalRef0.ErrorResponse

ErrorResponse defines model for ErrorResponse.

type FileDeleteResponse

type FileDeleteResponse struct {
	// Deleted Whether the file was deleted.
	Deleted bool `json:"deleted"`

	// Name The name of the deleted file.
	Name string `json:"name"`
}

FileDeleteResponse defines model for FileDeleteResponse.

type FileInfo

type FileInfo struct {
	// ContentType How the file should be treated during deploy (raw or template).
	ContentType string `json:"content_type"`

	// Name The name of the file.
	Name string `json:"name"`

	// Sha256 SHA-256 hash of the file content.
	Sha256 string `json:"sha256"`

	// Size File size in bytes.
	Size int `json:"size"`
}

FileInfo defines model for FileInfo.

type FileInfoResponse

type FileInfoResponse struct {
	// ContentType How the file should be treated during deploy (raw or template).
	ContentType string `json:"content_type"`

	// Name The name of the file.
	Name string `json:"name"`

	// Sha256 SHA-256 hash of the file content.
	Sha256 string `json:"sha256"`

	// Size File size in bytes.
	Size int `json:"size"`
}

FileInfoResponse defines model for FileInfoResponse.

type FileListResponse

type FileListResponse struct {
	// Files List of stored files.
	Files []FileInfo `json:"files"`

	// Total Total number of files.
	Total int `json:"total"`
}

FileListResponse defines model for FileListResponse.

type FileName

type FileName = string

FileName defines model for FileName.

type FileUploadResponse

type FileUploadResponse struct {
	// Changed Whether the file content changed. False when the Object Store already held an object with the same SHA-256 digest.
	Changed bool `json:"changed"`

	// ContentType How the file should be treated during deploy (raw or template).
	ContentType string `json:"content_type"`

	// Name The name of the uploaded file.
	Name string `json:"name"`

	// Sha256 SHA-256 hash of the file content.
	Sha256 string `json:"sha256"`

	// Size File size in bytes.
	Size int `json:"size"`
}

FileUploadResponse defines model for FileUploadResponse.

type GetFileByName200JSONResponse

type GetFileByName200JSONResponse FileInfoResponse

func (GetFileByName200JSONResponse) VisitGetFileByNameResponse

func (response GetFileByName200JSONResponse) VisitGetFileByNameResponse(w http.ResponseWriter) error

type GetFileByName400JSONResponse

type GetFileByName400JSONResponse externalRef0.ErrorResponse

func (GetFileByName400JSONResponse) VisitGetFileByNameResponse

func (response GetFileByName400JSONResponse) VisitGetFileByNameResponse(w http.ResponseWriter) error

type GetFileByName401JSONResponse

type GetFileByName401JSONResponse externalRef0.ErrorResponse

func (GetFileByName401JSONResponse) VisitGetFileByNameResponse

func (response GetFileByName401JSONResponse) VisitGetFileByNameResponse(w http.ResponseWriter) error

type GetFileByName403JSONResponse

type GetFileByName403JSONResponse externalRef0.ErrorResponse

func (GetFileByName403JSONResponse) VisitGetFileByNameResponse

func (response GetFileByName403JSONResponse) VisitGetFileByNameResponse(w http.ResponseWriter) error

type GetFileByName404JSONResponse

type GetFileByName404JSONResponse externalRef0.ErrorResponse

func (GetFileByName404JSONResponse) VisitGetFileByNameResponse

func (response GetFileByName404JSONResponse) VisitGetFileByNameResponse(w http.ResponseWriter) error

type GetFileByName500JSONResponse

type GetFileByName500JSONResponse externalRef0.ErrorResponse

func (GetFileByName500JSONResponse) VisitGetFileByNameResponse

func (response GetFileByName500JSONResponse) VisitGetFileByNameResponse(w http.ResponseWriter) error

type GetFileByNameRequestObject

type GetFileByNameRequestObject struct {
	Name FileName `json:"name"`
}

type GetFileByNameResponseObject

type GetFileByNameResponseObject interface {
	VisitGetFileByNameResponse(w http.ResponseWriter) error
}

type GetFiles200JSONResponse

type GetFiles200JSONResponse FileListResponse

func (GetFiles200JSONResponse) VisitGetFilesResponse

func (response GetFiles200JSONResponse) VisitGetFilesResponse(w http.ResponseWriter) error

type GetFiles401JSONResponse

type GetFiles401JSONResponse externalRef0.ErrorResponse

func (GetFiles401JSONResponse) VisitGetFilesResponse

func (response GetFiles401JSONResponse) VisitGetFilesResponse(w http.ResponseWriter) error

type GetFiles403JSONResponse

type GetFiles403JSONResponse externalRef0.ErrorResponse

func (GetFiles403JSONResponse) VisitGetFilesResponse

func (response GetFiles403JSONResponse) VisitGetFilesResponse(w http.ResponseWriter) error

type GetFiles500JSONResponse

type GetFiles500JSONResponse externalRef0.ErrorResponse

func (GetFiles500JSONResponse) VisitGetFilesResponse

func (response GetFiles500JSONResponse) VisitGetFilesResponse(w http.ResponseWriter) error

type GetFilesRequestObject

type GetFilesRequestObject struct {
}

type GetFilesResponseObject

type GetFilesResponseObject interface {
	VisitGetFilesResponse(w http.ResponseWriter) error
}

type PostFile201JSONResponse

type PostFile201JSONResponse FileUploadResponse

func (PostFile201JSONResponse) VisitPostFileResponse

func (response PostFile201JSONResponse) VisitPostFileResponse(w http.ResponseWriter) error

type PostFile400JSONResponse

type PostFile400JSONResponse externalRef0.ErrorResponse

func (PostFile400JSONResponse) VisitPostFileResponse

func (response PostFile400JSONResponse) VisitPostFileResponse(w http.ResponseWriter) error

type PostFile401JSONResponse

type PostFile401JSONResponse externalRef0.ErrorResponse

func (PostFile401JSONResponse) VisitPostFileResponse

func (response PostFile401JSONResponse) VisitPostFileResponse(w http.ResponseWriter) error

type PostFile403JSONResponse

type PostFile403JSONResponse externalRef0.ErrorResponse

func (PostFile403JSONResponse) VisitPostFileResponse

func (response PostFile403JSONResponse) VisitPostFileResponse(w http.ResponseWriter) error

type PostFile409JSONResponse

type PostFile409JSONResponse externalRef0.ErrorResponse

func (PostFile409JSONResponse) VisitPostFileResponse

func (response PostFile409JSONResponse) VisitPostFileResponse(w http.ResponseWriter) error

type PostFile500JSONResponse

type PostFile500JSONResponse externalRef0.ErrorResponse

func (PostFile500JSONResponse) VisitPostFileResponse

func (response PostFile500JSONResponse) VisitPostFileResponse(w http.ResponseWriter) error

type PostFileMultipartBody

type PostFileMultipartBody struct {
	// ContentType How the file should be treated during deploy. "raw" writes bytes as-is; "template" renders with Go text/template and agent facts.
	ContentType *PostFileMultipartBodyContentType `json:"content_type,omitempty"`

	// File The file content.
	File openapi_types.File `json:"file"`

	// Name The name of the file in the Object Store.
	Name string `json:"name"`
}

PostFileMultipartBody defines parameters for PostFile.

type PostFileMultipartBodyContentType

type PostFileMultipartBodyContentType string

PostFileMultipartBodyContentType defines parameters for PostFile.

const (
	Raw      PostFileMultipartBodyContentType = "raw"
	Template PostFileMultipartBodyContentType = "template"
)

Defines values for PostFileMultipartBodyContentType.

type PostFileMultipartRequestBody

type PostFileMultipartRequestBody PostFileMultipartBody

PostFileMultipartRequestBody defines body for PostFile for multipart/form-data ContentType.

type PostFileParams

type PostFileParams struct {
	// Force When true, bypass the digest check and always write the file. Returns changed=true regardless of whether the content differs from the existing object.
	Force *bool `form:"force,omitempty" json:"force,omitempty" validate:"omitempty"`
}

PostFileParams defines parameters for PostFile.

type PostFileRequestObject

type PostFileRequestObject struct {
	Params PostFileParams
	Body   *multipart.Reader
}

type PostFileResponseObject

type PostFileResponseObject interface {
	VisitPostFileResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// List stored files
	// (GET /file)
	GetFiles(ctx echo.Context) error
	// Upload a file
	// (POST /file)
	PostFile(ctx echo.Context, params PostFileParams) error
	// Delete a file
	// (DELETE /file/{name})
	DeleteFileByName(ctx echo.Context, name FileName) error
	// Get file metadata
	// (GET /file/{name})
	GetFileByName(ctx echo.Context, name FileName) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) DeleteFileByName

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

DeleteFileByName converts echo context to params.

func (*ServerInterfaceWrapper) GetFileByName

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

GetFileByName converts echo context to params.

func (*ServerInterfaceWrapper) GetFiles

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

GetFiles converts echo context to params.

func (*ServerInterfaceWrapper) PostFile

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

PostFile converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// List stored files
	// (GET /file)
	GetFiles(ctx context.Context, request GetFilesRequestObject) (GetFilesResponseObject, error)
	// Upload a file
	// (POST /file)
	PostFile(ctx context.Context, request PostFileRequestObject) (PostFileResponseObject, error)
	// Delete a file
	// (DELETE /file/{name})
	DeleteFileByName(ctx context.Context, request DeleteFileByNameRequestObject) (DeleteFileByNameResponseObject, error)
	// Get file metadata
	// (GET /file/{name})
	GetFileByName(ctx context.Context, request GetFileByNameRequestObject) (GetFileByNameResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

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