plugin.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: plugin.proto
  3. /*
  4. Package plugin_go is a generated protocol buffer package.
  5. It is generated from these files:
  6. plugin.proto
  7. It has these top-level messages:
  8. Version
  9. CodeGeneratorRequest
  10. CodeGeneratorResponse
  11. */
  12. package plugin_go
  13. import proto "github.com/gogo/protobuf/proto"
  14. import fmt "fmt"
  15. import math "math"
  16. import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
  17. // Reference imports to suppress errors if they are not otherwise used.
  18. var _ = proto.Marshal
  19. var _ = fmt.Errorf
  20. var _ = math.Inf
  21. // This is a compile-time assertion to ensure that this generated file
  22. // is compatible with the proto package it is being compiled against.
  23. // A compilation error at this line likely means your copy of the
  24. // proto package needs to be updated.
  25. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  26. // The version number of protocol compiler.
  27. type Version struct {
  28. Major *int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"`
  29. Minor *int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"`
  30. Patch *int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
  31. // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
  32. // be empty for mainline stable releases.
  33. Suffix *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
  34. XXX_unrecognized []byte `json:"-"`
  35. }
  36. func (m *Version) Reset() { *m = Version{} }
  37. func (m *Version) String() string { return proto.CompactTextString(m) }
  38. func (*Version) ProtoMessage() {}
  39. func (*Version) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} }
  40. func (m *Version) GetMajor() int32 {
  41. if m != nil && m.Major != nil {
  42. return *m.Major
  43. }
  44. return 0
  45. }
  46. func (m *Version) GetMinor() int32 {
  47. if m != nil && m.Minor != nil {
  48. return *m.Minor
  49. }
  50. return 0
  51. }
  52. func (m *Version) GetPatch() int32 {
  53. if m != nil && m.Patch != nil {
  54. return *m.Patch
  55. }
  56. return 0
  57. }
  58. func (m *Version) GetSuffix() string {
  59. if m != nil && m.Suffix != nil {
  60. return *m.Suffix
  61. }
  62. return ""
  63. }
  64. // An encoded CodeGeneratorRequest is written to the plugin's stdin.
  65. type CodeGeneratorRequest struct {
  66. // The .proto files that were explicitly listed on the command-line. The
  67. // code generator should generate code only for these files. Each file's
  68. // descriptor will be included in proto_file, below.
  69. FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"`
  70. // The generator parameter passed on the command-line.
  71. Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"`
  72. // FileDescriptorProtos for all files in files_to_generate and everything
  73. // they import. The files will appear in topological order, so each file
  74. // appears before any file that imports it.
  75. //
  76. // protoc guarantees that all proto_files will be written after
  77. // the fields above, even though this is not technically guaranteed by the
  78. // protobuf wire format. This theoretically could allow a plugin to stream
  79. // in the FileDescriptorProtos and handle them one by one rather than read
  80. // the entire set into memory at once. However, as of this writing, this
  81. // is not similarly optimized on protoc's end -- it will store all fields in
  82. // memory at once before sending them to the plugin.
  83. //
  84. // Type names of fields and extensions in the FileDescriptorProto are always
  85. // fully qualified.
  86. ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"`
  87. // The version number of protocol compiler.
  88. CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
  89. XXX_unrecognized []byte `json:"-"`
  90. }
  91. func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
  92. func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
  93. func (*CodeGeneratorRequest) ProtoMessage() {}
  94. func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} }
  95. func (m *CodeGeneratorRequest) GetFileToGenerate() []string {
  96. if m != nil {
  97. return m.FileToGenerate
  98. }
  99. return nil
  100. }
  101. func (m *CodeGeneratorRequest) GetParameter() string {
  102. if m != nil && m.Parameter != nil {
  103. return *m.Parameter
  104. }
  105. return ""
  106. }
  107. func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto {
  108. if m != nil {
  109. return m.ProtoFile
  110. }
  111. return nil
  112. }
  113. func (m *CodeGeneratorRequest) GetCompilerVersion() *Version {
  114. if m != nil {
  115. return m.CompilerVersion
  116. }
  117. return nil
  118. }
  119. // The plugin writes an encoded CodeGeneratorResponse to stdout.
  120. type CodeGeneratorResponse struct {
  121. // Error message. If non-empty, code generation failed. The plugin process
  122. // should exit with status code zero even if it reports an error in this way.
  123. //
  124. // This should be used to indicate errors in .proto files which prevent the
  125. // code generator from generating correct code. Errors which indicate a
  126. // problem in protoc itself -- such as the input CodeGeneratorRequest being
  127. // unparseable -- should be reported by writing a message to stderr and
  128. // exiting with a non-zero status code.
  129. Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
  130. File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
  131. XXX_unrecognized []byte `json:"-"`
  132. }
  133. func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
  134. func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
  135. func (*CodeGeneratorResponse) ProtoMessage() {}
  136. func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{2} }
  137. func (m *CodeGeneratorResponse) GetError() string {
  138. if m != nil && m.Error != nil {
  139. return *m.Error
  140. }
  141. return ""
  142. }
  143. func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File {
  144. if m != nil {
  145. return m.File
  146. }
  147. return nil
  148. }
  149. // Represents a single generated file.
  150. type CodeGeneratorResponse_File struct {
  151. // The file name, relative to the output directory. The name must not
  152. // contain "." or ".." components and must be relative, not be absolute (so,
  153. // the file cannot lie outside the output directory). "/" must be used as
  154. // the path separator, not "\".
  155. //
  156. // If the name is omitted, the content will be appended to the previous
  157. // file. This allows the generator to break large files into small chunks,
  158. // and allows the generated text to be streamed back to protoc so that large
  159. // files need not reside completely in memory at one time. Note that as of
  160. // this writing protoc does not optimize for this -- it will read the entire
  161. // CodeGeneratorResponse before writing files to disk.
  162. Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  163. // If non-empty, indicates that the named file should already exist, and the
  164. // content here is to be inserted into that file at a defined insertion
  165. // point. This feature allows a code generator to extend the output
  166. // produced by another code generator. The original generator may provide
  167. // insertion points by placing special annotations in the file that look
  168. // like:
  169. // @@protoc_insertion_point(NAME)
  170. // The annotation can have arbitrary text before and after it on the line,
  171. // which allows it to be placed in a comment. NAME should be replaced with
  172. // an identifier naming the point -- this is what other generators will use
  173. // as the insertion_point. Code inserted at this point will be placed
  174. // immediately above the line containing the insertion point (thus multiple
  175. // insertions to the same point will come out in the order they were added).
  176. // The double-@ is intended to make it unlikely that the generated code
  177. // could contain things that look like insertion points by accident.
  178. //
  179. // For example, the C++ code generator places the following line in the
  180. // .pb.h files that it generates:
  181. // // @@protoc_insertion_point(namespace_scope)
  182. // This line appears within the scope of the file's package namespace, but
  183. // outside of any particular class. Another plugin can then specify the
  184. // insertion_point "namespace_scope" to generate additional classes or
  185. // other declarations that should be placed in this scope.
  186. //
  187. // Note that if the line containing the insertion point begins with
  188. // whitespace, the same whitespace will be added to every line of the
  189. // inserted text. This is useful for languages like Python, where
  190. // indentation matters. In these languages, the insertion point comment
  191. // should be indented the same amount as any inserted code will need to be
  192. // in order to work correctly in that context.
  193. //
  194. // The code generator that generates the initial file and the one which
  195. // inserts into it must both run as part of a single invocation of protoc.
  196. // Code generators are executed in the order in which they appear on the
  197. // command line.
  198. //
  199. // If |insertion_point| is present, |name| must also be present.
  200. InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"`
  201. // The file contents.
  202. Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
  203. XXX_unrecognized []byte `json:"-"`
  204. }
  205. func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} }
  206. func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) }
  207. func (*CodeGeneratorResponse_File) ProtoMessage() {}
  208. func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) {
  209. return fileDescriptorPlugin, []int{2, 0}
  210. }
  211. func (m *CodeGeneratorResponse_File) GetName() string {
  212. if m != nil && m.Name != nil {
  213. return *m.Name
  214. }
  215. return ""
  216. }
  217. func (m *CodeGeneratorResponse_File) GetInsertionPoint() string {
  218. if m != nil && m.InsertionPoint != nil {
  219. return *m.InsertionPoint
  220. }
  221. return ""
  222. }
  223. func (m *CodeGeneratorResponse_File) GetContent() string {
  224. if m != nil && m.Content != nil {
  225. return *m.Content
  226. }
  227. return ""
  228. }
  229. func init() {
  230. proto.RegisterType((*Version)(nil), "google.protobuf.compiler.Version")
  231. proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest")
  232. proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse")
  233. proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File")
  234. }
  235. func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) }
  236. var fileDescriptorPlugin = []byte{
  237. // 383 bytes of a gzipped FileDescriptorProto
  238. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcd, 0x6a, 0xd5, 0x40,
  239. 0x14, 0xc7, 0x89, 0x37, 0xb5, 0xe4, 0xb4, 0x34, 0x65, 0xa8, 0x32, 0x94, 0x2e, 0xe2, 0x45, 0x30,
  240. 0xab, 0x14, 0x8a, 0xe0, 0xbe, 0x15, 0x75, 0xe1, 0xe2, 0x32, 0x88, 0x0b, 0x41, 0x42, 0x4c, 0x4f,
  241. 0xe2, 0x48, 0x32, 0x67, 0x9c, 0x99, 0x88, 0x4f, 0xea, 0x7b, 0xf8, 0x06, 0x32, 0x1f, 0xa9, 0x72,
  242. 0xf1, 0xee, 0xe6, 0xff, 0x3b, 0xf3, 0x71, 0xce, 0x8f, 0x81, 0x53, 0x3d, 0x2d, 0xa3, 0x54, 0x8d,
  243. 0x36, 0xe4, 0x88, 0xf1, 0x91, 0x68, 0x9c, 0x30, 0xa6, 0x2f, 0xcb, 0xd0, 0xf4, 0x34, 0x6b, 0x39,
  244. 0xa1, 0xb9, 0xac, 0x62, 0xe5, 0x7a, 0xad, 0x5c, 0xdf, 0xa3, 0xed, 0x8d, 0xd4, 0x8e, 0x4c, 0xdc,
  245. 0xbd, 0xed, 0xe1, 0xf8, 0x23, 0x1a, 0x2b, 0x49, 0xb1, 0x0b, 0x38, 0x9a, 0xbb, 0x6f, 0x64, 0x78,
  246. 0x56, 0x65, 0xf5, 0x91, 0x88, 0x21, 0x50, 0xa9, 0xc8, 0xf0, 0x47, 0x89, 0xfa, 0xe0, 0xa9, 0xee,
  247. 0x5c, 0xff, 0x95, 0x6f, 0x22, 0x0d, 0x81, 0x3d, 0x85, 0xc7, 0x76, 0x19, 0x06, 0xf9, 0x93, 0xe7,
  248. 0x55, 0x56, 0x17, 0x22, 0xa5, 0xed, 0xef, 0x0c, 0x2e, 0xee, 0xe8, 0x1e, 0xdf, 0xa2, 0x42, 0xd3,
  249. 0x39, 0x32, 0x02, 0xbf, 0x2f, 0x68, 0x1d, 0xab, 0xe1, 0x7c, 0x90, 0x13, 0xb6, 0x8e, 0xda, 0x31,
  250. 0xd6, 0x90, 0x67, 0xd5, 0xa6, 0x2e, 0xc4, 0x99, 0xe7, 0x1f, 0x28, 0x9d, 0x40, 0x76, 0x05, 0x85,
  251. 0xee, 0x4c, 0x37, 0xa3, 0xc3, 0xd8, 0x4a, 0x21, 0xfe, 0x02, 0x76, 0x07, 0x10, 0xc6, 0x69, 0xfd,
  252. 0x29, 0x5e, 0x56, 0x9b, 0xfa, 0xe4, 0xe6, 0x79, 0xb3, 0xaf, 0xe5, 0x8d, 0x9c, 0xf0, 0xf5, 0x83,
  253. 0x80, 0x9d, 0xc7, 0xa2, 0x08, 0x55, 0x5f, 0x61, 0xef, 0xe1, 0x7c, 0x15, 0xd7, 0xfe, 0x88, 0x4e,
  254. 0xc2, 0x78, 0x27, 0x37, 0xcf, 0x9a, 0x43, 0x86, 0x9b, 0x24, 0x4f, 0x94, 0x2b, 0x49, 0x60, 0xfb,
  255. 0x2b, 0x83, 0x27, 0x7b, 0x33, 0x5b, 0x4d, 0xca, 0xa2, 0x77, 0x87, 0xc6, 0x24, 0xcf, 0x85, 0x88,
  256. 0x81, 0xbd, 0x83, 0xfc, 0x9f, 0xe6, 0x5f, 0x1e, 0x7e, 0xf1, 0xbf, 0x97, 0x86, 0xd9, 0x44, 0xb8,
  257. 0xe1, 0xf2, 0x33, 0xe4, 0x61, 0x1e, 0x06, 0xb9, 0xea, 0x66, 0x4c, 0xcf, 0x84, 0x35, 0x7b, 0x01,
  258. 0xa5, 0x54, 0x16, 0x8d, 0x93, 0xa4, 0x5a, 0x4d, 0x52, 0xb9, 0x24, 0xf3, 0xec, 0x01, 0xef, 0x3c,
  259. 0x65, 0x1c, 0x8e, 0x7b, 0x52, 0x0e, 0x95, 0xe3, 0x65, 0xd8, 0xb0, 0xc6, 0xdb, 0x57, 0x70, 0xd5,
  260. 0xd3, 0x7c, 0xb0, 0xbf, 0xdb, 0xd3, 0x5d, 0xf8, 0x9b, 0x41, 0xaf, 0xfd, 0x54, 0xc4, 0x9f, 0xda,
  261. 0x8e, 0xf4, 0x27, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x72, 0x3d, 0x18, 0xb5, 0x02, 0x00, 0x00,
  262. }