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