e

package
v0.0.0-...-6cf1638 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MulanPSL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS      = 200
	ERROR        = 500
	ErrParams    = 10001
	ErrToken     = 10002 //token 错误
	ErrDatabase  = 10003
	ErrRedis     = 10004
	ErrEtcd      = 10005
	ErrMarshal   = 10006
	ErrUnmarshal = 10007

	ErrAdmin   = 20001
	ErrGateway = 30001
)

Variables

View Source
var MsgFlags = map[int]string{
	SUCCESS:      "成功",
	ERROR:        "失败",
	ErrParams:    "参数请求错误",
	ErrToken:     "Token错误",
	ErrDatabase:  "DB执行错误",
	ErrRedis:     "Redis执行错误",
	ErrEtcd:      "Etcd执行错误",
	ErrMarshal:   "序列化错误",
	ErrUnmarshal: "反序列化错误",

	ErrAdmin:   "Admin模块错误",
	ErrGateway: "Gateway模块错误",
}

Functions

func GetMsg

func GetMsg(code int) string

GetMsg 获取状态码对应信息

Types

This section is empty.

Jump to

Keyboard shortcuts

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