Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TagListFail = NewError(20001000, "标签列表获取失败") TagDetailFail = NewError(20001001, "标签详情获取失败") TagCreateFail = NewError(20001002, "标签创建失败") TagUpdateFail = NewError(20001003, "标签更新失败") TagDeleteFail = NewError(20001004, "标签删除失败") ArticleListFail = NewError(20001010, "文章列表获取失败") ArticleDetailFail = NewError(20001011, "文章详情获取失败") ArticleCreateFail = NewError(20001012, "文章创建失败") ArticleUpdateFail = NewError(20001013, "文章更新失败") ArticleDeleteFail = NewError(20001014, "文章删除失败") CommentListFail = NewError(20001020, "评论列表获取失败") CommentDetailFail = NewError(20001021, "评论详情获取失败") CommentCreateFail = NewError(20001022, "评论创建失败") CommentUpdateFail = NewError(20001023, "评论更新失败") CommentDeleteFail = NewError(20001024, "评论删除失败") UserListFail = NewError(20001030, "用户列表获取失败") UserDetailFail = NewError(20001031, "用户详情获取失败") UserCreateFail = NewError(20001032, "用户创建失败") UserUpdateFail = NewError(20001033, "用户更新失败") UserDeleteFail = NewError(20001034, "用户删除失败") UserPwdConfirmFail = NewError(20001035, "两次输入的密码不一样") UserOldPwdError = NewError(20001036, "原密码不正确") UploadFileFail = NewError(20002001, "上传文件失败") )
View Source
var ( Success = NewError(200, "成功") ServerError = NewError(10000000, "服务内部错误") InvalidParams = NewError(10000001, "参数错误") RecordNotFound = NewError(10000002, "记录不存在") TooManyRequests = NewError(10000003, "请求过多") AuthTokenGenerateFail = NewError(10000013, "登陆授权失败,Token生成失败") AuthPwdNotCorrect = NewError(10000014, "登陆授权失败,用户名或密码错误") AuthUserNotExists = NewError(10000015, "登陆授权失败,找不到对应用户") AuthRegisterFail = NewError(10000016, "注册失败") AuthUsernameExists = NewError(10000017, "注册失败,用户名已被使用") )
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (*Error) StatusCode ¶
func (*Error) WithDetails ¶
Click to show internal directories.
Click to hide internal directories.