github.com/celestiaorg/celestia-node@v0.15.0-beta.1/share/p2p/shrexeds/pb/extended_data_square.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: share/p2p/shrexeds/pb/extended_data_square.proto 3 4 package extended_data_square 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 Status int32 26 27 const ( 28 Status_INVALID Status = 0 29 Status_OK Status = 1 30 Status_NOT_FOUND Status = 2 31 Status_INTERNAL Status = 3 32 ) 33 34 var Status_name = map[int32]string{ 35 0: "INVALID", 36 1: "OK", 37 2: "NOT_FOUND", 38 3: "INTERNAL", 39 } 40 41 var Status_value = map[string]int32{ 42 "INVALID": 0, 43 "OK": 1, 44 "NOT_FOUND": 2, 45 "INTERNAL": 3, 46 } 47 48 func (x Status) String() string { 49 return proto.EnumName(Status_name, int32(x)) 50 } 51 52 func (Status) EnumDescriptor() ([]byte, []int) { 53 return fileDescriptor_49d42aa96098056e, []int{0} 54 } 55 56 type EDSRequest struct { 57 Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` 58 } 59 60 func (m *EDSRequest) Reset() { *m = EDSRequest{} } 61 func (m *EDSRequest) String() string { return proto.CompactTextString(m) } 62 func (*EDSRequest) ProtoMessage() {} 63 func (*EDSRequest) Descriptor() ([]byte, []int) { 64 return fileDescriptor_49d42aa96098056e, []int{0} 65 } 66 func (m *EDSRequest) XXX_Unmarshal(b []byte) error { 67 return m.Unmarshal(b) 68 } 69 func (m *EDSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 70 if deterministic { 71 return xxx_messageInfo_EDSRequest.Marshal(b, m, deterministic) 72 } else { 73 b = b[:cap(b)] 74 n, err := m.MarshalToSizedBuffer(b) 75 if err != nil { 76 return nil, err 77 } 78 return b[:n], nil 79 } 80 } 81 func (m *EDSRequest) XXX_Merge(src proto.Message) { 82 xxx_messageInfo_EDSRequest.Merge(m, src) 83 } 84 func (m *EDSRequest) XXX_Size() int { 85 return m.Size() 86 } 87 func (m *EDSRequest) XXX_DiscardUnknown() { 88 xxx_messageInfo_EDSRequest.DiscardUnknown(m) 89 } 90 91 var xxx_messageInfo_EDSRequest proto.InternalMessageInfo 92 93 func (m *EDSRequest) GetHash() []byte { 94 if m != nil { 95 return m.Hash 96 } 97 return nil 98 } 99 100 type EDSResponse struct { 101 Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=Status" json:"status,omitempty"` 102 } 103 104 func (m *EDSResponse) Reset() { *m = EDSResponse{} } 105 func (m *EDSResponse) String() string { return proto.CompactTextString(m) } 106 func (*EDSResponse) ProtoMessage() {} 107 func (*EDSResponse) Descriptor() ([]byte, []int) { 108 return fileDescriptor_49d42aa96098056e, []int{1} 109 } 110 func (m *EDSResponse) XXX_Unmarshal(b []byte) error { 111 return m.Unmarshal(b) 112 } 113 func (m *EDSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 114 if deterministic { 115 return xxx_messageInfo_EDSResponse.Marshal(b, m, deterministic) 116 } else { 117 b = b[:cap(b)] 118 n, err := m.MarshalToSizedBuffer(b) 119 if err != nil { 120 return nil, err 121 } 122 return b[:n], nil 123 } 124 } 125 func (m *EDSResponse) XXX_Merge(src proto.Message) { 126 xxx_messageInfo_EDSResponse.Merge(m, src) 127 } 128 func (m *EDSResponse) XXX_Size() int { 129 return m.Size() 130 } 131 func (m *EDSResponse) XXX_DiscardUnknown() { 132 xxx_messageInfo_EDSResponse.DiscardUnknown(m) 133 } 134 135 var xxx_messageInfo_EDSResponse proto.InternalMessageInfo 136 137 func (m *EDSResponse) GetStatus() Status { 138 if m != nil { 139 return m.Status 140 } 141 return Status_INVALID 142 } 143 144 func init() { 145 proto.RegisterEnum("Status", Status_name, Status_value) 146 proto.RegisterType((*EDSRequest)(nil), "EDSRequest") 147 proto.RegisterType((*EDSResponse)(nil), "EDSResponse") 148 } 149 150 func init() { 151 proto.RegisterFile("share/p2p/shrexeds/pb/extended_data_square.proto", fileDescriptor_49d42aa96098056e) 152 } 153 154 var fileDescriptor_49d42aa96098056e = []byte{ 155 // 227 bytes of a gzipped FileDescriptorProto 156 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x28, 0xce, 0x48, 0x2c, 157 0x4a, 0xd5, 0x2f, 0x30, 0x2a, 0xd0, 0x2f, 0xce, 0x28, 0x4a, 0xad, 0x48, 0x4d, 0x29, 0xd6, 0x2f, 158 0x48, 0xd2, 0x4f, 0xad, 0x28, 0x49, 0xcd, 0x4b, 0x49, 0x4d, 0x89, 0x4f, 0x49, 0x2c, 0x49, 0x8c, 159 0x2f, 0x2e, 0x2c, 0x4d, 0x2c, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x52, 0xe0, 0xe2, 160 0x72, 0x75, 0x09, 0x0e, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x12, 0xe2, 0x62, 0xc9, 0x48, 161 0x2c, 0xce, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x02, 0xb3, 0x95, 0xf4, 0xb8, 0xb8, 0xc1, 162 0x2a, 0x8a, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xe4, 0xb9, 0xd8, 0x8a, 0x4b, 0x12, 0x4b, 0x4a, 163 0x8b, 0xc1, 0x8a, 0xf8, 0x8c, 0xd8, 0xf5, 0x82, 0xc1, 0xdc, 0x20, 0xa8, 0xb0, 0x96, 0x15, 0x17, 164 0x1b, 0x44, 0x44, 0x88, 0x9b, 0x8b, 0xdd, 0xd3, 0x2f, 0xcc, 0xd1, 0xc7, 0xd3, 0x45, 0x80, 0x41, 165 0x88, 0x8d, 0x8b, 0xc9, 0xdf, 0x5b, 0x80, 0x51, 0x88, 0x97, 0x8b, 0xd3, 0xcf, 0x3f, 0x24, 0xde, 166 0xcd, 0x3f, 0xd4, 0xcf, 0x45, 0x80, 0x49, 0x88, 0x87, 0x8b, 0xc3, 0xd3, 0x2f, 0xc4, 0x35, 0xc8, 167 0xcf, 0xd1, 0x47, 0x80, 0xd9, 0x49, 0xe2, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 168 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 169 0x92, 0xd8, 0xc0, 0xce, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x1d, 0xd4, 0xa7, 0xe2, 170 0x00, 0x00, 0x00, 171 } 172 173 func (m *EDSRequest) Marshal() (dAtA []byte, err error) { 174 size := m.Size() 175 dAtA = make([]byte, size) 176 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 177 if err != nil { 178 return nil, err 179 } 180 return dAtA[:n], nil 181 } 182 183 func (m *EDSRequest) MarshalTo(dAtA []byte) (int, error) { 184 size := m.Size() 185 return m.MarshalToSizedBuffer(dAtA[:size]) 186 } 187 188 func (m *EDSRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 189 i := len(dAtA) 190 _ = i 191 var l int 192 _ = l 193 if len(m.Hash) > 0 { 194 i -= len(m.Hash) 195 copy(dAtA[i:], m.Hash) 196 i = encodeVarintExtendedDataSquare(dAtA, i, uint64(len(m.Hash))) 197 i-- 198 dAtA[i] = 0xa 199 } 200 return len(dAtA) - i, nil 201 } 202 203 func (m *EDSResponse) Marshal() (dAtA []byte, err error) { 204 size := m.Size() 205 dAtA = make([]byte, size) 206 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 207 if err != nil { 208 return nil, err 209 } 210 return dAtA[:n], nil 211 } 212 213 func (m *EDSResponse) MarshalTo(dAtA []byte) (int, error) { 214 size := m.Size() 215 return m.MarshalToSizedBuffer(dAtA[:size]) 216 } 217 218 func (m *EDSResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 219 i := len(dAtA) 220 _ = i 221 var l int 222 _ = l 223 if m.Status != 0 { 224 i = encodeVarintExtendedDataSquare(dAtA, i, uint64(m.Status)) 225 i-- 226 dAtA[i] = 0x8 227 } 228 return len(dAtA) - i, nil 229 } 230 231 func encodeVarintExtendedDataSquare(dAtA []byte, offset int, v uint64) int { 232 offset -= sovExtendedDataSquare(v) 233 base := offset 234 for v >= 1<<7 { 235 dAtA[offset] = uint8(v&0x7f | 0x80) 236 v >>= 7 237 offset++ 238 } 239 dAtA[offset] = uint8(v) 240 return base 241 } 242 func (m *EDSRequest) Size() (n int) { 243 if m == nil { 244 return 0 245 } 246 var l int 247 _ = l 248 l = len(m.Hash) 249 if l > 0 { 250 n += 1 + l + sovExtendedDataSquare(uint64(l)) 251 } 252 return n 253 } 254 255 func (m *EDSResponse) Size() (n int) { 256 if m == nil { 257 return 0 258 } 259 var l int 260 _ = l 261 if m.Status != 0 { 262 n += 1 + sovExtendedDataSquare(uint64(m.Status)) 263 } 264 return n 265 } 266 267 func sovExtendedDataSquare(x uint64) (n int) { 268 return (math_bits.Len64(x|1) + 6) / 7 269 } 270 func sozExtendedDataSquare(x uint64) (n int) { 271 return sovExtendedDataSquare(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 272 } 273 func (m *EDSRequest) Unmarshal(dAtA []byte) error { 274 l := len(dAtA) 275 iNdEx := 0 276 for iNdEx < l { 277 preIndex := iNdEx 278 var wire uint64 279 for shift := uint(0); ; shift += 7 { 280 if shift >= 64 { 281 return ErrIntOverflowExtendedDataSquare 282 } 283 if iNdEx >= l { 284 return io.ErrUnexpectedEOF 285 } 286 b := dAtA[iNdEx] 287 iNdEx++ 288 wire |= uint64(b&0x7F) << shift 289 if b < 0x80 { 290 break 291 } 292 } 293 fieldNum := int32(wire >> 3) 294 wireType := int(wire & 0x7) 295 if wireType == 4 { 296 return fmt.Errorf("proto: EDSRequest: wiretype end group for non-group") 297 } 298 if fieldNum <= 0 { 299 return fmt.Errorf("proto: EDSRequest: illegal tag %d (wire type %d)", fieldNum, wire) 300 } 301 switch fieldNum { 302 case 1: 303 if wireType != 2 { 304 return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) 305 } 306 var byteLen int 307 for shift := uint(0); ; shift += 7 { 308 if shift >= 64 { 309 return ErrIntOverflowExtendedDataSquare 310 } 311 if iNdEx >= l { 312 return io.ErrUnexpectedEOF 313 } 314 b := dAtA[iNdEx] 315 iNdEx++ 316 byteLen |= int(b&0x7F) << shift 317 if b < 0x80 { 318 break 319 } 320 } 321 if byteLen < 0 { 322 return ErrInvalidLengthExtendedDataSquare 323 } 324 postIndex := iNdEx + byteLen 325 if postIndex < 0 { 326 return ErrInvalidLengthExtendedDataSquare 327 } 328 if postIndex > l { 329 return io.ErrUnexpectedEOF 330 } 331 m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) 332 if m.Hash == nil { 333 m.Hash = []byte{} 334 } 335 iNdEx = postIndex 336 default: 337 iNdEx = preIndex 338 skippy, err := skipExtendedDataSquare(dAtA[iNdEx:]) 339 if err != nil { 340 return err 341 } 342 if (skippy < 0) || (iNdEx+skippy) < 0 { 343 return ErrInvalidLengthExtendedDataSquare 344 } 345 if (iNdEx + skippy) > l { 346 return io.ErrUnexpectedEOF 347 } 348 iNdEx += skippy 349 } 350 } 351 352 if iNdEx > l { 353 return io.ErrUnexpectedEOF 354 } 355 return nil 356 } 357 func (m *EDSResponse) Unmarshal(dAtA []byte) error { 358 l := len(dAtA) 359 iNdEx := 0 360 for iNdEx < l { 361 preIndex := iNdEx 362 var wire uint64 363 for shift := uint(0); ; shift += 7 { 364 if shift >= 64 { 365 return ErrIntOverflowExtendedDataSquare 366 } 367 if iNdEx >= l { 368 return io.ErrUnexpectedEOF 369 } 370 b := dAtA[iNdEx] 371 iNdEx++ 372 wire |= uint64(b&0x7F) << shift 373 if b < 0x80 { 374 break 375 } 376 } 377 fieldNum := int32(wire >> 3) 378 wireType := int(wire & 0x7) 379 if wireType == 4 { 380 return fmt.Errorf("proto: EDSResponse: wiretype end group for non-group") 381 } 382 if fieldNum <= 0 { 383 return fmt.Errorf("proto: EDSResponse: illegal tag %d (wire type %d)", fieldNum, wire) 384 } 385 switch fieldNum { 386 case 1: 387 if wireType != 0 { 388 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 389 } 390 m.Status = 0 391 for shift := uint(0); ; shift += 7 { 392 if shift >= 64 { 393 return ErrIntOverflowExtendedDataSquare 394 } 395 if iNdEx >= l { 396 return io.ErrUnexpectedEOF 397 } 398 b := dAtA[iNdEx] 399 iNdEx++ 400 m.Status |= Status(b&0x7F) << shift 401 if b < 0x80 { 402 break 403 } 404 } 405 default: 406 iNdEx = preIndex 407 skippy, err := skipExtendedDataSquare(dAtA[iNdEx:]) 408 if err != nil { 409 return err 410 } 411 if (skippy < 0) || (iNdEx+skippy) < 0 { 412 return ErrInvalidLengthExtendedDataSquare 413 } 414 if (iNdEx + skippy) > l { 415 return io.ErrUnexpectedEOF 416 } 417 iNdEx += skippy 418 } 419 } 420 421 if iNdEx > l { 422 return io.ErrUnexpectedEOF 423 } 424 return nil 425 } 426 func skipExtendedDataSquare(dAtA []byte) (n int, err error) { 427 l := len(dAtA) 428 iNdEx := 0 429 depth := 0 430 for iNdEx < l { 431 var wire uint64 432 for shift := uint(0); ; shift += 7 { 433 if shift >= 64 { 434 return 0, ErrIntOverflowExtendedDataSquare 435 } 436 if iNdEx >= l { 437 return 0, io.ErrUnexpectedEOF 438 } 439 b := dAtA[iNdEx] 440 iNdEx++ 441 wire |= (uint64(b) & 0x7F) << shift 442 if b < 0x80 { 443 break 444 } 445 } 446 wireType := int(wire & 0x7) 447 switch wireType { 448 case 0: 449 for shift := uint(0); ; shift += 7 { 450 if shift >= 64 { 451 return 0, ErrIntOverflowExtendedDataSquare 452 } 453 if iNdEx >= l { 454 return 0, io.ErrUnexpectedEOF 455 } 456 iNdEx++ 457 if dAtA[iNdEx-1] < 0x80 { 458 break 459 } 460 } 461 case 1: 462 iNdEx += 8 463 case 2: 464 var length int 465 for shift := uint(0); ; shift += 7 { 466 if shift >= 64 { 467 return 0, ErrIntOverflowExtendedDataSquare 468 } 469 if iNdEx >= l { 470 return 0, io.ErrUnexpectedEOF 471 } 472 b := dAtA[iNdEx] 473 iNdEx++ 474 length |= (int(b) & 0x7F) << shift 475 if b < 0x80 { 476 break 477 } 478 } 479 if length < 0 { 480 return 0, ErrInvalidLengthExtendedDataSquare 481 } 482 iNdEx += length 483 case 3: 484 depth++ 485 case 4: 486 if depth == 0 { 487 return 0, ErrUnexpectedEndOfGroupExtendedDataSquare 488 } 489 depth-- 490 case 5: 491 iNdEx += 4 492 default: 493 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 494 } 495 if iNdEx < 0 { 496 return 0, ErrInvalidLengthExtendedDataSquare 497 } 498 if depth == 0 { 499 return iNdEx, nil 500 } 501 } 502 return 0, io.ErrUnexpectedEOF 503 } 504 505 var ( 506 ErrInvalidLengthExtendedDataSquare = fmt.Errorf("proto: negative length found during unmarshaling") 507 ErrIntOverflowExtendedDataSquare = fmt.Errorf("proto: integer overflow") 508 ErrUnexpectedEndOfGroupExtendedDataSquare = fmt.Errorf("proto: unexpected end of group") 509 )