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 Res(c *gin.Context, code errorcode.ErrCode, msg string, data interface{})
- func Response(ctx *gin.Context, res ...interface{})
- func Wrap(handler interface{}) gin.HandlerFunc
- type ExportService
- type File
- type H
- type HttpFile
- type ResData
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 Response ¶
先信息后数据最后状态码 入参1. data interface{},msg string,code int 2.msg,code |data默认nil 3.data,msg |code默认SUCCESS 4.msg |data默认nil code默认ERROR 5.data |msg默认"",code默认SUCCESS
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.