response

package
v0.0.0-...-7e5dd20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Failed

func Failed(message string, c *gin.Context)

Failed 请求失败返回

func Success

func Success(message string, data interface{}, c *gin.Context)

Success 请求成功返回

func SuccessPage

func SuccessPage(message string, data interface{}, rows int64, c *gin.Context)

SuccessPage 请求成功返回分页结果

Types

type PageResult

type PageResult struct {
	Total int64       `json:"total"`
	List  interface{} `json:"list"`
}

PageResult 分页结果返回

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL