server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 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.3.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 GetImageByToken200ApplicationovfResponse

type GetImageByToken200ApplicationovfResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (GetImageByToken200ApplicationovfResponse) VisitGetImageByTokenResponse

func (response GetImageByToken200ApplicationovfResponse) VisitGetImageByTokenResponse(w http.ResponseWriter) error

type GetImageByToken400JSONResponse

type GetImageByToken400JSONResponse externalRef0.Error

func (GetImageByToken400JSONResponse) VisitGetImageByTokenResponse

func (response GetImageByToken400JSONResponse) VisitGetImageByTokenResponse(w http.ResponseWriter) error

type GetImageByToken401JSONResponse

type GetImageByToken401JSONResponse externalRef0.Error

func (GetImageByToken401JSONResponse) VisitGetImageByTokenResponse

func (response GetImageByToken401JSONResponse) VisitGetImageByTokenResponse(w http.ResponseWriter) error

type GetImageByToken404JSONResponse

type GetImageByToken404JSONResponse externalRef0.Error

func (GetImageByToken404JSONResponse) VisitGetImageByTokenResponse

func (response GetImageByToken404JSONResponse) VisitGetImageByTokenResponse(w http.ResponseWriter) error

type GetImageByToken500JSONResponse

type GetImageByToken500JSONResponse externalRef0.Error

func (GetImageByToken500JSONResponse) VisitGetImageByTokenResponse

func (response GetImageByToken500JSONResponse) VisitGetImageByTokenResponse(w http.ResponseWriter) error

type GetImageByTokenRequestObject

type GetImageByTokenRequestObject struct {
	Token string `json:"token"`
	Name  string `json:"name"`
}

type GetImageByTokenResponseObject

type GetImageByTokenResponseObject interface {
	VisitGetImageByTokenResponse(w http.ResponseWriter) error
}

type HeadImageByToken200Response

type HeadImageByToken200Response struct {
}

func (HeadImageByToken200Response) VisitHeadImageByTokenResponse

func (response HeadImageByToken200Response) VisitHeadImageByTokenResponse(w http.ResponseWriter) error

type HeadImageByToken400JSONResponse

type HeadImageByToken400JSONResponse externalRef0.Error

func (HeadImageByToken400JSONResponse) VisitHeadImageByTokenResponse

func (response HeadImageByToken400JSONResponse) VisitHeadImageByTokenResponse(w http.ResponseWriter) error

type HeadImageByToken401JSONResponse

type HeadImageByToken401JSONResponse externalRef0.Error

func (HeadImageByToken401JSONResponse) VisitHeadImageByTokenResponse

func (response HeadImageByToken401JSONResponse) VisitHeadImageByTokenResponse(w http.ResponseWriter) error

type HeadImageByToken404JSONResponse

type HeadImageByToken404JSONResponse externalRef0.Error

func (HeadImageByToken404JSONResponse) VisitHeadImageByTokenResponse

func (response HeadImageByToken404JSONResponse) VisitHeadImageByTokenResponse(w http.ResponseWriter) error

type HeadImageByToken500JSONResponse

type HeadImageByToken500JSONResponse externalRef0.Error

func (HeadImageByToken500JSONResponse) VisitHeadImageByTokenResponse

func (response HeadImageByToken500JSONResponse) VisitHeadImageByTokenResponse(w http.ResponseWriter) error

type HeadImageByTokenRequestObject

type HeadImageByTokenRequestObject struct {
	Token string `json:"token"`
	Name  string `json:"name"`
}

type HeadImageByTokenResponseObject

type HeadImageByTokenResponseObject interface {
	VisitHeadImageByTokenResponse(w http.ResponseWriter) error
}

type Health200Response

type Health200Response struct {
}

func (Health200Response) VisitHealthResponse

func (response Health200Response) VisitHealthResponse(w http.ResponseWriter) error

type HealthRequestObject

type HealthRequestObject struct {
}

type HealthResponseObject

type HealthResponseObject interface {
	VisitHealthResponse(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 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 {

	// (GET /api/v1/image/bytoken/{token}/{name})
	GetImageByToken(w http.ResponseWriter, r *http.Request, token string, name string)

	// (HEAD /api/v1/image/bytoken/{token}/{name})
	HeadImageByToken(w http.ResponseWriter, r *http.Request, token string, name string)

	// (GET /health)
	Health(w http.ResponseWriter, r *http.Request)
}

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) GetImageByToken

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

GetImageByToken operation middleware

func (*ServerInterfaceWrapper) HeadImageByToken

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

HeadImageByToken operation middleware

func (*ServerInterfaceWrapper) Health

Health operation middleware

type Service

type Service interface {
	StrictServerInterface
}

Service is a wrapper around the generated server interface.

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 StrictServerInterface

type StrictServerInterface interface {

	// (GET /api/v1/image/bytoken/{token}/{name})
	GetImageByToken(ctx context.Context, request GetImageByTokenRequestObject) (GetImageByTokenResponseObject, error)

	// (HEAD /api/v1/image/bytoken/{token}/{name})
	HeadImageByToken(ctx context.Context, request HeadImageByTokenRequestObject) (HeadImageByTokenResponseObject, error)

	// (GET /health)
	Health(ctx context.Context, request HealthRequestObject) (HealthResponseObject, 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) GetImageByToken

func (_ Unimplemented) GetImageByToken(w http.ResponseWriter, r *http.Request, token string, name string)

(GET /api/v1/image/bytoken/{token}/{name})

func (Unimplemented) HeadImageByToken

func (_ Unimplemented) HeadImageByToken(w http.ResponseWriter, r *http.Request, token string, name string)

(HEAD /api/v1/image/bytoken/{token}/{name})

func (Unimplemented) Health

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

(GET /health)

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