server

package
v0.0.0-...-42349e2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type CreateContainer201JSONResponse

type CreateContainer201JSONResponse Container

func (CreateContainer201JSONResponse) VisitCreateContainerResponse

func (response CreateContainer201JSONResponse) VisitCreateContainerResponse(w http.ResponseWriter) error

type CreateContainer400ApplicationProblemPlusJSONResponse

type CreateContainer400ApplicationProblemPlusJSONResponse Error

func (CreateContainer400ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse

func (response CreateContainer400ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse(w http.ResponseWriter) error

type CreateContainer401ApplicationProblemPlusJSONResponse

type CreateContainer401ApplicationProblemPlusJSONResponse Error

func (CreateContainer401ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse

func (response CreateContainer401ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse(w http.ResponseWriter) error

type CreateContainer403ApplicationProblemPlusJSONResponse

type CreateContainer403ApplicationProblemPlusJSONResponse Error

func (CreateContainer403ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse

func (response CreateContainer403ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse(w http.ResponseWriter) error

type CreateContainer409ApplicationProblemPlusJSONResponse

type CreateContainer409ApplicationProblemPlusJSONResponse Error

func (CreateContainer409ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse

func (response CreateContainer409ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse(w http.ResponseWriter) error

type CreateContainer500ApplicationProblemPlusJSONResponse

type CreateContainer500ApplicationProblemPlusJSONResponse Error

func (CreateContainer500ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse

func (response CreateContainer500ApplicationProblemPlusJSONResponse) VisitCreateContainerResponse(w http.ResponseWriter) error

type CreateContainerRequestObject

type CreateContainerRequestObject struct {
	Params CreateContainerParams
	Body   *CreateContainerJSONRequestBody
}

type CreateContainerResponseObject

type CreateContainerResponseObject interface {
	VisitCreateContainerResponse(w http.ResponseWriter) error
}

type DeleteContainer204Response

type DeleteContainer204Response struct {
}

func (DeleteContainer204Response) VisitDeleteContainerResponse

func (response DeleteContainer204Response) VisitDeleteContainerResponse(w http.ResponseWriter) error

type DeleteContainer401ApplicationProblemPlusJSONResponse

type DeleteContainer401ApplicationProblemPlusJSONResponse Error

func (DeleteContainer401ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse

func (response DeleteContainer401ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse(w http.ResponseWriter) error

type DeleteContainer403ApplicationProblemPlusJSONResponse

type DeleteContainer403ApplicationProblemPlusJSONResponse Error

func (DeleteContainer403ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse

func (response DeleteContainer403ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse(w http.ResponseWriter) error

type DeleteContainer404ApplicationProblemPlusJSONResponse

type DeleteContainer404ApplicationProblemPlusJSONResponse Error

func (DeleteContainer404ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse

func (response DeleteContainer404ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse(w http.ResponseWriter) error

type DeleteContainer500ApplicationProblemPlusJSONResponse

type DeleteContainer500ApplicationProblemPlusJSONResponse Error

func (DeleteContainer500ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse

func (response DeleteContainer500ApplicationProblemPlusJSONResponse) VisitDeleteContainerResponse(w http.ResponseWriter) error

type DeleteContainerRequestObject

type DeleteContainerRequestObject struct {
	ContainerId ContainerIdPath `json:"container_id"`
}

type DeleteContainerResponseObject

type DeleteContainerResponseObject interface {
	VisitDeleteContainerResponse(w http.ResponseWriter) error
}

type GetContainer200JSONResponse

type GetContainer200JSONResponse Container

func (GetContainer200JSONResponse) VisitGetContainerResponse

func (response GetContainer200JSONResponse) VisitGetContainerResponse(w http.ResponseWriter) error

type GetContainer401ApplicationProblemPlusJSONResponse

type GetContainer401ApplicationProblemPlusJSONResponse Error

func (GetContainer401ApplicationProblemPlusJSONResponse) VisitGetContainerResponse

func (response GetContainer401ApplicationProblemPlusJSONResponse) VisitGetContainerResponse(w http.ResponseWriter) error

type GetContainer403ApplicationProblemPlusJSONResponse

type GetContainer403ApplicationProblemPlusJSONResponse Error

func (GetContainer403ApplicationProblemPlusJSONResponse) VisitGetContainerResponse

func (response GetContainer403ApplicationProblemPlusJSONResponse) VisitGetContainerResponse(w http.ResponseWriter) error

type GetContainer404ApplicationProblemPlusJSONResponse

type GetContainer404ApplicationProblemPlusJSONResponse Error

func (GetContainer404ApplicationProblemPlusJSONResponse) VisitGetContainerResponse

func (response GetContainer404ApplicationProblemPlusJSONResponse) VisitGetContainerResponse(w http.ResponseWriter) error

type GetContainer500ApplicationProblemPlusJSONResponse

type GetContainer500ApplicationProblemPlusJSONResponse Error

func (GetContainer500ApplicationProblemPlusJSONResponse) VisitGetContainerResponse

func (response GetContainer500ApplicationProblemPlusJSONResponse) VisitGetContainerResponse(w http.ResponseWriter) error

type GetContainerRequestObject

type GetContainerRequestObject struct {
	ContainerId ContainerIdPath `json:"container_id"`
}

type GetContainerResponseObject

type GetContainerResponseObject interface {
	VisitGetContainerResponse(w http.ResponseWriter) error
}

type GetHealth200JSONResponse

type GetHealth200JSONResponse Health

func (GetHealth200JSONResponse) VisitGetHealthResponse

func (response GetHealth200JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error

type GetHealthRequestObject

type GetHealthRequestObject struct {
}

type GetHealthResponseObject

type GetHealthResponseObject interface {
	VisitGetHealthResponse(w http.ResponseWriter) error
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ListContainers200JSONResponse

type ListContainers200JSONResponse ContainerList

func (ListContainers200JSONResponse) VisitListContainersResponse

func (response ListContainers200JSONResponse) VisitListContainersResponse(w http.ResponseWriter) error

type ListContainers400ApplicationProblemPlusJSONResponse

type ListContainers400ApplicationProblemPlusJSONResponse Error

func (ListContainers400ApplicationProblemPlusJSONResponse) VisitListContainersResponse

func (response ListContainers400ApplicationProblemPlusJSONResponse) VisitListContainersResponse(w http.ResponseWriter) error

type ListContainers401ApplicationProblemPlusJSONResponse

type ListContainers401ApplicationProblemPlusJSONResponse Error

func (ListContainers401ApplicationProblemPlusJSONResponse) VisitListContainersResponse

func (response ListContainers401ApplicationProblemPlusJSONResponse) VisitListContainersResponse(w http.ResponseWriter) error

type ListContainers403ApplicationProblemPlusJSONResponse

type ListContainers403ApplicationProblemPlusJSONResponse Error

func (ListContainers403ApplicationProblemPlusJSONResponse) VisitListContainersResponse

func (response ListContainers403ApplicationProblemPlusJSONResponse) VisitListContainersResponse(w http.ResponseWriter) error

type ListContainers500ApplicationProblemPlusJSONResponse

type ListContainers500ApplicationProblemPlusJSONResponse Error

func (ListContainers500ApplicationProblemPlusJSONResponse) VisitListContainersResponse

func (response ListContainers500ApplicationProblemPlusJSONResponse) VisitListContainersResponse(w http.ResponseWriter) error

type ListContainersRequestObject

type ListContainersRequestObject struct {
	Params ListContainersParams
}

type ListContainersResponseObject

type ListContainersResponseObject interface {
	VisitListContainersResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {
	// ListContainers List Containers
	// (GET /api/v1alpha1/containers)
	ListContainers(w http.ResponseWriter, r *http.Request, params ListContainersParams)
	// CreateContainer Create Container
	// (POST /api/v1alpha1/containers)
	CreateContainer(w http.ResponseWriter, r *http.Request, params CreateContainerParams)
	// GetHealth Health Check
	// (GET /api/v1alpha1/containers/health)
	GetHealth(w http.ResponseWriter, r *http.Request)
	// DeleteContainer Delete Container
	// (DELETE /api/v1alpha1/containers/{container_id})
	DeleteContainer(w http.ResponseWriter, r *http.Request, containerId ContainerIdPath)
	// GetContainer Get Container
	// (GET /api/v1alpha1/containers/{container_id})
	GetContainer(w http.ResponseWriter, r *http.Request, containerId ContainerIdPath)
}

ServerInterface represents all server handlers.

func NewStrictHandler

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

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CreateContainer

func (siw *ServerInterfaceWrapper) CreateContainer(w http.ResponseWriter, r *http.Request)

CreateContainer operation middleware

func (*ServerInterfaceWrapper) DeleteContainer

func (siw *ServerInterfaceWrapper) DeleteContainer(w http.ResponseWriter, r *http.Request)

DeleteContainer operation middleware

func (*ServerInterfaceWrapper) GetContainer

func (siw *ServerInterfaceWrapper) GetContainer(w http.ResponseWriter, r *http.Request)

GetContainer operation middleware

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) ListContainers

func (siw *ServerInterfaceWrapper) ListContainers(w http.ResponseWriter, r *http.Request)

ListContainers operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// ListContainers List Containers
	// (GET /api/v1alpha1/containers)
	ListContainers(ctx context.Context, request ListContainersRequestObject) (ListContainersResponseObject, error)
	// CreateContainer Create Container
	// (POST /api/v1alpha1/containers)
	CreateContainer(ctx context.Context, request CreateContainerRequestObject) (CreateContainerResponseObject, error)
	// GetHealth Health Check
	// (GET /api/v1alpha1/containers/health)
	GetHealth(ctx context.Context, request GetHealthRequestObject) (GetHealthResponseObject, error)
	// DeleteContainer Delete Container
	// (DELETE /api/v1alpha1/containers/{container_id})
	DeleteContainer(ctx context.Context, request DeleteContainerRequestObject) (DeleteContainerResponseObject, error)
	// GetContainer Get Container
	// (GET /api/v1alpha1/containers/{container_id})
	GetContainer(ctx context.Context, request GetContainerRequestObject) (GetContainerResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) CreateContainer

func (_ Unimplemented) CreateContainer(w http.ResponseWriter, r *http.Request, params CreateContainerParams)

CreateContainer Create Container (POST /api/v1alpha1/containers)

func (Unimplemented) DeleteContainer

func (_ Unimplemented) DeleteContainer(w http.ResponseWriter, r *http.Request, containerId ContainerIdPath)

DeleteContainer Delete Container (DELETE /api/v1alpha1/containers/{container_id})

func (Unimplemented) GetContainer

func (_ Unimplemented) GetContainer(w http.ResponseWriter, r *http.Request, containerId ContainerIdPath)

GetContainer Get Container (GET /api/v1alpha1/containers/{container_id})

func (Unimplemented) GetHealth

func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth Health Check (GET /api/v1alpha1/containers/health)

func (Unimplemented) ListContainers

func (_ Unimplemented) ListContainers(w http.ResponseWriter, r *http.Request, params ListContainersParams)

ListContainers List Containers (GET /api/v1alpha1/containers)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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