extension.pb.go 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. // Code generated by protoc-gen-go.
  2. // source: extension.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package openapiextension_v1 is a generated protocol buffer package.
  6. It is generated from these files:
  7. extension.proto
  8. It has these top-level messages:
  9. Version
  10. ExtensionHandlerRequest
  11. ExtensionHandlerResponse
  12. Wrapper
  13. */
  14. package openapiextension_v1
  15. import proto "github.com/golang/protobuf/proto"
  16. import fmt "fmt"
  17. import math "math"
  18. import google_protobuf "github.com/golang/protobuf/ptypes/any"
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ = proto.Marshal
  21. var _ = fmt.Errorf
  22. var _ = math.Inf
  23. // This is a compile-time assertion to ensure that this generated file
  24. // is compatible with the proto package it is being compiled against.
  25. // A compilation error at this line likely means your copy of the
  26. // proto package needs to be updated.
  27. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  28. // The version number of OpenAPI compiler.
  29. type Version struct {
  30. Major int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
  31. Minor int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
  32. Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
  33. // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
  34. // be empty for mainline stable releases.
  35. Suffix string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
  36. }
  37. func (m *Version) Reset() { *m = Version{} }
  38. func (m *Version) String() string { return proto.CompactTextString(m) }
  39. func (*Version) ProtoMessage() {}
  40. func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  41. func (m *Version) GetMajor() int32 {
  42. if m != nil {
  43. return m.Major
  44. }
  45. return 0
  46. }
  47. func (m *Version) GetMinor() int32 {
  48. if m != nil {
  49. return m.Minor
  50. }
  51. return 0
  52. }
  53. func (m *Version) GetPatch() int32 {
  54. if m != nil {
  55. return m.Patch
  56. }
  57. return 0
  58. }
  59. func (m *Version) GetSuffix() string {
  60. if m != nil {
  61. return m.Suffix
  62. }
  63. return ""
  64. }
  65. // An encoded Request is written to the ExtensionHandler's stdin.
  66. type ExtensionHandlerRequest struct {
  67. // The OpenAPI descriptions that were explicitly listed on the command line.
  68. // The specifications will appear in the order they are specified to openapic.
  69. Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper" json:"wrapper,omitempty"`
  70. // The version number of openapi compiler.
  71. CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
  72. }
  73. func (m *ExtensionHandlerRequest) Reset() { *m = ExtensionHandlerRequest{} }
  74. func (m *ExtensionHandlerRequest) String() string { return proto.CompactTextString(m) }
  75. func (*ExtensionHandlerRequest) ProtoMessage() {}
  76. func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  77. func (m *ExtensionHandlerRequest) GetWrapper() *Wrapper {
  78. if m != nil {
  79. return m.Wrapper
  80. }
  81. return nil
  82. }
  83. func (m *ExtensionHandlerRequest) GetCompilerVersion() *Version {
  84. if m != nil {
  85. return m.CompilerVersion
  86. }
  87. return nil
  88. }
  89. // The extensions writes an encoded ExtensionHandlerResponse to stdout.
  90. type ExtensionHandlerResponse struct {
  91. // true if the extension is handled by the extension handler; false otherwise
  92. Handled bool `protobuf:"varint,1,opt,name=handled" json:"handled,omitempty"`
  93. // Error message. If non-empty, the extension handling failed.
  94. // The extension handler process should exit with status code zero
  95. // even if it reports an error in this way.
  96. //
  97. // This should be used to indicate errors which prevent the extension from
  98. // operating as intended. Errors which indicate a problem in gnostic
  99. // itself -- such as the input Document being unparseable -- should be
  100. // reported by writing a message to stderr and exiting with a non-zero
  101. // status code.
  102. Error []string `protobuf:"bytes,2,rep,name=error" json:"error,omitempty"`
  103. // text output
  104. Value *google_protobuf.Any `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
  105. }
  106. func (m *ExtensionHandlerResponse) Reset() { *m = ExtensionHandlerResponse{} }
  107. func (m *ExtensionHandlerResponse) String() string { return proto.CompactTextString(m) }
  108. func (*ExtensionHandlerResponse) ProtoMessage() {}
  109. func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  110. func (m *ExtensionHandlerResponse) GetHandled() bool {
  111. if m != nil {
  112. return m.Handled
  113. }
  114. return false
  115. }
  116. func (m *ExtensionHandlerResponse) GetError() []string {
  117. if m != nil {
  118. return m.Error
  119. }
  120. return nil
  121. }
  122. func (m *ExtensionHandlerResponse) GetValue() *google_protobuf.Any {
  123. if m != nil {
  124. return m.Value
  125. }
  126. return nil
  127. }
  128. type Wrapper struct {
  129. // version of the OpenAPI specification in which this extension was written.
  130. Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
  131. // Name of the extension
  132. ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName" json:"extension_name,omitempty"`
  133. // Must be a valid yaml for the proto
  134. Yaml string `protobuf:"bytes,3,opt,name=yaml" json:"yaml,omitempty"`
  135. }
  136. func (m *Wrapper) Reset() { *m = Wrapper{} }
  137. func (m *Wrapper) String() string { return proto.CompactTextString(m) }
  138. func (*Wrapper) ProtoMessage() {}
  139. func (*Wrapper) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  140. func (m *Wrapper) GetVersion() string {
  141. if m != nil {
  142. return m.Version
  143. }
  144. return ""
  145. }
  146. func (m *Wrapper) GetExtensionName() string {
  147. if m != nil {
  148. return m.ExtensionName
  149. }
  150. return ""
  151. }
  152. func (m *Wrapper) GetYaml() string {
  153. if m != nil {
  154. return m.Yaml
  155. }
  156. return ""
  157. }
  158. func init() {
  159. proto.RegisterType((*Version)(nil), "openapiextension.v1.Version")
  160. proto.RegisterType((*ExtensionHandlerRequest)(nil), "openapiextension.v1.ExtensionHandlerRequest")
  161. proto.RegisterType((*ExtensionHandlerResponse)(nil), "openapiextension.v1.ExtensionHandlerResponse")
  162. proto.RegisterType((*Wrapper)(nil), "openapiextension.v1.Wrapper")
  163. }
  164. func init() { proto.RegisterFile("extension.proto", fileDescriptor0) }
  165. var fileDescriptor0 = []byte{
  166. // 355 bytes of a gzipped FileDescriptorProto
  167. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0x4d, 0x4b, 0xf3, 0x40,
  168. 0x1c, 0xc4, 0x49, 0xdf, 0xf2, 0x64, 0x1f, 0xb4, 0xb2, 0x16, 0x8d, 0xe2, 0xa1, 0x04, 0x84, 0x22,
  169. 0xb8, 0xa5, 0x0a, 0xde, 0x5b, 0x28, 0xea, 0xc5, 0x96, 0x3d, 0xd4, 0x9b, 0x65, 0x9b, 0xfe, 0xdb,
  170. 0x46, 0x92, 0xdd, 0x75, 0xf3, 0x62, 0xfb, 0x55, 0x3c, 0xfa, 0x49, 0x25, 0xbb, 0xd9, 0x7a, 0x50,
  171. 0x6f, 0x99, 0x1f, 0x93, 0xfc, 0x67, 0x26, 0xa8, 0x0d, 0xdb, 0x0c, 0x78, 0x1a, 0x09, 0x4e, 0xa4,
  172. 0x12, 0x99, 0xc0, 0xc7, 0x42, 0x02, 0x67, 0x32, 0xfa, 0xe6, 0xc5, 0xe0, 0xfc, 0x6c, 0x2d, 0xc4,
  173. 0x3a, 0x86, 0xbe, 0xb6, 0x2c, 0xf2, 0x55, 0x9f, 0xf1, 0x9d, 0xf1, 0x07, 0x21, 0x72, 0x67, 0xa0,
  174. 0x4a, 0x23, 0xee, 0xa0, 0x66, 0xc2, 0x5e, 0x85, 0xf2, 0x9d, 0xae, 0xd3, 0x6b, 0x52, 0x23, 0x34,
  175. 0x8d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x62,
  186. 0x7d, 0xd6, 0xa3, 0xfa, 0x79, 0x74, 0x8d, 0xda, 0x42, 0xad, 0xed, 0x16, 0x21, 0x29, 0x06, 0x23,
  187. 0x3c, 0x91, 0xc0, 0x87, 0xd3, 0xc7, 0x7d, 0xdf, 0xd9, 0x60, 0xea, 0x7c, 0xd6, 0xea, 0x93, 0xe1,
  188. 0x78, 0xd1, 0xd2, 0x19, 0x6f, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x56, 0x40, 0x4d, 0x52,
  189. 0x02, 0x00, 0x00,
  190. }