...
1syntax = "proto3";
2
3package helloworld;
4
5import "google/api/annotations.proto";
6import "google/protobuf/wrappers.proto";
7
8service Greeter {
9 rpc SayHello (HelloRequest) returns (HelloReply) {
10 option (google.api.http) = {
11 get: "/say/{name}"
12 additional_bindings: {
13 get: "/say/strval/{strVal}",
14 }
15 additional_bindings: {
16 get: "/say/floatval/{floatVal}",
17 }
18 additional_bindings: {
19 get: "/say/doubleval/{doubleVal}",
20 }
21 additional_bindings: {
22 get: "/say/boolval/{boolVal}",
23 }
24 additional_bindings: {
25 get: "/say/bytesval/{bytesVal}",
26 }
27 additional_bindings: {
28 get: "/say/int32val/{int32Val}",
29 }
30 additional_bindings: {
31 get: "/say/uint32val/{uint32Val}",
32 }
33 additional_bindings: {
34 get: "/say/int64val/{int64Val}",
35 }
36 additional_bindings: {
37 get: "/say/uint64val/{uint64Val}",
38 }
39 };
40 }
41}
42
43message HelloRequest {
44 string name = 1;
45 google.protobuf.StringValue strVal = 2;
46 google.protobuf.FloatValue floatVal = 3;
47 google.protobuf.DoubleValue doubleVal = 4;
48 google.protobuf.BoolValue boolVal = 5;
49 google.protobuf.BytesValue bytesVal = 6;
50 google.protobuf.Int32Value int32Val = 7;
51 google.protobuf.UInt32Value uint32Val = 8;
52 google.protobuf.Int64Value int64Val = 9;
53 google.protobuf.UInt64Value uint64Val = 10;
54}
55
56message HelloReply {
57 string message = 1;
58}
View as plain text