github.com/ethersphere/bee/v2@v2.2.0/pkg/settlement/pseudosettle/pb/pseudosettle.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: pseudosettle.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 Payment struct { 26 Amount []byte `protobuf:"bytes,1,opt,name=Amount,proto3" json:"Amount,omitempty"` 27 } 28 29 func (m *Payment) Reset() { *m = Payment{} } 30 func (m *Payment) String() string { return proto.CompactTextString(m) } 31 func (*Payment) ProtoMessage() {} 32 func (*Payment) Descriptor() ([]byte, []int) { 33 return fileDescriptor_3ff21bb6c9cf5e84, []int{0} 34 } 35 func (m *Payment) XXX_Unmarshal(b []byte) error { 36 return m.Unmarshal(b) 37 } 38 func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 39 if deterministic { 40 return xxx_messageInfo_Payment.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 *Payment) XXX_Merge(src proto.Message) { 51 xxx_messageInfo_Payment.Merge(m, src) 52 } 53 func (m *Payment) XXX_Size() int { 54 return m.Size() 55 } 56 func (m *Payment) XXX_DiscardUnknown() { 57 xxx_messageInfo_Payment.DiscardUnknown(m) 58 } 59 60 var xxx_messageInfo_Payment proto.InternalMessageInfo 61 62 func (m *Payment) GetAmount() []byte { 63 if m != nil { 64 return m.Amount 65 } 66 return nil 67 } 68 69 type PaymentAck struct { 70 Amount []byte `protobuf:"bytes,1,opt,name=Amount,proto3" json:"Amount,omitempty"` 71 Timestamp int64 `protobuf:"varint,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` 72 } 73 74 func (m *PaymentAck) Reset() { *m = PaymentAck{} } 75 func (m *PaymentAck) String() string { return proto.CompactTextString(m) } 76 func (*PaymentAck) ProtoMessage() {} 77 func (*PaymentAck) Descriptor() ([]byte, []int) { 78 return fileDescriptor_3ff21bb6c9cf5e84, []int{1} 79 } 80 func (m *PaymentAck) XXX_Unmarshal(b []byte) error { 81 return m.Unmarshal(b) 82 } 83 func (m *PaymentAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 84 if deterministic { 85 return xxx_messageInfo_PaymentAck.Marshal(b, m, deterministic) 86 } else { 87 b = b[:cap(b)] 88 n, err := m.MarshalToSizedBuffer(b) 89 if err != nil { 90 return nil, err 91 } 92 return b[:n], nil 93 } 94 } 95 func (m *PaymentAck) XXX_Merge(src proto.Message) { 96 xxx_messageInfo_PaymentAck.Merge(m, src) 97 } 98 func (m *PaymentAck) XXX_Size() int { 99 return m.Size() 100 } 101 func (m *PaymentAck) XXX_DiscardUnknown() { 102 xxx_messageInfo_PaymentAck.DiscardUnknown(m) 103 } 104 105 var xxx_messageInfo_PaymentAck proto.InternalMessageInfo 106 107 func (m *PaymentAck) GetAmount() []byte { 108 if m != nil { 109 return m.Amount 110 } 111 return nil 112 } 113 114 func (m *PaymentAck) GetTimestamp() int64 { 115 if m != nil { 116 return m.Timestamp 117 } 118 return 0 119 } 120 121 func init() { 122 proto.RegisterType((*Payment)(nil), "pseudosettle.Payment") 123 proto.RegisterType((*PaymentAck)(nil), "pseudosettle.PaymentAck") 124 } 125 126 func init() { proto.RegisterFile("pseudosettle.proto", fileDescriptor_3ff21bb6c9cf5e84) } 127 128 var fileDescriptor_3ff21bb6c9cf5e84 = []byte{ 129 // 148 bytes of a gzipped FileDescriptorProto 130 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0x28, 0x4e, 0x2d, 131 0x4d, 0xc9, 0x2f, 0x4e, 0x2d, 0x29, 0xc9, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 132 0x41, 0x16, 0x53, 0x52, 0xe4, 0x62, 0x0f, 0x48, 0xac, 0xcc, 0x4d, 0xcd, 0x2b, 0x11, 0x12, 0xe3, 133 0x62, 0x73, 0xcc, 0xcd, 0x2f, 0xcd, 0x2b, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x82, 0xf2, 134 0x94, 0x9c, 0xb8, 0xb8, 0xa0, 0x4a, 0x1c, 0x93, 0xb3, 0x71, 0xa9, 0x12, 0x92, 0xe1, 0xe2, 0x0c, 135 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x90, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x0e, 0x42, 136 0x08, 0x38, 0xc9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 137 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x14, 0x53, 0x41, 138 0x52, 0x12, 0x1b, 0xd8, 0x65, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xcb, 0xb8, 0x18, 139 0xaf, 0x00, 0x00, 0x00, 140 } 141 142 func (m *Payment) Marshal() (dAtA []byte, err error) { 143 size := m.Size() 144 dAtA = make([]byte, size) 145 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 146 if err != nil { 147 return nil, err 148 } 149 return dAtA[:n], nil 150 } 151 152 func (m *Payment) MarshalTo(dAtA []byte) (int, error) { 153 size := m.Size() 154 return m.MarshalToSizedBuffer(dAtA[:size]) 155 } 156 157 func (m *Payment) MarshalToSizedBuffer(dAtA []byte) (int, error) { 158 i := len(dAtA) 159 _ = i 160 var l int 161 _ = l 162 if len(m.Amount) > 0 { 163 i -= len(m.Amount) 164 copy(dAtA[i:], m.Amount) 165 i = encodeVarintPseudosettle(dAtA, i, uint64(len(m.Amount))) 166 i-- 167 dAtA[i] = 0xa 168 } 169 return len(dAtA) - i, nil 170 } 171 172 func (m *PaymentAck) Marshal() (dAtA []byte, err error) { 173 size := m.Size() 174 dAtA = make([]byte, size) 175 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 176 if err != nil { 177 return nil, err 178 } 179 return dAtA[:n], nil 180 } 181 182 func (m *PaymentAck) MarshalTo(dAtA []byte) (int, error) { 183 size := m.Size() 184 return m.MarshalToSizedBuffer(dAtA[:size]) 185 } 186 187 func (m *PaymentAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { 188 i := len(dAtA) 189 _ = i 190 var l int 191 _ = l 192 if m.Timestamp != 0 { 193 i = encodeVarintPseudosettle(dAtA, i, uint64(m.Timestamp)) 194 i-- 195 dAtA[i] = 0x10 196 } 197 if len(m.Amount) > 0 { 198 i -= len(m.Amount) 199 copy(dAtA[i:], m.Amount) 200 i = encodeVarintPseudosettle(dAtA, i, uint64(len(m.Amount))) 201 i-- 202 dAtA[i] = 0xa 203 } 204 return len(dAtA) - i, nil 205 } 206 207 func encodeVarintPseudosettle(dAtA []byte, offset int, v uint64) int { 208 offset -= sovPseudosettle(v) 209 base := offset 210 for v >= 1<<7 { 211 dAtA[offset] = uint8(v&0x7f | 0x80) 212 v >>= 7 213 offset++ 214 } 215 dAtA[offset] = uint8(v) 216 return base 217 } 218 func (m *Payment) Size() (n int) { 219 if m == nil { 220 return 0 221 } 222 var l int 223 _ = l 224 l = len(m.Amount) 225 if l > 0 { 226 n += 1 + l + sovPseudosettle(uint64(l)) 227 } 228 return n 229 } 230 231 func (m *PaymentAck) Size() (n int) { 232 if m == nil { 233 return 0 234 } 235 var l int 236 _ = l 237 l = len(m.Amount) 238 if l > 0 { 239 n += 1 + l + sovPseudosettle(uint64(l)) 240 } 241 if m.Timestamp != 0 { 242 n += 1 + sovPseudosettle(uint64(m.Timestamp)) 243 } 244 return n 245 } 246 247 func sovPseudosettle(x uint64) (n int) { 248 return (math_bits.Len64(x|1) + 6) / 7 249 } 250 func sozPseudosettle(x uint64) (n int) { 251 return sovPseudosettle(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 252 } 253 func (m *Payment) Unmarshal(dAtA []byte) error { 254 l := len(dAtA) 255 iNdEx := 0 256 for iNdEx < l { 257 preIndex := iNdEx 258 var wire uint64 259 for shift := uint(0); ; shift += 7 { 260 if shift >= 64 { 261 return ErrIntOverflowPseudosettle 262 } 263 if iNdEx >= l { 264 return io.ErrUnexpectedEOF 265 } 266 b := dAtA[iNdEx] 267 iNdEx++ 268 wire |= uint64(b&0x7F) << shift 269 if b < 0x80 { 270 break 271 } 272 } 273 fieldNum := int32(wire >> 3) 274 wireType := int(wire & 0x7) 275 if wireType == 4 { 276 return fmt.Errorf("proto: Payment: wiretype end group for non-group") 277 } 278 if fieldNum <= 0 { 279 return fmt.Errorf("proto: Payment: illegal tag %d (wire type %d)", fieldNum, wire) 280 } 281 switch fieldNum { 282 case 1: 283 if wireType != 2 { 284 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 285 } 286 var byteLen int 287 for shift := uint(0); ; shift += 7 { 288 if shift >= 64 { 289 return ErrIntOverflowPseudosettle 290 } 291 if iNdEx >= l { 292 return io.ErrUnexpectedEOF 293 } 294 b := dAtA[iNdEx] 295 iNdEx++ 296 byteLen |= int(b&0x7F) << shift 297 if b < 0x80 { 298 break 299 } 300 } 301 if byteLen < 0 { 302 return ErrInvalidLengthPseudosettle 303 } 304 postIndex := iNdEx + byteLen 305 if postIndex < 0 { 306 return ErrInvalidLengthPseudosettle 307 } 308 if postIndex > l { 309 return io.ErrUnexpectedEOF 310 } 311 m.Amount = append(m.Amount[:0], dAtA[iNdEx:postIndex]...) 312 if m.Amount == nil { 313 m.Amount = []byte{} 314 } 315 iNdEx = postIndex 316 default: 317 iNdEx = preIndex 318 skippy, err := skipPseudosettle(dAtA[iNdEx:]) 319 if err != nil { 320 return err 321 } 322 if skippy < 0 { 323 return ErrInvalidLengthPseudosettle 324 } 325 if (iNdEx + skippy) < 0 { 326 return ErrInvalidLengthPseudosettle 327 } 328 if (iNdEx + skippy) > l { 329 return io.ErrUnexpectedEOF 330 } 331 iNdEx += skippy 332 } 333 } 334 335 if iNdEx > l { 336 return io.ErrUnexpectedEOF 337 } 338 return nil 339 } 340 func (m *PaymentAck) Unmarshal(dAtA []byte) error { 341 l := len(dAtA) 342 iNdEx := 0 343 for iNdEx < l { 344 preIndex := iNdEx 345 var wire uint64 346 for shift := uint(0); ; shift += 7 { 347 if shift >= 64 { 348 return ErrIntOverflowPseudosettle 349 } 350 if iNdEx >= l { 351 return io.ErrUnexpectedEOF 352 } 353 b := dAtA[iNdEx] 354 iNdEx++ 355 wire |= uint64(b&0x7F) << shift 356 if b < 0x80 { 357 break 358 } 359 } 360 fieldNum := int32(wire >> 3) 361 wireType := int(wire & 0x7) 362 if wireType == 4 { 363 return fmt.Errorf("proto: PaymentAck: wiretype end group for non-group") 364 } 365 if fieldNum <= 0 { 366 return fmt.Errorf("proto: PaymentAck: illegal tag %d (wire type %d)", fieldNum, wire) 367 } 368 switch fieldNum { 369 case 1: 370 if wireType != 2 { 371 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 372 } 373 var byteLen int 374 for shift := uint(0); ; shift += 7 { 375 if shift >= 64 { 376 return ErrIntOverflowPseudosettle 377 } 378 if iNdEx >= l { 379 return io.ErrUnexpectedEOF 380 } 381 b := dAtA[iNdEx] 382 iNdEx++ 383 byteLen |= int(b&0x7F) << shift 384 if b < 0x80 { 385 break 386 } 387 } 388 if byteLen < 0 { 389 return ErrInvalidLengthPseudosettle 390 } 391 postIndex := iNdEx + byteLen 392 if postIndex < 0 { 393 return ErrInvalidLengthPseudosettle 394 } 395 if postIndex > l { 396 return io.ErrUnexpectedEOF 397 } 398 m.Amount = append(m.Amount[:0], dAtA[iNdEx:postIndex]...) 399 if m.Amount == nil { 400 m.Amount = []byte{} 401 } 402 iNdEx = postIndex 403 case 2: 404 if wireType != 0 { 405 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 406 } 407 m.Timestamp = 0 408 for shift := uint(0); ; shift += 7 { 409 if shift >= 64 { 410 return ErrIntOverflowPseudosettle 411 } 412 if iNdEx >= l { 413 return io.ErrUnexpectedEOF 414 } 415 b := dAtA[iNdEx] 416 iNdEx++ 417 m.Timestamp |= int64(b&0x7F) << shift 418 if b < 0x80 { 419 break 420 } 421 } 422 default: 423 iNdEx = preIndex 424 skippy, err := skipPseudosettle(dAtA[iNdEx:]) 425 if err != nil { 426 return err 427 } 428 if skippy < 0 { 429 return ErrInvalidLengthPseudosettle 430 } 431 if (iNdEx + skippy) < 0 { 432 return ErrInvalidLengthPseudosettle 433 } 434 if (iNdEx + skippy) > l { 435 return io.ErrUnexpectedEOF 436 } 437 iNdEx += skippy 438 } 439 } 440 441 if iNdEx > l { 442 return io.ErrUnexpectedEOF 443 } 444 return nil 445 } 446 func skipPseudosettle(dAtA []byte) (n int, err error) { 447 l := len(dAtA) 448 iNdEx := 0 449 depth := 0 450 for iNdEx < l { 451 var wire uint64 452 for shift := uint(0); ; shift += 7 { 453 if shift >= 64 { 454 return 0, ErrIntOverflowPseudosettle 455 } 456 if iNdEx >= l { 457 return 0, io.ErrUnexpectedEOF 458 } 459 b := dAtA[iNdEx] 460 iNdEx++ 461 wire |= (uint64(b) & 0x7F) << shift 462 if b < 0x80 { 463 break 464 } 465 } 466 wireType := int(wire & 0x7) 467 switch wireType { 468 case 0: 469 for shift := uint(0); ; shift += 7 { 470 if shift >= 64 { 471 return 0, ErrIntOverflowPseudosettle 472 } 473 if iNdEx >= l { 474 return 0, io.ErrUnexpectedEOF 475 } 476 iNdEx++ 477 if dAtA[iNdEx-1] < 0x80 { 478 break 479 } 480 } 481 case 1: 482 iNdEx += 8 483 case 2: 484 var length int 485 for shift := uint(0); ; shift += 7 { 486 if shift >= 64 { 487 return 0, ErrIntOverflowPseudosettle 488 } 489 if iNdEx >= l { 490 return 0, io.ErrUnexpectedEOF 491 } 492 b := dAtA[iNdEx] 493 iNdEx++ 494 length |= (int(b) & 0x7F) << shift 495 if b < 0x80 { 496 break 497 } 498 } 499 if length < 0 { 500 return 0, ErrInvalidLengthPseudosettle 501 } 502 iNdEx += length 503 case 3: 504 depth++ 505 case 4: 506 if depth == 0 { 507 return 0, ErrUnexpectedEndOfGroupPseudosettle 508 } 509 depth-- 510 case 5: 511 iNdEx += 4 512 default: 513 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 514 } 515 if iNdEx < 0 { 516 return 0, ErrInvalidLengthPseudosettle 517 } 518 if depth == 0 { 519 return iNdEx, nil 520 } 521 } 522 return 0, io.ErrUnexpectedEOF 523 } 524 525 var ( 526 ErrInvalidLengthPseudosettle = fmt.Errorf("proto: negative length found during unmarshaling") 527 ErrIntOverflowPseudosettle = fmt.Errorf("proto: integer overflow") 528 ErrUnexpectedEndOfGroupPseudosettle = fmt.Errorf("proto: unexpected end of group") 529 )