github.com/ethersphere/bee/v2@v2.2.0/pkg/retrieval/pb/retrieval.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: retrieval.proto 3 4 package pb 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 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 25 type Request struct { 26 Addr []byte `protobuf:"bytes,1,opt,name=Addr,proto3" json:"Addr,omitempty"` 27 } 28 29 func (m *Request) Reset() { *m = Request{} } 30 func (m *Request) String() string { return proto.CompactTextString(m) } 31 func (*Request) ProtoMessage() {} 32 func (*Request) Descriptor() ([]byte, []int) { 33 return fileDescriptor_fcade0a564e5dcd4, []int{0} 34 } 35 func (m *Request) XXX_Unmarshal(b []byte) error { 36 return m.Unmarshal(b) 37 } 38 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 39 if deterministic { 40 return xxx_messageInfo_Request.Marshal(b, m, deterministic) 41 } else { 42 b = b[:cap(b)] 43 n, err := m.MarshalToSizedBuffer(b) 44 if err != nil { 45 return nil, err 46 } 47 return b[:n], nil 48 } 49 } 50 func (m *Request) XXX_Merge(src proto.Message) { 51 xxx_messageInfo_Request.Merge(m, src) 52 } 53 func (m *Request) XXX_Size() int { 54 return m.Size() 55 } 56 func (m *Request) XXX_DiscardUnknown() { 57 xxx_messageInfo_Request.DiscardUnknown(m) 58 } 59 60 var xxx_messageInfo_Request proto.InternalMessageInfo 61 62 func (m *Request) GetAddr() []byte { 63 if m != nil { 64 return m.Addr 65 } 66 return nil 67 } 68 69 type Delivery struct { 70 Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` 71 Stamp []byte `protobuf:"bytes,2,opt,name=Stamp,proto3" json:"Stamp,omitempty"` 72 Err string `protobuf:"bytes,3,opt,name=Err,proto3" json:"Err,omitempty"` 73 } 74 75 func (m *Delivery) Reset() { *m = Delivery{} } 76 func (m *Delivery) String() string { return proto.CompactTextString(m) } 77 func (*Delivery) ProtoMessage() {} 78 func (*Delivery) Descriptor() ([]byte, []int) { 79 return fileDescriptor_fcade0a564e5dcd4, []int{1} 80 } 81 func (m *Delivery) XXX_Unmarshal(b []byte) error { 82 return m.Unmarshal(b) 83 } 84 func (m *Delivery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 85 if deterministic { 86 return xxx_messageInfo_Delivery.Marshal(b, m, deterministic) 87 } else { 88 b = b[:cap(b)] 89 n, err := m.MarshalToSizedBuffer(b) 90 if err != nil { 91 return nil, err 92 } 93 return b[:n], nil 94 } 95 } 96 func (m *Delivery) XXX_Merge(src proto.Message) { 97 xxx_messageInfo_Delivery.Merge(m, src) 98 } 99 func (m *Delivery) XXX_Size() int { 100 return m.Size() 101 } 102 func (m *Delivery) XXX_DiscardUnknown() { 103 xxx_messageInfo_Delivery.DiscardUnknown(m) 104 } 105 106 var xxx_messageInfo_Delivery proto.InternalMessageInfo 107 108 func (m *Delivery) GetData() []byte { 109 if m != nil { 110 return m.Data 111 } 112 return nil 113 } 114 115 func (m *Delivery) GetStamp() []byte { 116 if m != nil { 117 return m.Stamp 118 } 119 return nil 120 } 121 122 func (m *Delivery) GetErr() string { 123 if m != nil { 124 return m.Err 125 } 126 return "" 127 } 128 129 func init() { 130 proto.RegisterType((*Request)(nil), "retrieval.Request") 131 proto.RegisterType((*Delivery)(nil), "retrieval.Delivery") 132 } 133 134 func init() { proto.RegisterFile("retrieval.proto", fileDescriptor_fcade0a564e5dcd4) } 135 136 var fileDescriptor_fcade0a564e5dcd4 = []byte{ 137 // 161 bytes of a gzipped FileDescriptorProto 138 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x4a, 0x2d, 0x29, 139 0xca, 0x4c, 0x2d, 0x4b, 0xcc, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x28, 140 0xc9, 0x72, 0xb1, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x09, 0x71, 0xb1, 0x38, 0xa6, 141 0xa4, 0x14, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x81, 0xd9, 0x4a, 0x6e, 0x5c, 0x1c, 0x2e, 142 0xa9, 0x39, 0x99, 0x65, 0xa9, 0x45, 0x95, 0x20, 0x79, 0x97, 0xc4, 0x92, 0x44, 0x98, 0x3c, 0x88, 143 0x2d, 0x24, 0xc2, 0xc5, 0x1a, 0x5c, 0x92, 0x98, 0x5b, 0x20, 0xc1, 0x04, 0x16, 0x84, 0x70, 0x84, 144 0x04, 0xb8, 0x98, 0x5d, 0x8b, 0x8a, 0x24, 0x98, 0x15, 0x18, 0x35, 0x38, 0x83, 0x40, 0x4c, 0x27, 145 0x99, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 146 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x62, 0x2a, 0x48, 0x4a, 0x62, 147 0x03, 0x3b, 0xcb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x82, 0x88, 0x0a, 0x3c, 0xa9, 0x00, 0x00, 148 0x00, 149 } 150 151 func (m *Request) Marshal() (dAtA []byte, err error) { 152 size := m.Size() 153 dAtA = make([]byte, size) 154 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 155 if err != nil { 156 return nil, err 157 } 158 return dAtA[:n], nil 159 } 160 161 func (m *Request) MarshalTo(dAtA []byte) (int, error) { 162 size := m.Size() 163 return m.MarshalToSizedBuffer(dAtA[:size]) 164 } 165 166 func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) { 167 i := len(dAtA) 168 _ = i 169 var l int 170 _ = l 171 if len(m.Addr) > 0 { 172 i -= len(m.Addr) 173 copy(dAtA[i:], m.Addr) 174 i = encodeVarintRetrieval(dAtA, i, uint64(len(m.Addr))) 175 i-- 176 dAtA[i] = 0xa 177 } 178 return len(dAtA) - i, nil 179 } 180 181 func (m *Delivery) Marshal() (dAtA []byte, err error) { 182 size := m.Size() 183 dAtA = make([]byte, size) 184 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 185 if err != nil { 186 return nil, err 187 } 188 return dAtA[:n], nil 189 } 190 191 func (m *Delivery) MarshalTo(dAtA []byte) (int, error) { 192 size := m.Size() 193 return m.MarshalToSizedBuffer(dAtA[:size]) 194 } 195 196 func (m *Delivery) MarshalToSizedBuffer(dAtA []byte) (int, error) { 197 i := len(dAtA) 198 _ = i 199 var l int 200 _ = l 201 if len(m.Err) > 0 { 202 i -= len(m.Err) 203 copy(dAtA[i:], m.Err) 204 i = encodeVarintRetrieval(dAtA, i, uint64(len(m.Err))) 205 i-- 206 dAtA[i] = 0x1a 207 } 208 if len(m.Stamp) > 0 { 209 i -= len(m.Stamp) 210 copy(dAtA[i:], m.Stamp) 211 i = encodeVarintRetrieval(dAtA, i, uint64(len(m.Stamp))) 212 i-- 213 dAtA[i] = 0x12 214 } 215 if len(m.Data) > 0 { 216 i -= len(m.Data) 217 copy(dAtA[i:], m.Data) 218 i = encodeVarintRetrieval(dAtA, i, uint64(len(m.Data))) 219 i-- 220 dAtA[i] = 0xa 221 } 222 return len(dAtA) - i, nil 223 } 224 225 func encodeVarintRetrieval(dAtA []byte, offset int, v uint64) int { 226 offset -= sovRetrieval(v) 227 base := offset 228 for v >= 1<<7 { 229 dAtA[offset] = uint8(v&0x7f | 0x80) 230 v >>= 7 231 offset++ 232 } 233 dAtA[offset] = uint8(v) 234 return base 235 } 236 func (m *Request) Size() (n int) { 237 if m == nil { 238 return 0 239 } 240 var l int 241 _ = l 242 l = len(m.Addr) 243 if l > 0 { 244 n += 1 + l + sovRetrieval(uint64(l)) 245 } 246 return n 247 } 248 249 func (m *Delivery) Size() (n int) { 250 if m == nil { 251 return 0 252 } 253 var l int 254 _ = l 255 l = len(m.Data) 256 if l > 0 { 257 n += 1 + l + sovRetrieval(uint64(l)) 258 } 259 l = len(m.Stamp) 260 if l > 0 { 261 n += 1 + l + sovRetrieval(uint64(l)) 262 } 263 l = len(m.Err) 264 if l > 0 { 265 n += 1 + l + sovRetrieval(uint64(l)) 266 } 267 return n 268 } 269 270 func sovRetrieval(x uint64) (n int) { 271 return (math_bits.Len64(x|1) + 6) / 7 272 } 273 func sozRetrieval(x uint64) (n int) { 274 return sovRetrieval(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 275 } 276 func (m *Request) Unmarshal(dAtA []byte) error { 277 l := len(dAtA) 278 iNdEx := 0 279 for iNdEx < l { 280 preIndex := iNdEx 281 var wire uint64 282 for shift := uint(0); ; shift += 7 { 283 if shift >= 64 { 284 return ErrIntOverflowRetrieval 285 } 286 if iNdEx >= l { 287 return io.ErrUnexpectedEOF 288 } 289 b := dAtA[iNdEx] 290 iNdEx++ 291 wire |= uint64(b&0x7F) << shift 292 if b < 0x80 { 293 break 294 } 295 } 296 fieldNum := int32(wire >> 3) 297 wireType := int(wire & 0x7) 298 if wireType == 4 { 299 return fmt.Errorf("proto: Request: wiretype end group for non-group") 300 } 301 if fieldNum <= 0 { 302 return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) 303 } 304 switch fieldNum { 305 case 1: 306 if wireType != 2 { 307 return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType) 308 } 309 var byteLen int 310 for shift := uint(0); ; shift += 7 { 311 if shift >= 64 { 312 return ErrIntOverflowRetrieval 313 } 314 if iNdEx >= l { 315 return io.ErrUnexpectedEOF 316 } 317 b := dAtA[iNdEx] 318 iNdEx++ 319 byteLen |= int(b&0x7F) << shift 320 if b < 0x80 { 321 break 322 } 323 } 324 if byteLen < 0 { 325 return ErrInvalidLengthRetrieval 326 } 327 postIndex := iNdEx + byteLen 328 if postIndex < 0 { 329 return ErrInvalidLengthRetrieval 330 } 331 if postIndex > l { 332 return io.ErrUnexpectedEOF 333 } 334 m.Addr = append(m.Addr[:0], dAtA[iNdEx:postIndex]...) 335 if m.Addr == nil { 336 m.Addr = []byte{} 337 } 338 iNdEx = postIndex 339 default: 340 iNdEx = preIndex 341 skippy, err := skipRetrieval(dAtA[iNdEx:]) 342 if err != nil { 343 return err 344 } 345 if skippy < 0 { 346 return ErrInvalidLengthRetrieval 347 } 348 if (iNdEx + skippy) < 0 { 349 return ErrInvalidLengthRetrieval 350 } 351 if (iNdEx + skippy) > l { 352 return io.ErrUnexpectedEOF 353 } 354 iNdEx += skippy 355 } 356 } 357 358 if iNdEx > l { 359 return io.ErrUnexpectedEOF 360 } 361 return nil 362 } 363 func (m *Delivery) Unmarshal(dAtA []byte) error { 364 l := len(dAtA) 365 iNdEx := 0 366 for iNdEx < l { 367 preIndex := iNdEx 368 var wire uint64 369 for shift := uint(0); ; shift += 7 { 370 if shift >= 64 { 371 return ErrIntOverflowRetrieval 372 } 373 if iNdEx >= l { 374 return io.ErrUnexpectedEOF 375 } 376 b := dAtA[iNdEx] 377 iNdEx++ 378 wire |= uint64(b&0x7F) << shift 379 if b < 0x80 { 380 break 381 } 382 } 383 fieldNum := int32(wire >> 3) 384 wireType := int(wire & 0x7) 385 if wireType == 4 { 386 return fmt.Errorf("proto: Delivery: wiretype end group for non-group") 387 } 388 if fieldNum <= 0 { 389 return fmt.Errorf("proto: Delivery: illegal tag %d (wire type %d)", fieldNum, wire) 390 } 391 switch fieldNum { 392 case 1: 393 if wireType != 2 { 394 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 395 } 396 var byteLen int 397 for shift := uint(0); ; shift += 7 { 398 if shift >= 64 { 399 return ErrIntOverflowRetrieval 400 } 401 if iNdEx >= l { 402 return io.ErrUnexpectedEOF 403 } 404 b := dAtA[iNdEx] 405 iNdEx++ 406 byteLen |= int(b&0x7F) << shift 407 if b < 0x80 { 408 break 409 } 410 } 411 if byteLen < 0 { 412 return ErrInvalidLengthRetrieval 413 } 414 postIndex := iNdEx + byteLen 415 if postIndex < 0 { 416 return ErrInvalidLengthRetrieval 417 } 418 if postIndex > l { 419 return io.ErrUnexpectedEOF 420 } 421 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 422 if m.Data == nil { 423 m.Data = []byte{} 424 } 425 iNdEx = postIndex 426 case 2: 427 if wireType != 2 { 428 return fmt.Errorf("proto: wrong wireType = %d for field Stamp", wireType) 429 } 430 var byteLen int 431 for shift := uint(0); ; shift += 7 { 432 if shift >= 64 { 433 return ErrIntOverflowRetrieval 434 } 435 if iNdEx >= l { 436 return io.ErrUnexpectedEOF 437 } 438 b := dAtA[iNdEx] 439 iNdEx++ 440 byteLen |= int(b&0x7F) << shift 441 if b < 0x80 { 442 break 443 } 444 } 445 if byteLen < 0 { 446 return ErrInvalidLengthRetrieval 447 } 448 postIndex := iNdEx + byteLen 449 if postIndex < 0 { 450 return ErrInvalidLengthRetrieval 451 } 452 if postIndex > l { 453 return io.ErrUnexpectedEOF 454 } 455 m.Stamp = append(m.Stamp[:0], dAtA[iNdEx:postIndex]...) 456 if m.Stamp == nil { 457 m.Stamp = []byte{} 458 } 459 iNdEx = postIndex 460 case 3: 461 if wireType != 2 { 462 return fmt.Errorf("proto: wrong wireType = %d for field Err", wireType) 463 } 464 var stringLen uint64 465 for shift := uint(0); ; shift += 7 { 466 if shift >= 64 { 467 return ErrIntOverflowRetrieval 468 } 469 if iNdEx >= l { 470 return io.ErrUnexpectedEOF 471 } 472 b := dAtA[iNdEx] 473 iNdEx++ 474 stringLen |= uint64(b&0x7F) << shift 475 if b < 0x80 { 476 break 477 } 478 } 479 intStringLen := int(stringLen) 480 if intStringLen < 0 { 481 return ErrInvalidLengthRetrieval 482 } 483 postIndex := iNdEx + intStringLen 484 if postIndex < 0 { 485 return ErrInvalidLengthRetrieval 486 } 487 if postIndex > l { 488 return io.ErrUnexpectedEOF 489 } 490 m.Err = string(dAtA[iNdEx:postIndex]) 491 iNdEx = postIndex 492 default: 493 iNdEx = preIndex 494 skippy, err := skipRetrieval(dAtA[iNdEx:]) 495 if err != nil { 496 return err 497 } 498 if skippy < 0 { 499 return ErrInvalidLengthRetrieval 500 } 501 if (iNdEx + skippy) < 0 { 502 return ErrInvalidLengthRetrieval 503 } 504 if (iNdEx + skippy) > l { 505 return io.ErrUnexpectedEOF 506 } 507 iNdEx += skippy 508 } 509 } 510 511 if iNdEx > l { 512 return io.ErrUnexpectedEOF 513 } 514 return nil 515 } 516 func skipRetrieval(dAtA []byte) (n int, err error) { 517 l := len(dAtA) 518 iNdEx := 0 519 depth := 0 520 for iNdEx < l { 521 var wire uint64 522 for shift := uint(0); ; shift += 7 { 523 if shift >= 64 { 524 return 0, ErrIntOverflowRetrieval 525 } 526 if iNdEx >= l { 527 return 0, io.ErrUnexpectedEOF 528 } 529 b := dAtA[iNdEx] 530 iNdEx++ 531 wire |= (uint64(b) & 0x7F) << shift 532 if b < 0x80 { 533 break 534 } 535 } 536 wireType := int(wire & 0x7) 537 switch wireType { 538 case 0: 539 for shift := uint(0); ; shift += 7 { 540 if shift >= 64 { 541 return 0, ErrIntOverflowRetrieval 542 } 543 if iNdEx >= l { 544 return 0, io.ErrUnexpectedEOF 545 } 546 iNdEx++ 547 if dAtA[iNdEx-1] < 0x80 { 548 break 549 } 550 } 551 case 1: 552 iNdEx += 8 553 case 2: 554 var length int 555 for shift := uint(0); ; shift += 7 { 556 if shift >= 64 { 557 return 0, ErrIntOverflowRetrieval 558 } 559 if iNdEx >= l { 560 return 0, io.ErrUnexpectedEOF 561 } 562 b := dAtA[iNdEx] 563 iNdEx++ 564 length |= (int(b) & 0x7F) << shift 565 if b < 0x80 { 566 break 567 } 568 } 569 if length < 0 { 570 return 0, ErrInvalidLengthRetrieval 571 } 572 iNdEx += length 573 case 3: 574 depth++ 575 case 4: 576 if depth == 0 { 577 return 0, ErrUnexpectedEndOfGroupRetrieval 578 } 579 depth-- 580 case 5: 581 iNdEx += 4 582 default: 583 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 584 } 585 if iNdEx < 0 { 586 return 0, ErrInvalidLengthRetrieval 587 } 588 if depth == 0 { 589 return iNdEx, nil 590 } 591 } 592 return 0, io.ErrUnexpectedEOF 593 } 594 595 var ( 596 ErrInvalidLengthRetrieval = fmt.Errorf("proto: negative length found during unmarshaling") 597 ErrIntOverflowRetrieval = fmt.Errorf("proto: integer overflow") 598 ErrUnexpectedEndOfGroupRetrieval = fmt.Errorf("proto: unexpected end of group") 599 )