app

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest added in v0.2.0

func BadRequest(c *gin.Context, errCode int, err ...error)

BadRequest bad request response

func BizFailed

func BizFailed(c *gin.Context, errCode int, err ...error)

BizFailed business failed response

func HttpResponse

func HttpResponse(c *gin.Context, httpCode int, msgCode int, data interface{})

HttpResponse common response

func ServerFailed

func ServerFailed(c *gin.Context, errCode int, err ...error)

ServerFailed server internal failed response

func Success

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

Success response a success

func Unauthorized

func Unauthorized(c *gin.Context, errCode int, err ...error)

Unauthorized authorized failed response

Types

type ApiJson

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

type ErrJson

type ErrJson struct {
	Err []string `json:"err"`
}

Directories

Path Synopsis
e

Jump to

Keyboard shortcuts

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