response

package
v0.0.0-...-3e386e2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err

func Err(c *gin.Context, errMsg ErrMsg)

错误响应

func Ok

func Ok(c *gin.Context, data interface{})

成功响应

Types

type ErrMsg

type ErrMsg struct {
	Code   int
	Error  error
	Result interface{}
}

type ListsResult

type ListsResult struct {
	Field      interface{} `json:"field"`
	Data       interface{} `json:"data"`
	Pagination interface{} `json:"pagination"`
}

分页列表结果

type Response

type Response struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Result  interface{} `json:"result"`
}

Jump to

Keyboard shortcuts

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