...
1syntax = "proto3";
2option go_package = "examplepb";
3
4// Merging Services
5//
6// This is an example of merging two proto files.
7package grpc.gateway.examples.internal.examplepb;
8
9import "google/api/annotations.proto";
10
11// InMessageB represents a message to ServiceB.
12message InMessageB {
13 // Here is the explanation about InMessageB.values
14 string value = 1;
15}
16
17// OutMessageB represents a message returned from ServiceB.
18message OutMessageB {
19 // Here is the explanation about OutMessageB.value
20 repeated string values = 1;
21}
22
23// ServiceB service responds to incoming merge requests.
24service ServiceB {
25 // ServiceB.MethodOne receives InMessageB and returns OutMessageB
26 //
27 // Here is the detail explanation about ServiceB.MethodOne.
28 rpc MethodOne(InMessageB) returns (OutMessageB) {
29 option (google.api.http) = {
30 post: "/v1/example/b/1"
31 body: "*"
32 };
33 }
34 // ServiceB.MethodTwo receives OutMessageB and returns InMessageB
35 //
36 // Here is the detail explanation about ServiceB.MethodTwo.
37 rpc MethodTwo(OutMessageB) returns (InMessageB) {
38 option (google.api.http) = {
39 post: "/v1/example/b/2"
40 body: "*"
41 };
42 }
43}
View as plain text