2
0

plugin.pb.go 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. // Code generated by protoc-gen-go.
  2. // source: plugins/plugin.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package openapi_plugin_v1 is a generated protocol buffer package.
  6. It is generated from these files:
  7. plugins/plugin.proto
  8. It has these top-level messages:
  9. Version
  10. Parameter
  11. Request
  12. Response
  13. File
  14. Wrapper
  15. */
  16. package openapi_plugin_v1
  17. import proto "github.com/golang/protobuf/proto"
  18. import fmt "fmt"
  19. import math "math"
  20. // Reference imports to suppress errors if they are not otherwise used.
  21. var _ = proto.Marshal
  22. var _ = fmt.Errorf
  23. var _ = math.Inf
  24. // This is a compile-time assertion to ensure that this generated file
  25. // is compatible with the proto package it is being compiled against.
  26. // A compilation error at this line likely means your copy of the
  27. // proto package needs to be updated.
  28. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  29. // The version number of OpenAPI compiler.
  30. type Version struct {
  31. Major int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
  32. Minor int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
  33. Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
  34. // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
  35. // be empty for mainline stable releases.
  36. Suffix string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
  37. }
  38. func (m *Version) Reset() { *m = Version{} }
  39. func (m *Version) String() string { return proto.CompactTextString(m) }
  40. func (*Version) ProtoMessage() {}
  41. func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  42. func (m *Version) GetMajor() int32 {
  43. if m != nil {
  44. return m.Major
  45. }
  46. return 0
  47. }
  48. func (m *Version) GetMinor() int32 {
  49. if m != nil {
  50. return m.Minor
  51. }
  52. return 0
  53. }
  54. func (m *Version) GetPatch() int32 {
  55. if m != nil {
  56. return m.Patch
  57. }
  58. return 0
  59. }
  60. func (m *Version) GetSuffix() string {
  61. if m != nil {
  62. return m.Suffix
  63. }
  64. return ""
  65. }
  66. // A parameter passed to the plugin from (or through) the OpenAPI compiler.
  67. type Parameter struct {
  68. // The name of the parameter as specified in the option string
  69. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  70. // The parameter value as specified in the option string
  71. Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
  72. }
  73. func (m *Parameter) Reset() { *m = Parameter{} }
  74. func (m *Parameter) String() string { return proto.CompactTextString(m) }
  75. func (*Parameter) ProtoMessage() {}
  76. func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  77. func (m *Parameter) GetName() string {
  78. if m != nil {
  79. return m.Name
  80. }
  81. return ""
  82. }
  83. func (m *Parameter) GetValue() string {
  84. if m != nil {
  85. return m.Value
  86. }
  87. return ""
  88. }
  89. // An encoded Request is written to the plugin's stdin.
  90. type Request struct {
  91. // A wrapped OpenAPI document to process.
  92. Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper" json:"wrapper,omitempty"`
  93. // Output path specified in the plugin invocation.
  94. OutputPath string `protobuf:"bytes,2,opt,name=output_path,json=outputPath" json:"output_path,omitempty"`
  95. // Plugin parameters parsed from the invocation string.
  96. Parameters []*Parameter `protobuf:"bytes,3,rep,name=parameters" json:"parameters,omitempty"`
  97. // The version number of openapi compiler.
  98. CompilerVersion *Version `protobuf:"bytes,4,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
  99. }
  100. func (m *Request) Reset() { *m = Request{} }
  101. func (m *Request) String() string { return proto.CompactTextString(m) }
  102. func (*Request) ProtoMessage() {}
  103. func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  104. func (m *Request) GetWrapper() *Wrapper {
  105. if m != nil {
  106. return m.Wrapper
  107. }
  108. return nil
  109. }
  110. func (m *Request) GetOutputPath() string {
  111. if m != nil {
  112. return m.OutputPath
  113. }
  114. return ""
  115. }
  116. func (m *Request) GetParameters() []*Parameter {
  117. if m != nil {
  118. return m.Parameters
  119. }
  120. return nil
  121. }
  122. func (m *Request) GetCompilerVersion() *Version {
  123. if m != nil {
  124. return m.CompilerVersion
  125. }
  126. return nil
  127. }
  128. // The plugin writes an encoded Response to stdout.
  129. type Response struct {
  130. // Error message. If non-empty, the plugin failed.
  131. // The plugin process should exit with status code zero
  132. // even if it reports an error in this way.
  133. //
  134. // This should be used to indicate errors which prevent the plugin from
  135. // operating as intended. Errors which indicate a problem in openapic
  136. // itself -- such as the input Document being unparseable -- should be
  137. // reported by writing a message to stderr and exiting with a non-zero
  138. // status code.
  139. Errors []string `protobuf:"bytes,1,rep,name=errors" json:"errors,omitempty"`
  140. // file output, each file will be written by openapic to an appropriate location.
  141. Files []*File `protobuf:"bytes,2,rep,name=files" json:"files,omitempty"`
  142. }
  143. func (m *Response) Reset() { *m = Response{} }
  144. func (m *Response) String() string { return proto.CompactTextString(m) }
  145. func (*Response) ProtoMessage() {}
  146. func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  147. func (m *Response) GetErrors() []string {
  148. if m != nil {
  149. return m.Errors
  150. }
  151. return nil
  152. }
  153. func (m *Response) GetFiles() []*File {
  154. if m != nil {
  155. return m.Files
  156. }
  157. return nil
  158. }
  159. // File describes a file generated by a plugin.
  160. type File struct {
  161. // name of the file
  162. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  163. // data to be written to the file
  164. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  165. }
  166. func (m *File) Reset() { *m = File{} }
  167. func (m *File) String() string { return proto.CompactTextString(m) }
  168. func (*File) ProtoMessage() {}
  169. func (*File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  170. func (m *File) GetName() string {
  171. if m != nil {
  172. return m.Name
  173. }
  174. return ""
  175. }
  176. func (m *File) GetData() []byte {
  177. if m != nil {
  178. return m.Data
  179. }
  180. return nil
  181. }
  182. // Wrapper wraps an OpenAPI document with its version.
  183. type Wrapper struct {
  184. // filename or URL of the wrapped document
  185. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  186. // version of the OpenAPI specification that is used by the wrapped document
  187. Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
  188. // valid serialized protocol buffer of the named OpenAPI specification version
  189. Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
  190. }
  191. func (m *Wrapper) Reset() { *m = Wrapper{} }
  192. func (m *Wrapper) String() string { return proto.CompactTextString(m) }
  193. func (*Wrapper) ProtoMessage() {}
  194. func (*Wrapper) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  195. func (m *Wrapper) GetName() string {
  196. if m != nil {
  197. return m.Name
  198. }
  199. return ""
  200. }
  201. func (m *Wrapper) GetVersion() string {
  202. if m != nil {
  203. return m.Version
  204. }
  205. return ""
  206. }
  207. func (m *Wrapper) GetValue() []byte {
  208. if m != nil {
  209. return m.Value
  210. }
  211. return nil
  212. }
  213. func init() {
  214. proto.RegisterType((*Version)(nil), "openapi.plugin.v1.Version")
  215. proto.RegisterType((*Parameter)(nil), "openapi.plugin.v1.Parameter")
  216. proto.RegisterType((*Request)(nil), "openapi.plugin.v1.Request")
  217. proto.RegisterType((*Response)(nil), "openapi.plugin.v1.Response")
  218. proto.RegisterType((*File)(nil), "openapi.plugin.v1.File")
  219. proto.RegisterType((*Wrapper)(nil), "openapi.plugin.v1.Wrapper")
  220. }
  221. func init() { proto.RegisterFile("plugins/plugin.proto", fileDescriptor0) }
  222. var fileDescriptor0 = []byte{
  223. // 390 bytes of a gzipped FileDescriptorProto
  224. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x92, 0x41, 0x8f, 0xd3, 0x30,
  225. 0x10, 0x85, 0x95, 0x26, 0xdd, 0x90, 0x29, 0xd2, 0x82, 0xb5, 0x80, 0x85, 0x90, 0x88, 0x72, 0xea,
  226. 0x85, 0xc0, 0x2e, 0x70, 0xe3, 0xd2, 0x56, 0x20, 0x71, 0x40, 0x0d, 0x3e, 0xc0, 0xb1, 0x32, 0x61,
  227. 0xda, 0x1a, 0x25, 0xb1, 0xb1, 0x9d, 0xc0, 0xef, 0xe1, 0xbf, 0xf1, 0x3f, 0x50, 0x6c, 0x07, 0x90,
  228. 0x36, 0xa7, 0xfa, 0x7b, 0x1a, 0x3f, 0xbf, 0x79, 0x0d, 0x5c, 0xa9, 0xa6, 0x3f, 0x89, 0xce, 0x3c,
  229. 0xf7, 0xbf, 0xa5, 0xd2, 0xd2, 0x4a, 0x72, 0x5f, 0x2a, 0xec, 0xb8, 0x12, 0x65, 0x50, 0x87, 0xeb,
  230. 0xa2, 0x86, 0xf4, 0x13, 0x6a, 0x23, 0x64, 0x47, 0xae, 0x60, 0xd9, 0xf2, 0x6f, 0x52, 0xd3, 0x28,
  231. 0x8f, 0xd6, 0x4b, 0xe6, 0xc1, 0xa9, 0xa2, 0x93, 0x9a, 0x2e, 0x82, 0x3a, 0xc2, 0xa8, 0x2a, 0x6e,
  232. 0xeb, 0x33, 0x8d, 0xbd, 0xea, 0x80, 0x3c, 0x84, 0x0b, 0xd3, 0x1f, 0x8f, 0xe2, 0x27, 0x4d, 0xf2,
  233. 0x68, 0x9d, 0xb1, 0x40, 0xc5, 0x6b, 0xc8, 0x2a, 0xae, 0x79, 0x8b, 0x16, 0x35, 0x21, 0x90, 0x74,
  234. 0xbc, 0x45, 0xf7, 0x4a, 0xc6, 0xdc, 0x79, 0xb4, 0x1b, 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 0xd4, 0xa7, 0x29, 0x63, 0x5d, 0x0e, 0xd7, 0xdb,
  246. 0x07, 0x7b, 0x85, 0xdd, 0xa6, 0x7a, 0xbf, 0x0b, 0xcb, 0x57, 0x2e, 0x77, 0x15, 0xfd, 0x5a, 0xc4,
  247. 0xfb, 0xcd, 0xee, 0xcb, 0x85, 0xfb, 0x42, 0x5f, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x51, 0x4d,
  248. 0xec, 0x80, 0xb9, 0x02, 0x00, 0x00,
  249. }