plugin.pb.go 16 KB

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