plugin.pb.go 10 KB

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