本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

689 lines
15KB

  1. // Code generated by protoc-gen-gogo.
  2. // source: upsidedown.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package upsidedown is a generated protocol buffer package.
  6. It is generated from these files:
  7. upsidedown.proto
  8. It has these top-level messages:
  9. BackIndexTermsEntry
  10. BackIndexStoreEntry
  11. BackIndexRowValue
  12. */
  13. package upsidedown
  14. import proto "github.com/golang/protobuf/proto"
  15. import math "math"
  16. import io "io"
  17. import fmt "fmt"
  18. import github_com_golang_protobuf_proto "github.com/golang/protobuf/proto"
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ = proto.Marshal
  21. var _ = math.Inf
  22. type BackIndexTermsEntry struct {
  23. Field *uint32 `protobuf:"varint,1,req,name=field" json:"field,omitempty"`
  24. Terms []string `protobuf:"bytes,2,rep,name=terms" json:"terms,omitempty"`
  25. XXX_unrecognized []byte `json:"-"`
  26. }
  27. func (m *BackIndexTermsEntry) Reset() { *m = BackIndexTermsEntry{} }
  28. func (m *BackIndexTermsEntry) String() string { return proto.CompactTextString(m) }
  29. func (*BackIndexTermsEntry) ProtoMessage() {}
  30. func (m *BackIndexTermsEntry) GetField() uint32 {
  31. if m != nil && m.Field != nil {
  32. return *m.Field
  33. }
  34. return 0
  35. }
  36. func (m *BackIndexTermsEntry) GetTerms() []string {
  37. if m != nil {
  38. return m.Terms
  39. }
  40. return nil
  41. }
  42. type BackIndexStoreEntry struct {
  43. Field *uint32 `protobuf:"varint,1,req,name=field" json:"field,omitempty"`
  44. ArrayPositions []uint64 `protobuf:"varint,2,rep,name=arrayPositions" json:"arrayPositions,omitempty"`
  45. XXX_unrecognized []byte `json:"-"`
  46. }
  47. func (m *BackIndexStoreEntry) Reset() { *m = BackIndexStoreEntry{} }
  48. func (m *BackIndexStoreEntry) String() string { return proto.CompactTextString(m) }
  49. func (*BackIndexStoreEntry) ProtoMessage() {}
  50. func (m *BackIndexStoreEntry) GetField() uint32 {
  51. if m != nil && m.Field != nil {
  52. return *m.Field
  53. }
  54. return 0
  55. }
  56. func (m *BackIndexStoreEntry) GetArrayPositions() []uint64 {
  57. if m != nil {
  58. return m.ArrayPositions
  59. }
  60. return nil
  61. }
  62. type BackIndexRowValue struct {
  63. TermsEntries []*BackIndexTermsEntry `protobuf:"bytes,1,rep,name=termsEntries" json:"termsEntries,omitempty"`
  64. StoredEntries []*BackIndexStoreEntry `protobuf:"bytes,2,rep,name=storedEntries" json:"storedEntries,omitempty"`
  65. XXX_unrecognized []byte `json:"-"`
  66. }
  67. func (m *BackIndexRowValue) Reset() { *m = BackIndexRowValue{} }
  68. func (m *BackIndexRowValue) String() string { return proto.CompactTextString(m) }
  69. func (*BackIndexRowValue) ProtoMessage() {}
  70. func (m *BackIndexRowValue) GetTermsEntries() []*BackIndexTermsEntry {
  71. if m != nil {
  72. return m.TermsEntries
  73. }
  74. return nil
  75. }
  76. func (m *BackIndexRowValue) GetStoredEntries() []*BackIndexStoreEntry {
  77. if m != nil {
  78. return m.StoredEntries
  79. }
  80. return nil
  81. }
  82. func (m *BackIndexTermsEntry) Unmarshal(data []byte) error {
  83. var hasFields [1]uint64
  84. l := len(data)
  85. iNdEx := 0
  86. for iNdEx < l {
  87. var wire uint64
  88. for shift := uint(0); ; shift += 7 {
  89. if iNdEx >= l {
  90. return io.ErrUnexpectedEOF
  91. }
  92. b := data[iNdEx]
  93. iNdEx++
  94. wire |= (uint64(b) & 0x7F) << shift
  95. if b < 0x80 {
  96. break
  97. }
  98. }
  99. fieldNum := int32(wire >> 3)
  100. wireType := int(wire & 0x7)
  101. switch fieldNum {
  102. case 1:
  103. if wireType != 0 {
  104. return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType)
  105. }
  106. var v uint32
  107. for shift := uint(0); ; shift += 7 {
  108. if iNdEx >= l {
  109. return io.ErrUnexpectedEOF
  110. }
  111. b := data[iNdEx]
  112. iNdEx++
  113. v |= (uint32(b) & 0x7F) << shift
  114. if b < 0x80 {
  115. break
  116. }
  117. }
  118. m.Field = &v
  119. hasFields[0] |= uint64(0x00000001)
  120. case 2:
  121. if wireType != 2 {
  122. return fmt.Errorf("proto: wrong wireType = %d for field Terms", wireType)
  123. }
  124. var stringLen uint64
  125. for shift := uint(0); ; shift += 7 {
  126. if iNdEx >= l {
  127. return io.ErrUnexpectedEOF
  128. }
  129. b := data[iNdEx]
  130. iNdEx++
  131. stringLen |= (uint64(b) & 0x7F) << shift
  132. if b < 0x80 {
  133. break
  134. }
  135. }
  136. postIndex := iNdEx + int(stringLen)
  137. if postIndex > l {
  138. return io.ErrUnexpectedEOF
  139. }
  140. m.Terms = append(m.Terms, string(data[iNdEx:postIndex]))
  141. iNdEx = postIndex
  142. default:
  143. var sizeOfWire int
  144. for {
  145. sizeOfWire++
  146. wire >>= 7
  147. if wire == 0 {
  148. break
  149. }
  150. }
  151. iNdEx -= sizeOfWire
  152. skippy, err := skipUpsidedown(data[iNdEx:])
  153. if err != nil {
  154. return err
  155. }
  156. if skippy < 0 {
  157. return ErrInvalidLengthUpsidedown
  158. }
  159. if (iNdEx + skippy) > l {
  160. return io.ErrUnexpectedEOF
  161. }
  162. m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
  163. iNdEx += skippy
  164. }
  165. }
  166. if hasFields[0]&uint64(0x00000001) == 0 {
  167. return new(github_com_golang_protobuf_proto.RequiredNotSetError)
  168. }
  169. return nil
  170. }
  171. func (m *BackIndexStoreEntry) Unmarshal(data []byte) error {
  172. var hasFields [1]uint64
  173. l := len(data)
  174. iNdEx := 0
  175. for iNdEx < l {
  176. var wire uint64
  177. for shift := uint(0); ; shift += 7 {
  178. if iNdEx >= l {
  179. return io.ErrUnexpectedEOF
  180. }
  181. b := data[iNdEx]
  182. iNdEx++
  183. wire |= (uint64(b) & 0x7F) << shift
  184. if b < 0x80 {
  185. break
  186. }
  187. }
  188. fieldNum := int32(wire >> 3)
  189. wireType := int(wire & 0x7)
  190. switch fieldNum {
  191. case 1:
  192. if wireType != 0 {
  193. return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType)
  194. }
  195. var v uint32
  196. for shift := uint(0); ; shift += 7 {
  197. if iNdEx >= l {
  198. return io.ErrUnexpectedEOF
  199. }
  200. b := data[iNdEx]
  201. iNdEx++
  202. v |= (uint32(b) & 0x7F) << shift
  203. if b < 0x80 {
  204. break
  205. }
  206. }
  207. m.Field = &v
  208. hasFields[0] |= uint64(0x00000001)
  209. case 2:
  210. if wireType != 0 {
  211. return fmt.Errorf("proto: wrong wireType = %d for field ArrayPositions", wireType)
  212. }
  213. var v uint64
  214. for shift := uint(0); ; shift += 7 {
  215. if iNdEx >= l {
  216. return io.ErrUnexpectedEOF
  217. }
  218. b := data[iNdEx]
  219. iNdEx++
  220. v |= (uint64(b) & 0x7F) << shift
  221. if b < 0x80 {
  222. break
  223. }
  224. }
  225. m.ArrayPositions = append(m.ArrayPositions, v)
  226. default:
  227. var sizeOfWire int
  228. for {
  229. sizeOfWire++
  230. wire >>= 7
  231. if wire == 0 {
  232. break
  233. }
  234. }
  235. iNdEx -= sizeOfWire
  236. skippy, err := skipUpsidedown(data[iNdEx:])
  237. if err != nil {
  238. return err
  239. }
  240. if skippy < 0 {
  241. return ErrInvalidLengthUpsidedown
  242. }
  243. if (iNdEx + skippy) > l {
  244. return io.ErrUnexpectedEOF
  245. }
  246. m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
  247. iNdEx += skippy
  248. }
  249. }
  250. if hasFields[0]&uint64(0x00000001) == 0 {
  251. return new(github_com_golang_protobuf_proto.RequiredNotSetError)
  252. }
  253. return nil
  254. }
  255. func (m *BackIndexRowValue) Unmarshal(data []byte) error {
  256. l := len(data)
  257. iNdEx := 0
  258. for iNdEx < l {
  259. var wire uint64
  260. for shift := uint(0); ; shift += 7 {
  261. if iNdEx >= l {
  262. return io.ErrUnexpectedEOF
  263. }
  264. b := data[iNdEx]
  265. iNdEx++
  266. wire |= (uint64(b) & 0x7F) << shift
  267. if b < 0x80 {
  268. break
  269. }
  270. }
  271. fieldNum := int32(wire >> 3)
  272. wireType := int(wire & 0x7)
  273. switch fieldNum {
  274. case 1:
  275. if wireType != 2 {
  276. return fmt.Errorf("proto: wrong wireType = %d for field TermsEntries", wireType)
  277. }
  278. var msglen int
  279. for shift := uint(0); ; shift += 7 {
  280. if iNdEx >= l {
  281. return io.ErrUnexpectedEOF
  282. }
  283. b := data[iNdEx]
  284. iNdEx++
  285. msglen |= (int(b) & 0x7F) << shift
  286. if b < 0x80 {
  287. break
  288. }
  289. }
  290. postIndex := iNdEx + msglen
  291. if msglen < 0 {
  292. return ErrInvalidLengthUpsidedown
  293. }
  294. if postIndex > l {
  295. return io.ErrUnexpectedEOF
  296. }
  297. m.TermsEntries = append(m.TermsEntries, &BackIndexTermsEntry{})
  298. if err := m.TermsEntries[len(m.TermsEntries)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  299. return err
  300. }
  301. iNdEx = postIndex
  302. case 2:
  303. if wireType != 2 {
  304. return fmt.Errorf("proto: wrong wireType = %d for field StoredEntries", wireType)
  305. }
  306. var msglen int
  307. for shift := uint(0); ; shift += 7 {
  308. if iNdEx >= l {
  309. return io.ErrUnexpectedEOF
  310. }
  311. b := data[iNdEx]
  312. iNdEx++
  313. msglen |= (int(b) & 0x7F) << shift
  314. if b < 0x80 {
  315. break
  316. }
  317. }
  318. postIndex := iNdEx + msglen
  319. if msglen < 0 {
  320. return ErrInvalidLengthUpsidedown
  321. }
  322. if postIndex > l {
  323. return io.ErrUnexpectedEOF
  324. }
  325. m.StoredEntries = append(m.StoredEntries, &BackIndexStoreEntry{})
  326. if err := m.StoredEntries[len(m.StoredEntries)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  327. return err
  328. }
  329. iNdEx = postIndex
  330. default:
  331. var sizeOfWire int
  332. for {
  333. sizeOfWire++
  334. wire >>= 7
  335. if wire == 0 {
  336. break
  337. }
  338. }
  339. iNdEx -= sizeOfWire
  340. skippy, err := skipUpsidedown(data[iNdEx:])
  341. if err != nil {
  342. return err
  343. }
  344. if skippy < 0 {
  345. return ErrInvalidLengthUpsidedown
  346. }
  347. if (iNdEx + skippy) > l {
  348. return io.ErrUnexpectedEOF
  349. }
  350. m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
  351. iNdEx += skippy
  352. }
  353. }
  354. return nil
  355. }
  356. func skipUpsidedown(data []byte) (n int, err error) {
  357. l := len(data)
  358. iNdEx := 0
  359. for iNdEx < l {
  360. var wire uint64
  361. for shift := uint(0); ; shift += 7 {
  362. if iNdEx >= l {
  363. return 0, io.ErrUnexpectedEOF
  364. }
  365. b := data[iNdEx]
  366. iNdEx++
  367. wire |= (uint64(b) & 0x7F) << shift
  368. if b < 0x80 {
  369. break
  370. }
  371. }
  372. wireType := int(wire & 0x7)
  373. switch wireType {
  374. case 0:
  375. for {
  376. if iNdEx >= l {
  377. return 0, io.ErrUnexpectedEOF
  378. }
  379. iNdEx++
  380. if data[iNdEx-1] < 0x80 {
  381. break
  382. }
  383. }
  384. return iNdEx, nil
  385. case 1:
  386. iNdEx += 8
  387. return iNdEx, nil
  388. case 2:
  389. var length int
  390. for shift := uint(0); ; shift += 7 {
  391. if iNdEx >= l {
  392. return 0, io.ErrUnexpectedEOF
  393. }
  394. b := data[iNdEx]
  395. iNdEx++
  396. length |= (int(b) & 0x7F) << shift
  397. if b < 0x80 {
  398. break
  399. }
  400. }
  401. iNdEx += length
  402. if length < 0 {
  403. return 0, ErrInvalidLengthUpsidedown
  404. }
  405. return iNdEx, nil
  406. case 3:
  407. for {
  408. var innerWire uint64
  409. var start int = iNdEx
  410. for shift := uint(0); ; shift += 7 {
  411. if iNdEx >= l {
  412. return 0, io.ErrUnexpectedEOF
  413. }
  414. b := data[iNdEx]
  415. iNdEx++
  416. innerWire |= (uint64(b) & 0x7F) << shift
  417. if b < 0x80 {
  418. break
  419. }
  420. }
  421. innerWireType := int(innerWire & 0x7)
  422. if innerWireType == 4 {
  423. break
  424. }
  425. next, err := skipUpsidedown(data[start:])
  426. if err != nil {
  427. return 0, err
  428. }
  429. iNdEx = start + next
  430. }
  431. return iNdEx, nil
  432. case 4:
  433. return iNdEx, nil
  434. case 5:
  435. iNdEx += 4
  436. return iNdEx, nil
  437. default:
  438. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  439. }
  440. }
  441. panic("unreachable")
  442. }
  443. var (
  444. ErrInvalidLengthUpsidedown = fmt.Errorf("proto: negative length found during unmarshaling")
  445. )
  446. func (m *BackIndexTermsEntry) Size() (n int) {
  447. var l int
  448. _ = l
  449. if m.Field != nil {
  450. n += 1 + sovUpsidedown(uint64(*m.Field))
  451. }
  452. if len(m.Terms) > 0 {
  453. for _, s := range m.Terms {
  454. l = len(s)
  455. n += 1 + l + sovUpsidedown(uint64(l))
  456. }
  457. }
  458. if m.XXX_unrecognized != nil {
  459. n += len(m.XXX_unrecognized)
  460. }
  461. return n
  462. }
  463. func (m *BackIndexStoreEntry) Size() (n int) {
  464. var l int
  465. _ = l
  466. if m.Field != nil {
  467. n += 1 + sovUpsidedown(uint64(*m.Field))
  468. }
  469. if len(m.ArrayPositions) > 0 {
  470. for _, e := range m.ArrayPositions {
  471. n += 1 + sovUpsidedown(uint64(e))
  472. }
  473. }
  474. if m.XXX_unrecognized != nil {
  475. n += len(m.XXX_unrecognized)
  476. }
  477. return n
  478. }
  479. func (m *BackIndexRowValue) Size() (n int) {
  480. var l int
  481. _ = l
  482. if len(m.TermsEntries) > 0 {
  483. for _, e := range m.TermsEntries {
  484. l = e.Size()
  485. n += 1 + l + sovUpsidedown(uint64(l))
  486. }
  487. }
  488. if len(m.StoredEntries) > 0 {
  489. for _, e := range m.StoredEntries {
  490. l = e.Size()
  491. n += 1 + l + sovUpsidedown(uint64(l))
  492. }
  493. }
  494. if m.XXX_unrecognized != nil {
  495. n += len(m.XXX_unrecognized)
  496. }
  497. return n
  498. }
  499. func sovUpsidedown(x uint64) (n int) {
  500. for {
  501. n++
  502. x >>= 7
  503. if x == 0 {
  504. break
  505. }
  506. }
  507. return n
  508. }
  509. func sozUpsidedown(x uint64) (n int) {
  510. return sovUpsidedown(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  511. }
  512. func (m *BackIndexTermsEntry) Marshal() (data []byte, err error) {
  513. size := m.Size()
  514. data = make([]byte, size)
  515. n, err := m.MarshalTo(data)
  516. if err != nil {
  517. return nil, err
  518. }
  519. return data[:n], nil
  520. }
  521. func (m *BackIndexTermsEntry) MarshalTo(data []byte) (n int, err error) {
  522. var i int
  523. _ = i
  524. var l int
  525. _ = l
  526. if m.Field == nil {
  527. return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError)
  528. } else {
  529. data[i] = 0x8
  530. i++
  531. i = encodeVarintUpsidedown(data, i, uint64(*m.Field))
  532. }
  533. if len(m.Terms) > 0 {
  534. for _, s := range m.Terms {
  535. data[i] = 0x12
  536. i++
  537. l = len(s)
  538. for l >= 1<<7 {
  539. data[i] = uint8(uint64(l)&0x7f | 0x80)
  540. l >>= 7
  541. i++
  542. }
  543. data[i] = uint8(l)
  544. i++
  545. i += copy(data[i:], s)
  546. }
  547. }
  548. if m.XXX_unrecognized != nil {
  549. i += copy(data[i:], m.XXX_unrecognized)
  550. }
  551. return i, nil
  552. }
  553. func (m *BackIndexStoreEntry) Marshal() (data []byte, err error) {
  554. size := m.Size()
  555. data = make([]byte, size)
  556. n, err := m.MarshalTo(data)
  557. if err != nil {
  558. return nil, err
  559. }
  560. return data[:n], nil
  561. }
  562. func (m *BackIndexStoreEntry) MarshalTo(data []byte) (n int, err error) {
  563. var i int
  564. _ = i
  565. var l int
  566. _ = l
  567. if m.Field == nil {
  568. return 0, new(github_com_golang_protobuf_proto.RequiredNotSetError)
  569. } else {
  570. data[i] = 0x8
  571. i++
  572. i = encodeVarintUpsidedown(data, i, uint64(*m.Field))
  573. }
  574. if len(m.ArrayPositions) > 0 {
  575. for _, num := range m.ArrayPositions {
  576. data[i] = 0x10
  577. i++
  578. i = encodeVarintUpsidedown(data, i, uint64(num))
  579. }
  580. }
  581. if m.XXX_unrecognized != nil {
  582. i += copy(data[i:], m.XXX_unrecognized)
  583. }
  584. return i, nil
  585. }
  586. func (m *BackIndexRowValue) Marshal() (data []byte, err error) {
  587. size := m.Size()
  588. data = make([]byte, size)
  589. n, err := m.MarshalTo(data)
  590. if err != nil {
  591. return nil, err
  592. }
  593. return data[:n], nil
  594. }
  595. func (m *BackIndexRowValue) MarshalTo(data []byte) (n int, err error) {
  596. var i int
  597. _ = i
  598. var l int
  599. _ = l
  600. if len(m.TermsEntries) > 0 {
  601. for _, msg := range m.TermsEntries {
  602. data[i] = 0xa
  603. i++
  604. i = encodeVarintUpsidedown(data, i, uint64(msg.Size()))
  605. n, err := msg.MarshalTo(data[i:])
  606. if err != nil {
  607. return 0, err
  608. }
  609. i += n
  610. }
  611. }
  612. if len(m.StoredEntries) > 0 {
  613. for _, msg := range m.StoredEntries {
  614. data[i] = 0x12
  615. i++
  616. i = encodeVarintUpsidedown(data, i, uint64(msg.Size()))
  617. n, err := msg.MarshalTo(data[i:])
  618. if err != nil {
  619. return 0, err
  620. }
  621. i += n
  622. }
  623. }
  624. if m.XXX_unrecognized != nil {
  625. i += copy(data[i:], m.XXX_unrecognized)
  626. }
  627. return i, nil
  628. }
  629. func encodeFixed64Upsidedown(data []byte, offset int, v uint64) int {
  630. data[offset] = uint8(v)
  631. data[offset+1] = uint8(v >> 8)
  632. data[offset+2] = uint8(v >> 16)
  633. data[offset+3] = uint8(v >> 24)
  634. data[offset+4] = uint8(v >> 32)
  635. data[offset+5] = uint8(v >> 40)
  636. data[offset+6] = uint8(v >> 48)
  637. data[offset+7] = uint8(v >> 56)
  638. return offset + 8
  639. }
  640. func encodeFixed32Upsidedown(data []byte, offset int, v uint32) int {
  641. data[offset] = uint8(v)
  642. data[offset+1] = uint8(v >> 8)
  643. data[offset+2] = uint8(v >> 16)
  644. data[offset+3] = uint8(v >> 24)
  645. return offset + 4
  646. }
  647. func encodeVarintUpsidedown(data []byte, offset int, v uint64) int {
  648. for v >= 1<<7 {
  649. data[offset] = uint8(v&0x7f | 0x80)
  650. v >>= 7
  651. offset++
  652. }
  653. data[offset] = uint8(v)
  654. return offset + 1
  655. }
上海开阖软件有限公司 沪ICP备12045867号-1