response

package
v0.0.0-...-d5480cd Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS = http.StatusOK
	ERROR   = http.StatusBadRequest
)

通过了middleware

未通过middleware

Variables

This section is empty.

Functions

func BadReq

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

func Fail

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

func Success

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

func Unauthorized

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

Types

type PageResult

type PageResult struct {
	List     interface{} `json:"list"`
	Total    int64       `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"pageSize"`
}

type Response

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

Jump to

Keyboard shortcuts

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