response

package
v0.0.0-...-efd361b Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoErr         = ErrMsg{2000, "请求成功"}
	AuthErr       = ErrMsg{4001, "认证错误"}
	AuthExpireErr = ErrMsg{4002, "token 过期,请刷新token"}
	AuthActionErr = ErrMsg{4003, "权限错误"}
	SystemErr     = ErrMsg{5000, "系统错误,请联系管理员"}
	DataEmptyErr  = ErrMsg{5001, "数据为空"}
	TokenCacheErr = ErrMsg{5002, "TOKEN CACHE 错误"}
)

Functions

This section is empty.

Types

type ErrMsg

type ErrMsg struct {
	Code int64
	Msg  string
}

type MoreResponse

type MoreResponse struct {
	Data  interface{} `json:"data"`
	Total int         `json:"total"`
}

type Response

type Response struct {
	Code int64       `json:"code"`
	Msg  interface{} `json:"msg"`
	Data interface{} `json:"data"`
}

func NewResponse

func NewResponse(code int64, objects interface{}, msg string) *Response

Jump to

Keyboard shortcuts

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