response

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortWithJSONFail

func AbortWithJSONFail(c *gin.Context, ecode int, msg string, data interface{})

AbortWithJSONFail .

func AbortWithJSONResponse

func AbortWithJSONResponse(c *gin.Context, httpStatus int, ecode int, msg string, data interface{})

AbortWithJSONResponse .

func AbortWithJSONSuccess

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

AbortWithJSONSuccess .

func JSONFail

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

JSONFail .

func JSONResponse

func JSONResponse(c *gin.Context, httpStatus int, ecode int, msg string, data interface{})

JSONResponse .

func JSONSuccess

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

JSONSuccess .

Types

type Resp

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

Resp .

Jump to

Keyboard shortcuts

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