error.go 1.3 KB

1234567891011121314151617181920212223242526272829
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.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. BrandNotExistError = status.Error(11001, "品牌不存在")
  13. CycleError = status.Error(11002, "新增数据里程间隔周期无法匹配")
  14. FieldNotExistError = status.Error(11003, "字段不存在")
  15. DataNotExistError = status.Error(11004, "数据不存在")
  16. InterfaceNoExistError = status.Error(11005, "接口不存在")
  17. CreateIdError = status.Error(11006, "导出车型失败,生成导出id失败")
  18. ExportError = status.Error(11006, "导出车型失败,插入导出id失败")
  19. CreateMsgError = status.Error(11006, "导出车型失败,消息生成失败")
  20. SendMsgError = status.Error(11006, "导出车型失败,消息投递失败")
  21. TimeCalcFailed = status.Error(11007, "时间计算错误")
  22. AnnualRuleError = status.Error(11008, "无年检计算规则")
  23. DataBaseError = status.Error(20005, "数据库操作失败")
  24. )