wrapper

package
v0.0.0-...-7472649 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapRequest

func WrapRequest(obj interface{}) http.HandlerFunc

Types

type BodyDecoder

type BodyDecoder interface {
	DecodeBody(body io.ReadCloser, target interface{}, obj interface{}) error
}

BodyDecoder is required for structures with a `Body` field

type ErrorHandlerInterface

type ErrorHandlerInterface interface {
	HandleError(context.Context, http.ResponseWriter, error)
}

type HandlerInterface

type HandlerInterface interface {
	Handle(context.Context, http.ResponseWriter) error
}

type HandlerWithRequestInterface

type HandlerWithRequestInterface interface {
	Handle(context.Context, *http.Request, http.ResponseWriter) error
}

type ResponseEncoder

type ResponseEncoder interface {
	EncodeResponse(ctx context.Context, out http.ResponseWriter, obj interface{})
}

ResponseEncoder is required for structures with a `Response` field

Jump to

Keyboard shortcuts

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