gin

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT, Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind added in v1.7.6

func Bind(ctx *gin.Context, obj any) error

func Convert

func Convert(handler 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, RESP any](service Service[*REQ, *RESP]) gin.HandlerFunc

func HandlerWrapGRPC added in v1.3.12

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

func Respond added in v1.6.6

func Respond(ctx *gin.Context, v any)

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 RequestSource added in v1.7.6

type RequestSource struct {
	*gin.Context
}

func (RequestSource) Body added in v1.7.7

func (RequestSource) Header added in v1.7.6

func (RequestSource) Query added in v1.7.6

func (RequestSource) Uri added in v1.7.6

func (s RequestSource) Uri() strstruct.Getter

type Service added in v1.3.9

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

Jump to

Keyboard shortcuts

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