result

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpFailed

func HttpFailed(ctx *gin.Context, err error)

func HttpResult

func HttpResult(ctx *gin.Context, data interface{}, err error)

func HttpSuccess

func HttpSuccess(ctx *gin.Context, data interface{})

func ParamError

func ParamError(ctx *gin.Context, err error)

Types

type PageResult

type PageResult struct {
	List     interface{} `json:"list"`
	Total    int64       `json:"total"`
	Page     int         `json:"page"`
	PageSize int         `json:"pageSize"`
}

PageResult @Description: 返回翻页数据

type Response

type Response struct {
	Code uint        `json:"code"`
	Data interface{} `json:"data,omitempty"`
	Msg  string      `json:"msg,omitempty"`
}

func Failed

func Failed(errCode uint, errMsg string) *Response

func Success

func Success(data interface{}) *Response

Jump to

Keyboard shortcuts

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