// Copyright 2019 getensh.com. All rights reserved. // Use of this source code is governed by getensh.com. package errors import ( "google.golang.org/grpc/status" ) var ( // 通用错误 SystemError = status.Error(10001, "系统错误") ServiceError = status.Error(10002, "内部服务错误") ParamsError = status.Error(10003, "参数错误") DataBaseError = status.Error(10004, "数据库错误") RedisError = status.Error(10005, "Redis错误") VendorError = status.Error(10006, "三方错误") ElasticError = status.Error(10007, "ElasticSearch 错误") NoTokenError = status.Error(10008, "没有token") TokenExpiredError = status.Error(10009, "token已过期") TokenFailedError = status.Error(10010, "token错误") DistributeIdError = status.Error(10011, "分布式id错误") ErrRecordNotFound = status.Error(10012, "数据不存在") UserGroupNotExist = status.Error(30201, "用户组不存在") UserExist = status.Error(30202, "用户已存在") PasswordError = status.Error(30203, "密码错误") OrganizationNotExist = status.Error(30204, "机构不存在") OrganizationExist = status.Error(30205, "机构已存在") RbacNodeNotExist = status.Error(30206, "权限基础节点不存在") UserNotExist = status.Error(30203, "用户不存在") UserNotInRightZone = status.Error(30301, "目标用户不在您的管辖区域") ZoneNotInRightZone = status.Error(30301, "目标区域不在您的管辖区域") //ZonePermissionError = status.Error(30301, "无区域操作权限") NotSuperGroupError = status.Error(30302, "非超管组人员无法进行该操作") SuperError = status.Error(30302, "无法修改超级用户") NotSuperError = status.Error(30302, "非超级管理员无法操作该角色") //GroupPermissionError = status.Error(30302, "无操作权限") )