response

package
v0.0.0-...-6562851 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ERR

func ERR(ctx *gin.Context, v interface{})

func OK

func OK(ctx *gin.Context, v interface{})

func SystemERR

func SystemERR(ctx *gin.Context, v interface{})

Types

type JsonResult

type JsonResult struct {
	Rows    interface{} `json:"rows"`
	Code    int         `json:"code"`
	Message interface{} `json:"message"`
}

func NewJsonResult

func NewJsonResult(code int, message interface{}, rows interface{}) *JsonResult

type PageResult

type PageResult struct {
	Rows     interface{} `json:"rows"`
	Code     int         `json:"code"`
	Total    int64       `json:"total"`
	PageNum  int         `json:"page_num"`
	PageSize int         `json:"page_size"`
}

func NewPageResult

func NewPageResult(code int, total int64, pageNum int, pageSize int, rows interface{}) *PageResult

type ResultFunc

type ResultFunc func(result interface{}) func(output output)

func Resp

func Resp(ctx *gin.Context) ResultFunc

Jump to

Keyboard shortcuts

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