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