risk.proto 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. //存放api使用的模型
  2. syntax = "proto3";
  3. package open.service.antifraud.v1;
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. option go_package = "v1";
  6. option (gogoproto.goproto_getters_all) = false;
  7. option (gogoproto.goproto_stringer_all) = false;
  8. option (gogoproto.stringer_all) = true;
  9. message RiskCheckRequest{
  10. int64 mid = 1 [(gogoproto.jsontag) = "mid", (gogoproto.customname) = "MID",(gogoproto.moretags) = "form:\"mid\" validate:\"required\""];
  11. string ip = 2 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP",(gogoproto.moretags) = "form:\"ip\" validate:\"required\""];
  12. int64 item_id = 3 [(gogoproto.jsontag) = "item_id", (gogoproto.customname) = "ItemID",(gogoproto.moretags) = "form:\"item_id\" validate:\"required\""];
  13. string path = 4 [(gogoproto.jsontag) = "path",(gogoproto.moretags) = "form:\"path\" validate:\"required\""];
  14. int64 customer = 5 [(gogoproto.jsontag) = "customer",(gogoproto.moretags) = "form:\"customer\" validate:\"required\""];
  15. int64 open_time = 6 [(gogoproto.jsontag) = "open_time",(gogoproto.moretags) = "form:\"open_time\" validate:\"required\""];
  16. string voucher = 7 [(gogoproto.jsontag) = "voucher",(gogoproto.moretags) = "form:\"voucher\""];
  17. }
  18. message RiskCheckResponse{
  19. int64 success = 1 [(gogoproto.jsontag) = "success"];
  20. int64 rank = 2 [(gogoproto.jsontag) = "rank"];
  21. int64 method = 3 [(gogoproto.jsontag) = "method"];
  22. string desc = 4 [(gogoproto.jsontag) = "desc"];
  23. }
  24. service Risk {
  25. // 风险检查
  26. rpc RiskCheck(RiskCheckRequest) returns (RiskCheckResponse);
  27. }