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.

809 lines
19 KiB

  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: libs/common/types.proto
  3. package common
  4. import (
  5. bytes "bytes"
  6. fmt "fmt"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. golang_proto "github.com/golang/protobuf/proto"
  10. io "io"
  11. math "math"
  12. math_bits "math/bits"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = golang_proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  24. // Define these here for compatibility but use tmlibs/common.KVPair.
  25. type KVPair struct {
  26. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  27. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
  28. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  29. XXX_unrecognized []byte `json:"-"`
  30. XXX_sizecache int32 `json:"-"`
  31. }
  32. func (m *KVPair) Reset() { *m = KVPair{} }
  33. func (m *KVPair) String() string { return proto.CompactTextString(m) }
  34. func (*KVPair) ProtoMessage() {}
  35. func (*KVPair) Descriptor() ([]byte, []int) {
  36. return fileDescriptor_28b36ea5054b507d, []int{0}
  37. }
  38. func (m *KVPair) XXX_Unmarshal(b []byte) error {
  39. return m.Unmarshal(b)
  40. }
  41. func (m *KVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  42. if deterministic {
  43. return xxx_messageInfo_KVPair.Marshal(b, m, deterministic)
  44. } else {
  45. b = b[:cap(b)]
  46. n, err := m.MarshalToSizedBuffer(b)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return b[:n], nil
  51. }
  52. }
  53. func (m *KVPair) XXX_Merge(src proto.Message) {
  54. xxx_messageInfo_KVPair.Merge(m, src)
  55. }
  56. func (m *KVPair) XXX_Size() int {
  57. return m.Size()
  58. }
  59. func (m *KVPair) XXX_DiscardUnknown() {
  60. xxx_messageInfo_KVPair.DiscardUnknown(m)
  61. }
  62. var xxx_messageInfo_KVPair proto.InternalMessageInfo
  63. func (m *KVPair) GetKey() []byte {
  64. if m != nil {
  65. return m.Key
  66. }
  67. return nil
  68. }
  69. func (m *KVPair) GetValue() []byte {
  70. if m != nil {
  71. return m.Value
  72. }
  73. return nil
  74. }
  75. // Define these here for compatibility but use tmlibs/common.KI64Pair.
  76. type KI64Pair struct {
  77. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  78. Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
  79. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  80. XXX_unrecognized []byte `json:"-"`
  81. XXX_sizecache int32 `json:"-"`
  82. }
  83. func (m *KI64Pair) Reset() { *m = KI64Pair{} }
  84. func (m *KI64Pair) String() string { return proto.CompactTextString(m) }
  85. func (*KI64Pair) ProtoMessage() {}
  86. func (*KI64Pair) Descriptor() ([]byte, []int) {
  87. return fileDescriptor_28b36ea5054b507d, []int{1}
  88. }
  89. func (m *KI64Pair) XXX_Unmarshal(b []byte) error {
  90. return m.Unmarshal(b)
  91. }
  92. func (m *KI64Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  93. if deterministic {
  94. return xxx_messageInfo_KI64Pair.Marshal(b, m, deterministic)
  95. } else {
  96. b = b[:cap(b)]
  97. n, err := m.MarshalToSizedBuffer(b)
  98. if err != nil {
  99. return nil, err
  100. }
  101. return b[:n], nil
  102. }
  103. }
  104. func (m *KI64Pair) XXX_Merge(src proto.Message) {
  105. xxx_messageInfo_KI64Pair.Merge(m, src)
  106. }
  107. func (m *KI64Pair) XXX_Size() int {
  108. return m.Size()
  109. }
  110. func (m *KI64Pair) XXX_DiscardUnknown() {
  111. xxx_messageInfo_KI64Pair.DiscardUnknown(m)
  112. }
  113. var xxx_messageInfo_KI64Pair proto.InternalMessageInfo
  114. func (m *KI64Pair) GetKey() []byte {
  115. if m != nil {
  116. return m.Key
  117. }
  118. return nil
  119. }
  120. func (m *KI64Pair) GetValue() int64 {
  121. if m != nil {
  122. return m.Value
  123. }
  124. return 0
  125. }
  126. func init() {
  127. proto.RegisterType((*KVPair)(nil), "tendermint.libs.common.KVPair")
  128. golang_proto.RegisterType((*KVPair)(nil), "tendermint.libs.common.KVPair")
  129. proto.RegisterType((*KI64Pair)(nil), "tendermint.libs.common.KI64Pair")
  130. golang_proto.RegisterType((*KI64Pair)(nil), "tendermint.libs.common.KI64Pair")
  131. }
  132. func init() { proto.RegisterFile("libs/common/types.proto", fileDescriptor_28b36ea5054b507d) }
  133. func init() { golang_proto.RegisterFile("libs/common/types.proto", fileDescriptor_28b36ea5054b507d) }
  134. var fileDescriptor_28b36ea5054b507d = []byte{
  135. // 197 bytes of a gzipped FileDescriptorProto
  136. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0xc9, 0x4c, 0x2a,
  137. 0xd6, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, 0x28,
  138. 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x2b, 0x49, 0xcd, 0x4b, 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1,
  139. 0x03, 0xa9, 0xd1, 0x83, 0xa8, 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0x02, 0x71, 0xf5,
  140. 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xca, 0x93, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82,
  141. 0x18, 0xa3, 0x64, 0xc0, 0xc5, 0xe6, 0x1d, 0x16, 0x90, 0x98, 0x59, 0x24, 0x24, 0xc0, 0xc5, 0x9c,
  142. 0x9d, 0x5a, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0x62, 0x0a, 0x89, 0x70, 0xb1, 0x96,
  143. 0x25, 0xe6, 0x94, 0xa6, 0x4a, 0x30, 0x81, 0xc5, 0x20, 0x1c, 0x25, 0x23, 0x2e, 0x0e, 0x6f, 0x4f,
  144. 0x33, 0x13, 0x62, 0xf4, 0x30, 0x43, 0xf5, 0x38, 0x79, 0xfd, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91,
  145. 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0,
  146. 0x91, 0x1c, 0xe3, 0x81, 0xc7, 0x72, 0x8c, 0x51, 0x3a, 0x48, 0x4e, 0x46, 0xf8, 0x0a, 0x99, 0x89,
  147. 0x14, 0x08, 0x49, 0x6c, 0x60, 0x87, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd4, 0xc3, 0x96,
  148. 0x94, 0x1a, 0x01, 0x00, 0x00,
  149. }
  150. func (this *KVPair) Equal(that interface{}) bool {
  151. if that == nil {
  152. return this == nil
  153. }
  154. that1, ok := that.(*KVPair)
  155. if !ok {
  156. that2, ok := that.(KVPair)
  157. if ok {
  158. that1 = &that2
  159. } else {
  160. return false
  161. }
  162. }
  163. if that1 == nil {
  164. return this == nil
  165. } else if this == nil {
  166. return false
  167. }
  168. if !bytes.Equal(this.Key, that1.Key) {
  169. return false
  170. }
  171. if !bytes.Equal(this.Value, that1.Value) {
  172. return false
  173. }
  174. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  175. return false
  176. }
  177. return true
  178. }
  179. func (this *KI64Pair) Equal(that interface{}) bool {
  180. if that == nil {
  181. return this == nil
  182. }
  183. that1, ok := that.(*KI64Pair)
  184. if !ok {
  185. that2, ok := that.(KI64Pair)
  186. if ok {
  187. that1 = &that2
  188. } else {
  189. return false
  190. }
  191. }
  192. if that1 == nil {
  193. return this == nil
  194. } else if this == nil {
  195. return false
  196. }
  197. if !bytes.Equal(this.Key, that1.Key) {
  198. return false
  199. }
  200. if this.Value != that1.Value {
  201. return false
  202. }
  203. if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
  204. return false
  205. }
  206. return true
  207. }
  208. func (m *KVPair) Marshal() (dAtA []byte, err error) {
  209. size := m.Size()
  210. dAtA = make([]byte, size)
  211. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  212. if err != nil {
  213. return nil, err
  214. }
  215. return dAtA[:n], nil
  216. }
  217. func (m *KVPair) MarshalTo(dAtA []byte) (int, error) {
  218. size := m.Size()
  219. return m.MarshalToSizedBuffer(dAtA[:size])
  220. }
  221. func (m *KVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  222. i := len(dAtA)
  223. _ = i
  224. var l int
  225. _ = l
  226. if m.XXX_unrecognized != nil {
  227. i -= len(m.XXX_unrecognized)
  228. copy(dAtA[i:], m.XXX_unrecognized)
  229. }
  230. if len(m.Value) > 0 {
  231. i -= len(m.Value)
  232. copy(dAtA[i:], m.Value)
  233. i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
  234. i--
  235. dAtA[i] = 0x12
  236. }
  237. if len(m.Key) > 0 {
  238. i -= len(m.Key)
  239. copy(dAtA[i:], m.Key)
  240. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  241. i--
  242. dAtA[i] = 0xa
  243. }
  244. return len(dAtA) - i, nil
  245. }
  246. func (m *KI64Pair) Marshal() (dAtA []byte, err error) {
  247. size := m.Size()
  248. dAtA = make([]byte, size)
  249. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  250. if err != nil {
  251. return nil, err
  252. }
  253. return dAtA[:n], nil
  254. }
  255. func (m *KI64Pair) MarshalTo(dAtA []byte) (int, error) {
  256. size := m.Size()
  257. return m.MarshalToSizedBuffer(dAtA[:size])
  258. }
  259. func (m *KI64Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  260. i := len(dAtA)
  261. _ = i
  262. var l int
  263. _ = l
  264. if m.XXX_unrecognized != nil {
  265. i -= len(m.XXX_unrecognized)
  266. copy(dAtA[i:], m.XXX_unrecognized)
  267. }
  268. if m.Value != 0 {
  269. i = encodeVarintTypes(dAtA, i, uint64(m.Value))
  270. i--
  271. dAtA[i] = 0x10
  272. }
  273. if len(m.Key) > 0 {
  274. i -= len(m.Key)
  275. copy(dAtA[i:], m.Key)
  276. i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  277. i--
  278. dAtA[i] = 0xa
  279. }
  280. return len(dAtA) - i, nil
  281. }
  282. func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  283. offset -= sovTypes(v)
  284. base := offset
  285. for v >= 1<<7 {
  286. dAtA[offset] = uint8(v&0x7f | 0x80)
  287. v >>= 7
  288. offset++
  289. }
  290. dAtA[offset] = uint8(v)
  291. return base
  292. }
  293. func NewPopulatedKVPair(r randyTypes, easy bool) *KVPair {
  294. this := &KVPair{}
  295. v1 := r.Intn(100)
  296. this.Key = make([]byte, v1)
  297. for i := 0; i < v1; i++ {
  298. this.Key[i] = byte(r.Intn(256))
  299. }
  300. v2 := r.Intn(100)
  301. this.Value = make([]byte, v2)
  302. for i := 0; i < v2; i++ {
  303. this.Value[i] = byte(r.Intn(256))
  304. }
  305. if !easy && r.Intn(10) != 0 {
  306. this.XXX_unrecognized = randUnrecognizedTypes(r, 3)
  307. }
  308. return this
  309. }
  310. func NewPopulatedKI64Pair(r randyTypes, easy bool) *KI64Pair {
  311. this := &KI64Pair{}
  312. v3 := r.Intn(100)
  313. this.Key = make([]byte, v3)
  314. for i := 0; i < v3; i++ {
  315. this.Key[i] = byte(r.Intn(256))
  316. }
  317. this.Value = int64(r.Int63())
  318. if r.Intn(2) == 0 {
  319. this.Value *= -1
  320. }
  321. if !easy && r.Intn(10) != 0 {
  322. this.XXX_unrecognized = randUnrecognizedTypes(r, 3)
  323. }
  324. return this
  325. }
  326. type randyTypes interface {
  327. Float32() float32
  328. Float64() float64
  329. Int63() int64
  330. Int31() int32
  331. Uint32() uint32
  332. Intn(n int) int
  333. }
  334. func randUTF8RuneTypes(r randyTypes) rune {
  335. ru := r.Intn(62)
  336. if ru < 10 {
  337. return rune(ru + 48)
  338. } else if ru < 36 {
  339. return rune(ru + 55)
  340. }
  341. return rune(ru + 61)
  342. }
  343. func randStringTypes(r randyTypes) string {
  344. v4 := r.Intn(100)
  345. tmps := make([]rune, v4)
  346. for i := 0; i < v4; i++ {
  347. tmps[i] = randUTF8RuneTypes(r)
  348. }
  349. return string(tmps)
  350. }
  351. func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) {
  352. l := r.Intn(5)
  353. for i := 0; i < l; i++ {
  354. wire := r.Intn(4)
  355. if wire == 3 {
  356. wire = 5
  357. }
  358. fieldNumber := maxFieldNumber + r.Intn(100)
  359. dAtA = randFieldTypes(dAtA, r, fieldNumber, wire)
  360. }
  361. return dAtA
  362. }
  363. func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte {
  364. key := uint32(fieldNumber)<<3 | uint32(wire)
  365. switch wire {
  366. case 0:
  367. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  368. v5 := r.Int63()
  369. if r.Intn(2) == 0 {
  370. v5 *= -1
  371. }
  372. dAtA = encodeVarintPopulateTypes(dAtA, uint64(v5))
  373. case 1:
  374. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  375. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  376. case 2:
  377. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  378. ll := r.Intn(100)
  379. dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll))
  380. for j := 0; j < ll; j++ {
  381. dAtA = append(dAtA, byte(r.Intn(256)))
  382. }
  383. default:
  384. dAtA = encodeVarintPopulateTypes(dAtA, uint64(key))
  385. dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
  386. }
  387. return dAtA
  388. }
  389. func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte {
  390. for v >= 1<<7 {
  391. dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
  392. v >>= 7
  393. }
  394. dAtA = append(dAtA, uint8(v))
  395. return dAtA
  396. }
  397. func (m *KVPair) Size() (n int) {
  398. if m == nil {
  399. return 0
  400. }
  401. var l int
  402. _ = l
  403. l = len(m.Key)
  404. if l > 0 {
  405. n += 1 + l + sovTypes(uint64(l))
  406. }
  407. l = len(m.Value)
  408. if l > 0 {
  409. n += 1 + l + sovTypes(uint64(l))
  410. }
  411. if m.XXX_unrecognized != nil {
  412. n += len(m.XXX_unrecognized)
  413. }
  414. return n
  415. }
  416. func (m *KI64Pair) Size() (n int) {
  417. if m == nil {
  418. return 0
  419. }
  420. var l int
  421. _ = l
  422. l = len(m.Key)
  423. if l > 0 {
  424. n += 1 + l + sovTypes(uint64(l))
  425. }
  426. if m.Value != 0 {
  427. n += 1 + sovTypes(uint64(m.Value))
  428. }
  429. if m.XXX_unrecognized != nil {
  430. n += len(m.XXX_unrecognized)
  431. }
  432. return n
  433. }
  434. func sovTypes(x uint64) (n int) {
  435. return (math_bits.Len64(x|1) + 6) / 7
  436. }
  437. func sozTypes(x uint64) (n int) {
  438. return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  439. }
  440. func (m *KVPair) Unmarshal(dAtA []byte) error {
  441. l := len(dAtA)
  442. iNdEx := 0
  443. for iNdEx < l {
  444. preIndex := iNdEx
  445. var wire uint64
  446. for shift := uint(0); ; shift += 7 {
  447. if shift >= 64 {
  448. return ErrIntOverflowTypes
  449. }
  450. if iNdEx >= l {
  451. return io.ErrUnexpectedEOF
  452. }
  453. b := dAtA[iNdEx]
  454. iNdEx++
  455. wire |= uint64(b&0x7F) << shift
  456. if b < 0x80 {
  457. break
  458. }
  459. }
  460. fieldNum := int32(wire >> 3)
  461. wireType := int(wire & 0x7)
  462. if wireType == 4 {
  463. return fmt.Errorf("proto: KVPair: wiretype end group for non-group")
  464. }
  465. if fieldNum <= 0 {
  466. return fmt.Errorf("proto: KVPair: illegal tag %d (wire type %d)", fieldNum, wire)
  467. }
  468. switch fieldNum {
  469. case 1:
  470. if wireType != 2 {
  471. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  472. }
  473. var byteLen int
  474. for shift := uint(0); ; shift += 7 {
  475. if shift >= 64 {
  476. return ErrIntOverflowTypes
  477. }
  478. if iNdEx >= l {
  479. return io.ErrUnexpectedEOF
  480. }
  481. b := dAtA[iNdEx]
  482. iNdEx++
  483. byteLen |= int(b&0x7F) << shift
  484. if b < 0x80 {
  485. break
  486. }
  487. }
  488. if byteLen < 0 {
  489. return ErrInvalidLengthTypes
  490. }
  491. postIndex := iNdEx + byteLen
  492. if postIndex < 0 {
  493. return ErrInvalidLengthTypes
  494. }
  495. if postIndex > l {
  496. return io.ErrUnexpectedEOF
  497. }
  498. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  499. if m.Key == nil {
  500. m.Key = []byte{}
  501. }
  502. iNdEx = postIndex
  503. case 2:
  504. if wireType != 2 {
  505. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  506. }
  507. var byteLen int
  508. for shift := uint(0); ; shift += 7 {
  509. if shift >= 64 {
  510. return ErrIntOverflowTypes
  511. }
  512. if iNdEx >= l {
  513. return io.ErrUnexpectedEOF
  514. }
  515. b := dAtA[iNdEx]
  516. iNdEx++
  517. byteLen |= int(b&0x7F) << shift
  518. if b < 0x80 {
  519. break
  520. }
  521. }
  522. if byteLen < 0 {
  523. return ErrInvalidLengthTypes
  524. }
  525. postIndex := iNdEx + byteLen
  526. if postIndex < 0 {
  527. return ErrInvalidLengthTypes
  528. }
  529. if postIndex > l {
  530. return io.ErrUnexpectedEOF
  531. }
  532. m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
  533. if m.Value == nil {
  534. m.Value = []byte{}
  535. }
  536. iNdEx = postIndex
  537. default:
  538. iNdEx = preIndex
  539. skippy, err := skipTypes(dAtA[iNdEx:])
  540. if err != nil {
  541. return err
  542. }
  543. if skippy < 0 {
  544. return ErrInvalidLengthTypes
  545. }
  546. if (iNdEx + skippy) < 0 {
  547. return ErrInvalidLengthTypes
  548. }
  549. if (iNdEx + skippy) > l {
  550. return io.ErrUnexpectedEOF
  551. }
  552. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  553. iNdEx += skippy
  554. }
  555. }
  556. if iNdEx > l {
  557. return io.ErrUnexpectedEOF
  558. }
  559. return nil
  560. }
  561. func (m *KI64Pair) Unmarshal(dAtA []byte) error {
  562. l := len(dAtA)
  563. iNdEx := 0
  564. for iNdEx < l {
  565. preIndex := iNdEx
  566. var wire uint64
  567. for shift := uint(0); ; shift += 7 {
  568. if shift >= 64 {
  569. return ErrIntOverflowTypes
  570. }
  571. if iNdEx >= l {
  572. return io.ErrUnexpectedEOF
  573. }
  574. b := dAtA[iNdEx]
  575. iNdEx++
  576. wire |= uint64(b&0x7F) << shift
  577. if b < 0x80 {
  578. break
  579. }
  580. }
  581. fieldNum := int32(wire >> 3)
  582. wireType := int(wire & 0x7)
  583. if wireType == 4 {
  584. return fmt.Errorf("proto: KI64Pair: wiretype end group for non-group")
  585. }
  586. if fieldNum <= 0 {
  587. return fmt.Errorf("proto: KI64Pair: illegal tag %d (wire type %d)", fieldNum, wire)
  588. }
  589. switch fieldNum {
  590. case 1:
  591. if wireType != 2 {
  592. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  593. }
  594. var byteLen int
  595. for shift := uint(0); ; shift += 7 {
  596. if shift >= 64 {
  597. return ErrIntOverflowTypes
  598. }
  599. if iNdEx >= l {
  600. return io.ErrUnexpectedEOF
  601. }
  602. b := dAtA[iNdEx]
  603. iNdEx++
  604. byteLen |= int(b&0x7F) << shift
  605. if b < 0x80 {
  606. break
  607. }
  608. }
  609. if byteLen < 0 {
  610. return ErrInvalidLengthTypes
  611. }
  612. postIndex := iNdEx + byteLen
  613. if postIndex < 0 {
  614. return ErrInvalidLengthTypes
  615. }
  616. if postIndex > l {
  617. return io.ErrUnexpectedEOF
  618. }
  619. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  620. if m.Key == nil {
  621. m.Key = []byte{}
  622. }
  623. iNdEx = postIndex
  624. case 2:
  625. if wireType != 0 {
  626. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  627. }
  628. m.Value = 0
  629. for shift := uint(0); ; shift += 7 {
  630. if shift >= 64 {
  631. return ErrIntOverflowTypes
  632. }
  633. if iNdEx >= l {
  634. return io.ErrUnexpectedEOF
  635. }
  636. b := dAtA[iNdEx]
  637. iNdEx++
  638. m.Value |= int64(b&0x7F) << shift
  639. if b < 0x80 {
  640. break
  641. }
  642. }
  643. default:
  644. iNdEx = preIndex
  645. skippy, err := skipTypes(dAtA[iNdEx:])
  646. if err != nil {
  647. return err
  648. }
  649. if skippy < 0 {
  650. return ErrInvalidLengthTypes
  651. }
  652. if (iNdEx + skippy) < 0 {
  653. return ErrInvalidLengthTypes
  654. }
  655. if (iNdEx + skippy) > l {
  656. return io.ErrUnexpectedEOF
  657. }
  658. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  659. iNdEx += skippy
  660. }
  661. }
  662. if iNdEx > l {
  663. return io.ErrUnexpectedEOF
  664. }
  665. return nil
  666. }
  667. func skipTypes(dAtA []byte) (n int, err error) {
  668. l := len(dAtA)
  669. iNdEx := 0
  670. for iNdEx < l {
  671. var wire uint64
  672. for shift := uint(0); ; shift += 7 {
  673. if shift >= 64 {
  674. return 0, ErrIntOverflowTypes
  675. }
  676. if iNdEx >= l {
  677. return 0, io.ErrUnexpectedEOF
  678. }
  679. b := dAtA[iNdEx]
  680. iNdEx++
  681. wire |= (uint64(b) & 0x7F) << shift
  682. if b < 0x80 {
  683. break
  684. }
  685. }
  686. wireType := int(wire & 0x7)
  687. switch wireType {
  688. case 0:
  689. for shift := uint(0); ; shift += 7 {
  690. if shift >= 64 {
  691. return 0, ErrIntOverflowTypes
  692. }
  693. if iNdEx >= l {
  694. return 0, io.ErrUnexpectedEOF
  695. }
  696. iNdEx++
  697. if dAtA[iNdEx-1] < 0x80 {
  698. break
  699. }
  700. }
  701. return iNdEx, nil
  702. case 1:
  703. iNdEx += 8
  704. return iNdEx, nil
  705. case 2:
  706. var length int
  707. for shift := uint(0); ; shift += 7 {
  708. if shift >= 64 {
  709. return 0, ErrIntOverflowTypes
  710. }
  711. if iNdEx >= l {
  712. return 0, io.ErrUnexpectedEOF
  713. }
  714. b := dAtA[iNdEx]
  715. iNdEx++
  716. length |= (int(b) & 0x7F) << shift
  717. if b < 0x80 {
  718. break
  719. }
  720. }
  721. if length < 0 {
  722. return 0, ErrInvalidLengthTypes
  723. }
  724. iNdEx += length
  725. if iNdEx < 0 {
  726. return 0, ErrInvalidLengthTypes
  727. }
  728. return iNdEx, nil
  729. case 3:
  730. for {
  731. var innerWire uint64
  732. var start int = iNdEx
  733. for shift := uint(0); ; shift += 7 {
  734. if shift >= 64 {
  735. return 0, ErrIntOverflowTypes
  736. }
  737. if iNdEx >= l {
  738. return 0, io.ErrUnexpectedEOF
  739. }
  740. b := dAtA[iNdEx]
  741. iNdEx++
  742. innerWire |= (uint64(b) & 0x7F) << shift
  743. if b < 0x80 {
  744. break
  745. }
  746. }
  747. innerWireType := int(innerWire & 0x7)
  748. if innerWireType == 4 {
  749. break
  750. }
  751. next, err := skipTypes(dAtA[start:])
  752. if err != nil {
  753. return 0, err
  754. }
  755. iNdEx = start + next
  756. if iNdEx < 0 {
  757. return 0, ErrInvalidLengthTypes
  758. }
  759. }
  760. return iNdEx, nil
  761. case 4:
  762. return iNdEx, nil
  763. case 5:
  764. iNdEx += 4
  765. return iNdEx, nil
  766. default:
  767. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  768. }
  769. }
  770. panic("unreachable")
  771. }
  772. var (
  773. ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  774. ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
  775. )