error.go 1.3 KB

1234567891011121314151617181920212223242526272829
  1. // Copyright 2019 github.com. All rights reserved.
  2. // Use of this source code is governed by github.com.
  3. package errors
  4. import (
  5. "google.golang.org/grpc/status"
  6. )
  7. var (
  8. // 通用错误
  9. SystemError = status.Error(10001, "系统错误")
  10. ServiceError = status.Error(10002, "内部服务错误")
  11. ParamsError = status.Error(10003, "参数错误")
  12. SmsAlarmError = status.Error(20001, "短信发送告警失败")
  13. VCodeSendFailed = status.Error(20002, "短信验证码请求失败")
  14. VCodeExpired = status.Error(20003, "短信验证码过期")
  15. VCodeVerifyFailed = status.Error(20004, "短信验证码错误")
  16. VerifyNoticeError = status.Error(20005, "短信发送审核通过通知失败")
  17. EmailSendError = status.Error(20006, "邮件发送失败")
  18. WeatherConditionError = status.Error(20007, "获取实时天气失败")
  19. ProvincialLoginError = status.Error(20008, "省厅登录失败")
  20. ProvincialProjectCodeError = status.Error(20009, "省厅获取项目编码失败")
  21. ProvincialProjectUploadError = status.Error(20010, "省厅上传项目失败")
  22. ProvincialDustDeviceUploadError = status.Error(20011, "省厅上传扬尘设备失败")
  23. ProvincialDustDataUploadError = status.Error(20012, "省厅上传扬尘数据失败")
  24. ProvincialVerifyDataError = status.Error(20013, "省厅验证数据失败")
  25. )