message

package
v0.0.0-...-615e99e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Failed

func Failed(c *gin.Context, err error)

func FailedWithMsg

func FailedWithMsg(c *gin.Context, msg string, err error)

func Success

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

func SuccessWithMsg

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

func WriteResponse

func WriteResponse(c *gin.Context, err error, data interface{})

Types

type Response

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

Jump to

Keyboard shortcuts

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