humamux

package
v2.38.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MultipartMaxMemory int64 = 8 * 1024

MultipartMaxMemory is the maximum memory to use when parsing multipart form data.

Functions

func New

func New(r *mux.Router, config huma.Config, options ...Option) huma.API

func NewAdapter added in v2.37.1

func NewAdapter(r *mux.Router, options ...Option) huma.Adapter

NewAdapter creates a new adapter for the given Gorilla mux.

func NewContext added in v2.37.1

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

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

func Unwrap added in v2.30.0

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 Option added in v2.33.0

type Option func(*options)

func WithRouteCustomizer added in v2.33.0

func WithRouteCustomizer(f func(op *huma.Operation, r *mux.Route)) Option

WithRouteCustomizer allows customizing a mux route, like adding HTTP middlewares.

Jump to

Keyboard shortcuts

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