e

package
v0.0.0-...-b8d1666 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheArticle  = "ARTICLE"
	CacheCategory = "CATEGORY"
	CacheTag      = "Tag"
	CacheUser     = "User"
	CacheMail     = "Mail"
	CacheComment  = "comment"
)
View Source
const (
	SUCCESS           = 200
	ERROR             = 500
	InvalidParams     = 400
	ErrorNotExistPage = 600

	ErrorNotExistArticle       = 11000
	ErrorCheckExistArticleFail = 11001
	ErrorCountArticleFail      = 11002
	ErrorGetArticlesFail       = 11003
	ErrorGetArticleFail        = 11004
	ErrorDeleteArticleFail     = 11005
	ErrorAddArticleFail        = 11006
	ErrorUpdArticleFail        = 11007

	ErrorNotExistCategory       = 12000
	ErrorCheckExistCategoryFail = 12001
	ErrorCountCategoryFail      = 12002
	ErrorGetCategoriesFail      = 12003
	ErrorGetCategoryFail        = 12004
	ErrorDeleteCategoryFail     = 12005
	ErrorAddCategoryFail        = 12006
	ErrorUpdCategoryFail        = 12007

	ErrorNotExistTag       = 13000
	ErrorCheckExistTagFail = 13001
	ErrorCountTagFail      = 13002
	ErrorGetTagsFail       = 13003
	ErrorGetTagFail        = 13004
	ErrorDeleteTagFail     = 13005
	ErrorAddTagFail        = 13006
	ErrorUpdTagFail        = 13007

	ErrorAuthCheckTokenFail    = 14000
	ErrorAuthCheckTokenTimeout = 14001
	ErrorAuthToken             = 14002
	ErrorAuth                  = 14003
	ErrorNotExistToken         = 14004
	ErrorAuthUserPwd           = 14005

	ErrorUploadSaveImageFail    = 15000
	ErrorUploadCheckImageFail   = 15001
	ErrorUploadCheckImageFormat = 15002

	ErrorNotExistUser       = 16000
	ErrorCheckExistUserFail = 16001
	ErrorCountUserFail      = 16002
	ErrorGetUsersFail       = 16003
	ErrorGetUserFail        = 16004
	ErrorDeleteUserFail     = 16005
	ErrorAddUserFail        = 16006
	ErrorUpdUserFail        = 16007

	ErrorMailCodeFail   = 17001
	ErrorMailExpireFail = 17002
	ErrorMailCode       = 17003
	ErrorMailCodeVerify = 17004
	ErrorMailExistFail  = 17005

	ErrorNotExistComment       = 18000
	ErrorCheckExistCommentFail = 18001
	ErrorCountCommentFail      = 18002
	ErrorGetCommentsFail       = 18003
	ErrorGetCommentFail        = 18004
	ErrorDeleteCommentFail     = 18005
	ErrorAddCommentFail        = 18006
	ErrorUpdCommentFail        = 18007
)

Variables

View Source
var MsgFlags = map[int]string{
	SUCCESS:           "ok",
	ERROR:             "fail",
	InvalidParams:     "请求参数错误",
	ErrorNotExistPage: "该页数不存在",

	ErrorNotExistArticle:       "该文章不存在",
	ErrorCheckExistArticleFail: "检查文章是否存在失败",
	ErrorCountArticleFail:      "统计文章失败",
	ErrorGetArticlesFail:       "获取多个文章失败",
	ErrorGetArticleFail:        "获取单个文章失败",
	ErrorDeleteArticleFail:     "删除文章失败",
	ErrorAddArticleFail:        "添加文章失败",
	ErrorUpdArticleFail:        "更新文章失败",

	ErrorNotExistCategory:       "该分类不存在",
	ErrorCheckExistCategoryFail: "检查分类是否存在失败",
	ErrorCountCategoryFail:      "统计分类失败",
	ErrorGetCategoriesFail:      "获取多个分类失败",
	ErrorGetCategoryFail:        "获取单个分类失败",
	ErrorDeleteCategoryFail:     "删除分类失败",
	ErrorAddCategoryFail:        "添加分类失败",
	ErrorUpdCategoryFail:        "更新分类失败",

	ErrorNotExistTag:       "该标签不存在",
	ErrorCheckExistTagFail: "检查标签是否存在失败",
	ErrorCountTagFail:      "统计标签失败",
	ErrorGetTagsFail:       "获取多个标签失败",
	ErrorGetTagFail:        "获取单个分类失败",
	ErrorDeleteTagFail:     "删除分类失败",
	ErrorAddTagFail:        "添加分类失败",
	ErrorUpdTagFail:        "更新分类失败",

	ErrorNotExistUser:       "该用户不存在",
	ErrorCheckExistUserFail: "检查用户是否存在失败",
	ErrorCountUserFail:      "统计用户失败",
	ErrorGetUsersFail:       "获取多个用户失败",
	ErrorGetUserFail:        "获取单个用户失败",
	ErrorDeleteUserFail:     "删除用户失败",
	ErrorAddUserFail:        "添加用户失败",
	ErrorUpdUserFail:        "更新用户失败",

	ErrorAuthCheckTokenFail:    "Token鉴权失败",
	ErrorAuthCheckTokenTimeout: "Token已超时",
	ErrorAuthToken:             "Token生成失败",
	ErrorAuth:                  "权限不足,认证失败",
	ErrorNotExistToken:         "Token无效",
	ErrorAuthUserPwd:           "账号或者密码错误",

	ErrorMailCodeFail:   "邮箱验证码发送失败",
	ErrorMailExpireFail: "验证码已过期",
	ErrorMailCode:       "验证码错误",
	ErrorMailCodeVerify: "验证码校验失败",
	ErrorMailExistFail:  "邮箱已存在,不能注册",

	ErrorUploadSaveImageFail:    "保存图片失败",
	ErrorUploadCheckImageFail:   "检查图片失败",
	ErrorUploadCheckImageFormat: "校验图片错误,图片格式或大小有问题",

	ErrorNotExistComment:       "该评论不存在",
	ErrorCheckExistCommentFail: "检查评论是否存在失败",
	ErrorCountCommentFail:      "统计评论失败",
	ErrorGetCommentsFail:       "获取多个评论失败",
	ErrorGetCommentFail:        "获取单个评论失败",
	ErrorDeleteCommentFail:     "删除评论失败",
	ErrorAddCommentFail:        "添加评论失败",
	ErrorUpdCommentFail:        "更新评论失败",
}

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