error.go 693 B

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