Documentation ¶
Index ¶
- func WrapContext(ctx func(*Context), memo ...string) gin.HandlerFunc
- type Context
- func (a *Context) GetPageIndex() uint
- func (a *Context) GetPageSize() uint
- func (a *Context) GetTraceID() string
- func (a *Context) GetUserID() string
- func (a *Context) NewContext() context.Context
- func (a *Context) ParseJSON(obj interface{}) error
- func (a *Context) ResBadRequest(err error, code ...int)
- func (a *Context) ResError(err error, status int, code ...int)
- func (a *Context) ResInternalServerError(err error, code ...int)
- func (a *Context) ResList(list interface{})
- func (a *Context) ResOK()
- func (a *Context) ResPage(total int64, list interface{})
- func (a *Context) ResSuccess(obj interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapContext ¶
func WrapContext(ctx func(*Context), memo ...string) gin.HandlerFunc
WrapContext 包装上下文
Types ¶
type Context ¶
Context 定义上下文
func (*Context) ResBadRequest ¶
ResBadRequest 响应客户端请求错误
func (*Context) ResInternalServerError ¶
ResInternalServerError 响应服务器错误
Click to show internal directories.
Click to hide internal directories.