-
Notifications
You must be signed in to change notification settings - Fork 448
Expand file tree
/
Copy pathsimple_service.proto
More file actions
32 lines (24 loc) · 999 Bytes
/
simple_service.proto
File metadata and controls
32 lines (24 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
syntax = "proto3";
package examplecom;
import "proto/othercom/external_child_message.proto";
// these imports should not be output in the generated typescript service
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
message UnaryRequest {
int64 some_int64 = 1;
google.protobuf.Timestamp some_timestamp = 2;
}
message UnaryResponse {}
message StreamRequest {
string some_string = 1;
}
// SimpleService is a simple grpc service.
service SimpleService {
// DoUnary is a unary gRPC service
rpc DoUnary(UnaryRequest) returns (othercom.ExternalChildMessage) {}
rpc DoServerStream(StreamRequest) returns (stream othercom.ExternalChildMessage) {}
rpc DoClientStream(stream StreamRequest) returns (google.protobuf.Empty) {}
rpc DoBidiStream(stream StreamRequest) returns (stream othercom.ExternalChildMessage) {}
// checks that rpc methods that use reserved JS words don't generate invalid code
rpc Delete(UnaryRequest) returns (UnaryResponse) {}
}