Documentation ¶
Overview ¶
* @Descripttion: * @version: * @Author: moo * @Date: 2020-10-22 18:25:28 * @LastEditors: moo * @LastEditTime: 2020-12-26 16:01:02
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MsgFlags = map[ERRCODE]string{ SUCCESS: "success", NOT_FOUND: "not found", PARAMS_INVALID: "parameters invaild", SERVER_ERROR: "internal error", OTHER_ERROR: "other error", BLOCKCHAIN_ERROR: "block chain error", AUTH_INVAILD: "认证错误", AUTH_EXPIRE: "token 过期", PERMISSION_DENIED: "权限错误", TOKEN_BLACKLIST: "token在黑名单里", USER_BLACKLIST: "user在黑名单里", FORCE_USER_REFRESH: "强制用户刷新", FORCE_LOGOUT: "强制用户签退", REFRESH_TOKEN_EXPIRE: "refresh token 过期", EMAIL_EXIST: "Email已存在", USER_NOT_EXIST: "用户不存在", USER_EXIST: "用户已存在", PWD_INVALID: "密码错误", USER_STA_INVALID: "用户状态错误", USER_NOT_ACTIVE: "用户未激活", USER_VERIFICATION_INVAILD: "Verification code Invalid", GATEWAY_CONNECT_FAILED: "节点网关连接失败", NETWORK_CONNECT_FAILED: "Channel连接失败", NETWORK_RTN_ERROR: "节点返回错误信息", }
Functions ¶
func Code2Error ¶
Types ¶
type ERRCODE ¶
type ERRCODE int
const ( SUCCESS ERRCODE = 0 ERROR_ERROR ERRCODE = 4 // 未初始化errorcode, 仅仅内部使用 NOT_FOUND ERRCODE = 404 // 404错误 PARAMS_INVALID ERRCODE = 1001 // 参数错误 NOT_SUPPORT ERRCODE = 1002 // 功能不支持 SERVER_ERROR ERRCODE = 1003 // 系统错误 OTHER_ERROR ERRCODE = 1004 BLOCKCHAIN_ERROR ERRCODE = 1005 // 系统错误 AUTH_INVAILD ERRCODE = 2000 // 认证错误 AUTH_EXPIRE ERRCODE = 2001 // access token 过期 PERMISSION_DENIED ERRCODE = 2002 // 权限错误 TOKEN_BLACKLIST ERRCODE = 2003 // token上黑名单 USER_BLACKLIST ERRCODE = 2004 // token上黑名单 FORCE_USER_REFRESH ERRCODE = 2005 // 用户强制刷新 FORCE_LOGOUT ERRCODE = 2006 // 用户强制签退 REFRESH_TOKEN_EXPIRE ERRCODE = 2007 // refresh token 过期 EXTSERVER_AUTH_INVAILD ERRCODE = 2101 // 外部服务器认证错误 USER_NOT_EXIST ERRCODE = 4001 USER_EXIST ERRCODE = 4002 PWD_INVALID ERRCODE = 4003 USER_STA_INVALID ERRCODE = 4004 USER_NOT_ACTIVE ERRCODE = 4005 USER_VERIFICATION_INVAILD ERRCODE = 4006 EMAIL_EXIST ERRCODE = 4010 EMAIL_NOT_EXIST ERRCODE = 4011 TEL_EXIST ERRCODE = 4021 TEL_NOT_EXIST ERRCODE = 4022 GATEWAY_CONNECT_FAILED ERRCODE = 5001 NETWORK_CONNECT_FAILED ERRCODE = 5002 NETWORK_RTN_ERROR ERRCODE = 5003 TERMINAL_RTN_ERROR ERRCODE = 5004 )
Click to show internal directories.
Click to hide internal directories.