RouterReport

package
v5.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionCreate

func ActionCreate(c *gin.Context, logMsg string, codeMsg string, err error, data interface{})

func ActionCreateNoData

func ActionCreateNoData(c *gin.Context, logMsg string, codeMsg string, err error)

func ActionDelete

func ActionDelete(c *gin.Context, logMsg string, codeMsg string, err error)

func ActionUpdate

func ActionUpdate(c *gin.Context, logMsg string, codeMsg string, err error)

func BaseBool

func BaseBool(c *gin.Context, code string, b bool, errMsg string)

反馈成功或失败

func BaseCustomMsg

func BaseCustomMsg(c *gin.Context, status bool, code string, msg string)

BaseCustomMsg 反馈自定义内容

func BaseData

func BaseData(c *gin.Context, data interface{})

反馈一般数据

func BaseDataList

func BaseDataList(c *gin.Context, count int64, data interface{})

反馈列队数据

func BaseError

func BaseError(c *gin.Context, code string, msg string)

反馈错误

func BaseSuccess

func BaseSuccess(c *gin.Context)

反馈成功

func Data

func Data(c *gin.Context, errMessage string, codeMsg string, err error, data interface{})

Data 通用反馈单一数据

func DataList

func DataList(c *gin.Context, errMessage string, codeMsg string, err error, dataList interface{}, dataCount int64)

DataList 通用反馈列表方案

func DataNoErr

func DataNoErr(c *gin.Context, errMessage string, codeMsg string, err error, data interface{})

func ErrorBadRequest

func ErrorBadRequest(c *gin.Context, code string, codeMsg string)

ErrorBadRequest 反馈错误但不带JSON重新标定

func ErrorLog

func ErrorLog(c *gin.Context, message string, err error, code string, codeMsg string)

ErrorLog 反馈错误并抛出日志

func WarnLog

func WarnLog(c *gin.Context, message string, err error, code string, codeMsg string)

WarnLog 反馈警告并抛出错误

Types

type DataType

type DataType struct {
	//错误信息
	Status bool `json:"status"`
	//错误信息
	Code string `json:"code"`
	//错误描述
	Msg string `json:"msg"`
	//数据个数
	Count int64 `json:"count"`
	//数据集合
	Data interface{} `json:"data"`
}

通用数据反馈头

Jump to

Keyboard shortcuts

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