graph.proto 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 GraphPrepareRequest{
  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 customer = 3 [(gogoproto.jsontag) = "customer", (gogoproto.moretags) = "form:\"customer\" validate:\"required\""];
  13. int64 item_id = 4 [(gogoproto.jsontag) = "item_id", (gogoproto.customname) = "ItemID", (gogoproto.moretags) = "form:\"item_id\" validate:\"required\""];
  14. string client_type = 5 [(gogoproto.jsontag) = "client_type", (gogoproto.moretags) = "form:\"client_type\" validate:\"required\""];
  15. }
  16. message GraphPrepareResponse{
  17. int64 success = 1 [(gogoproto.jsontag) = "success"];
  18. string captcha_id = 2 [(gogoproto.jsontag) = "captcha_id", (gogoproto.customname) = "CaptchaID"];
  19. string challenge = 3 [(gogoproto.jsontag) = "challenge"];
  20. int64 new_captcha = 4 [(gogoproto.jsontag) = "new_captcha"];
  21. string voucher = 5 [(gogoproto.jsontag) = "voucher"];
  22. }
  23. message GraphCheckRequest{
  24. int64 mid = 1 [(gogoproto.jsontag) = "mid", (gogoproto.customname) = "MID",(gogoproto.moretags) = "form:\"mid\" validate:\"required\""];
  25. string ip = 2 [(gogoproto.jsontag) = "ip", (gogoproto.customname) = "IP",(gogoproto.moretags) = "form:\"ip\" validate:\"required\""];
  26. int64 customer = 3 [(gogoproto.jsontag) = "customer", (gogoproto.moretags) = "form:\"customer\" validate:\"required\""];
  27. int64 item_id = 4 [(gogoproto.jsontag) = "item_id", (gogoproto.customname) = "ItemID",(gogoproto.moretags) = "form:\"item_id\" validate:\"required\""];
  28. string voucher = 5 [(gogoproto.jsontag) = "voucher", (gogoproto.moretags) = "form:\"voucher\" validate:\"required\""];
  29. string challenge = 6 [(gogoproto.jsontag) = "challenge", (gogoproto.moretags) = "form:\"challenge\" validate:\"required\""];
  30. string validate = 7 [(gogoproto.jsontag) = "validate", (gogoproto.moretags) = "form:\"validate\" validate:\"required\""];
  31. string seccode = 8 [(gogoproto.jsontag) = "seccode", (gogoproto.moretags) = "form:\"seccode\" validate:\"required\""];
  32. string client_type = 9 [(gogoproto.jsontag) = "client_type", (gogoproto.moretags) = "form:\"client_type\" validate:\"required\""];
  33. int64 success = 10 [(gogoproto.jsontag) = "success", (gogoproto.moretags) = "form:\"success\" validate:\"required\""];
  34. }
  35. message GraphCheckResponse{
  36. string new_voucher = 1 [(gogoproto.jsontag) = "new_voucher"];
  37. }
  38. service Graph {
  39. // 拉起极验
  40. rpc GraphPrepare(GraphPrepareRequest) returns (GraphPrepareResponse);
  41. // 极验验证
  42. rpc GraphCheck(GraphCheckRequest) returns (GraphCheckResponse);
  43. }