database.pb.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: database.proto
  3. /*
  4. Package main is a generated protocol buffer package.
  5. It is generated from these files:
  6. database.proto
  7. It has these top-level messages:
  8. DatabaseRecord
  9. ReplicationRecord
  10. DatabaseAddress
  11. */
  12. package main
  13. import proto "github.com/gogo/protobuf/proto"
  14. import fmt "fmt"
  15. import math "math"
  16. import _ "github.com/gogo/protobuf/gogoproto"
  17. import io "io"
  18. // Reference imports to suppress errors if they are not otherwise used.
  19. var _ = proto.Marshal
  20. var _ = fmt.Errorf
  21. var _ = math.Inf
  22. // This is a compile-time assertion to ensure that this generated file
  23. // is compatible with the proto package it is being compiled against.
  24. // A compilation error at this line likely means your copy of the
  25. // proto package needs to be updated.
  26. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  27. type DatabaseRecord struct {
  28. Addresses []DatabaseAddress `protobuf:"bytes,1,rep,name=addresses" json:"addresses"`
  29. Misses int32 `protobuf:"varint,2,opt,name=misses,proto3" json:"misses,omitempty"`
  30. Seen int64 `protobuf:"varint,3,opt,name=seen,proto3" json:"seen,omitempty"`
  31. Missed int64 `protobuf:"varint,4,opt,name=missed,proto3" json:"missed,omitempty"`
  32. }
  33. func (m *DatabaseRecord) Reset() { *m = DatabaseRecord{} }
  34. func (m *DatabaseRecord) String() string { return proto.CompactTextString(m) }
  35. func (*DatabaseRecord) ProtoMessage() {}
  36. func (*DatabaseRecord) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{0} }
  37. type ReplicationRecord struct {
  38. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  39. Addresses []DatabaseAddress `protobuf:"bytes,2,rep,name=addresses" json:"addresses"`
  40. Seen int64 `protobuf:"varint,3,opt,name=seen,proto3" json:"seen,omitempty"`
  41. }
  42. func (m *ReplicationRecord) Reset() { *m = ReplicationRecord{} }
  43. func (m *ReplicationRecord) String() string { return proto.CompactTextString(m) }
  44. func (*ReplicationRecord) ProtoMessage() {}
  45. func (*ReplicationRecord) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{1} }
  46. type DatabaseAddress struct {
  47. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
  48. Expires int64 `protobuf:"varint,2,opt,name=expires,proto3" json:"expires,omitempty"`
  49. }
  50. func (m *DatabaseAddress) Reset() { *m = DatabaseAddress{} }
  51. func (m *DatabaseAddress) String() string { return proto.CompactTextString(m) }
  52. func (*DatabaseAddress) ProtoMessage() {}
  53. func (*DatabaseAddress) Descriptor() ([]byte, []int) { return fileDescriptorDatabase, []int{2} }
  54. func init() {
  55. proto.RegisterType((*DatabaseRecord)(nil), "main.DatabaseRecord")
  56. proto.RegisterType((*ReplicationRecord)(nil), "main.ReplicationRecord")
  57. proto.RegisterType((*DatabaseAddress)(nil), "main.DatabaseAddress")
  58. }
  59. func (m *DatabaseRecord) Marshal() (dAtA []byte, err error) {
  60. size := m.Size()
  61. dAtA = make([]byte, size)
  62. n, err := m.MarshalTo(dAtA)
  63. if err != nil {
  64. return nil, err
  65. }
  66. return dAtA[:n], nil
  67. }
  68. func (m *DatabaseRecord) MarshalTo(dAtA []byte) (int, error) {
  69. var i int
  70. _ = i
  71. var l int
  72. _ = l
  73. if len(m.Addresses) > 0 {
  74. for _, msg := range m.Addresses {
  75. dAtA[i] = 0xa
  76. i++
  77. i = encodeVarintDatabase(dAtA, i, uint64(msg.Size()))
  78. n, err := msg.MarshalTo(dAtA[i:])
  79. if err != nil {
  80. return 0, err
  81. }
  82. i += n
  83. }
  84. }
  85. if m.Misses != 0 {
  86. dAtA[i] = 0x10
  87. i++
  88. i = encodeVarintDatabase(dAtA, i, uint64(m.Misses))
  89. }
  90. if m.Seen != 0 {
  91. dAtA[i] = 0x18
  92. i++
  93. i = encodeVarintDatabase(dAtA, i, uint64(m.Seen))
  94. }
  95. if m.Missed != 0 {
  96. dAtA[i] = 0x20
  97. i++
  98. i = encodeVarintDatabase(dAtA, i, uint64(m.Missed))
  99. }
  100. return i, nil
  101. }
  102. func (m *ReplicationRecord) Marshal() (dAtA []byte, err error) {
  103. size := m.Size()
  104. dAtA = make([]byte, size)
  105. n, err := m.MarshalTo(dAtA)
  106. if err != nil {
  107. return nil, err
  108. }
  109. return dAtA[:n], nil
  110. }
  111. func (m *ReplicationRecord) MarshalTo(dAtA []byte) (int, error) {
  112. var i int
  113. _ = i
  114. var l int
  115. _ = l
  116. if len(m.Key) > 0 {
  117. dAtA[i] = 0xa
  118. i++
  119. i = encodeVarintDatabase(dAtA, i, uint64(len(m.Key)))
  120. i += copy(dAtA[i:], m.Key)
  121. }
  122. if len(m.Addresses) > 0 {
  123. for _, msg := range m.Addresses {
  124. dAtA[i] = 0x12
  125. i++
  126. i = encodeVarintDatabase(dAtA, i, uint64(msg.Size()))
  127. n, err := msg.MarshalTo(dAtA[i:])
  128. if err != nil {
  129. return 0, err
  130. }
  131. i += n
  132. }
  133. }
  134. if m.Seen != 0 {
  135. dAtA[i] = 0x18
  136. i++
  137. i = encodeVarintDatabase(dAtA, i, uint64(m.Seen))
  138. }
  139. return i, nil
  140. }
  141. func (m *DatabaseAddress) Marshal() (dAtA []byte, err error) {
  142. size := m.Size()
  143. dAtA = make([]byte, size)
  144. n, err := m.MarshalTo(dAtA)
  145. if err != nil {
  146. return nil, err
  147. }
  148. return dAtA[:n], nil
  149. }
  150. func (m *DatabaseAddress) MarshalTo(dAtA []byte) (int, error) {
  151. var i int
  152. _ = i
  153. var l int
  154. _ = l
  155. if len(m.Address) > 0 {
  156. dAtA[i] = 0xa
  157. i++
  158. i = encodeVarintDatabase(dAtA, i, uint64(len(m.Address)))
  159. i += copy(dAtA[i:], m.Address)
  160. }
  161. if m.Expires != 0 {
  162. dAtA[i] = 0x10
  163. i++
  164. i = encodeVarintDatabase(dAtA, i, uint64(m.Expires))
  165. }
  166. return i, nil
  167. }
  168. func encodeFixed64Database(dAtA []byte, offset int, v uint64) int {
  169. dAtA[offset] = uint8(v)
  170. dAtA[offset+1] = uint8(v >> 8)
  171. dAtA[offset+2] = uint8(v >> 16)
  172. dAtA[offset+3] = uint8(v >> 24)
  173. dAtA[offset+4] = uint8(v >> 32)
  174. dAtA[offset+5] = uint8(v >> 40)
  175. dAtA[offset+6] = uint8(v >> 48)
  176. dAtA[offset+7] = uint8(v >> 56)
  177. return offset + 8
  178. }
  179. func encodeFixed32Database(dAtA []byte, offset int, v uint32) int {
  180. dAtA[offset] = uint8(v)
  181. dAtA[offset+1] = uint8(v >> 8)
  182. dAtA[offset+2] = uint8(v >> 16)
  183. dAtA[offset+3] = uint8(v >> 24)
  184. return offset + 4
  185. }
  186. func encodeVarintDatabase(dAtA []byte, offset int, v uint64) int {
  187. for v >= 1<<7 {
  188. dAtA[offset] = uint8(v&0x7f | 0x80)
  189. v >>= 7
  190. offset++
  191. }
  192. dAtA[offset] = uint8(v)
  193. return offset + 1
  194. }
  195. func (m *DatabaseRecord) Size() (n int) {
  196. var l int
  197. _ = l
  198. if len(m.Addresses) > 0 {
  199. for _, e := range m.Addresses {
  200. l = e.Size()
  201. n += 1 + l + sovDatabase(uint64(l))
  202. }
  203. }
  204. if m.Misses != 0 {
  205. n += 1 + sovDatabase(uint64(m.Misses))
  206. }
  207. if m.Seen != 0 {
  208. n += 1 + sovDatabase(uint64(m.Seen))
  209. }
  210. if m.Missed != 0 {
  211. n += 1 + sovDatabase(uint64(m.Missed))
  212. }
  213. return n
  214. }
  215. func (m *ReplicationRecord) Size() (n int) {
  216. var l int
  217. _ = l
  218. l = len(m.Key)
  219. if l > 0 {
  220. n += 1 + l + sovDatabase(uint64(l))
  221. }
  222. if len(m.Addresses) > 0 {
  223. for _, e := range m.Addresses {
  224. l = e.Size()
  225. n += 1 + l + sovDatabase(uint64(l))
  226. }
  227. }
  228. if m.Seen != 0 {
  229. n += 1 + sovDatabase(uint64(m.Seen))
  230. }
  231. return n
  232. }
  233. func (m *DatabaseAddress) Size() (n int) {
  234. var l int
  235. _ = l
  236. l = len(m.Address)
  237. if l > 0 {
  238. n += 1 + l + sovDatabase(uint64(l))
  239. }
  240. if m.Expires != 0 {
  241. n += 1 + sovDatabase(uint64(m.Expires))
  242. }
  243. return n
  244. }
  245. func sovDatabase(x uint64) (n int) {
  246. for {
  247. n++
  248. x >>= 7
  249. if x == 0 {
  250. break
  251. }
  252. }
  253. return n
  254. }
  255. func sozDatabase(x uint64) (n int) {
  256. return sovDatabase(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  257. }
  258. func (m *DatabaseRecord) Unmarshal(dAtA []byte) error {
  259. l := len(dAtA)
  260. iNdEx := 0
  261. for iNdEx < l {
  262. preIndex := iNdEx
  263. var wire uint64
  264. for shift := uint(0); ; shift += 7 {
  265. if shift >= 64 {
  266. return ErrIntOverflowDatabase
  267. }
  268. if iNdEx >= l {
  269. return io.ErrUnexpectedEOF
  270. }
  271. b := dAtA[iNdEx]
  272. iNdEx++
  273. wire |= (uint64(b) & 0x7F) << shift
  274. if b < 0x80 {
  275. break
  276. }
  277. }
  278. fieldNum := int32(wire >> 3)
  279. wireType := int(wire & 0x7)
  280. if wireType == 4 {
  281. return fmt.Errorf("proto: DatabaseRecord: wiretype end group for non-group")
  282. }
  283. if fieldNum <= 0 {
  284. return fmt.Errorf("proto: DatabaseRecord: illegal tag %d (wire type %d)", fieldNum, wire)
  285. }
  286. switch fieldNum {
  287. case 1:
  288. if wireType != 2 {
  289. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  290. }
  291. var msglen int
  292. for shift := uint(0); ; shift += 7 {
  293. if shift >= 64 {
  294. return ErrIntOverflowDatabase
  295. }
  296. if iNdEx >= l {
  297. return io.ErrUnexpectedEOF
  298. }
  299. b := dAtA[iNdEx]
  300. iNdEx++
  301. msglen |= (int(b) & 0x7F) << shift
  302. if b < 0x80 {
  303. break
  304. }
  305. }
  306. if msglen < 0 {
  307. return ErrInvalidLengthDatabase
  308. }
  309. postIndex := iNdEx + msglen
  310. if postIndex > l {
  311. return io.ErrUnexpectedEOF
  312. }
  313. m.Addresses = append(m.Addresses, DatabaseAddress{})
  314. if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  315. return err
  316. }
  317. iNdEx = postIndex
  318. case 2:
  319. if wireType != 0 {
  320. return fmt.Errorf("proto: wrong wireType = %d for field Misses", wireType)
  321. }
  322. m.Misses = 0
  323. for shift := uint(0); ; shift += 7 {
  324. if shift >= 64 {
  325. return ErrIntOverflowDatabase
  326. }
  327. if iNdEx >= l {
  328. return io.ErrUnexpectedEOF
  329. }
  330. b := dAtA[iNdEx]
  331. iNdEx++
  332. m.Misses |= (int32(b) & 0x7F) << shift
  333. if b < 0x80 {
  334. break
  335. }
  336. }
  337. case 3:
  338. if wireType != 0 {
  339. return fmt.Errorf("proto: wrong wireType = %d for field Seen", wireType)
  340. }
  341. m.Seen = 0
  342. for shift := uint(0); ; shift += 7 {
  343. if shift >= 64 {
  344. return ErrIntOverflowDatabase
  345. }
  346. if iNdEx >= l {
  347. return io.ErrUnexpectedEOF
  348. }
  349. b := dAtA[iNdEx]
  350. iNdEx++
  351. m.Seen |= (int64(b) & 0x7F) << shift
  352. if b < 0x80 {
  353. break
  354. }
  355. }
  356. case 4:
  357. if wireType != 0 {
  358. return fmt.Errorf("proto: wrong wireType = %d for field Missed", wireType)
  359. }
  360. m.Missed = 0
  361. for shift := uint(0); ; shift += 7 {
  362. if shift >= 64 {
  363. return ErrIntOverflowDatabase
  364. }
  365. if iNdEx >= l {
  366. return io.ErrUnexpectedEOF
  367. }
  368. b := dAtA[iNdEx]
  369. iNdEx++
  370. m.Missed |= (int64(b) & 0x7F) << shift
  371. if b < 0x80 {
  372. break
  373. }
  374. }
  375. default:
  376. iNdEx = preIndex
  377. skippy, err := skipDatabase(dAtA[iNdEx:])
  378. if err != nil {
  379. return err
  380. }
  381. if skippy < 0 {
  382. return ErrInvalidLengthDatabase
  383. }
  384. if (iNdEx + skippy) > l {
  385. return io.ErrUnexpectedEOF
  386. }
  387. iNdEx += skippy
  388. }
  389. }
  390. if iNdEx > l {
  391. return io.ErrUnexpectedEOF
  392. }
  393. return nil
  394. }
  395. func (m *ReplicationRecord) Unmarshal(dAtA []byte) error {
  396. l := len(dAtA)
  397. iNdEx := 0
  398. for iNdEx < l {
  399. preIndex := iNdEx
  400. var wire uint64
  401. for shift := uint(0); ; shift += 7 {
  402. if shift >= 64 {
  403. return ErrIntOverflowDatabase
  404. }
  405. if iNdEx >= l {
  406. return io.ErrUnexpectedEOF
  407. }
  408. b := dAtA[iNdEx]
  409. iNdEx++
  410. wire |= (uint64(b) & 0x7F) << shift
  411. if b < 0x80 {
  412. break
  413. }
  414. }
  415. fieldNum := int32(wire >> 3)
  416. wireType := int(wire & 0x7)
  417. if wireType == 4 {
  418. return fmt.Errorf("proto: ReplicationRecord: wiretype end group for non-group")
  419. }
  420. if fieldNum <= 0 {
  421. return fmt.Errorf("proto: ReplicationRecord: illegal tag %d (wire type %d)", fieldNum, wire)
  422. }
  423. switch fieldNum {
  424. case 1:
  425. if wireType != 2 {
  426. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  427. }
  428. var stringLen uint64
  429. for shift := uint(0); ; shift += 7 {
  430. if shift >= 64 {
  431. return ErrIntOverflowDatabase
  432. }
  433. if iNdEx >= l {
  434. return io.ErrUnexpectedEOF
  435. }
  436. b := dAtA[iNdEx]
  437. iNdEx++
  438. stringLen |= (uint64(b) & 0x7F) << shift
  439. if b < 0x80 {
  440. break
  441. }
  442. }
  443. intStringLen := int(stringLen)
  444. if intStringLen < 0 {
  445. return ErrInvalidLengthDatabase
  446. }
  447. postIndex := iNdEx + intStringLen
  448. if postIndex > l {
  449. return io.ErrUnexpectedEOF
  450. }
  451. m.Key = string(dAtA[iNdEx:postIndex])
  452. iNdEx = postIndex
  453. case 2:
  454. if wireType != 2 {
  455. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  456. }
  457. var msglen int
  458. for shift := uint(0); ; shift += 7 {
  459. if shift >= 64 {
  460. return ErrIntOverflowDatabase
  461. }
  462. if iNdEx >= l {
  463. return io.ErrUnexpectedEOF
  464. }
  465. b := dAtA[iNdEx]
  466. iNdEx++
  467. msglen |= (int(b) & 0x7F) << shift
  468. if b < 0x80 {
  469. break
  470. }
  471. }
  472. if msglen < 0 {
  473. return ErrInvalidLengthDatabase
  474. }
  475. postIndex := iNdEx + msglen
  476. if postIndex > l {
  477. return io.ErrUnexpectedEOF
  478. }
  479. m.Addresses = append(m.Addresses, DatabaseAddress{})
  480. if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  481. return err
  482. }
  483. iNdEx = postIndex
  484. case 3:
  485. if wireType != 0 {
  486. return fmt.Errorf("proto: wrong wireType = %d for field Seen", wireType)
  487. }
  488. m.Seen = 0
  489. for shift := uint(0); ; shift += 7 {
  490. if shift >= 64 {
  491. return ErrIntOverflowDatabase
  492. }
  493. if iNdEx >= l {
  494. return io.ErrUnexpectedEOF
  495. }
  496. b := dAtA[iNdEx]
  497. iNdEx++
  498. m.Seen |= (int64(b) & 0x7F) << shift
  499. if b < 0x80 {
  500. break
  501. }
  502. }
  503. default:
  504. iNdEx = preIndex
  505. skippy, err := skipDatabase(dAtA[iNdEx:])
  506. if err != nil {
  507. return err
  508. }
  509. if skippy < 0 {
  510. return ErrInvalidLengthDatabase
  511. }
  512. if (iNdEx + skippy) > l {
  513. return io.ErrUnexpectedEOF
  514. }
  515. iNdEx += skippy
  516. }
  517. }
  518. if iNdEx > l {
  519. return io.ErrUnexpectedEOF
  520. }
  521. return nil
  522. }
  523. func (m *DatabaseAddress) Unmarshal(dAtA []byte) error {
  524. l := len(dAtA)
  525. iNdEx := 0
  526. for iNdEx < l {
  527. preIndex := iNdEx
  528. var wire uint64
  529. for shift := uint(0); ; shift += 7 {
  530. if shift >= 64 {
  531. return ErrIntOverflowDatabase
  532. }
  533. if iNdEx >= l {
  534. return io.ErrUnexpectedEOF
  535. }
  536. b := dAtA[iNdEx]
  537. iNdEx++
  538. wire |= (uint64(b) & 0x7F) << shift
  539. if b < 0x80 {
  540. break
  541. }
  542. }
  543. fieldNum := int32(wire >> 3)
  544. wireType := int(wire & 0x7)
  545. if wireType == 4 {
  546. return fmt.Errorf("proto: DatabaseAddress: wiretype end group for non-group")
  547. }
  548. if fieldNum <= 0 {
  549. return fmt.Errorf("proto: DatabaseAddress: illegal tag %d (wire type %d)", fieldNum, wire)
  550. }
  551. switch fieldNum {
  552. case 1:
  553. if wireType != 2 {
  554. return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  555. }
  556. var stringLen uint64
  557. for shift := uint(0); ; shift += 7 {
  558. if shift >= 64 {
  559. return ErrIntOverflowDatabase
  560. }
  561. if iNdEx >= l {
  562. return io.ErrUnexpectedEOF
  563. }
  564. b := dAtA[iNdEx]
  565. iNdEx++
  566. stringLen |= (uint64(b) & 0x7F) << shift
  567. if b < 0x80 {
  568. break
  569. }
  570. }
  571. intStringLen := int(stringLen)
  572. if intStringLen < 0 {
  573. return ErrInvalidLengthDatabase
  574. }
  575. postIndex := iNdEx + intStringLen
  576. if postIndex > l {
  577. return io.ErrUnexpectedEOF
  578. }
  579. m.Address = string(dAtA[iNdEx:postIndex])
  580. iNdEx = postIndex
  581. case 2:
  582. if wireType != 0 {
  583. return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
  584. }
  585. m.Expires = 0
  586. for shift := uint(0); ; shift += 7 {
  587. if shift >= 64 {
  588. return ErrIntOverflowDatabase
  589. }
  590. if iNdEx >= l {
  591. return io.ErrUnexpectedEOF
  592. }
  593. b := dAtA[iNdEx]
  594. iNdEx++
  595. m.Expires |= (int64(b) & 0x7F) << shift
  596. if b < 0x80 {
  597. break
  598. }
  599. }
  600. default:
  601. iNdEx = preIndex
  602. skippy, err := skipDatabase(dAtA[iNdEx:])
  603. if err != nil {
  604. return err
  605. }
  606. if skippy < 0 {
  607. return ErrInvalidLengthDatabase
  608. }
  609. if (iNdEx + skippy) > l {
  610. return io.ErrUnexpectedEOF
  611. }
  612. iNdEx += skippy
  613. }
  614. }
  615. if iNdEx > l {
  616. return io.ErrUnexpectedEOF
  617. }
  618. return nil
  619. }
  620. func skipDatabase(dAtA []byte) (n int, err error) {
  621. l := len(dAtA)
  622. iNdEx := 0
  623. for iNdEx < l {
  624. var wire uint64
  625. for shift := uint(0); ; shift += 7 {
  626. if shift >= 64 {
  627. return 0, ErrIntOverflowDatabase
  628. }
  629. if iNdEx >= l {
  630. return 0, io.ErrUnexpectedEOF
  631. }
  632. b := dAtA[iNdEx]
  633. iNdEx++
  634. wire |= (uint64(b) & 0x7F) << shift
  635. if b < 0x80 {
  636. break
  637. }
  638. }
  639. wireType := int(wire & 0x7)
  640. switch wireType {
  641. case 0:
  642. for shift := uint(0); ; shift += 7 {
  643. if shift >= 64 {
  644. return 0, ErrIntOverflowDatabase
  645. }
  646. if iNdEx >= l {
  647. return 0, io.ErrUnexpectedEOF
  648. }
  649. iNdEx++
  650. if dAtA[iNdEx-1] < 0x80 {
  651. break
  652. }
  653. }
  654. return iNdEx, nil
  655. case 1:
  656. iNdEx += 8
  657. return iNdEx, nil
  658. case 2:
  659. var length int
  660. for shift := uint(0); ; shift += 7 {
  661. if shift >= 64 {
  662. return 0, ErrIntOverflowDatabase
  663. }
  664. if iNdEx >= l {
  665. return 0, io.ErrUnexpectedEOF
  666. }
  667. b := dAtA[iNdEx]
  668. iNdEx++
  669. length |= (int(b) & 0x7F) << shift
  670. if b < 0x80 {
  671. break
  672. }
  673. }
  674. iNdEx += length
  675. if length < 0 {
  676. return 0, ErrInvalidLengthDatabase
  677. }
  678. return iNdEx, nil
  679. case 3:
  680. for {
  681. var innerWire uint64
  682. var start int = iNdEx
  683. for shift := uint(0); ; shift += 7 {
  684. if shift >= 64 {
  685. return 0, ErrIntOverflowDatabase
  686. }
  687. if iNdEx >= l {
  688. return 0, io.ErrUnexpectedEOF
  689. }
  690. b := dAtA[iNdEx]
  691. iNdEx++
  692. innerWire |= (uint64(b) & 0x7F) << shift
  693. if b < 0x80 {
  694. break
  695. }
  696. }
  697. innerWireType := int(innerWire & 0x7)
  698. if innerWireType == 4 {
  699. break
  700. }
  701. next, err := skipDatabase(dAtA[start:])
  702. if err != nil {
  703. return 0, err
  704. }
  705. iNdEx = start + next
  706. }
  707. return iNdEx, nil
  708. case 4:
  709. return iNdEx, nil
  710. case 5:
  711. iNdEx += 4
  712. return iNdEx, nil
  713. default:
  714. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  715. }
  716. }
  717. panic("unreachable")
  718. }
  719. var (
  720. ErrInvalidLengthDatabase = fmt.Errorf("proto: negative length found during unmarshaling")
  721. ErrIntOverflowDatabase = fmt.Errorf("proto: integer overflow")
  722. )
  723. func init() { proto.RegisterFile("database.proto", fileDescriptorDatabase) }
  724. var fileDescriptorDatabase = []byte{
  725. // 264 bytes of a gzipped FileDescriptorProto
  726. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0x49, 0x2c, 0x49,
  727. 0x4c, 0x4a, 0x2c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc,
  728. 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f,
  729. 0xcf, 0xd7, 0x07, 0x4b, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa4, 0xd4,
  730. 0xcf, 0xc8, 0xc5, 0xe7, 0x02, 0x35, 0x27, 0x28, 0x35, 0x39, 0xbf, 0x28, 0x45, 0xc8, 0x92, 0x8b,
  731. 0x33, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x38, 0xb5, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb,
  732. 0x48, 0x54, 0x0f, 0x64, 0xb6, 0x1e, 0x4c, 0xa1, 0x23, 0x44, 0xda, 0x89, 0xe5, 0xc4, 0x3d, 0x79,
  733. 0x86, 0x20, 0x84, 0x6a, 0x21, 0x31, 0x2e, 0xb6, 0xdc, 0x4c, 0xb0, 0x3e, 0x26, 0x05, 0x46, 0x0d,
  734. 0xd6, 0x20, 0x28, 0x4f, 0x48, 0x88, 0x8b, 0xa5, 0x38, 0x35, 0x35, 0x4f, 0x82, 0x59, 0x81, 0x51,
  735. 0x83, 0x39, 0x08, 0xcc, 0x86, 0xab, 0x4d, 0x91, 0x60, 0x01, 0x8b, 0x42, 0x79, 0x4a, 0x25, 0x5c,
  736. 0x82, 0x41, 0xa9, 0x05, 0x39, 0x99, 0xc9, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x50, 0x37, 0x09, 0x70,
  737. 0x31, 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0x98, 0xa8, 0xae, 0x64,
  738. 0x22, 0xc9, 0x95, 0x58, 0x5c, 0xa3, 0xe4, 0xca, 0xc5, 0x8f, 0xa6, 0x4f, 0x48, 0x82, 0x8b, 0x1d,
  739. 0xaa, 0x07, 0x6a, 0x2f, 0x8c, 0x0b, 0x92, 0x49, 0xad, 0x28, 0xc8, 0x2c, 0x82, 0xfa, 0x93, 0x39,
  740. 0x08, 0xc6, 0x75, 0x12, 0x38, 0xf1, 0x50, 0x8e, 0xe1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4,
  741. 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x87, 0xb3, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff,
  742. 0x6a, 0x22, 0xa2, 0x85, 0xae, 0x01, 0x00, 0x00,
  743. }