resp

package
v0.0.0-...-585f28f Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIError

func APIError(err error, c echo.Context) error

APIError 返回API错误

func ListDataResponse

func ListDataResponse(arr interface{}, total int64, c echo.Context) error

func OneDataResponse

func OneDataResponse(data interface{}, c echo.Context) error

func OperateSuccess

func OperateSuccess(c echo.Context) error

Types

type DataResponse

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

type ListData

type ListData struct {
	Total int64       `json:"total"`
	List  interface{} `json:"list" `
}

type ListResponse

type ListResponse struct {
	Code int      `json:"code"`
	Msg  string   `json:"msg"`
	Data ListData `json:"data"`
}

Jump to

Keyboard shortcuts

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