databus.pb.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: library/queue/databus/databus.proto
  3. /*
  4. Package databus is a generated protocol buffer package.
  5. It is generated from these files:
  6. library/queue/databus/databus.proto
  7. It has these top-level messages:
  8. Header
  9. MessagePB
  10. */
  11. package databus
  12. import proto "github.com/gogo/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import _ "github.com/gogo/protobuf/gogoproto"
  16. import encoding_json "encoding/json"
  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 Header struct {
  28. Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata" json:"metadata" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  29. }
  30. func (m *Header) Reset() { *m = Header{} }
  31. func (m *Header) String() string { return proto.CompactTextString(m) }
  32. func (*Header) ProtoMessage() {}
  33. func (*Header) Descriptor() ([]byte, []int) { return fileDescriptorDatabus, []int{0} }
  34. func (m *Header) GetMetadata() map[string]string {
  35. if m != nil {
  36. return m.Metadata
  37. }
  38. return nil
  39. }
  40. type MessagePB struct {
  41. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
  42. Value encoding_json.RawMessage `protobuf:"bytes,2,opt,name=value,proto3,casttype=encoding/json.RawMessage" json:"value"`
  43. Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic"`
  44. Partition int32 `protobuf:"varint,4,opt,name=partition,proto3" json:"partition"`
  45. Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset"`
  46. Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp"`
  47. Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata" json:"metadata" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  48. }
  49. func (m *MessagePB) Reset() { *m = MessagePB{} }
  50. func (m *MessagePB) String() string { return proto.CompactTextString(m) }
  51. func (*MessagePB) ProtoMessage() {}
  52. func (*MessagePB) Descriptor() ([]byte, []int) { return fileDescriptorDatabus, []int{1} }
  53. func (m *MessagePB) GetKey() string {
  54. if m != nil {
  55. return m.Key
  56. }
  57. return ""
  58. }
  59. func (m *MessagePB) GetValue() encoding_json.RawMessage {
  60. if m != nil {
  61. return m.Value
  62. }
  63. return nil
  64. }
  65. func (m *MessagePB) GetTopic() string {
  66. if m != nil {
  67. return m.Topic
  68. }
  69. return ""
  70. }
  71. func (m *MessagePB) GetPartition() int32 {
  72. if m != nil {
  73. return m.Partition
  74. }
  75. return 0
  76. }
  77. func (m *MessagePB) GetOffset() int64 {
  78. if m != nil {
  79. return m.Offset
  80. }
  81. return 0
  82. }
  83. func (m *MessagePB) GetTimestamp() int64 {
  84. if m != nil {
  85. return m.Timestamp
  86. }
  87. return 0
  88. }
  89. func (m *MessagePB) GetMetadata() map[string]string {
  90. if m != nil {
  91. return m.Metadata
  92. }
  93. return nil
  94. }
  95. func init() {
  96. proto.RegisterType((*Header)(nil), "infra.databus.Header")
  97. proto.RegisterType((*MessagePB)(nil), "infra.databus.MessagePB")
  98. }
  99. func (m *Header) Marshal() (dAtA []byte, err error) {
  100. size := m.Size()
  101. dAtA = make([]byte, size)
  102. n, err := m.MarshalTo(dAtA)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return dAtA[:n], nil
  107. }
  108. func (m *Header) MarshalTo(dAtA []byte) (int, error) {
  109. var i int
  110. _ = i
  111. var l int
  112. _ = l
  113. if len(m.Metadata) > 0 {
  114. for k, _ := range m.Metadata {
  115. dAtA[i] = 0xa
  116. i++
  117. v := m.Metadata[k]
  118. mapSize := 1 + len(k) + sovDatabus(uint64(len(k))) + 1 + len(v) + sovDatabus(uint64(len(v)))
  119. i = encodeVarintDatabus(dAtA, i, uint64(mapSize))
  120. dAtA[i] = 0xa
  121. i++
  122. i = encodeVarintDatabus(dAtA, i, uint64(len(k)))
  123. i += copy(dAtA[i:], k)
  124. dAtA[i] = 0x12
  125. i++
  126. i = encodeVarintDatabus(dAtA, i, uint64(len(v)))
  127. i += copy(dAtA[i:], v)
  128. }
  129. }
  130. return i, nil
  131. }
  132. func (m *MessagePB) Marshal() (dAtA []byte, err error) {
  133. size := m.Size()
  134. dAtA = make([]byte, size)
  135. n, err := m.MarshalTo(dAtA)
  136. if err != nil {
  137. return nil, err
  138. }
  139. return dAtA[:n], nil
  140. }
  141. func (m *MessagePB) MarshalTo(dAtA []byte) (int, error) {
  142. var i int
  143. _ = i
  144. var l int
  145. _ = l
  146. if len(m.Key) > 0 {
  147. dAtA[i] = 0xa
  148. i++
  149. i = encodeVarintDatabus(dAtA, i, uint64(len(m.Key)))
  150. i += copy(dAtA[i:], m.Key)
  151. }
  152. if len(m.Value) > 0 {
  153. dAtA[i] = 0x12
  154. i++
  155. i = encodeVarintDatabus(dAtA, i, uint64(len(m.Value)))
  156. i += copy(dAtA[i:], m.Value)
  157. }
  158. if len(m.Topic) > 0 {
  159. dAtA[i] = 0x1a
  160. i++
  161. i = encodeVarintDatabus(dAtA, i, uint64(len(m.Topic)))
  162. i += copy(dAtA[i:], m.Topic)
  163. }
  164. if m.Partition != 0 {
  165. dAtA[i] = 0x20
  166. i++
  167. i = encodeVarintDatabus(dAtA, i, uint64(m.Partition))
  168. }
  169. if m.Offset != 0 {
  170. dAtA[i] = 0x28
  171. i++
  172. i = encodeVarintDatabus(dAtA, i, uint64(m.Offset))
  173. }
  174. if m.Timestamp != 0 {
  175. dAtA[i] = 0x30
  176. i++
  177. i = encodeVarintDatabus(dAtA, i, uint64(m.Timestamp))
  178. }
  179. if len(m.Metadata) > 0 {
  180. for k, _ := range m.Metadata {
  181. dAtA[i] = 0x3a
  182. i++
  183. v := m.Metadata[k]
  184. mapSize := 1 + len(k) + sovDatabus(uint64(len(k))) + 1 + len(v) + sovDatabus(uint64(len(v)))
  185. i = encodeVarintDatabus(dAtA, i, uint64(mapSize))
  186. dAtA[i] = 0xa
  187. i++
  188. i = encodeVarintDatabus(dAtA, i, uint64(len(k)))
  189. i += copy(dAtA[i:], k)
  190. dAtA[i] = 0x12
  191. i++
  192. i = encodeVarintDatabus(dAtA, i, uint64(len(v)))
  193. i += copy(dAtA[i:], v)
  194. }
  195. }
  196. return i, nil
  197. }
  198. func encodeVarintDatabus(dAtA []byte, offset int, v uint64) int {
  199. for v >= 1<<7 {
  200. dAtA[offset] = uint8(v&0x7f | 0x80)
  201. v >>= 7
  202. offset++
  203. }
  204. dAtA[offset] = uint8(v)
  205. return offset + 1
  206. }
  207. func (m *Header) Size() (n int) {
  208. var l int
  209. _ = l
  210. if len(m.Metadata) > 0 {
  211. for k, v := range m.Metadata {
  212. _ = k
  213. _ = v
  214. mapEntrySize := 1 + len(k) + sovDatabus(uint64(len(k))) + 1 + len(v) + sovDatabus(uint64(len(v)))
  215. n += mapEntrySize + 1 + sovDatabus(uint64(mapEntrySize))
  216. }
  217. }
  218. return n
  219. }
  220. func (m *MessagePB) Size() (n int) {
  221. var l int
  222. _ = l
  223. l = len(m.Key)
  224. if l > 0 {
  225. n += 1 + l + sovDatabus(uint64(l))
  226. }
  227. l = len(m.Value)
  228. if l > 0 {
  229. n += 1 + l + sovDatabus(uint64(l))
  230. }
  231. l = len(m.Topic)
  232. if l > 0 {
  233. n += 1 + l + sovDatabus(uint64(l))
  234. }
  235. if m.Partition != 0 {
  236. n += 1 + sovDatabus(uint64(m.Partition))
  237. }
  238. if m.Offset != 0 {
  239. n += 1 + sovDatabus(uint64(m.Offset))
  240. }
  241. if m.Timestamp != 0 {
  242. n += 1 + sovDatabus(uint64(m.Timestamp))
  243. }
  244. if len(m.Metadata) > 0 {
  245. for k, v := range m.Metadata {
  246. _ = k
  247. _ = v
  248. mapEntrySize := 1 + len(k) + sovDatabus(uint64(len(k))) + 1 + len(v) + sovDatabus(uint64(len(v)))
  249. n += mapEntrySize + 1 + sovDatabus(uint64(mapEntrySize))
  250. }
  251. }
  252. return n
  253. }
  254. func sovDatabus(x uint64) (n int) {
  255. for {
  256. n++
  257. x >>= 7
  258. if x == 0 {
  259. break
  260. }
  261. }
  262. return n
  263. }
  264. func sozDatabus(x uint64) (n int) {
  265. return sovDatabus(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  266. }
  267. func (m *Header) Unmarshal(dAtA []byte) error {
  268. l := len(dAtA)
  269. iNdEx := 0
  270. for iNdEx < l {
  271. preIndex := iNdEx
  272. var wire uint64
  273. for shift := uint(0); ; shift += 7 {
  274. if shift >= 64 {
  275. return ErrIntOverflowDatabus
  276. }
  277. if iNdEx >= l {
  278. return io.ErrUnexpectedEOF
  279. }
  280. b := dAtA[iNdEx]
  281. iNdEx++
  282. wire |= (uint64(b) & 0x7F) << shift
  283. if b < 0x80 {
  284. break
  285. }
  286. }
  287. fieldNum := int32(wire >> 3)
  288. wireType := int(wire & 0x7)
  289. if wireType == 4 {
  290. return fmt.Errorf("proto: Header: wiretype end group for non-group")
  291. }
  292. if fieldNum <= 0 {
  293. return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
  294. }
  295. switch fieldNum {
  296. case 1:
  297. if wireType != 2 {
  298. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  299. }
  300. var msglen int
  301. for shift := uint(0); ; shift += 7 {
  302. if shift >= 64 {
  303. return ErrIntOverflowDatabus
  304. }
  305. if iNdEx >= l {
  306. return io.ErrUnexpectedEOF
  307. }
  308. b := dAtA[iNdEx]
  309. iNdEx++
  310. msglen |= (int(b) & 0x7F) << shift
  311. if b < 0x80 {
  312. break
  313. }
  314. }
  315. if msglen < 0 {
  316. return ErrInvalidLengthDatabus
  317. }
  318. postIndex := iNdEx + msglen
  319. if postIndex > l {
  320. return io.ErrUnexpectedEOF
  321. }
  322. if m.Metadata == nil {
  323. m.Metadata = make(map[string]string)
  324. }
  325. var mapkey string
  326. var mapvalue string
  327. for iNdEx < postIndex {
  328. entryPreIndex := iNdEx
  329. var wire uint64
  330. for shift := uint(0); ; shift += 7 {
  331. if shift >= 64 {
  332. return ErrIntOverflowDatabus
  333. }
  334. if iNdEx >= l {
  335. return io.ErrUnexpectedEOF
  336. }
  337. b := dAtA[iNdEx]
  338. iNdEx++
  339. wire |= (uint64(b) & 0x7F) << shift
  340. if b < 0x80 {
  341. break
  342. }
  343. }
  344. fieldNum := int32(wire >> 3)
  345. if fieldNum == 1 {
  346. var stringLenmapkey uint64
  347. for shift := uint(0); ; shift += 7 {
  348. if shift >= 64 {
  349. return ErrIntOverflowDatabus
  350. }
  351. if iNdEx >= l {
  352. return io.ErrUnexpectedEOF
  353. }
  354. b := dAtA[iNdEx]
  355. iNdEx++
  356. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  357. if b < 0x80 {
  358. break
  359. }
  360. }
  361. intStringLenmapkey := int(stringLenmapkey)
  362. if intStringLenmapkey < 0 {
  363. return ErrInvalidLengthDatabus
  364. }
  365. postStringIndexmapkey := iNdEx + intStringLenmapkey
  366. if postStringIndexmapkey > l {
  367. return io.ErrUnexpectedEOF
  368. }
  369. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  370. iNdEx = postStringIndexmapkey
  371. } else if fieldNum == 2 {
  372. var stringLenmapvalue uint64
  373. for shift := uint(0); ; shift += 7 {
  374. if shift >= 64 {
  375. return ErrIntOverflowDatabus
  376. }
  377. if iNdEx >= l {
  378. return io.ErrUnexpectedEOF
  379. }
  380. b := dAtA[iNdEx]
  381. iNdEx++
  382. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  383. if b < 0x80 {
  384. break
  385. }
  386. }
  387. intStringLenmapvalue := int(stringLenmapvalue)
  388. if intStringLenmapvalue < 0 {
  389. return ErrInvalidLengthDatabus
  390. }
  391. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  392. if postStringIndexmapvalue > l {
  393. return io.ErrUnexpectedEOF
  394. }
  395. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  396. iNdEx = postStringIndexmapvalue
  397. } else {
  398. iNdEx = entryPreIndex
  399. skippy, err := skipDatabus(dAtA[iNdEx:])
  400. if err != nil {
  401. return err
  402. }
  403. if skippy < 0 {
  404. return ErrInvalidLengthDatabus
  405. }
  406. if (iNdEx + skippy) > postIndex {
  407. return io.ErrUnexpectedEOF
  408. }
  409. iNdEx += skippy
  410. }
  411. }
  412. m.Metadata[mapkey] = mapvalue
  413. iNdEx = postIndex
  414. default:
  415. iNdEx = preIndex
  416. skippy, err := skipDatabus(dAtA[iNdEx:])
  417. if err != nil {
  418. return err
  419. }
  420. if skippy < 0 {
  421. return ErrInvalidLengthDatabus
  422. }
  423. if (iNdEx + skippy) > l {
  424. return io.ErrUnexpectedEOF
  425. }
  426. iNdEx += skippy
  427. }
  428. }
  429. if iNdEx > l {
  430. return io.ErrUnexpectedEOF
  431. }
  432. return nil
  433. }
  434. func (m *MessagePB) Unmarshal(dAtA []byte) error {
  435. l := len(dAtA)
  436. iNdEx := 0
  437. for iNdEx < l {
  438. preIndex := iNdEx
  439. var wire uint64
  440. for shift := uint(0); ; shift += 7 {
  441. if shift >= 64 {
  442. return ErrIntOverflowDatabus
  443. }
  444. if iNdEx >= l {
  445. return io.ErrUnexpectedEOF
  446. }
  447. b := dAtA[iNdEx]
  448. iNdEx++
  449. wire |= (uint64(b) & 0x7F) << shift
  450. if b < 0x80 {
  451. break
  452. }
  453. }
  454. fieldNum := int32(wire >> 3)
  455. wireType := int(wire & 0x7)
  456. if wireType == 4 {
  457. return fmt.Errorf("proto: MessagePB: wiretype end group for non-group")
  458. }
  459. if fieldNum <= 0 {
  460. return fmt.Errorf("proto: MessagePB: illegal tag %d (wire type %d)", fieldNum, wire)
  461. }
  462. switch fieldNum {
  463. case 1:
  464. if wireType != 2 {
  465. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  466. }
  467. var stringLen uint64
  468. for shift := uint(0); ; shift += 7 {
  469. if shift >= 64 {
  470. return ErrIntOverflowDatabus
  471. }
  472. if iNdEx >= l {
  473. return io.ErrUnexpectedEOF
  474. }
  475. b := dAtA[iNdEx]
  476. iNdEx++
  477. stringLen |= (uint64(b) & 0x7F) << shift
  478. if b < 0x80 {
  479. break
  480. }
  481. }
  482. intStringLen := int(stringLen)
  483. if intStringLen < 0 {
  484. return ErrInvalidLengthDatabus
  485. }
  486. postIndex := iNdEx + intStringLen
  487. if postIndex > l {
  488. return io.ErrUnexpectedEOF
  489. }
  490. m.Key = string(dAtA[iNdEx:postIndex])
  491. iNdEx = postIndex
  492. case 2:
  493. if wireType != 2 {
  494. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  495. }
  496. var byteLen int
  497. for shift := uint(0); ; shift += 7 {
  498. if shift >= 64 {
  499. return ErrIntOverflowDatabus
  500. }
  501. if iNdEx >= l {
  502. return io.ErrUnexpectedEOF
  503. }
  504. b := dAtA[iNdEx]
  505. iNdEx++
  506. byteLen |= (int(b) & 0x7F) << shift
  507. if b < 0x80 {
  508. break
  509. }
  510. }
  511. if byteLen < 0 {
  512. return ErrInvalidLengthDatabus
  513. }
  514. postIndex := iNdEx + byteLen
  515. if postIndex > l {
  516. return io.ErrUnexpectedEOF
  517. }
  518. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  519. if m.Value == nil {
  520. m.Value = []byte{}
  521. }
  522. iNdEx = postIndex
  523. case 3:
  524. if wireType != 2 {
  525. return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
  526. }
  527. var stringLen uint64
  528. for shift := uint(0); ; shift += 7 {
  529. if shift >= 64 {
  530. return ErrIntOverflowDatabus
  531. }
  532. if iNdEx >= l {
  533. return io.ErrUnexpectedEOF
  534. }
  535. b := dAtA[iNdEx]
  536. iNdEx++
  537. stringLen |= (uint64(b) & 0x7F) << shift
  538. if b < 0x80 {
  539. break
  540. }
  541. }
  542. intStringLen := int(stringLen)
  543. if intStringLen < 0 {
  544. return ErrInvalidLengthDatabus
  545. }
  546. postIndex := iNdEx + intStringLen
  547. if postIndex > l {
  548. return io.ErrUnexpectedEOF
  549. }
  550. m.Topic = string(dAtA[iNdEx:postIndex])
  551. iNdEx = postIndex
  552. case 4:
  553. if wireType != 0 {
  554. return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType)
  555. }
  556. m.Partition = 0
  557. for shift := uint(0); ; shift += 7 {
  558. if shift >= 64 {
  559. return ErrIntOverflowDatabus
  560. }
  561. if iNdEx >= l {
  562. return io.ErrUnexpectedEOF
  563. }
  564. b := dAtA[iNdEx]
  565. iNdEx++
  566. m.Partition |= (int32(b) & 0x7F) << shift
  567. if b < 0x80 {
  568. break
  569. }
  570. }
  571. case 5:
  572. if wireType != 0 {
  573. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  574. }
  575. m.Offset = 0
  576. for shift := uint(0); ; shift += 7 {
  577. if shift >= 64 {
  578. return ErrIntOverflowDatabus
  579. }
  580. if iNdEx >= l {
  581. return io.ErrUnexpectedEOF
  582. }
  583. b := dAtA[iNdEx]
  584. iNdEx++
  585. m.Offset |= (int64(b) & 0x7F) << shift
  586. if b < 0x80 {
  587. break
  588. }
  589. }
  590. case 6:
  591. if wireType != 0 {
  592. return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
  593. }
  594. m.Timestamp = 0
  595. for shift := uint(0); ; shift += 7 {
  596. if shift >= 64 {
  597. return ErrIntOverflowDatabus
  598. }
  599. if iNdEx >= l {
  600. return io.ErrUnexpectedEOF
  601. }
  602. b := dAtA[iNdEx]
  603. iNdEx++
  604. m.Timestamp |= (int64(b) & 0x7F) << shift
  605. if b < 0x80 {
  606. break
  607. }
  608. }
  609. case 7:
  610. if wireType != 2 {
  611. return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  612. }
  613. var msglen int
  614. for shift := uint(0); ; shift += 7 {
  615. if shift >= 64 {
  616. return ErrIntOverflowDatabus
  617. }
  618. if iNdEx >= l {
  619. return io.ErrUnexpectedEOF
  620. }
  621. b := dAtA[iNdEx]
  622. iNdEx++
  623. msglen |= (int(b) & 0x7F) << shift
  624. if b < 0x80 {
  625. break
  626. }
  627. }
  628. if msglen < 0 {
  629. return ErrInvalidLengthDatabus
  630. }
  631. postIndex := iNdEx + msglen
  632. if postIndex > l {
  633. return io.ErrUnexpectedEOF
  634. }
  635. if m.Metadata == nil {
  636. m.Metadata = make(map[string]string)
  637. }
  638. var mapkey string
  639. var mapvalue string
  640. for iNdEx < postIndex {
  641. entryPreIndex := iNdEx
  642. var wire uint64
  643. for shift := uint(0); ; shift += 7 {
  644. if shift >= 64 {
  645. return ErrIntOverflowDatabus
  646. }
  647. if iNdEx >= l {
  648. return io.ErrUnexpectedEOF
  649. }
  650. b := dAtA[iNdEx]
  651. iNdEx++
  652. wire |= (uint64(b) & 0x7F) << shift
  653. if b < 0x80 {
  654. break
  655. }
  656. }
  657. fieldNum := int32(wire >> 3)
  658. if fieldNum == 1 {
  659. var stringLenmapkey uint64
  660. for shift := uint(0); ; shift += 7 {
  661. if shift >= 64 {
  662. return ErrIntOverflowDatabus
  663. }
  664. if iNdEx >= l {
  665. return io.ErrUnexpectedEOF
  666. }
  667. b := dAtA[iNdEx]
  668. iNdEx++
  669. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  670. if b < 0x80 {
  671. break
  672. }
  673. }
  674. intStringLenmapkey := int(stringLenmapkey)
  675. if intStringLenmapkey < 0 {
  676. return ErrInvalidLengthDatabus
  677. }
  678. postStringIndexmapkey := iNdEx + intStringLenmapkey
  679. if postStringIndexmapkey > l {
  680. return io.ErrUnexpectedEOF
  681. }
  682. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  683. iNdEx = postStringIndexmapkey
  684. } else if fieldNum == 2 {
  685. var stringLenmapvalue uint64
  686. for shift := uint(0); ; shift += 7 {
  687. if shift >= 64 {
  688. return ErrIntOverflowDatabus
  689. }
  690. if iNdEx >= l {
  691. return io.ErrUnexpectedEOF
  692. }
  693. b := dAtA[iNdEx]
  694. iNdEx++
  695. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  696. if b < 0x80 {
  697. break
  698. }
  699. }
  700. intStringLenmapvalue := int(stringLenmapvalue)
  701. if intStringLenmapvalue < 0 {
  702. return ErrInvalidLengthDatabus
  703. }
  704. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  705. if postStringIndexmapvalue > l {
  706. return io.ErrUnexpectedEOF
  707. }
  708. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  709. iNdEx = postStringIndexmapvalue
  710. } else {
  711. iNdEx = entryPreIndex
  712. skippy, err := skipDatabus(dAtA[iNdEx:])
  713. if err != nil {
  714. return err
  715. }
  716. if skippy < 0 {
  717. return ErrInvalidLengthDatabus
  718. }
  719. if (iNdEx + skippy) > postIndex {
  720. return io.ErrUnexpectedEOF
  721. }
  722. iNdEx += skippy
  723. }
  724. }
  725. m.Metadata[mapkey] = mapvalue
  726. iNdEx = postIndex
  727. default:
  728. iNdEx = preIndex
  729. skippy, err := skipDatabus(dAtA[iNdEx:])
  730. if err != nil {
  731. return err
  732. }
  733. if skippy < 0 {
  734. return ErrInvalidLengthDatabus
  735. }
  736. if (iNdEx + skippy) > l {
  737. return io.ErrUnexpectedEOF
  738. }
  739. iNdEx += skippy
  740. }
  741. }
  742. if iNdEx > l {
  743. return io.ErrUnexpectedEOF
  744. }
  745. return nil
  746. }
  747. func skipDatabus(dAtA []byte) (n int, err error) {
  748. l := len(dAtA)
  749. iNdEx := 0
  750. for iNdEx < l {
  751. var wire uint64
  752. for shift := uint(0); ; shift += 7 {
  753. if shift >= 64 {
  754. return 0, ErrIntOverflowDatabus
  755. }
  756. if iNdEx >= l {
  757. return 0, io.ErrUnexpectedEOF
  758. }
  759. b := dAtA[iNdEx]
  760. iNdEx++
  761. wire |= (uint64(b) & 0x7F) << shift
  762. if b < 0x80 {
  763. break
  764. }
  765. }
  766. wireType := int(wire & 0x7)
  767. switch wireType {
  768. case 0:
  769. for shift := uint(0); ; shift += 7 {
  770. if shift >= 64 {
  771. return 0, ErrIntOverflowDatabus
  772. }
  773. if iNdEx >= l {
  774. return 0, io.ErrUnexpectedEOF
  775. }
  776. iNdEx++
  777. if dAtA[iNdEx-1] < 0x80 {
  778. break
  779. }
  780. }
  781. return iNdEx, nil
  782. case 1:
  783. iNdEx += 8
  784. return iNdEx, nil
  785. case 2:
  786. var length int
  787. for shift := uint(0); ; shift += 7 {
  788. if shift >= 64 {
  789. return 0, ErrIntOverflowDatabus
  790. }
  791. if iNdEx >= l {
  792. return 0, io.ErrUnexpectedEOF
  793. }
  794. b := dAtA[iNdEx]
  795. iNdEx++
  796. length |= (int(b) & 0x7F) << shift
  797. if b < 0x80 {
  798. break
  799. }
  800. }
  801. iNdEx += length
  802. if length < 0 {
  803. return 0, ErrInvalidLengthDatabus
  804. }
  805. return iNdEx, nil
  806. case 3:
  807. for {
  808. var innerWire uint64
  809. var start int = iNdEx
  810. for shift := uint(0); ; shift += 7 {
  811. if shift >= 64 {
  812. return 0, ErrIntOverflowDatabus
  813. }
  814. if iNdEx >= l {
  815. return 0, io.ErrUnexpectedEOF
  816. }
  817. b := dAtA[iNdEx]
  818. iNdEx++
  819. innerWire |= (uint64(b) & 0x7F) << shift
  820. if b < 0x80 {
  821. break
  822. }
  823. }
  824. innerWireType := int(innerWire & 0x7)
  825. if innerWireType == 4 {
  826. break
  827. }
  828. next, err := skipDatabus(dAtA[start:])
  829. if err != nil {
  830. return 0, err
  831. }
  832. iNdEx = start + next
  833. }
  834. return iNdEx, nil
  835. case 4:
  836. return iNdEx, nil
  837. case 5:
  838. iNdEx += 4
  839. return iNdEx, nil
  840. default:
  841. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  842. }
  843. }
  844. panic("unreachable")
  845. }
  846. var (
  847. ErrInvalidLengthDatabus = fmt.Errorf("proto: negative length found during unmarshaling")
  848. ErrIntOverflowDatabus = fmt.Errorf("proto: integer overflow")
  849. )
  850. func init() { proto.RegisterFile("library/queue/databus/databus.proto", fileDescriptorDatabus) }
  851. var fileDescriptorDatabus = []byte{
  852. // 376 bytes of a gzipped FileDescriptorProto
  853. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x92, 0x41, 0x4a, 0xc3, 0x40,
  854. 0x18, 0x85, 0x99, 0xc6, 0xa4, 0x66, 0x6c, 0x41, 0x06, 0x85, 0xb1, 0x8b, 0x26, 0xb4, 0x28, 0x01,
  855. 0x31, 0x01, 0xdd, 0x88, 0xdd, 0x05, 0x04, 0x37, 0x85, 0x92, 0xa5, 0xbb, 0x49, 0x3b, 0x89, 0xa3,
  856. 0x4d, 0x26, 0x26, 0x13, 0xa5, 0xc7, 0x10, 0x3c, 0x94, 0x4b, 0x4f, 0x10, 0xa4, 0xcb, 0x1c, 0xc1,
  857. 0x95, 0x64, 0x12, 0xd3, 0xd6, 0x03, 0xb8, 0xfa, 0xdf, 0xff, 0x78, 0xff, 0x97, 0x90, 0x17, 0x38,
  858. 0x5e, 0x32, 0x3f, 0x25, 0xe9, 0xca, 0x79, 0xce, 0x69, 0x4e, 0x9d, 0x05, 0x11, 0xc4, 0xcf, 0xb3,
  859. 0xdf, 0x69, 0x27, 0x29, 0x17, 0x1c, 0xf5, 0x59, 0x1c, 0xa4, 0xc4, 0x6e, 0xcc, 0xc1, 0x45, 0xc8,
  860. 0xc4, 0x43, 0xee, 0xdb, 0x73, 0x1e, 0x39, 0x21, 0x0f, 0xb9, 0x23, 0x53, 0x7e, 0x1e, 0xc8, 0x4d,
  861. 0x2e, 0x52, 0xd5, 0xd7, 0xa3, 0x77, 0x00, 0xb5, 0x3b, 0x4a, 0x16, 0x34, 0x45, 0x53, 0xb8, 0x1f,
  862. 0x51, 0x41, 0x2a, 0x10, 0x06, 0xa6, 0x62, 0x1d, 0x5c, 0x8e, 0xed, 0x1d, 0xb6, 0x5d, 0x07, 0xed,
  863. 0x69, 0x93, 0xba, 0x8d, 0x45, 0xba, 0x72, 0x7b, 0x65, 0x61, 0xb4, 0x87, 0x5e, 0xab, 0x06, 0x13,
  864. 0xd8, 0xdf, 0x09, 0xa2, 0x43, 0xa8, 0x3c, 0xd1, 0x15, 0x06, 0x26, 0xb0, 0x74, 0xaf, 0x92, 0xe8,
  865. 0x08, 0xaa, 0x2f, 0x64, 0x99, 0x53, 0xdc, 0x91, 0x5e, 0xbd, 0xdc, 0x74, 0xae, 0xc1, 0xe8, 0x4d,
  866. 0x81, 0xfa, 0x94, 0x66, 0x19, 0x09, 0xe9, 0xcc, 0x45, 0x27, 0x5b, 0x97, 0x6e, 0xb7, 0x2c, 0x8c,
  867. 0x6a, 0xad, 0x11, 0x93, 0x6d, 0x44, 0xcf, 0x3d, 0x2d, 0x0b, 0xa3, 0x36, 0xbe, 0x0b, 0x03, 0xd3,
  868. 0x78, 0xce, 0x17, 0x2c, 0x0e, 0x9d, 0xc7, 0x8c, 0xc7, 0xb6, 0x47, 0x5e, 0x1b, 0x64, 0xf3, 0x24,
  869. 0x64, 0x40, 0x55, 0xf0, 0x84, 0xcd, 0xb1, 0x22, 0xc9, 0x7a, 0x75, 0x2c, 0x0d, 0xaf, 0x1e, 0xe8,
  870. 0x1c, 0xea, 0x09, 0x49, 0x05, 0x13, 0x8c, 0xc7, 0x78, 0xcf, 0x04, 0x96, 0xea, 0xf6, 0xcb, 0xc2,
  871. 0xd8, 0x98, 0xde, 0x46, 0xa2, 0x11, 0xd4, 0x78, 0x10, 0x64, 0x54, 0x60, 0xd5, 0x04, 0x96, 0xe2,
  872. 0xc2, 0xb2, 0x30, 0x1a, 0xc7, 0x6b, 0x66, 0x05, 0x14, 0x2c, 0xa2, 0x99, 0x20, 0x51, 0x82, 0x35,
  873. 0x19, 0x93, 0xc0, 0xd6, 0xf4, 0x36, 0x12, 0xcd, 0xb6, 0x0a, 0xe9, 0xca, 0x42, 0xce, 0xfe, 0x14,
  874. 0xd2, 0x7e, 0xa2, 0x7f, 0xe8, 0xc4, 0x3d, 0xfe, 0x58, 0x0f, 0xc1, 0xe7, 0x7a, 0x08, 0xbe, 0xd6,
  875. 0x43, 0x70, 0xdf, 0x6d, 0xde, 0xc1, 0xd7, 0xe4, 0x8f, 0x74, 0xf5, 0x13, 0x00, 0x00, 0xff, 0xff,
  876. 0xa5, 0x22, 0x22, 0x61, 0xad, 0x02, 0x00, 0x00,
  877. }