kongchuanhujiao

package
v1.3.19-beta.6aa12b39 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultSuccResp = &Response{Message: "ok"}               // DefaultSuccResp 默认成功响应
	DefaultErrResp  = &Response{Status: 1, Message: "服务器错误"} // DefaultErrResp 默认错误响应
)

Functions

This section is empty.

Types

type Response

type Response struct {
	Status  uint16      `json:"status"`  // 状态码
	Message string      `json:"message"` // 消息
	Data    interface{} `json:"data"`    // 数据
}

Response 响应

func GenerateErrResp

func GenerateErrResp(s uint16, msg string) *Response

GenerateErrResp 生成错误响应 返回带状态码和信息的响应

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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