handler

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 10 Imported by: 2

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 RespErr

func RespErr(ctx *gin.Context, err error)

func RespErrMsg

func RespErrMsg(ctx *gin.Context, msg string)

func RespErrRep

func RespErrRep(ctx *gin.Context, rep *errorcode.ErrRep)

func RespErrcode

func RespErrcode(ctx *gin.Context, code errorcode.ErrCode)

func Response

func Response(ctx *gin.Context, code errorcode.ErrCode, msg string, data interface{})

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 ExportService

type ExportService struct{}

Jump to

Keyboard shortcuts

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