get.go 733 B

1234567891011121314151617181920212223242526
  1. package user_ext
  2. import (
  3. "context"
  4. "github.com/pkg/errors"
  5. "go-common/app/interface/live/app-interface/dao"
  6. userExV1 "go-common/app/service/live/userext/api/liverpc/v1"
  7. "go-common/library/ecode"
  8. "go-common/library/log"
  9. )
  10. // GetGrayRule 获取灰度配置
  11. func (d *Dao) GetGrayRule(ctx context.Context, req *userExV1.GrayRuleGetByMarkReq) (extResult *userExV1.GrayRuleGetByMarkResp, err error) {
  12. extResult = &userExV1.GrayRuleGetByMarkResp{}
  13. if req == nil {
  14. return nil, nil
  15. }
  16. ret, err := dao.UserExtApi.V1GrayRule.GetByMark(ctx, req)
  17. if err != nil {
  18. log.Error("call_userExt_grayRule error,err:%v", err)
  19. err = errors.WithMessage(ecode.GetGrayRuleError, "GET SEA PATROL FAIL")
  20. return
  21. }
  22. extResult = ret
  23. return
  24. }