...
1syntax = "proto3";
2option go_package = "examplepb";
3package grpc.gateway.examples.internal.examplepb;
4
5import "google/api/annotations.proto";
6import "google/protobuf/wrappers.proto";
7import "google/protobuf/empty.proto";
8
9message Wrappers {
10 google.protobuf.StringValue string_value = 1;
11 google.protobuf.Int32Value int32_value = 2;
12 google.protobuf.Int64Value int64_value = 3;
13 google.protobuf.FloatValue float_value = 4;
14 google.protobuf.DoubleValue double_value = 5;
15 google.protobuf.BoolValue bool_value = 6;
16 google.protobuf.UInt32Value uint32_value = 7;
17 google.protobuf.UInt64Value uint64_value = 8;
18 google.protobuf.BytesValue bytes_value = 9;
19}
20
21service WrappersService {
22 rpc Create(Wrappers) returns (Wrappers) {
23 option (google.api.http) = {
24 post: "/v1/example/wrappers"
25 body: "*"
26 };
27 }
28
29 rpc CreateStringValue(google.protobuf.StringValue) returns (google.protobuf.StringValue) {
30 option (google.api.http) = {
31 post: "/v1/testString"
32 body: "*"
33 };
34 }
35 rpc CreateInt32Value(google.protobuf.Int32Value) returns (google.protobuf.Int32Value) {
36 option (google.api.http) = {
37 post: "/v1/testInt32"
38 body: "*"
39 };
40 }
41 rpc CreateInt64Value(google.protobuf.Int64Value) returns (google.protobuf.Int64Value){
42 option (google.api.http) = {
43 post: "/v1/testInt64"
44 body: "*"
45 };
46 }
47 rpc CreateFloatValue(google.protobuf.FloatValue) returns (google.protobuf.FloatValue){
48 option (google.api.http) = {
49 post: "/v1/testFloat"
50 body: "*"
51 };
52 }
53 rpc CreateDoubleValue(google.protobuf.DoubleValue) returns (google.protobuf.DoubleValue){
54 option (google.api.http) = {
55 post: "/v1/testDouble"
56 body: "*"
57 };
58 }
59 rpc CreateBoolValue(google.protobuf.BoolValue) returns (google.protobuf.BoolValue){
60 option (google.api.http) = {
61 post: "/v1/testBool"
62 body: "*"
63 };
64 }
65 rpc CreateUInt32Value(google.protobuf.UInt32Value) returns (google.protobuf.UInt32Value){
66 option (google.api.http) = {
67 post: "/v1/testUint32"
68 body: "*"
69 };
70 }
71 rpc CreateUInt64Value(google.protobuf.UInt64Value) returns (google.protobuf.UInt64Value){
72 option (google.api.http) = {
73 post: "/v1/testUint64"
74 body: "*"
75 };
76 }
77 rpc CreateBytesValue(google.protobuf.BytesValue) returns (google.protobuf.BytesValue){
78 option (google.api.http) = {
79 post: "/v1/testBytes"
80 body: "*"
81 };
82 }
83 rpc CreateEmpty(google.protobuf.Empty) returns (google.protobuf.Empty){
84 option (google.api.http) = {
85 post: "/v1/testEmpty"
86 body: "*"
87 };
88 }
89}
View as plain text