remote_api.proto 934 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. syntax = "proto2";
  2. option go_package = "remote_api";
  3. package remote_api;
  4. message Request {
  5. required string service_name = 2;
  6. required string method = 3;
  7. required bytes request = 4;
  8. optional string request_id = 5;
  9. }
  10. message ApplicationError {
  11. required int32 code = 1;
  12. required string detail = 2;
  13. }
  14. message RpcError {
  15. enum ErrorCode {
  16. UNKNOWN = 0;
  17. CALL_NOT_FOUND = 1;
  18. PARSE_ERROR = 2;
  19. SECURITY_VIOLATION = 3;
  20. OVER_QUOTA = 4;
  21. REQUEST_TOO_LARGE = 5;
  22. CAPABILITY_DISABLED = 6;
  23. FEATURE_DISABLED = 7;
  24. BAD_REQUEST = 8;
  25. RESPONSE_TOO_LARGE = 9;
  26. CANCELLED = 10;
  27. REPLAY_ERROR = 11;
  28. DEADLINE_EXCEEDED = 12;
  29. }
  30. required int32 code = 1;
  31. optional string detail = 2;
  32. }
  33. message Response {
  34. optional bytes response = 1;
  35. optional bytes exception = 2;
  36. optional ApplicationError application_error = 3;
  37. optional bytes java_exception = 4;
  38. optional RpcError rpc_error = 5;
  39. }