response

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorAuthFail

func ErrorAuthFail(c *gin.Context)

权限校验失败

func ErrorParam

func ErrorParam(c *gin.Context, wrongParam interface{})

参数校验错误

func ErrorSystem

func ErrorSystem(c *gin.Context, msg string, data interface{})

系统执行代码错误

func Fail

func Fail(c *gin.Context, dataCode int, msg string, data interface{}, logs interface{})

失败的业务逻辑

func ReturnJson

func ReturnJson(Context *gin.Context, httpCode int, dataCode int, msg string, data interface{}, logs interface{})

func ReturnJsonFromString

func ReturnJsonFromString(Context *gin.Context, httpCode int, jsonStr string)

将json字符窜以标准json格式返回(例如,从redis读取json、格式的字符串,返回给浏览器json格式)

func Success

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

直接返回成功

Types

This section is empty.

Jump to

Keyboard shortcuts

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