Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: third_party/grpc/src/php/tests/interop/messages.proto

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1
2 // Copyright 2015, Google Inc.
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 // Message definitions to be used by integration test service definitions.
32
33 syntax = "proto2";
34
35 package grpc.testing;
36
37 // The type of payload that should be returned.
38 enum PayloadType {
39 // Compressable text format.
40 COMPRESSABLE = 0;
41
42 // Uncompressable binary format.
43 UNCOMPRESSABLE = 1;
44
45 // Randomly chosen from all other formats defined in this enum.
46 RANDOM = 2;
47 }
48
49 // A block of data, to simply increase gRPC message size.
50 message Payload {
51 // The type of data in body.
52 optional PayloadType type = 1 [default = COMPRESSABLE];
53 // Primary contents of payload.
54 optional bytes body = 2;
55 }
56
57 // Unary request.
58 message SimpleRequest {
59 // Desired payload type in the response from the server.
60 // If response_type is RANDOM, server randomly chooses one from other formats.
61 optional PayloadType response_type = 1 [default = COMPRESSABLE];
62
63 // Desired payload size in the response from the server.
64 // If response_type is COMPRESSABLE, this denotes the size before compression.
65 optional int32 response_size = 2;
66
67 // Optional input payload sent along with the request.
68 optional Payload payload = 3;
69
70 // Whether SimpleResponse should include username.
71 optional bool fill_username = 4;
72
73 // Whether SimpleResponse should include OAuth scope.
74 optional bool fill_oauth_scope = 5;
75 }
76
77 // Unary response, as configured by the request.
78 message SimpleResponse {
79 // Payload to increase message size.
80 optional Payload payload = 1;
81 // The user the request came from, for verifying authentication was
82 // successful when the client expected it.
83 optional string username = 2;
84 // OAuth scope.
85 optional string oauth_scope = 3;
86 }
87
88 // Client-streaming request.
89 message StreamingInputCallRequest {
90 // Optional input payload sent along with the request.
91 optional Payload payload = 1;
92
93 // Not expecting any payload from the response.
94 }
95
96 // Client-streaming response.
97 message StreamingInputCallResponse {
98 // Aggregated size of payloads received from the client.
99 optional int32 aggregated_payload_size = 1;
100 }
101
102 // Configuration for a particular response.
103 message ResponseParameters {
104 // Desired payload sizes in responses from the server.
105 // If response_type is COMPRESSABLE, this denotes the size before compression.
106 optional int32 size = 1;
107
108 // Desired interval between consecutive responses in the response stream in
109 // microseconds.
110 optional int32 interval_us = 2;
111 }
112
113 // Server-streaming request.
114 message StreamingOutputCallRequest {
115 // Desired payload type in the response from the server.
116 // If response_type is RANDOM, the payload from each response in the stream
117 // might be of different types. This is to simulate a mixed type of payload
118 // stream.
119 optional PayloadType response_type = 1 [default = COMPRESSABLE];
120
121 // Configuration for each expected response message.
122 repeated ResponseParameters response_parameters = 2;
123
124 // Optional input payload sent along with the request.
125 optional Payload payload = 3;
126 }
127
128 // Server-streaming response, as configured by the request and parameters.
129 message StreamingOutputCallResponse {
130 // Payload to increase response size.
131 optional Payload payload = 1;
132 }
OLDNEW
« no previous file with comments | « third_party/grpc/src/php/tests/interop/interop_client.php ('k') | third_party/grpc/src/php/tests/interop/test.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698