grpc-tools 0.14.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/bin/x86-linux/google/protobuf/any.proto +130 -0
  3. data/bin/x86-linux/google/protobuf/api.proto +202 -0
  4. data/bin/x86-linux/google/protobuf/compiler/plugin.proto +150 -0
  5. data/bin/x86-linux/google/protobuf/descriptor.proto +803 -0
  6. data/bin/x86-linux/google/protobuf/duration.proto +98 -0
  7. data/bin/x86-linux/google/protobuf/empty.proto +53 -0
  8. data/bin/x86-linux/google/protobuf/field_mask.proto +194 -0
  9. data/bin/x86-linux/google/protobuf/source_context.proto +48 -0
  10. data/bin/x86-linux/google/protobuf/struct.proto +96 -0
  11. data/bin/x86-linux/google/protobuf/timestamp.proto +111 -0
  12. data/bin/x86-linux/google/protobuf/type.proto +180 -0
  13. data/bin/x86-linux/google/protobuf/wrappers.proto +119 -0
  14. data/bin/x86-linux/grpc_ruby_plugin +0 -0
  15. data/bin/x86-linux/protoc +0 -0
  16. data/bin/x86-macos/google/protobuf/any.proto +130 -0
  17. data/bin/x86-macos/google/protobuf/api.proto +202 -0
  18. data/bin/x86-macos/google/protobuf/compiler/plugin.proto +150 -0
  19. data/bin/x86-macos/google/protobuf/descriptor.proto +803 -0
  20. data/bin/x86-macos/google/protobuf/duration.proto +98 -0
  21. data/bin/x86-macos/google/protobuf/empty.proto +53 -0
  22. data/bin/x86-macos/google/protobuf/field_mask.proto +194 -0
  23. data/bin/x86-macos/google/protobuf/source_context.proto +48 -0
  24. data/bin/x86-macos/google/protobuf/struct.proto +96 -0
  25. data/bin/x86-macos/google/protobuf/timestamp.proto +111 -0
  26. data/bin/x86-macos/google/protobuf/type.proto +180 -0
  27. data/bin/x86-macos/google/protobuf/wrappers.proto +119 -0
  28. data/bin/x86-macos/grpc_ruby_plugin +0 -0
  29. data/bin/x86-macos/protoc +0 -0
  30. data/bin/x86-windows/google/protobuf/any.proto +130 -0
  31. data/bin/x86-windows/google/protobuf/api.proto +202 -0
  32. data/bin/x86-windows/google/protobuf/compiler/plugin.proto +150 -0
  33. data/bin/x86-windows/google/protobuf/descriptor.proto +803 -0
  34. data/bin/x86-windows/google/protobuf/duration.proto +98 -0
  35. data/bin/x86-windows/google/protobuf/empty.proto +53 -0
  36. data/bin/x86-windows/google/protobuf/field_mask.proto +194 -0
  37. data/bin/x86-windows/google/protobuf/source_context.proto +48 -0
  38. data/bin/x86-windows/google/protobuf/struct.proto +96 -0
  39. data/bin/x86-windows/google/protobuf/timestamp.proto +111 -0
  40. data/bin/x86-windows/google/protobuf/type.proto +180 -0
  41. data/bin/x86-windows/google/protobuf/wrappers.proto +119 -0
  42. data/bin/x86-windows/grpc_ruby_plugin.exe +0 -0
  43. data/bin/x86-windows/protoc.exe +0 -0
  44. data/bin/x86_64-linux/google/protobuf/any.proto +130 -0
  45. data/bin/x86_64-linux/google/protobuf/api.proto +202 -0
  46. data/bin/x86_64-linux/google/protobuf/compiler/plugin.proto +150 -0
  47. data/bin/x86_64-linux/google/protobuf/descriptor.proto +803 -0
  48. data/bin/x86_64-linux/google/protobuf/duration.proto +98 -0
  49. data/bin/x86_64-linux/google/protobuf/empty.proto +53 -0
  50. data/bin/x86_64-linux/google/protobuf/field_mask.proto +194 -0
  51. data/bin/x86_64-linux/google/protobuf/source_context.proto +48 -0
  52. data/bin/x86_64-linux/google/protobuf/struct.proto +96 -0
  53. data/bin/x86_64-linux/google/protobuf/timestamp.proto +111 -0
  54. data/bin/x86_64-linux/google/protobuf/type.proto +180 -0
  55. data/bin/x86_64-linux/google/protobuf/wrappers.proto +119 -0
  56. data/bin/x86_64-linux/grpc_ruby_plugin +0 -0
  57. data/bin/x86_64-linux/protoc +0 -0
  58. data/bin/x86_64-macos/google/protobuf/any.proto +130 -0
  59. data/bin/x86_64-macos/google/protobuf/api.proto +202 -0
  60. data/bin/x86_64-macos/google/protobuf/compiler/plugin.proto +150 -0
  61. data/bin/x86_64-macos/google/protobuf/descriptor.proto +803 -0
  62. data/bin/x86_64-macos/google/protobuf/duration.proto +98 -0
  63. data/bin/x86_64-macos/google/protobuf/empty.proto +53 -0
  64. data/bin/x86_64-macos/google/protobuf/field_mask.proto +194 -0
  65. data/bin/x86_64-macos/google/protobuf/source_context.proto +48 -0
  66. data/bin/x86_64-macos/google/protobuf/struct.proto +96 -0
  67. data/bin/x86_64-macos/google/protobuf/timestamp.proto +111 -0
  68. data/bin/x86_64-macos/google/protobuf/type.proto +180 -0
  69. data/bin/x86_64-macos/google/protobuf/wrappers.proto +119 -0
  70. data/bin/x86_64-macos/grpc_ruby_plugin +0 -0
  71. data/bin/x86_64-macos/protoc +0 -0
  72. data/bin/x86_64-windows/google/protobuf/any.proto +130 -0
  73. data/bin/x86_64-windows/google/protobuf/api.proto +202 -0
  74. data/bin/x86_64-windows/google/protobuf/compiler/plugin.proto +150 -0
  75. data/bin/x86_64-windows/google/protobuf/descriptor.proto +803 -0
  76. data/bin/x86_64-windows/google/protobuf/duration.proto +98 -0
  77. data/bin/x86_64-windows/google/protobuf/empty.proto +53 -0
  78. data/bin/x86_64-windows/google/protobuf/field_mask.proto +194 -0
  79. data/bin/x86_64-windows/google/protobuf/source_context.proto +48 -0
  80. data/bin/x86_64-windows/google/protobuf/struct.proto +96 -0
  81. data/bin/x86_64-windows/google/protobuf/timestamp.proto +111 -0
  82. data/bin/x86_64-windows/google/protobuf/type.proto +180 -0
  83. data/bin/x86_64-windows/google/protobuf/wrappers.proto +119 -0
  84. data/bin/x86_64-windows/grpc_ruby_plugin.exe +0 -0
  85. data/bin/x86_64-windows/protoc.exe +0 -0
  86. data/version.rb +1 -1
  87. metadata +74 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e8b9e13d03eb11b5644ad8388632cc0afd3dd6b
