response

package
v0.0.0-...-5d42812 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BusinessFail

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

func Fail

func Fail(c *gin.Context, errorCode int, msg string)

func FailByError

func FailByError(c *gin.Context, error global.CustomError)

func ServerError

func ServerError(c *gin.Context, err interface{})

func Success

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

func TokenFail

func TokenFail(c *gin.Context)

func ValidateFail

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

Types

type Response

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

Jump to

Keyboard shortcuts

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