result

package
v0.0.0-...-1bf96ee Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CODE_SUCCESS int = 0
	CODE_ERROR   int = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultDto

type ResultDto struct {
	Code    int         `json:"code"`
	Msg     string      `json:"msg"`
	Data    interface{} `json:"data"`
	Total   int64       `json:"total"`
	Records int64       `json:"records"`
	Row     int64       `json:"row"`
}

func Error

func Error(msg string) ResultDto

* 默认失败封装

func ErrorData

func ErrorData(data interface{}) ResultDto

* 默认失败封装

func Success

func Success() ResultDto

* 默认成功封装

func SuccessData

func SuccessData(data interface{}, totals ...int64) ResultDto

Jump to

Keyboard shortcuts

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