output

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

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

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

type ProTableResult added in v0.4.0

type ProTableResult struct {
	Success bool        `json:"success"`
	Total   int         `json:"total"`
	Data    interface{} `json:"data"`
}

pro-table-data json

Jump to

Keyboard shortcuts

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