plugin.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. // Code generated by protoc-gen-go.
  2. // source: google/protobuf/compiler/plugin.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package plugin_go is a generated protocol buffer package.
  6. It is generated from these files:
  7. google/protobuf/compiler/plugin.proto
  8. It has these top-level messages:
  9. CodeGeneratorRequest
  10. CodeGeneratorResponse
  11. */
  12. package plugin_go
  13. import proto "github.com/golang/protobuf/proto"
  14. import fmt "fmt"
  15. import math "math"
  16. import google_protobuf "github.com/golang/protobuf/protoc-gen-go/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. const _ = proto.ProtoPackageIsVersion1
  24. // An encoded CodeGeneratorRequest is written to the plugin's stdin.
  25. type CodeGeneratorRequest struct {
  26. // The .proto files that were explicitly listed on the command-line. The
  27. // code generator should generate code only for these files. Each file's
  28. // descriptor will be included in proto_file, below.
  29. FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"`
  30. // The generator parameter passed on the command-line.
  31. Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"`
  32. // FileDescriptorProtos for all files in files_to_generate and everything
  33. // they import. The files will appear in topological order, so each file
  34. // appears before any file that imports it.
  35. //
  36. // protoc guarantees that all proto_files will be written after
  37. // the fields above, even though this is not technically guaranteed by the
  38. // protobuf wire format. This theoretically could allow a plugin to stream
  39. // in the FileDescriptorProtos and handle them one by one rather than read
  40. // the entire set into memory at once. However, as of this writing, this
  41. // is not similarly optimized on protoc's end -- it will store all fields in
  42. // memory at once before sending them to the plugin.
  43. ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"`
  44. XXX_unrecognized []byte `json:"-"`
  45. }
  46. func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
  47. func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
  48. func (*CodeGeneratorRequest) ProtoMessage() {}
  49. func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  50. func (m *CodeGeneratorRequest) GetFileToGenerate() []string {
  51. if m != nil {
  52. return m.FileToGenerate
  53. }
  54. return nil
  55. }
  56. func (m *CodeGeneratorRequest) GetParameter() string {
  57. if m != nil && m.Parameter != nil {
  58. return *m.Parameter
  59. }
  60. return ""
  61. }
  62. func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto {
  63. if m != nil {
  64. return m.ProtoFile
  65. }
  66. return nil
  67. }
  68. // The plugin writes an encoded CodeGeneratorResponse to stdout.
  69. type CodeGeneratorResponse struct {
  70. // Error message. If non-empty, code generation failed. The plugin process
  71. // should exit with status code zero even if it reports an error in this way.
  72. //
  73. // This should be used to indicate errors in .proto files which prevent the
  74. // code generator from generating correct code. Errors which indicate a
  75. // problem in protoc itself -- such as the input CodeGeneratorRequest being
  76. // unparseable -- should be reported by writing a message to stderr and
  77. // exiting with a non-zero status code.
  78. Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
  79. File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
  80. XXX_unrecognized []byte `json:"-"`
  81. }
  82. func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
  83. func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
  84. func (*CodeGeneratorResponse) ProtoMessage() {}
  85. func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  86. func (m *CodeGeneratorResponse) GetError() string {
  87. if m != nil && m.Error != nil {
  88. return *m.Error
  89. }
  90. return ""
  91. }
  92. func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File {
  93. if m != nil {
  94. return m.File
  95. }
  96. return nil
  97. }
  98. // Represents a single generated file.
  99. type CodeGeneratorResponse_File struct {
  100. // The file name, relative to the output directory. The name must not
  101. // contain "." or ".." components and must be relative, not be absolute (so,
  102. // the file cannot lie outside the output directory). "/" must be used as
  103. // the path separator, not "\".
  104. //
  105. // If the name is omitted, the content will be appended to the previous
  106. // file. This allows the generator to break large files into small chunks,
  107. // and allows the generated text to be streamed back to protoc so that large
  108. // files need not reside completely in memory at one time. Note that as of
  109. // this writing protoc does not optimize for this -- it will read the entire
  110. // CodeGeneratorResponse before writing files to disk.
  111. Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  112. // If non-empty, indicates that the named file should already exist, and the
  113. // content here is to be inserted into that file at a defined insertion
  114. // point. This feature allows a code generator to extend the output
  115. // produced by another code generator. The original generator may provide
  116. // insertion points by placing special annotations in the file that look
  117. // like:
  118. // @@protoc_insertion_point(NAME)
  119. // The annotation can have arbitrary text before and after it on the line,
  120. // which allows it to be placed in a comment. NAME should be replaced with
  121. // an identifier naming the point -- this is what other generators will use
  122. // as the insertion_point. Code inserted at this point will be placed
  123. // immediately above the line containing the insertion point (thus multiple
  124. // insertions to the same point will come out in the order they were added).
  125. // The double-@ is intended to make it unlikely that the generated code
  126. // could contain things that look like insertion points by accident.
  127. //
  128. // For example, the C++ code generator places the following line in the
  129. // .pb.h files that it generates:
  130. // // @@protoc_insertion_point(namespace_scope)
  131. // This line appears within the scope of the file's package namespace, but
  132. // outside of any particular class. Another plugin can then specify the
  133. // insertion_point "namespace_scope" to generate additional classes or
  134. // other declarations that should be placed in this scope.
  135. //
  136. // Note that if the line containing the insertion point begins with
  137. // whitespace, the same whitespace will be added to every line of the
  138. // inserted text. This is useful for languages like Python, where
  139. // indentation matters. In these languages, the insertion point comment
  140. // should be indented the same amount as any inserted code will need to be
  141. // in order to work correctly in that context.
  142. //
  143. // The code generator that generates the initial file and the one which
  144. // inserts into it must both run as part of a single invocation of protoc.
  145. // Code generators are executed in the order in which they appear on the
  146. // command line.
  147. //
  148. // If |insertion_point| is present, |name| must also be present.
  149. InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"`
  150. // The file contents.
  151. Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
  152. XXX_unrecognized []byte `json:"-"`
  153. }
  154. func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} }
  155. func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) }
  156. func (*CodeGeneratorResponse_File) ProtoMessage() {}
  157. func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
  158. func (m *CodeGeneratorResponse_File) GetName() string {
  159. if m != nil && m.Name != nil {
  160. return *m.Name
  161. }
  162. return ""
  163. }
  164. func (m *CodeGeneratorResponse_File) GetInsertionPoint() string {
  165. if m != nil && m.InsertionPoint != nil {
  166. return *m.InsertionPoint
  167. }
  168. return ""
  169. }
  170. func (m *CodeGeneratorResponse_File) GetContent() string {
  171. if m != nil && m.Content != nil {
  172. return *m.Content
  173. }
  174. return ""
  175. }
  176. func init() {
  177. proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest")
  178. proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse")
  179. proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File")
  180. }
  181. var fileDescriptor0 = []byte{
  182. // 311 bytes of a gzipped FileDescriptorProto
  183. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0xd1, 0x4a, 0xfb, 0x30,
  184. 0x14, 0xc6, 0xe9, 0xff, 0x3f, 0x91, 0x1d, 0x65, 0x93, 0x30, 0xa1, 0x8c, 0x5d, 0x94, 0xa1, 0xb8,
  185. 0xab, 0x14, 0x44, 0xf0, 0x7e, 0x13, 0xf5, 0xb2, 0x14, 0xaf, 0x04, 0x29, 0xb5, 0x3b, 0x2b, 0x81,
  186. 0x2e, 0x27, 0xa6, 0xe9, 0x13, 0xf9, 0x4e, 0x3e, 0x8f, 0x49, 0xda, 0x4e, 0x29, 0xee, 0xaa, 0x3d,
  187. 0xdf, 0xf9, 0xe5, 0x3b, 0x5f, 0x72, 0xe0, 0xba, 0x24, 0x2a, 0x2b, 0x8c, 0x95, 0x26, 0x43, 0xef,
  188. 0xcd, 0x2e, 0x2e, 0x68, 0xaf, 0x44, 0x85, 0x3a, 0x56, 0x55, 0x53, 0x0a, 0xc9, 0x7d, 0x83, 0x85,
  189. 0x2d, 0xc6, 0x7b, 0x8c, 0xf7, 0xd8, 0x3c, 0x1a, 0x1a, 0x6c, 0xb1, 0x2e, 0xb4, 0x50, 0x86, 0x74,
  190. 0x4b, 0x2f, 0x3f, 0x03, 0x98, 0x6d, 0x68, 0x8b, 0x4f, 0x28, 0x51, 0xe7, 0x56, 0x4f, 0xf1, 0xa3,
  191. 0xc1, 0xda, 0xb0, 0x15, 0x5c, 0xec, 0xac, 0x47, 0x66, 0x28, 0x2b, 0xdb, 0x1e, 0x86, 0x41, 0xf4,
  192. 0x7f, 0x35, 0x4e, 0x27, 0x4e, 0x7f, 0xa1, 0xee, 0x04, 0xb2, 0x05, 0x8c, 0x55, 0xae, 0xf3, 0x3d,
  193. 0x1a, 0xd4, 0xe1, 0xbf, 0x28, 0xb0, 0xc8, 0x8f, 0xc0, 0x36, 0x00, 0x7e, 0x52, 0xe6, 0x4e, 0x85,
  194. 0x53, 0xeb, 0x70, 0x76, 0x7b, 0xc5, 0x87, 0x89, 0x1f, 0x6d, 0xf3, 0xe1, 0x90, 0x2d, 0x71, 0xb2,
  195. 0x35, 0x71, 0x1f, 0xd7, 0x59, 0x7e, 0x05, 0x70, 0x39, 0x48, 0x59, 0x2b, 0x92, 0x35, 0xb2, 0x19,
  196. 0x9c, 0xa0, 0xd6, 0xa4, 0x6d, 0x36, 0x37, 0xb8, 0x2d, 0xd8, 0x33, 0x8c, 0x7e, 0x8d, 0xbb, 0xe3,
  197. 0xc7, 0x1e, 0x88, 0xff, 0x69, 0xea, 0xd3, 0xa4, 0xde, 0x61, 0xfe, 0x06, 0x23, 0x57, 0x31, 0x06,
  198. 0x23, 0x69, 0x6f, 0xd4, 0x8d, 0xf1, 0xff, 0xec, 0x06, 0xa6, 0xc2, 0xe2, 0xda, 0x08, 0x92, 0x99,
  199. 0x22, 0x21, 0x4d, 0x77, 0xfd, 0xc9, 0x41, 0x4e, 0x9c, 0xca, 0x42, 0x38, 0x2d, 0x48, 0x1a, 0xb4,
  200. 0xc0, 0xd4, 0x03, 0x7d, 0xb9, 0xbe, 0x87, 0x85, 0xcd, 0x72, 0x34, 0xdf, 0xfa, 0x3c, 0xf1, 0x8b,
  201. 0xf6, 0x0f, 0x52, 0xbf, 0x8e, 0xdb, 0xb5, 0x67, 0x25, 0x7d, 0x07, 0x00, 0x00, 0xff, 0xff, 0x83,
  202. 0x7b, 0x5c, 0x7c, 0x1b, 0x02, 0x00, 0x00,
  203. }