handlers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OAPIValidatorHandler

func OAPIValidatorHandler(
	ctx context.Context,
	err error,
	w http.ResponseWriter,
	_ *http.Request,
	opts md.ErrorHandlerOpts,
)

OAPIValidatorHandler is called when OAPI Required fields are missing from Request

func ParamsErrorHandler

func ParamsErrorHandler() func(w http.ResponseWriter, r *http.Request, err error)

ParamsErrorHandler is called whenever Request doesn't follow OAPI Endpoint Parameters (Path and Query) Must create RequestID and logger because middlewares weren't ran

func RequestErrorHandlerFunc

func RequestErrorHandlerFunc() func(w http.ResponseWriter, r *http.Request, err error)

RequestErrorHandlerFunc is called when Request JSON Body Decoding fails

func ResponseErrorHandlerFunc

func ResponseErrorHandlerFunc() func(w http.ResponseWriter, r *http.Request, err error)

ResponseErrorHandlerFunc is called when HTTP Handlers (Controller Functions) return invalid responses

Types

This section is empty.

Jump to

Keyboard shortcuts

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