plugin.pb.go 11 KB

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