humagin

package
v2.32.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 10 Imported by: 3

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 *gin.Engine, config huma.Config) huma.API

func NewWithGroup added in v2.11.0

func NewWithGroup(r *gin.Engine, g *gin.RouterGroup, config huma.Config) huma.API

NewWithGroup creates a new Huma API using the provided Gin router and group, letting you mount the API at a sub-path. Can be used in combination with the `OpenAPI.Servers` field to set the correct base URL for the API / docs / schemas / etc.

func Unwrap added in v2.30.0

func Unwrap(ctx huma.Context) *gin.Context

Unwrap extracts the underlying Gin context from a Huma context. If passed a context from a different adapter it will panic.

Types

type Router added in v2.11.0

type Router interface {
	Handle(string, string, ...gin.HandlerFunc) gin.IRoutes
}

Router is an interface that wraps the Gin router's Handle method.

Jump to

Keyboard shortcuts

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