Documentation ¶
Index ¶
- func Convert(handler http.HandlerFunc) gin.HandlerFunc
- func Converts(handlers []http.HandlerFunc) []gin.HandlerFunc
- func FromStdWithNext(h func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)) gin.HandlerFunc
- func RespErr(ctx *gin.Context, err error)
- func RespErrMsg(ctx *gin.Context, msg string)
- func RespErrRep(ctx *gin.Context, rep *errorcode.ErrRep)
- func RespErrcode(ctx *gin.Context, code errorcode.ErrCode)
- func Response(ctx *gin.Context, code errorcode.ErrCode, msg string, data interface{})
- func Wrap(handler interface{}) gin.HandlerFunc
- type ExportService
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 RespErrMsg ¶
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{}
Click to show internal directories.
Click to hide internal directories.