error

package
v0.0.0-...-b03bf0d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS_CODE = 200   //成功的状态码
	FAIL_CODE    = 30000 //失败的状态码
)

Variables

This section is empty.

Functions

func ResFail

func ResFail(c *gin.Context, msg string)

ResFail 响应失败

func ResJSON

func ResJSON(c *gin.Context, status int, v interface{})

ResJSON 响应JSON数据

func ResSuccess

func ResSuccess(c *gin.Context, v interface{})

ResSuccess 响应成功

Types

type ResponseModel

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

ResponseModel ...

type ResponseModelBase

type ResponseModelBase struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

ResponseModelBase ...

Jump to

Keyboard shortcuts

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