plugin.pb.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/protobuf/compiler/plugin.proto
  3. /*
  4. Package plugin_go is a generated protocol buffer package.
  5. It is generated from these files:
  6. google/protobuf/compiler/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/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. // 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_NoUnkeyedLiteral struct{} `json:"-"`
  35. XXX_unrecognized []byte `json:"-"`
  36. XXX_sizecache int32 `json:"-"`
  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) Unmarshal(b []byte) error {
  43. return xxx_messageInfo_Version.Unmarshal(m, b)
  44. }
  45. func (m *Version) Marshal(b []byte, deterministic bool) ([]byte, error) {
  46. return xxx_messageInfo_Version.Marshal(b, m, deterministic)
  47. }
  48. func (dst *Version) XXX_Merge(src proto.Message) {
  49. xxx_messageInfo_Version.Merge(dst, src)
  50. }
  51. func (m *Version) XXX_Size() int {
  52. return xxx_messageInfo_Version.Size(m)
  53. }
  54. func (m *Version) XXX_DiscardUnknown() {
  55. xxx_messageInfo_Version.DiscardUnknown(m)
  56. }
  57. var xxx_messageInfo_Version proto.InternalMessageInfo
  58. func (m *Version) GetMajor() int32 {
  59. if m != nil && m.Major != nil {
  60. return *m.Major
  61. }
  62. return 0
  63. }
  64. func (m *Version) GetMinor() int32 {
  65. if m != nil && m.Minor != nil {
  66. return *m.Minor
  67. }
  68. return 0
  69. }
  70. func (m *Version) GetPatch() int32 {
  71. if m != nil && m.Patch != nil {
  72. return *m.Patch
  73. }
  74. return 0
  75. }
  76. func (m *Version) GetSuffix() string {
  77. if m != nil && m.Suffix != nil {
  78. return *m.Suffix
  79. }
  80. return ""
  81. }
  82. // An encoded CodeGeneratorRequest is written to the plugin's stdin.
  83. type CodeGeneratorRequest struct {
  84. // The .proto files that were explicitly listed on the command-line. The
  85. // code generator should generate code only for these files. Each file's
  86. // descriptor will be included in proto_file, below.
  87. FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"`
  88. // The generator parameter passed on the command-line.
  89. Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"`
  90. // FileDescriptorProtos for all files in files_to_generate and everything
  91. // they import. The files will appear in topological order, so each file
  92. // appears before any file that imports it.
  93. //
  94. // protoc guarantees that all proto_files will be written after
  95. // the fields above, even though this is not technically guaranteed by the
  96. // protobuf wire format. This theoretically could allow a plugin to stream
  97. // in the FileDescriptorProtos and handle them one by one rather than read
  98. // the entire set into memory at once. However, as of this writing, this
  99. // is not similarly optimized on protoc's end -- it will store all fields in
  100. // memory at once before sending them to the plugin.
  101. //
  102. // Type names of fields and extensions in the FileDescriptorProto are always
  103. // fully qualified.
  104. ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"`
  105. // The version number of protocol compiler.
  106. CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
  107. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  108. XXX_unrecognized []byte `json:"-"`
  109. XXX_sizecache int32 `json:"-"`
  110. }
  111. func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
  112. func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
  113. func (*CodeGeneratorRequest) ProtoMessage() {}
  114. func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  115. func (m *CodeGeneratorRequest) Unmarshal(b []byte) error {
  116. return xxx_messageInfo_CodeGeneratorRequest.Unmarshal(m, b)
  117. }
  118. func (m *CodeGeneratorRequest) Marshal(b []byte, deterministic bool) ([]byte, error) {
  119. return xxx_messageInfo_CodeGeneratorRequest.Marshal(b, m, deterministic)
  120. }
  121. func (dst *CodeGeneratorRequest) XXX_Merge(src proto.Message) {
  122. xxx_messageInfo_CodeGeneratorRequest.Merge(dst, src)
  123. }
  124. func (m *CodeGeneratorRequest) XXX_Size() int {
  125. return xxx_messageInfo_CodeGeneratorRequest.Size(m)
  126. }
  127. func (m *CodeGeneratorRequest) XXX_DiscardUnknown() {
  128. xxx_messageInfo_CodeGeneratorRequest.DiscardUnknown(m)
  129. }
  130. var xxx_messageInfo_CodeGeneratorRequest proto.InternalMessageInfo
  131. func (m *CodeGeneratorRequest) GetFileToGenerate() []string {
  132. if m != nil {
  133. return m.FileToGenerate
  134. }
  135. return nil
  136. }
  137. func (m *CodeGeneratorRequest) GetParameter() string {
  138. if m != nil && m.Parameter != nil {
  139. return *m.Parameter
  140. }
  141. return ""
  142. }
  143. func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto {
  144. if m != nil {
  145. return m.ProtoFile
  146. }
  147. return nil
  148. }
  149. func (m *CodeGeneratorRequest) GetCompilerVersion() *Version {
  150. if m != nil {
  151. return m.CompilerVersion
  152. }
  153. return nil
  154. }
  155. // The plugin writes an encoded CodeGeneratorResponse to stdout.
  156. type CodeGeneratorResponse struct {
  157. // Error message. If non-empty, code generation failed. The plugin process
  158. // should exit with status code zero even if it reports an error in this way.
  159. //
  160. // This should be used to indicate errors in .proto files which prevent the
  161. // code generator from generating correct code. Errors which indicate a
  162. // problem in protoc itself -- such as the input CodeGeneratorRequest being
  163. // unparseable -- should be reported by writing a message to stderr and
  164. // exiting with a non-zero status code.
  165. Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
  166. File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
  167. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  168. XXX_unrecognized []byte `json:"-"`
  169. XXX_sizecache int32 `json:"-"`
  170. }
  171. func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
  172. func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
  173. func (*CodeGeneratorResponse) ProtoMessage() {}
  174. func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  175. func (m *CodeGeneratorResponse) Unmarshal(b []byte) error {
  176. return xxx_messageInfo_CodeGeneratorResponse.Unmarshal(m, b)
  177. }
  178. func (m *CodeGeneratorResponse) Marshal(b []byte, deterministic bool) ([]byte, error) {
  179. return xxx_messageInfo_CodeGeneratorResponse.Marshal(b, m, deterministic)
  180. }
  181. func (dst *CodeGeneratorResponse) XXX_Merge(src proto.Message) {
  182. xxx_messageInfo_CodeGeneratorResponse.Merge(dst, src)
  183. }
  184. func (m *CodeGeneratorResponse) XXX_Size() int {
  185. return xxx_messageInfo_CodeGeneratorResponse.Size(m)
  186. }
  187. func (m *CodeGeneratorResponse) XXX_DiscardUnknown() {
  188. xxx_messageInfo_CodeGeneratorResponse.DiscardUnknown(m)
  189. }
  190. var xxx_messageInfo_CodeGeneratorResponse proto.InternalMessageInfo
  191. func (m *CodeGeneratorResponse) GetError() string {
  192. if m != nil && m.Error != nil {
  193. return *m.Error
  194. }
  195. return ""
  196. }
  197. func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File {
  198. if m != nil {
  199. return m.File
  200. }
  201. return nil
  202. }
  203. // Represents a single generated file.
  204. type CodeGeneratorResponse_File struct {
  205. // The file name, relative to the output directory. The name must not
  206. // contain "." or ".." components and must be relative, not be absolute (so,
  207. // the file cannot lie outside the output directory). "/" must be used as
  208. // the path separator, not "\".
  209. //
  210. // If the name is omitted, the content will be appended to the previous
  211. // file. This allows the generator to break large files into small chunks,
  212. // and allows the generated text to be streamed back to protoc so that large
  213. // files need not reside completely in memory at one time. Note that as of
  214. // this writing protoc does not optimize for this -- it will read the entire
  215. // CodeGeneratorResponse before writing files to disk.
  216. Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  217. // If non-empty, indicates that the named file should already exist, and the
  218. // content here is to be inserted into that file at a defined insertion
  219. // point. This feature allows a code generator to extend the output
  220. // produced by another code generator. The original generator may provide
  221. // insertion points by placing special annotations in the file that look
  222. // like:
  223. // @@protoc_insertion_point(NAME)
  224. // The annotation can have arbitrary text before and after it on the line,
  225. // which allows it to be placed in a comment. NAME should be replaced with
  226. // an identifier naming the point -- this is what other generators will use
  227. // as the insertion_point. Code inserted at this point will be placed
  228. // immediately above the line containing the insertion point (thus multiple
  229. // insertions to the same point will come out in the order they were added).
  230. // The double-@ is intended to make it unlikely that the generated code
  231. // could contain things that look like insertion points by accident.
  232. //
  233. // For example, the C++ code generator places the following line in the
  234. // .pb.h files that it generates:
  235. // // @@protoc_insertion_point(namespace_scope)
  236. // This line appears within the scope of the file's package namespace, but
  237. // outside of any particular class. Another plugin can then specify the
  238. // insertion_point "namespace_scope" to generate additional classes or
  239. // other declarations that should be placed in this scope.
  240. //
  241. // Note that if the line containing the insertion point begins with
  242. // whitespace, the same whitespace will be added to every line of the
  243. // inserted text. This is useful for languages like Python, where
  244. // indentation matters. In these languages, the insertion point comment
  245. // should be indented the same amount as any inserted code will need to be
  246. // in order to work correctly in that context.
  247. //
  248. // The code generator that generates the initial file and the one which
  249. // inserts into it must both run as part of a single invocation of protoc.
  250. // Code generators are executed in the order in which they appear on the
  251. // command line.
  252. //
  253. // If |insertion_point| is present, |name| must also be present.
  254. InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"`
  255. // The file contents.
  256. Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
  257. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  258. XXX_unrecognized []byte `json:"-"`
  259. XXX_sizecache int32 `json:"-"`
  260. }
  261. func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} }
  262. func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) }
  263. func (*CodeGeneratorResponse_File) ProtoMessage() {}
  264. func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
  265. func (m *CodeGeneratorResponse_File) Unmarshal(b []byte) error {
  266. return xxx_messageInfo_CodeGeneratorResponse_File.Unmarshal(m, b)
  267. }
  268. func (m *CodeGeneratorResponse_File) Marshal(b []byte, deterministic bool) ([]byte, error) {
  269. return xxx_messageInfo_CodeGeneratorResponse_File.Marshal(b, m, deterministic)
  270. }
  271. func (dst *CodeGeneratorResponse_File) XXX_Merge(src proto.Message) {
  272. xxx_messageInfo_CodeGeneratorResponse_File.Merge(dst, src)
  273. }
  274. func (m *CodeGeneratorResponse_File) XXX_Size() int {
  275. return xxx_messageInfo_CodeGeneratorResponse_File.Size(m)
  276. }
  277. func (m *CodeGeneratorResponse_File) XXX_DiscardUnknown() {
  278. xxx_messageInfo_CodeGeneratorResponse_File.DiscardUnknown(m)
  279. }
  280. var xxx_messageInfo_CodeGeneratorResponse_File proto.InternalMessageInfo
  281. func (m *CodeGeneratorResponse_File) GetName() string {
  282. if m != nil && m.Name != nil {
  283. return *m.Name
  284. }
  285. return ""
  286. }
  287. func (m *CodeGeneratorResponse_File) GetInsertionPoint() string {
  288. if m != nil && m.InsertionPoint != nil {
  289. return *m.InsertionPoint
  290. }
  291. return ""
  292. }
  293. func (m *CodeGeneratorResponse_File) GetContent() string {
  294. if m != nil && m.Content != nil {
  295. return *m.Content
  296. }
  297. return ""
  298. }
  299. func init() {
  300. proto.RegisterType((*Version)(nil), "google.protobuf.compiler.Version")
  301. proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest")
  302. proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse")
  303. proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File")
  304. }
  305. func init() { proto.RegisterFile("google/protobuf/compiler/plugin.proto", fileDescriptor0) }
  306. var fileDescriptor0 = []byte{
  307. // 417 bytes of a gzipped FileDescriptorProto
  308. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x6a, 0x14, 0x41,
  309. 0x10, 0xc6, 0x19, 0x77, 0x63, 0x98, 0x8a, 0x64, 0x43, 0x13, 0xa5, 0x09, 0x39, 0x8c, 0x8b, 0xe2,
  310. 0x5c, 0x32, 0x0b, 0xc1, 0x8b, 0x78, 0x4b, 0x44, 0x3d, 0x78, 0x58, 0x1a, 0xf1, 0x20, 0xc8, 0x30,
  311. 0x99, 0xd4, 0x74, 0x5a, 0x66, 0xba, 0xc6, 0xee, 0x1e, 0xf1, 0x49, 0x7d, 0x0f, 0xdf, 0x40, 0xfa,
  312. 0xcf, 0x24, 0xb2, 0xb8, 0xa7, 0xee, 0xef, 0x57, 0xd5, 0xd5, 0x55, 0x1f, 0x05, 0x2f, 0x25, 0x91,
  313. 0xec, 0x71, 0x33, 0x1a, 0x72, 0x74, 0x33, 0x75, 0x9b, 0x96, 0x86, 0x51, 0xf5, 0x68, 0x36, 0x63,
  314. 0x3f, 0x49, 0xa5, 0xab, 0x10, 0x60, 0x3c, 0xa6, 0x55, 0x73, 0x5a, 0x35, 0xa7, 0x9d, 0x15, 0xbb,
  315. 0x05, 0x6e, 0xd1, 0xb6, 0x46, 0x8d, 0x8e, 0x4c, 0xcc, 0x5e, 0xb7, 0x70, 0xf8, 0x05, 0x8d, 0x55,
  316. 0xa4, 0xd9, 0x29, 0x1c, 0x0c, 0xcd, 0x77, 0x32, 0x3c, 0x2b, 0xb2, 0xf2, 0x40, 0x44, 0x11, 0xa8,
  317. 0xd2, 0x64, 0xf8, 0xa3, 0x44, 0xbd, 0xf0, 0x74, 0x6c, 0x5c, 0x7b, 0xc7, 0x17, 0x91, 0x06, 0xc1,
  318. 0x9e, 0xc1, 0x63, 0x3b, 0x75, 0x9d, 0xfa, 0xc5, 0x97, 0x45, 0x56, 0xe6, 0x22, 0xa9, 0xf5, 0x9f,
  319. 0x0c, 0x4e, 0xaf, 0xe9, 0x16, 0x3f, 0xa0, 0x46, 0xd3, 0x38, 0x32, 0x02, 0x7f, 0x4c, 0x68, 0x1d,
  320. 0x2b, 0xe1, 0xa4, 0x53, 0x3d, 0xd6, 0x8e, 0x6a, 0x19, 0x63, 0xc8, 0xb3, 0x62, 0x51, 0xe6, 0xe2,
  321. 0xd8, 0xf3, 0xcf, 0x94, 0x5e, 0x20, 0x3b, 0x87, 0x7c, 0x6c, 0x4c, 0x33, 0xa0, 0xc3, 0xd8, 0x4a,
  322. 0x2e, 0x1e, 0x00, 0xbb, 0x06, 0x08, 0xe3, 0xd4, 0xfe, 0x15, 0x5f, 0x15, 0x8b, 0xf2, 0xe8, 0xf2,
  323. 0x45, 0xb5, 0x6b, 0xcb, 0x7b, 0xd5, 0xe3, 0xbb, 0x7b, 0x03, 0xb6, 0x1e, 0x8b, 0x3c, 0x44, 0x7d,
  324. 0x84, 0x7d, 0x82, 0x93, 0xd9, 0xb8, 0xfa, 0x67, 0xf4, 0x24, 0x8c, 0x77, 0x74, 0xf9, 0xbc, 0xda,
  325. 0xe7, 0x70, 0x95, 0xcc, 0x13, 0xab, 0x99, 0x24, 0xb0, 0xfe, 0x9d, 0xc1, 0xd3, 0x9d, 0x99, 0xed,
  326. 0x48, 0xda, 0xa2, 0xf7, 0x0e, 0x8d, 0x49, 0x3e, 0xe7, 0x22, 0x0a, 0xf6, 0x11, 0x96, 0xff, 0x34,
  327. 0xff, 0x7a, 0xff, 0x8f, 0xff, 0x2d, 0x1a, 0x66, 0x13, 0xa1, 0xc2, 0xd9, 0x37, 0x58, 0x86, 0x79,
  328. 0x18, 0x2c, 0x75, 0x33, 0x60, 0xfa, 0x26, 0xdc, 0xd9, 0x2b, 0x58, 0x29, 0x6d, 0xd1, 0x38, 0x45,
  329. 0xba, 0x1e, 0x49, 0x69, 0x97, 0xcc, 0x3c, 0xbe, 0xc7, 0x5b, 0x4f, 0x19, 0x87, 0xc3, 0x96, 0xb4,
  330. 0x43, 0xed, 0xf8, 0x2a, 0x24, 0xcc, 0xf2, 0x4a, 0xc2, 0x79, 0x4b, 0xc3, 0xde, 0xfe, 0xae, 0x9e,
  331. 0x6c, 0xc3, 0x6e, 0x06, 0x7b, 0xed, 0xd7, 0x37, 0x52, 0xb9, 0xbb, 0xe9, 0xc6, 0x87, 0x37, 0x92,
  332. 0xfa, 0x46, 0xcb, 0x87, 0x65, 0x0c, 0x97, 0xf6, 0x42, 0xa2, 0xbe, 0x90, 0x94, 0x56, 0xfa, 0x6d,
  333. 0x3c, 0x6a, 0x49, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x15, 0x40, 0xc5, 0xfe, 0x02, 0x00,
  334. 0x00,
  335. }