error.go 769 B

12345678910111213141516171819202122
  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. )