Documentation
¶
Index ¶
- Constants
- func Json(r *ghttp.Request, code int, message string, data ...interface{})
- func JsonExit(r *ghttp.Request, code int, message string, data ...interface{})
- func JsonFail(r *ghttp.Request, message string, data ...interface{})
- func JsonFailExit(r *ghttp.Request, message string, data ...interface{})
- func JsonRedirect(r *ghttp.Request, code int, message, redirect string, data ...interface{})
- func JsonRedirectExit(r *ghttp.Request, code int, message, redirect string, data ...interface{})
- func JsonSuccess(r *ghttp.Request, message string, data ...interface{})
- func JsonSuccessExit(r *ghttp.Request, message string, data ...interface{})
- type JsonRes
Constants ¶
View Source
const ( //FAIL 失败 FAIL = 0 //SUCCESS 成功 SUCCESS = 1 )
自定义业务code码从-101开始
Variables ¶
This section is empty.
Functions ¶
func JsonFailExit ¶ added in v0.0.3
返回标准JSON数据并退出当前HTTP执行函数。
func JsonRedirect ¶
返回标准JSON数据引导客户端跳转。
func JsonRedirectExit ¶
返回标准JSON数据引导客户端跳转,并退出当前HTTP执行函数。
func JsonSuccess ¶ added in v0.0.3
返回标准JSON数据并退出当前HTTP执行函数。
func JsonSuccessExit ¶ added in v0.0.3
返回标准JSON数据并退出当前HTTP执行函数。
Types ¶
Click to show internal directories.
Click to hide internal directories.