errcode

package
v0.0.0-...-8edd1ee Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InternalError = &apiErrorImp{1006, "内部错误"}
View Source
var InvalidParams = &apiErrorImp{1003, "参数无效"}

系统错误

View Source
var InvalidToken = &apiErrorImp{1001, "无效的登陆会话"}
View Source
var MysqlFailed = &apiErrorImp{1005, "sql数据库错误"}
View Source
var NoToken = &apiErrorImp{1000, "无令牌请求头"}

token相关

View Source
var RedisError = &apiErrorImp{1004, "nosql数据库错误"}
View Source
var Success = &apiErrorImp{0, "ok"}

正常

View Source
var TokenExpired = &apiErrorImp{1002, "登陆会话过期"}
View Source
var UserAlreadyRegistered = &apiErrorImp{1007, "用户已注册"}
View Source
var UserDisabled = &apiErrorImp{1010, "用户已禁用"}
View Source
var UserNotExists = &apiErrorImp{1008, "用户不存在"}
View Source
var UsernameOrPasswordError = &apiErrorImp{1009, "用户名或密码错误"}

Functions

func Resp

func Resp(ae APIError, data ...interface{}) gin.H

Types

type APIError

type APIError interface {
	Code() int
	Message() string
	error
}

Jump to

Keyboard shortcuts

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