Discover Packages
github.com/clrainy/gin-core
response
package
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Aug 12, 2023
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Index
Constants
Variables
Functions
Json(c, httpStatus, code, data)
JsonFail(c, data)
JsonPage(c, httpCode, code, data, total, totalPage)
JsonSuccess(c, data)
Types
Source Files
Documentation
Documentation
¶
func Json(c *gin.Context, httpStatus int, code int, data interface{})
func JsonFail(c *gin.Context, data interface{})
func JsonPage(c *gin.Context, httpCode int, code int, data interface{}, total, totalPage int)
func JsonSuccess(c *gin.Context, data interface{})
type Paging
type Response
func JsonSuccess(c *gin .Context , data interface{})
JsonSuccess 响应-成功
type Paging struct {
Code int `json:"code"`
Msg string `json:"message"`
Data interface{} `json:"data"`
Total int `json:"total"`
TotalPage int `json:"totalPage"`
}
type Response struct {
Code int `json:"code"`
Msg string `json:"message"`
Data interface{} `json:"data"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.