gin

package
v1.3.21 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT, Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(handler http.HandlerFunc) gin.HandlerFunc

func Converts

func Converts(handlers []http.HandlerFunc) []gin.HandlerFunc

func FromStdWithNext

func FromStdWithNext(h func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)) gin.HandlerFunc

func HandlerWrap

func HandlerWrap[REQ, RES any](service Service[*REQ, *RES]) gin.HandlerFunc

func HandlerWrapGRPC added in v1.3.12

func HandlerWrapGRPC[REQ, RES any](service types.GrpcService[*REQ, *RES]) gin.HandlerFunc

func Wrap

func Wrap(handler interface{}) gin.HandlerFunc

Wrap converts native http.Handler & http.HandlerFunc to gin.HandlerFunc.

Supported form types:

.Wrap(h http.Handler)
.Wrap(func(w http.ResponseWriter, r *http.Request))
.Wrap(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc))

Types

type Service added in v1.3.9

type Service[REQ, RES any] func(*gin.Context, REQ) (RES, *httpx.ErrResp)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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