-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathstream.proto
45 lines (39 loc) · 1.49 KB
/
stream.proto
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
33
34
35
36
37
38
39
40
41
42
43
44
45
syntax = "proto3";
package grpc.gateway.examples.internal.proto.examplepb;
import "examples/internal/proto/examplepb/a_bit_of_everything.proto";
import "examples/internal/proto/sub/message.proto";
import "google/api/annotations.proto";
import "google/api/httpbody.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb";
// Defines some more operations to be added to ABitOfEverythingService
service StreamService {
rpc BulkCreate(stream ABitOfEverything) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1/example/a_bit_of_everything/bulk"
body: "*"
};
}
rpc List(Options) returns (stream ABitOfEverything) {
option (google.api.http) = {get: "/v1/example/a_bit_of_everything"};
}
rpc BulkEcho(stream grpc.gateway.examples.internal.proto.sub.StringMessage) returns (stream grpc.gateway.examples.internal.proto.sub.StringMessage) {
option (google.api.http) = {
post: "/v1/example/a_bit_of_everything/echo"
body: "*"
};
}
rpc BulkEchoDuration(stream google.protobuf.Duration) returns (stream google.protobuf.Duration) {
option (google.api.http) = {
post: "/v1/example/a_bit_of_everything/echo_duration"
body: "*"
};
}
rpc Download(Options) returns (stream google.api.HttpBody) {
option (google.api.http) = {get: "/v1/example/download"};
}
}
message Options {
bool error = 1;
}