package
Version:
v0.0.0-...-92a1e37
Opens a new window with list of versions in this module.
Published: Mar 19, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func Json(r *ghttp.Request, code int, message string, data ...interface{})
-
func JsonExit(r *ghttp.Request, code int, 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{})
-
type JsonRes
返回标准JSON数据引导客户端跳转,并退出当前HTTP执行函数。
type JsonRes struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data"`
Redirect string `json:"redirect"`
}
数据返回通用JSON数据结构
Source Files
¶
Click to show internal directories.
Click to hide internal directories.