4
- data.tar.gz: 493c4aa0b3f5f9e734916b970c16ac83d50e42de
3
+ metadata.gz: 4430dc112258259f619b4a64bc2f573758314c4a
4
+ data.tar.gz: a208e9a28daba0edc3a0323e0f53b4b18476a591
5
5
  SHA512:
6
- metadata.gz: 14e6e3e42825362e731ef9c464adf0009b2deab4f86378a156be31e0eab78c86edd62f202362db5034ee1686fceb24f4363c364969bd505a58ed6a1e538030a7
7
- data.tar.gz: a8c33dc18af1ac789f13ac3fa7feced51275ff896f600b2871dc71e3568dcec40cb3c2823d130f30652c72e8828274ba255e99395e96920652e10691b616a569
6
+ metadata.gz: f54f6199e572ab7ee66488d8fee92bd6b58e3c40db09a489fa518130a094a46da18f61791704f63180dce0e39f314ad0ab6a664071063cfcd92e045aac5a208a
7
+ data.tar.gz: 2e904681aeb3c66691f0ed290af25d5e1020d06cb9c0101c2956db17b8c822298639accf2e23b4793c1809d12179c61fd0029b64191a5588babd3216faab79e7
@@ -0,0 +1,130 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2008 Google Inc. All rights reserved.
3
+ // https://developers.google.com/protocol-buffers/
4
+ //
5
+ // Redistribution and use in source and binary forms, with or without
6
+ // modification, are permitted provided that the following conditions are
7
+ // met:
8
+ //
9
+ // * Redistributions of source code must retain the above copyright
10
+ // notice, this list of conditions and the following disclaimer.
11
+ // * Redistributions in binary form must reproduce the above
12
+ // copyright notice, this list of conditions and the following disclaimer
13
+ // in the documentation and/or other materials provided with the
14
+ // distribution.
15
+ // * Neither the name of Google Inc. nor the names of its
16
+ // contributors may be used to endorse or promote products derived from
17
+ // this software without specific prior written permission.
18
+ //
19
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ syntax = "proto3";
32
+
33
+ package google.protobuf;
34
+
35
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
+ option go_package = "github.com/golang/protobuf/ptypes/any";
37
+ option java_package = "com.google.protobuf";
38
+ option java_outer_classname = "AnyProto";
39
+ option java_multiple_files = true;
40
+ option java_generate_equals_and_hash = true;
41
+ option objc_class_prefix = "GPB";
42
+
43
+ // `Any` contains an arbitrary serialized protocol buffer message along with a
44
+ // URL that describes the type of the serialized message.
45
+ //
46
+ // Protobuf library provides support to pack/unpack Any values in the form
47
+ // of utility functions or additional generated methods of the Any type.
48
+ //
49
+ // Example 1: Pack and unpack a message in C++.
50
+ //
51
+ // Foo foo = ...;
52
+ // Any any;
53
+ // any.PackFrom(foo);
54
+ // ...
55
+ // if (any.UnpackTo(&foo)) {
56
+ // ...
57
+ // }
58
+ //
59
+ // Example 2: Pack and unpack a message in Java.
60
+ //
61
+ // Foo foo = ...;
62
+ // Any any = Any.pack(foo);
63
+ // ...
64
+ // if (any.is(Foo.class)) {
65
+ // foo = any.unpack(Foo.class);
66
+ // }
67
+ //
68
+ // The pack methods provided by protobuf library will by default use
69
+ // 'type.googleapis.com/full.type.name' as the type URL and the unpack
70
+ // methods only use the fully qualified type name after the last '/'
71
+ // in the type URL, for example "foo.bar.com/x/y.z" will yield type
72
+ // name "y.z".
73
+ //
74
+ //
75
+ // JSON
76
+ // ====
77
+ // The JSON representation of an `Any` value uses the regular
78
+ // representation of the deserialized, embedded message, with an
79
+ // additional field `@type` which contains the type URL. Example:
80
+ //
81
+ // package google.profile;
82
+ // message Person {
83
+ // string first_name = 1;
84
+ // string last_name = 2;
85
+ // }
86
+ //
87
+ // {
88
+ // "@type": "type.googleapis.com/google.profile.Person",
89
+ // "firstName": <string>,
90
+ // "lastName": <string>
91
+ // }
92
+ //
93
+ // If the embedded message type is well-known and has a custom JSON
94
+ // representation, that representation will be embedded adding a field
95
+ // `value` which holds the custom JSON in addition to the `@type`
96
+ // field. Example (for message [google.protobuf.Duration][]):
97
+ //
98
+ // {
99
+ // "@type": "type.googleapis.com/google.protobuf.Duration",
100
+ // "value": "1.212s"
101
+ // }
102
+ //
103
+ message Any {
104
+ // A URL/resource name whose content describes the type of the
105
+ // serialized protocol buffer message.
106
+ //
107
+ // For URLs which use the schema `http`, `https`, or no schema, the
108
+ // following restrictions and interpretations apply:
109
+ //
110
+ // * If no schema is provided, `https` is assumed.
111
+ // * The last segment of the URL's path must represent the fully
112
+ // qualified name of the type (as in `path/google.protobuf.Duration`).
113
+ // The name should be in a canonical form (e.g., leading "." is
114
+ // not accepted).
115
+ // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
116
+ // value in binary format, or produce an error.
117
+ // * Applications are allowed to cache lookup results based on the
118
+ // URL, or have them precompiled into a binary to avoid any
119
+ // lookup. Therefore, binary compatibility needs to be preserved
120
+ // on changes to types. (Use versioned type names to manage
121
+ // breaking changes.)
122
+ //
123
+ // Schemas other than `http`, `https` (or the empty schema) might be
124
+ // used with implementation specific semantics.
125
+ //
126
+ string type_url = 1;
127
+
128
+ // Must be a valid serialized protocol buffer of the above specified type.
129
+ bytes value = 2;
130
+ }
@@ -0,0 +1,202 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2008 Google Inc. All rights reserved.
3
+ // https://developers.google.com/protocol-buffers/
4
+ //
5
+ // Redistribution and use in source and binary forms, with or without
6
+ // modification, are permitted provided that the following conditions are
7
+ // met:
8
+ //
9
+ // * Redistributions of source code must retain the above copyright
10
+ // notice, this list of conditions and the following disclaimer.
11
+ // * Redistributions in binary form must reproduce the above
12
+ // copyright notice, this list of conditions and the following disclaimer
13
+ // in the documentation and/or other materials provided with the
14
+ // distribution.
15
+ // * Neither the name of Google Inc. nor the names of its
16
+ // contributors may be used to endorse or promote products derived from
17
+ // this software without specific prior written permission.
18
+ //
19
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ syntax = "proto3";
32
+
33
+ package google.protobuf;
34
+
35
+ import "google/protobuf/source_context.proto";
36
+ import "google/protobuf/type.proto";
37
+
38
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
39
+ option java_package = "com.google.protobuf";
40
+ option java_outer_classname = "ApiProto";
41
+ option java_multiple_files = true;
42
+ option java_generate_equals_and_hash = true;
43
+ option objc_class_prefix = "GPB";
44
+
45
+ // Api is a light-weight descriptor for a protocol buffer service.
46
+ message Api {
47
+
48
+ // The fully qualified name of this api, including package name
49
+ // followed by the api's simple name.
50
+ string name = 1;
51
+
52
+ // The methods of this api, in unspecified order.
53
+ repeated Method methods = 2;
54
+
55
+ // Any metadata attached to the API.
56
+ repeated Option options = 3;
57
+
58
+ // A version string for this api. If specified, must have the form
59
+ // `major-version.minor-version`, as in `1.10`. If the minor version
60
+ // is omitted, it defaults to zero. If the entire version field is
61
+ // empty, the major version is derived from the package name, as
62
+ // outlined below. If the field is not empty, the version in the
63
+ // package name will be verified to be consistent with what is
64
+ // provided here.
65
+ //
66
+ // The versioning schema uses [semantic
67
+ // versioning](http://semver.org) where the major version number
68
+ // indicates a breaking change and the minor version an additive,
69
+ // non-breaking change. Both version numbers are signals to users
70
+ // what to expect from different versions, and should be carefully
71
+ // chosen based on the product plan.
72
+ //
73
+ // The major version is also reflected in the package name of the
74
+ // API, which must end in `v<major-version>`, as in
75
+ // `google.feature.v1`. For major versions 0 and 1, the suffix can
76
+ // be omitted. Zero major versions must only be used for
77
+ // experimental, none-GA apis.
78
+ //
79
+ //
80
+ string version = 4;
81
+
82
+ // Source context for the protocol buffer service represented by this
83
+ // message.
84
+ SourceContext source_context = 5;
85
+
86
+ // Included APIs. See [Mixin][].
87
+ repeated Mixin mixins = 6;
88
+
89
+ // The source syntax of the service.
90
+ Syntax syntax = 7;
91
+ }
92
+
93
+ // Method represents a method of an api.
94
+ message Method {
95
+
96
+ // The simple name of this method.
97
+ string name = 1;
98
+
99
+ // A URL of the input message type.
100
+ string request_type_url = 2;
101
+
102
+ // If true, the request is streamed.
103
+ bool request_streaming = 3;
104
+
105
+ // The URL of the output message type.
106
+ string response_type_url = 4;
107
+
108
+ // If true, the response is streamed.
109
+ bool response_streaming = 5;
110
+
111
+ // Any metadata attached to the method.
112
+ repeated Option options = 6;
113
+
114
+ // The source syntax of this method.
115
+ Syntax syntax = 7;
116
+ }
117
+
118
+ // Declares an API to be included in this API. The including API must
119
+ // redeclare all the methods from the included API, but documentation
120
+ // and options are inherited as follows:
121
+ //
122
+ // - If after comment and whitespace stripping, the documentation
123
+ // string of the redeclared method is empty, it will be inherited
124
+ // from the original method.
125
+ //
126
+ // - Each annotation belonging to the service config (http,
127
+ // visibility) which is not set in the redeclared method will be
128
+ // inherited.
129
+ //
130
+ // - If an http annotation is inherited, the path pattern will be
131
+ // modified as follows. Any version prefix will be replaced by the
132
+ // version of the including API plus the [root][] path if specified.
133
+ //
134
+ // Example of a simple mixin:
135
+ //
136
+ // package google.acl.v1;
137
+ // service AccessControl {
138
+ // // Get the underlying ACL object.
139
+ // rpc GetAcl(GetAclRequest) returns (Acl) {
140
+ // option (google.api.http).get = "/v1/{resource=**}:getAcl";
141
+ // }
142
+ // }
143
+ //
144
+ // package google.storage.v2;
145
+ // service Storage {
146
+ // rpc GetAcl(GetAclRequest) returns (Acl);
147
+ //
148
+ // // Get a data record.
149
+ // rpc GetData(GetDataRequest) returns (Data) {
150
+ // option (google.api.http).get = "/v2/{resource=**}";
151
+ // }
152
+ // }
153
+ //
154
+ // Example of a mixin configuration:
155
+ //
156
+ // apis:
157
+ // - name: google.storage.v2.Storage
158
+ // mixins:
159
+ // - name: google.acl.v1.AccessControl
160
+ //
161
+ // The mixin construct implies that all methods in `AccessControl` are
162
+ // also declared with same name and request/response types in
163
+ // `Storage`. A documentation generator or annotation processor will
164
+ // see the effective `Storage.GetAcl` method after inherting
165
+ // documentation and annotations as follows:
166
+ //
167
+ // service Storage {
168
+ // // Get the underlying ACL object.
169
+ // rpc GetAcl(GetAclRequest) returns (Acl) {
170
+ // option (google.api.http).get = "/v2/{resource=**}:getAcl";
171
+ // }
172
+ // ...
173
+ // }
174
+ //
175
+ // Note how the version in the path pattern changed from `v1` to `v2`.
176
+ //
177
+ // If the `root` field in the mixin is specified, it should be a
178
+ // relative path under which inherited HTTP paths are placed. Example:
179
+ //
180
+ // apis:
181
+ // - name: google.storage.v2.Storage
182
+ // mixins:
183
+ // - name: google.acl.v1.AccessControl
184
+ // root: acls
185
+ //
186
+ // This implies the following inherited HTTP annotation:
187
+ //
188
+ // service Storage {
189
+ // // Get the underlying ACL object.
190
+ // rpc GetAcl(GetAclRequest) returns (Acl) {
191
+ // option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
192
+ // }
193
+ // ...
194
+ // }
195
+ message Mixin {
196
+ // The fully qualified name of the API which is included.
197
+ string name = 1;
198
+
199
+ // If non-empty specifies a path under which inherited HTTP paths
200
+ // are rooted.
201
+ string root = 2;
202
+ }
@@ -0,0 +1,150 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2008 Google Inc. All rights reserved.
3
+ // https://developers.google.com/protocol-buffers/
4
+ //
5
+ // Redistribution and use in source and binary forms, with or without
6
+ // modification, are permitted provided that the following conditions are
7
+ // met:
8
+ //
9
+ // * Redistributions of source code must retain the above copyright
10
+ // notice, this list of conditions and the following disclaimer.
11
+ // * Redistributions in binary form must reproduce the above
12
+ // copyright notice, this list of conditions and the following disclaimer
13
+ // in the documentation and/or other materials provided with the
14
+ // distribution.
15
+ // * Neither the name of Google Inc. nor the names of its
16
+ // contributors may be used to endorse or promote products derived from
17
+ // this software without specific prior written permission.
18
+ //
19
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ // Author: kenton@google.com (Kenton Varda)
32
+ //
33
+ // WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
34
+ // change.
35
+ //
36
+ // protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
37
+ // just a program that reads a CodeGeneratorRequest from stdin and writes a
38
+ // CodeGeneratorResponse to stdout.
39
+ //
40
+ // Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
41
+ // of dealing with the raw protocol defined here.
42
+ //
43
+ // A plugin executable needs only to be placed somewhere in the path. The
44
+ // plugin should be named "protoc-gen-$NAME", and will then be used when the
45
+ // flag "--${NAME}_out" is passed to protoc.
46
+
47
+ syntax = "proto2";
48
+ package google.protobuf.compiler;
49
+ option java_package = "com.google.protobuf.compiler";
50
+ option java_outer_classname = "PluginProtos";
51
+
52
+ option go_package = "plugin_go";
53
+
54
+ import "google/protobuf/descriptor.proto";
55
+
56
+ // An encoded CodeGeneratorRequest is written to the plugin's stdin.
57
+ message CodeGeneratorRequest {
58
+ // The .proto files that were explicitly listed on the command-line. The
59
+ // code generator should generate code only for these files. Each file's
60
+ // descriptor will be included in proto_file, below.
61
+ repeated string file_to_generate = 1;
62
+
63
+ // The generator parameter passed on the command-line.
64
+ optional string parameter = 2;
65
+
66
+ // FileDescriptorProtos for all files in files_to_generate and everything
67
+ // they import. The files will appear in topological order, so each file
68
+ // appears before any file that imports it.
69
+ //
70
+ // protoc guarantees that all proto_files will be written after
71
+ // the fields above, even though this is not technically guaranteed by the
72
+ // protobuf wire format. This theoretically could allow a plugin to stream
73
+ // in the FileDescriptorProtos and handle them one by one rather than read
74
+ // the entire set into memory at once. However, as of this writing, this
75
+ // is not similarly optimized on protoc's end -- it will store all fields in
76
+ // memory at once before sending them to the plugin.
77
+ repeated FileDescriptorProto proto_file = 15;
78
+ }
79
+
80
+ // The plugin writes an encoded CodeGeneratorResponse to stdout.
81
+ message CodeGeneratorResponse {
82
+ // Error message. If non-empty, code generation failed. The plugin process
83
+ // should exit with status code zero even if it reports an error in this way.
84
+ //
85
+ // This should be used to indicate errors in .proto files which prevent the
86
+ // code generator from generating correct code. Errors which indicate a
87
+ // problem in protoc itself -- such as the input CodeGeneratorRequest being
88
+ // unparseable -- should be reported by writing a message to stderr and
89
+ // exiting with a non-zero status code.
90
+ optional string error = 1;
91
+
92
+ // Represents a single generated file.
93
+ message File {
94
+ // The file name, relative to the output directory. The name must not
95
+ // contain "." or ".." components and must be relative, not be absolute (so,
96
+ // the file cannot lie outside the output directory). "/" must be used as
97
+ // the path separator, not "\".
98
+ //
99
+ // If the name is omitted, the content will be appended to the previous
100
+ // file. This allows the generator to break large files into small chunks,
101
+ // and allows the generated text to be streamed back to protoc so that large
102
+ // files need not reside completely in memory at one time. Note that as of
103
+ // this writing protoc does not optimize for this -- it will read the entire
104
+ // CodeGeneratorResponse before writing files to disk.
105
+ optional string name = 1;
106
+
107
+ // If non-empty, indicates that the named file should already exist, and the
108
+ // content here is to be inserted into that file at a defined insertion
109
+ // point. This feature allows a code generator to extend the output
110
+ // produced by another code generator. The original generator may provide
111
+ // insertion points by placing special annotations in the file that look
112
+ // like:
113
+ // @@protoc_insertion_point(NAME)
114
+ // The annotation can have arbitrary text before and after it on the line,
115
+ // which allows it to be placed in a comment. NAME should be replaced with
116
+ // an identifier naming the point -- this is what other generators will use
117
+ // as the insertion_point. Code inserted at this point will be placed
118
+ // immediately above the line containing the insertion point (thus multiple
119
+ // insertions to the same point will come out in the order they were added).
120
+ // The double-@ is intended to make it unlikely that the generated code
121
+ // could contain things that look like insertion points by accident.
122
+ //
123
+ // For example, the C++ code generator places the following line in the
124
+ // .pb.h files that it generates:
125
+ // // @@protoc_insertion_point(namespace_scope)
126
+ // This line appears within the scope of the file's package namespace, but
127
+ // outside of any particular class. Another plugin can then specify the
128
+ // insertion_point "namespace_scope" to generate additional classes or
129
+ // other declarations that should be placed in this scope.
130
+ //
131
+ // Note that if the line containing the insertion point begins with
132
+ // whitespace, the same whitespace will be added to every line of the
133
+ // inserted text. This is useful for languages like Python, where
134
+ // indentation matters. In these languages, the insertion point comment
135
+ // should be indented the same amount as any inserted code will need to be
136
+ // in order to work correctly in that context.
137
+ //
138
+ // The code generator that generates the initial file and the one which
139
+ // inserts into it must both run as part of a single invocation of protoc.
140
+ // Code generators are executed in the order in which they appear on the
141
+ // command line.
142
+ //
143
+ // If |insertion_point| is present, |name| must also be present.
144
+ optional string insertion_point = 2;
145
+
146
+ // The file contents.
147
+ optional string content = 15;
148
+ }
149
+ repeated File file = 15;
150
+ }