Debian Codegraph @

extensions/extension.pb.go

raw
1 // Copyright 2017 Google LLC. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.35.1
18 // protoc v4.23.4
19 // source: extensions/extension.proto
20
21 package gnostic_extension_v1
22
23 import (
24 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
25 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
26 anypb "google.golang.org/protobuf/types/known/anypb"
27 reflect "reflect"
28 sync "sync"
29 )
30
31 const (
32 // Verify that this generated code is sufficiently up-to-date.
33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
34 // Verify that runtime/protoimpl is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
36 )
37
38 // The version number of Gnostic.
39 type Version struct {
40 state protoimpl.MessageState
41 sizeCache protoimpl.SizeCache
42 unknownFields protoimpl.UnknownFields
43
44 Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
45 Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
46 Patch int32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
47 // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
48 // be empty for mainline stable releases.
49 Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"`
50 }
51
52 func (x *Version) Reset() {
53 *x = Version{}
54 mi := &file_extensions_extension_proto_msgTypes[0]
55 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
56 ms.StoreMessageInfo(mi)
57 }
58
59 func (x *Version) String() string {
60 return protoimpl.X.MessageStringOf(x)
61 }
62
63 func (*Version) ProtoMessage() {}
64
65 func (x *Version) ProtoReflect() protoreflect.Message {
66 mi := &file_extensions_extension_proto_msgTypes[0]
67 if x != nil {
68 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
69 if ms.LoadMessageInfo() == nil {
70 ms.StoreMessageInfo(mi)
71 }
72 return ms
73 }
74 return mi.MessageOf(x)
75 }
76
77 // Deprecated: Use Version.ProtoReflect.Descriptor instead.
78 func (*Version) Descriptor() ([]byte, []int) {
79 return file_extensions_extension_proto_rawDescGZIP(), []int{0}
80 }
81
82 func (x *Version) GetMajor() int32 {
83 if x != nil {
84 return x.Major
85 }
86 return 0
87 }
88
89 func (x *Version) GetMinor() int32 {
90 if x != nil {
91 return x.Minor
92 }
93 return 0
94 }
95
96 func (x *Version) GetPatch() int32 {
97 if x != nil {
98 return x.Patch
99 }
100 return 0
101 }
102
103 func (x *Version) GetSuffix() string {
104 if x != nil {
105 return x.Suffix
106 }
107 return ""
108 }
109
110 // An encoded Request is written to the ExtensionHandler's stdin.
111 type ExtensionHandlerRequest struct {
112 state protoimpl.MessageState
113 sizeCache protoimpl.SizeCache
114 unknownFields protoimpl.UnknownFields
115
116 // The extension to process.
117 Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper,proto3" json:"wrapper,omitempty"`
118 // The version number of Gnostic.
119 CompilerVersion *Version `protobuf:"bytes,2,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"`
120 }
121
122 func (x *ExtensionHandlerRequest) Reset() {
123 *x = ExtensionHandlerRequest{}
124 mi := &file_extensions_extension_proto_msgTypes[1]
125 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
126 ms.StoreMessageInfo(mi)
127 }
128
129 func (x *ExtensionHandlerRequest) String() string {
130 return protoimpl.X.MessageStringOf(x)
131 }
132
133 func (*ExtensionHandlerRequest) ProtoMessage() {}
134
135 func (x *ExtensionHandlerRequest) ProtoReflect() protoreflect.Message {
136 mi := &file_extensions_extension_proto_msgTypes[1]
137 if x != nil {
138 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
139 if ms.LoadMessageInfo() == nil {
140 ms.StoreMessageInfo(mi)
141 }
142 return ms
143 }
144 return mi.MessageOf(x)
145 }
146
147 // Deprecated: Use ExtensionHandlerRequest.ProtoReflect.Descriptor instead.
148 func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) {
149 return file_extensions_extension_proto_rawDescGZIP(), []int{1}
150 }
151
152 func (x *ExtensionHandlerRequest) GetWrapper() *Wrapper {
153 if x != nil {
154 return x.Wrapper
155 }
156 return nil
157 }
158
159 func (x *ExtensionHandlerRequest) GetCompilerVersion() *Version {
160 if x != nil {
161 return x.CompilerVersion
162 }
163 return nil
164 }
165
166 // The extensions writes an encoded ExtensionHandlerResponse to stdout.
167 type ExtensionHandlerResponse struct {
168 state protoimpl.MessageState
169 sizeCache protoimpl.SizeCache
170 unknownFields protoimpl.UnknownFields
171
172 // true if the extension is handled by the extension handler; false otherwise
173 Handled bool `protobuf:"varint,1,opt,name=handled,proto3" json:"handled,omitempty"`
174 // Error message(s). If non-empty, the extension handling failed.
175 // The extension handler process should exit with status code zero
176 // even if it reports an error in this way.
177 //
178 // This should be used to indicate errors which prevent the extension from
179 // operating as intended. Errors which indicate a problem in gnostic
180 // itself -- such as the input Document being unparseable -- should be
181 // reported by writing a message to stderr and exiting with a non-zero
182 // status code.
183 Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
184 // text output
185 Value *anypb.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
186 }
187
188 func (x *ExtensionHandlerResponse) Reset() {
189 *x = ExtensionHandlerResponse{}
190 mi := &file_extensions_extension_proto_msgTypes[2]
191 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
192 ms.StoreMessageInfo(mi)
193 }
194
195 func (x *ExtensionHandlerResponse) String() string {
196 return protoimpl.X.MessageStringOf(x)
197 }
198
199 func (*ExtensionHandlerResponse) ProtoMessage() {}
200
201 func (x *ExtensionHandlerResponse) ProtoReflect() protoreflect.Message {
202 mi := &file_extensions_extension_proto_msgTypes[2]
203 if x != nil {
204 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
205 if ms.LoadMessageInfo() == nil {
206 ms.StoreMessageInfo(mi)
207 }
208 return ms
209 }
210 return mi.MessageOf(x)
211 }
212
213 // Deprecated: Use ExtensionHandlerResponse.ProtoReflect.Descriptor instead.
214 func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) {
215 return file_extensions_extension_proto_rawDescGZIP(), []int{2}
216 }
217
218 func (x *ExtensionHandlerResponse) GetHandled() bool {
219 if x != nil {
220 return x.Handled
221 }
222 return false
223 }
224
225 func (x *ExtensionHandlerResponse) GetErrors() []string {
226 if x != nil {
227 return x.Errors
228 }
229 return nil
230 }
231
232 func (x *ExtensionHandlerResponse) GetValue() *anypb.Any {
233 if x != nil {
234 return x.Value
235 }
236 return nil
237 }
238
239 type Wrapper struct {
240 state protoimpl.MessageState
241 sizeCache protoimpl.SizeCache
242 unknownFields protoimpl.UnknownFields
243
244 // version of the OpenAPI specification in which this extension was written.
245 Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
246 // Name of the extension.
247 ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName,proto3" json:"extension_name,omitempty"`
248 // YAML-formatted extension value.
249 Yaml string `protobuf:"bytes,3,opt,name=yaml,proto3" json:"yaml,omitempty"`
250 }
251
252 func (x *Wrapper) Reset() {
253 *x = Wrapper{}
254 mi := &file_extensions_extension_proto_msgTypes[3]
255 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
256 ms.StoreMessageInfo(mi)
257 }
258
259 func (x *Wrapper) String() string {
260 return protoimpl.X.MessageStringOf(x)
261 }
262
263 func (*Wrapper) ProtoMessage() {}
264
265 func (x *Wrapper) ProtoReflect() protoreflect.Message {
266 mi := &file_extensions_extension_proto_msgTypes[3]
267 if x != nil {
268 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
269 if ms.LoadMessageInfo() == nil {
270 ms.StoreMessageInfo(mi)
271 }
272 return ms
273 }
274 return mi.MessageOf(x)
275 }
276
277 // Deprecated: Use Wrapper.ProtoReflect.Descriptor instead.
278 func (*Wrapper) Descriptor() ([]byte, []int) {
279 return file_extensions_extension_proto_rawDescGZIP(), []int{3}
280 }
281
282 func (x *Wrapper) GetVersion() string {
283 if x != nil {
284 return x.Version
285 }
286 return ""
287 }
288
289 func (x *Wrapper) GetExtensionName() string {
290 if x != nil {
291 return x.ExtensionName
292 }
293 return ""
294 }
295
296 func (x *Wrapper) GetYaml() string {
297 if x != nil {
298 return x.Yaml
299 }
300 return ""
301 }
302
303 var File_extensions_extension_proto protoreflect.FileDescriptor
304
305 var file_extensions_extension_proto_rawDesc = []byte{
306 0x0a, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x78, 0x74,
307 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6e,
308 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
309 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
310 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a,
311 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f,
312 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14,
313 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d,
314 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20,
315 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75,
316 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66,
317 0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
318 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37,
319 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
320 0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
321 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x07,
322 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x69,
323 0x6c, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
324 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65,
325 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
326 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
327 0x6e, 0x22, 0x78, 0x0a, 0x18, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61,
328 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
329 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
330 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72,
331 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12,
332 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
333 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
334 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5e, 0x0a, 0x07, 0x57,
335 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
336 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
337 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61,
338 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
339 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18,
340 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x42, 0x4d, 0x0a, 0x0e, 0x6f,
341 0x72, 0x67, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x47,
342 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50,
343 0x01, 0x5a, 0x21, 0x2e, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3b,
344 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
345 0x6e, 0x5f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x47, 0x4e, 0x58, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
346 0x6f, 0x33,
347 }
348
349 var (
350 file_extensions_extension_proto_rawDescOnce sync.Once
351 file_extensions_extension_proto_rawDescData = file_extensions_extension_proto_rawDesc
352 )
353
354 func file_extensions_extension_proto_rawDescGZIP() []byte {
355 file_extensions_extension_proto_rawDescOnce.Do(func() {
356 file_extensions_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_extensions_extension_proto_rawDescData)
357 })
358 return file_extensions_extension_proto_rawDescData
359 }
360
361 var file_extensions_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
362 var file_extensions_extension_proto_goTypes = []any{
363 (*Version)(nil), // 0: gnostic.extension.v1.Version
364 (*ExtensionHandlerRequest)(nil), // 1: gnostic.extension.v1.ExtensionHandlerRequest
365 (*ExtensionHandlerResponse)(nil), // 2: gnostic.extension.v1.ExtensionHandlerResponse
366 (*Wrapper)(nil), // 3: gnostic.extension.v1.Wrapper
367 (*anypb.Any)(nil), // 4: google.protobuf.Any
368 }
369 var file_extensions_extension_proto_depIdxs = []int32{
370 3, // 0: gnostic.extension.v1.ExtensionHandlerRequest.wrapper:type_name -> gnostic.extension.v1.Wrapper
371 0, // 1: gnostic.extension.v1.ExtensionHandlerRequest.compiler_version:type_name -> gnostic.extension.v1.Version
372 4, // 2: gnostic.extension.v1.ExtensionHandlerResponse.value:type_name -> google.protobuf.Any
373 3, // [3:3] is the sub-list for method output_type
374 3, // [3:3] is the sub-list for method input_type
375 3, // [3:3] is the sub-list for extension type_name
376 3, // [3:3] is the sub-list for extension extendee
377 0, // [0:3] is the sub-list for field type_name
378 }
379
380 func init() { file_extensions_extension_proto_init() }
381 func file_extensions_extension_proto_init() {
382 if File_extensions_extension_proto != nil {
383 return
384 }
385 type x struct{}
386 out := protoimpl.TypeBuilder{
387 File: protoimpl.DescBuilder{
388 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
389 RawDescriptor: file_extensions_extension_proto_rawDesc,
390 NumEnums: 0,
391 NumMessages: 4,
392 NumExtensions: 0,
393 NumServices: 0,
394 },
395 GoTypes: file_extensions_extension_proto_goTypes,
396 DependencyIndexes: file_extensions_extension_proto_depIdxs,
397 MessageInfos: file_extensions_extension_proto_msgTypes,
398 }.Build()
399 File_extensions_extension_proto = out.File
400 file_extensions_extension_proto_rawDesc = nil
401 file_extensions_extension_proto_goTypes = nil
402 file_extensions_extension_proto_depIdxs = nil
403 }