adapter

package module
v0.0.0-...-9446fd8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(op *huma.Operation, req *http.Request, w http.ResponseWriter) huma.Context

NewContext creates a new Huma context from an HTTP request and response.

func Unwrap

func Unwrap(ctx huma.Context) (*http.Request, http.ResponseWriter)

Unwrap extracts the underlying HTTP request and response writer from a Huma context. If passed a context from a different adapter it will panic.

Types

type Adapter

type Adapter struct {
	http.Handler
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(handler http.Handler, router router) *Adapter

func (*Adapter) Handle

func (a *Adapter) Handle(op *huma.Operation, handler func(huma.Context))

Jump to

Keyboard shortcuts

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