output

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgOk        = 0
	MsgRedirect  = 302
	MsgErr       = 1
	MsgNoAuth    = 14000
	MsgNeedLogin = 10000
)

Variables

This section is empty.

Functions

func JSON

func JSON(c echo.Context, Code int, message string, data ...interface{}) error

JSON 渲染

Types

type JSONResult

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

JSONResult json

func WithData

func WithData(data interface{}) JSONResult

type Pagination

type Pagination struct {
	Total       int `json:"total"`
	CurrentPage int `json:"current_page"` // current page
}

Pagination

Jump to

Keyboard shortcuts

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