e

package
v0.0.0-...-d402f94 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success             = 200 // 通用模块
	InternalServerError = 500
	InvalidParams       = 400

	ErrorUpdate          = 10101 // 常用模块
	ErrorInsert          = 10102
	ErrorDelete          = 10103
	ErrorQuery           = 10104
	ErrorVerifyCode      = 10105
	ErrorExistTag        = 10001
	ErrorNotExistTag     = 10002
	ErrorNotExistArticle = 10003

	Auth                  = 20100 // 登录用户模块
	AuthCheckTokenFail    = 20001
	AuthCheckTokenTimeout = 20002
	AuthToken             = 20003

	AuthUserPasswordError   = 20101
	AuthFailedGenerateToken = 20102
	AuthLoginSuccess        = 20103
	AuthSignInSuccess       = 20104
	AuthTokenNoEmpty        = 20105
	AuthFail                = 20106
)

Variables

View Source
var MsgFlags = map[int]string{
	Success:             "操作成功",
	InternalServerError: "操作失败",
	InvalidParams:       "请求参数错误",

	ErrorInsert:          "新增失败",
	ErrorUpdate:          "修改失败",
	ErrorDelete:          "删除失败",
	ErrorQuery:           "查询失败",
	ErrorVerifyCode:      "图片验证码错误",
	ErrorExistTag:        "已存在该标签名称",
	ErrorNotExistTag:     "该标签不存在",
	ErrorNotExistArticle: "该文章不存在",

	Auth:                    "Token错误",
	AuthToken:               "Token生成失败",
	AuthUserPasswordError:   "用户名密码不正确",
	AuthFailedGenerateToken: "生成token失败",
	AuthLoginSuccess:        "登录成功",
	AuthSignInSuccess:       "注册成功",
	AuthTokenNoEmpty:        "Token不能为空",
	AuthCheckTokenFail:      "Token鉴权失败",
	AuthCheckTokenTimeout:   "Token已超时",
	AuthFail:                "演示模式,权限不足",
}

Functions

func Msg

func Msg(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