github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/types/kv/kv.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/base/kv/v1beta1/kv.proto 3 4 package kv 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // Pairs defines a repeated slice of Pair objects. 27 type Pairs struct { 28 Pairs []Pair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"` 29 } 30 31 func (m *Pairs) Reset() { *m = Pairs{} } 32 func (m *Pairs) String() string { return proto.CompactTextString(m) } 33 func (*Pairs) ProtoMessage() {} 34 func (*Pairs) Descriptor() ([]byte, []int) { 35 return fileDescriptor_a44e87fe7182bb73, []int{0} 36 } 37 func (m *Pairs) XXX_Unmarshal(b []byte) error { 38 return m.Unmarshal(b) 39 } 40 func (m *Pairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 41 if deterministic { 42 return xxx_messageInfo_Pairs.Marshal(b, m, deterministic) 43 } else { 44 b = b[:cap(b)] 45 n, err := m.MarshalToSizedBuffer(b) 46 if err != nil { 47 return nil, err 48 } 49 return b[:n], nil 50 } 51 } 52 func (m *Pairs) XXX_Merge(src proto.Message) { 53 xxx_messageInfo_Pairs.Merge(m, src) 54 } 55 func (m *Pairs) XXX_Size() int { 56 return m.Size() 57 } 58 func (m *Pairs) XXX_DiscardUnknown() { 59 xxx_messageInfo_Pairs.DiscardUnknown(m) 60 } 61 62 var xxx_messageInfo_Pairs proto.InternalMessageInfo 63 64 func (m *Pairs) GetPairs() []Pair { 65 if m != nil { 66 return m.Pairs 67 } 68 return nil 69 } 70 71 // Pair defines a key/value bytes tuple. 72 type Pair struct { 73 Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 74 Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 75 } 76 77 func (m *Pair) Reset() { *m = Pair{} } 78 func (m *Pair) String() string { return proto.CompactTextString(m) } 79 func (*Pair) ProtoMessage() {} 80 func (*Pair) Descriptor() ([]byte, []int) { 81 return fileDescriptor_a44e87fe7182bb73, []int{1} 82 } 83 func (m *Pair) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 if deterministic { 88 return xxx_messageInfo_Pair.Marshal(b, m, deterministic) 89 } else { 90 b = b[:cap(b)] 91 n, err := m.MarshalToSizedBuffer(b) 92 if err != nil { 93 return nil, err 94 } 95 return b[:n], nil 96 } 97 } 98 func (m *Pair) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_Pair.Merge(m, src) 100 } 101 func (m *Pair) XXX_Size() int { 102 return m.Size() 103 } 104 func (m *Pair) XXX_DiscardUnknown() { 105 xxx_messageInfo_Pair.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_Pair proto.InternalMessageInfo 109 110 func (m *Pair) GetKey() []byte { 111 if m != nil { 112 return m.Key 113 } 114 return nil 115 } 116 117 func (m *Pair) GetValue() []byte { 118 if m != nil { 119 return m.Value 120 } 121 return nil 122 } 123 124 func init() { 125 proto.RegisterType((*Pairs)(nil), "cosmos.base.kv.v1beta1.Pairs") 126 proto.RegisterType((*Pair)(nil), "cosmos.base.kv.v1beta1.Pair") 127 } 128 129 func init() { proto.RegisterFile("cosmos/base/kv/v1beta1/kv.proto", fileDescriptor_a44e87fe7182bb73) } 130 131 var fileDescriptor_a44e87fe7182bb73 = []byte{ 132 // 221 bytes of a gzipped FileDescriptorProto 133 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, 134 0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0xcf, 0x2e, 0xd3, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 135 0x49, 0x34, 0xd4, 0xcf, 0x2e, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x28, 0xd0, 136 0x03, 0x29, 0xd0, 0xcb, 0x2e, 0xd3, 0x83, 0x2a, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 137 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0x95, 0x1c, 0xb9, 0x58, 0x03, 0x12, 0x33, 0x8b, 0x8a, 0x85, 0x2c, 138 0xb8, 0x58, 0x0b, 0x40, 0x0c, 0x09, 0x46, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x19, 0x3d, 0xec, 0xc6, 139 0xe8, 0x81, 0x54, 0x3b, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0xd1, 0xa0, 0xa4, 0xc7, 0xc5, 140 0x02, 0x12, 0x14, 0x12, 0xe0, 0x62, 0xce, 0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 141 0x02, 0x31, 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x12, 0x73, 0x4a, 0x53, 0x25, 0x98, 0xc0, 0x62, 0x10, 142 0x8e, 0x93, 0xfd, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 143 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xa9, 0xa6, 0x67, 144 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0xbd, 0x09, 0xa1, 0x74, 0x8b, 0x53, 145 0xb2, 0xf5, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0xf5, 0xb3, 0xcb, 0x92, 0xd8, 0xc0, 0x4e, 0x37, 0x06, 146 0x04, 0x00, 0x00, 0xff, 0xff, 0x15, 0x18, 0x16, 0xcf, 0x0b, 0x01, 0x00, 0x00, 147 } 148 149 func (m *Pairs) Marshal() (dAtA []byte, err error) { 150 size := m.Size() 151 dAtA = make([]byte, size) 152 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 153 if err != nil { 154 return nil, err 155 } 156 return dAtA[:n], nil 157 } 158 159 func (m *Pairs) MarshalTo(dAtA []byte) (int, error) { 160 size := m.Size() 161 return m.MarshalToSizedBuffer(dAtA[:size]) 162 } 163 164 func (m *Pairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { 165 i := len(dAtA) 166 _ = i 167 var l int 168 _ = l 169 if len(m.Pairs) > 0 { 170 for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { 171 { 172 size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 173 if err != nil { 174 return 0, err 175 } 176 i -= size 177 i = encodeVarintKv(dAtA, i, uint64(size)) 178 } 179 i-- 180 dAtA[i] = 0xa 181 } 182 } 183 return len(dAtA) - i, nil 184 } 185 186 func (m *Pair) Marshal() (dAtA []byte, err error) { 187 size := m.Size() 188 dAtA = make([]byte, size) 189 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 190 if err != nil { 191 return nil, err 192 } 193 return dAtA[:n], nil 194 } 195 196 func (m *Pair) MarshalTo(dAtA []byte) (int, error) { 197 size := m.Size() 198 return m.MarshalToSizedBuffer(dAtA[:size]) 199 } 200 201 func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) { 202 i := len(dAtA) 203 _ = i 204 var l int 205 _ = l 206 if len(m.Value) > 0 { 207 i -= len(m.Value) 208 copy(dAtA[i:], m.Value) 209 i = encodeVarintKv(dAtA, i, uint64(len(m.Value))) 210 i-- 211 dAtA[i] = 0x12 212 } 213 if len(m.Key) > 0 { 214 i -= len(m.Key) 215 copy(dAtA[i:], m.Key) 216 i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) 217 i-- 218 dAtA[i] = 0xa 219 } 220 return len(dAtA) - i, nil 221 } 222 223 func encodeVarintKv(dAtA []byte, offset int, v uint64) int { 224 offset -= sovKv(v) 225 base := offset 226 for v >= 1<<7 { 227 dAtA[offset] = uint8(v&0x7f | 0x80) 228 v >>= 7 229 offset++ 230 } 231 dAtA[offset] = uint8(v) 232 return base 233 } 234 func (m *Pairs) Size() (n int) { 235 if m == nil { 236 return 0 237 } 238 var l int 239 _ = l 240 if len(m.Pairs) > 0 { 241 for _, e := range m.Pairs { 242 l = e.Size() 243 n += 1 + l + sovKv(uint64(l)) 244 } 245 } 246 return n 247 } 248 249 func (m *Pair) Size() (n int) { 250 if m == nil { 251 return 0 252 } 253 var l int 254 _ = l 255 l = len(m.Key) 256 if l > 0 { 257 n += 1 + l + sovKv(uint64(l)) 258 } 259 l = len(m.Value) 260 if l > 0 { 261 n += 1 + l + sovKv(uint64(l)) 262 } 263 return n 264 } 265 266 func sovKv(x uint64) (n int) { 267 return (math_bits.Len64(x|1) + 6) / 7 268 } 269 func sozKv(x uint64) (n int) { 270 return sovKv(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 271 } 272 func (m *Pairs) Unmarshal(dAtA []byte) error { 273 l := len(dAtA) 274 iNdEx := 0 275 for iNdEx < l { 276 preIndex := iNdEx 277 var wire uint64 278 for shift := uint(0); ; shift += 7 { 279 if shift >= 64 { 280 return ErrIntOverflowKv 281 } 282 if iNdEx >= l { 283 return io.ErrUnexpectedEOF 284 } 285 b := dAtA[iNdEx] 286 iNdEx++ 287 wire |= uint64(b&0x7F) << shift 288 if b < 0x80 { 289 break 290 } 291 } 292 fieldNum := int32(wire >> 3) 293 wireType := int(wire & 0x7) 294 if wireType == 4 { 295 return fmt.Errorf("proto: Pairs: wiretype end group for non-group") 296 } 297 if fieldNum <= 0 { 298 return fmt.Errorf("proto: Pairs: illegal tag %d (wire type %d)", fieldNum, wire) 299 } 300 switch fieldNum { 301 case 1: 302 if wireType != 2 { 303 return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) 304 } 305 var msglen int 306 for shift := uint(0); ; shift += 7 { 307 if shift >= 64 { 308 return ErrIntOverflowKv 309 } 310 if iNdEx >= l { 311 return io.ErrUnexpectedEOF 312 } 313 b := dAtA[iNdEx] 314 iNdEx++ 315 msglen |= int(b&0x7F) << shift 316 if b < 0x80 { 317 break 318 } 319 } 320 if msglen < 0 { 321 return ErrInvalidLengthKv 322 } 323 postIndex := iNdEx + msglen 324 if postIndex < 0 { 325 return ErrInvalidLengthKv 326 } 327 if postIndex > l { 328 return io.ErrUnexpectedEOF 329 } 330 m.Pairs = append(m.Pairs, Pair{}) 331 if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 332 return err 333 } 334 iNdEx = postIndex 335 default: 336 iNdEx = preIndex 337 skippy, err := skipKv(dAtA[iNdEx:]) 338 if err != nil { 339 return err 340 } 341 if (skippy < 0) || (iNdEx+skippy) < 0 { 342 return ErrInvalidLengthKv 343 } 344 if (iNdEx + skippy) > l { 345 return io.ErrUnexpectedEOF 346 } 347 iNdEx += skippy 348 } 349 } 350 351 if iNdEx > l { 352 return io.ErrUnexpectedEOF 353 } 354 return nil 355 } 356 func (m *Pair) Unmarshal(dAtA []byte) error { 357 l := len(dAtA) 358 iNdEx := 0 359 for iNdEx < l { 360 preIndex := iNdEx 361 var wire uint64 362 for shift := uint(0); ; shift += 7 { 363 if shift >= 64 { 364 return ErrIntOverflowKv 365 } 366 if iNdEx >= l { 367 return io.ErrUnexpectedEOF 368 } 369 b := dAtA[iNdEx] 370 iNdEx++ 371 wire |= uint64(b&0x7F) << shift 372 if b < 0x80 { 373 break 374 } 375 } 376 fieldNum := int32(wire >> 3) 377 wireType := int(wire & 0x7) 378 if wireType == 4 { 379 return fmt.Errorf("proto: Pair: wiretype end group for non-group") 380 } 381 if fieldNum <= 0 { 382 return fmt.Errorf("proto: Pair: illegal tag %d (wire type %d)", fieldNum, wire) 383 } 384 switch fieldNum { 385 case 1: 386 if wireType != 2 { 387 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 388 } 389 var byteLen int 390 for shift := uint(0); ; shift += 7 { 391 if shift >= 64 { 392 return ErrIntOverflowKv 393 } 394 if iNdEx >= l { 395 return io.ErrUnexpectedEOF 396 } 397 b := dAtA[iNdEx] 398 iNdEx++ 399 byteLen |= int(b&0x7F) << shift 400 if b < 0x80 { 401 break 402 } 403 } 404 if byteLen < 0 { 405 return ErrInvalidLengthKv 406 } 407 postIndex := iNdEx + byteLen 408 if postIndex < 0 { 409 return ErrInvalidLengthKv 410 } 411 if postIndex > l { 412 return io.ErrUnexpectedEOF 413 } 414 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) 415 if m.Key == nil { 416 m.Key = []byte{} 417 } 418 iNdEx = postIndex 419 case 2: 420 if wireType != 2 { 421 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 422 } 423 var byteLen int 424 for shift := uint(0); ; shift += 7 { 425 if shift >= 64 { 426 return ErrIntOverflowKv 427 } 428 if iNdEx >= l { 429 return io.ErrUnexpectedEOF 430 } 431 b := dAtA[iNdEx] 432 iNdEx++ 433 byteLen |= int(b&0x7F) << shift 434 if b < 0x80 { 435 break 436 } 437 } 438 if byteLen < 0 { 439 return ErrInvalidLengthKv 440 } 441 postIndex := iNdEx + byteLen 442 if postIndex < 0 { 443 return ErrInvalidLengthKv 444 } 445 if postIndex > l { 446 return io.ErrUnexpectedEOF 447 } 448 m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) 449 if m.Value == nil { 450 m.Value = []byte{} 451 } 452 iNdEx = postIndex 453 default: 454 iNdEx = preIndex 455 skippy, err := skipKv(dAtA[iNdEx:]) 456 if err != nil { 457 return err 458 } 459 if (skippy < 0) || (iNdEx+skippy) < 0 { 460 return ErrInvalidLengthKv 461 } 462 if (iNdEx + skippy) > l { 463 return io.ErrUnexpectedEOF 464 } 465 iNdEx += skippy 466 } 467 } 468 469 if iNdEx > l { 470 return io.ErrUnexpectedEOF 471 } 472 return nil 473 } 474 func skipKv(dAtA []byte) (n int, err error) { 475 l := len(dAtA) 476 iNdEx := 0 477 depth := 0 478 for iNdEx < l { 479 var wire uint64 480 for shift := uint(0); ; shift += 7 { 481 if shift >= 64 { 482 return 0, ErrIntOverflowKv 483 } 484 if iNdEx >= l { 485 return 0, io.ErrUnexpectedEOF 486 } 487 b := dAtA[iNdEx] 488 iNdEx++ 489 wire |= (uint64(b) & 0x7F) << shift 490 if b < 0x80 { 491 break 492 } 493 } 494 wireType := int(wire & 0x7) 495 switch wireType { 496 case 0: 497 for shift := uint(0); ; shift += 7 { 498 if shift >= 64 { 499 return 0, ErrIntOverflowKv 500 } 501 if iNdEx >= l { 502 return 0, io.ErrUnexpectedEOF 503 } 504 iNdEx++ 505 if dAtA[iNdEx-1] < 0x80 { 506 break 507 } 508 } 509 case 1: 510 iNdEx += 8 511 case 2: 512 var length int 513 for shift := uint(0); ; shift += 7 { 514 if shift >= 64 { 515 return 0, ErrIntOverflowKv 516 } 517 if iNdEx >= l { 518 return 0, io.ErrUnexpectedEOF 519 } 520 b := dAtA[iNdEx] 521 iNdEx++ 522 length |= (int(b) & 0x7F) << shift 523 if b < 0x80 { 524 break 525 } 526 } 527 if length < 0 { 528 return 0, ErrInvalidLengthKv 529 } 530 iNdEx += length 531 case 3: 532 depth++ 533 case 4: 534 if depth == 0 { 535 return 0, ErrUnexpectedEndOfGroupKv 536 } 537 depth-- 538 case 5: 539 iNdEx += 4 540 default: 541 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 542 } 543 if iNdEx < 0 { 544 return 0, ErrInvalidLengthKv 545 } 546 if depth == 0 { 547 return iNdEx, nil 548 } 549 } 550 return 0, io.ErrUnexpectedEOF 551 } 552 553 var ( 554 ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling") 555 ErrIntOverflowKv = fmt.Errorf("proto: integer overflow") 556 ErrUnexpectedEndOfGroupKv = fmt.Errorf("proto: unexpected end of group") 557 )