ecode

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: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success = 0
	Error   = 600
	// 验证
	AccountException       = 400
	Unauthorized           = 401
	LoginFailed            = 402
	PermissionDenied       = 403
	PageNotFound           = 404
	ValidatesRequestsError = 414
	// 查询
	ResultEmpty    = 700
	OrmUpdateError = 701
	OrmCreateError = 702
	ParamsError    = 707
)

Variables

View Source
var MessageMap = map[int]string{
	Success: "success",
	Error:   "服务端异常",

	AccountException:       "账号异常",
	Unauthorized:           "未授权:请登录",
	LoginFailed:            "用户名或密码错误",
	PermissionDenied:       "权限不足",
	PageNotFound:           "404 Not Found",
	ValidatesRequestsError: "表单验证错误",

	ResultEmpty:    "数据为空",
	OrmUpdateError: "参数错误,数据无法更新",
	OrmCreateError: "参数错误,数据无法创建",
	ParamsError:    "参数错误",
}

Functions

func GetMsg

func GetMsg(code int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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