github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/message/ping.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: ping.proto 3 4 package message 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 proto "github.com/golang/protobuf/proto" 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.ProtoPackageIsVersion3 // please upgrade the proto package 25 26 type PingRequest struct { 27 XXX_NoUnkeyedLiteral struct{} `json:"-"` 28 XXX_unrecognized []byte `json:"-"` 29 XXX_sizecache int32 `json:"-"` 30 } 31 32 func (m *PingRequest) Reset() { *m = PingRequest{} } 33 func (m *PingRequest) String() string { return proto.CompactTextString(m) } 34 func (*PingRequest) ProtoMessage() {} 35 func (*PingRequest) Descriptor() ([]byte, []int) { 36 return fileDescriptor_6d51d96c3ad891f5, []int{0} 37 } 38 func (m *PingRequest) XXX_Unmarshal(b []byte) error { 39 return m.Unmarshal(b) 40 } 41 func (m *PingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 42 if deterministic { 43 return xxx_messageInfo_PingRequest.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 *PingRequest) XXX_Merge(src proto.Message) { 54 xxx_messageInfo_PingRequest.Merge(m, src) 55 } 56 func (m *PingRequest) XXX_Size() int { 57 return m.Size() 58 } 59 func (m *PingRequest) XXX_DiscardUnknown() { 60 xxx_messageInfo_PingRequest.DiscardUnknown(m) 61 } 62 63 var xxx_messageInfo_PingRequest proto.InternalMessageInfo 64 65 type PingResponse struct { 66 Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` 67 BlockHeight uint64 `protobuf:"varint,2,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` 68 HotstuffView uint64 `protobuf:"varint,3,opt,name=hotstuffView,proto3" json:"hotstuffView,omitempty"` 69 XXX_NoUnkeyedLiteral struct{} `json:"-"` 70 XXX_unrecognized []byte `json:"-"` 71 XXX_sizecache int32 `json:"-"` 72 } 73 74 func (m *PingResponse) Reset() { *m = PingResponse{} } 75 func (m *PingResponse) String() string { return proto.CompactTextString(m) } 76 func (*PingResponse) ProtoMessage() {} 77 func (*PingResponse) Descriptor() ([]byte, []int) { 78 return fileDescriptor_6d51d96c3ad891f5, []int{1} 79 } 80 func (m *PingResponse) XXX_Unmarshal(b []byte) error { 81 return m.Unmarshal(b) 82 } 83 func (m *PingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 84 if deterministic { 85 return xxx_messageInfo_PingResponse.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 *PingResponse) XXX_Merge(src proto.Message) { 96 xxx_messageInfo_PingResponse.Merge(m, src) 97 } 98 func (m *PingResponse) XXX_Size() int { 99 return m.Size() 100 } 101 func (m *PingResponse) XXX_DiscardUnknown() { 102 xxx_messageInfo_PingResponse.DiscardUnknown(m) 103 } 104 105 var xxx_messageInfo_PingResponse proto.InternalMessageInfo 106 107 func (m *PingResponse) GetVersion() string { 108 if m != nil { 109 return m.Version 110 } 111 return "" 112 } 113 114 func (m *PingResponse) GetBlockHeight() uint64 { 115 if m != nil { 116 return m.BlockHeight 117 } 118 return 0 119 } 120 121 func (m *PingResponse) GetHotstuffView() uint64 { 122 if m != nil { 123 return m.HotstuffView 124 } 125 return 0 126 } 127 128 func init() { 129 proto.RegisterType((*PingRequest)(nil), "message.PingRequest") 130 proto.RegisterType((*PingResponse)(nil), "message.PingResponse") 131 } 132 133 func init() { proto.RegisterFile("ping.proto", fileDescriptor_6d51d96c3ad891f5) } 134 135 var fileDescriptor_6d51d96c3ad891f5 = []byte{ 136 // 162 bytes of a gzipped FileDescriptorProto 137 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xc8, 0xcc, 0x4b, 138 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x55, 139 0xe2, 0xe5, 0xe2, 0x0e, 0xc8, 0xcc, 0x4b, 0x0f, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x51, 0xca, 140 0xe3, 0xe2, 0x81, 0x70, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0x24, 0xb8, 0xd8, 0xcb, 0x52, 141 0x8b, 0x8a, 0x33, 0xf3, 0xf3, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x60, 0x5c, 0x21, 0x05, 142 0x2e, 0xee, 0xa4, 0x9c, 0xfc, 0xe4, 0x6c, 0x8f, 0xd4, 0xcc, 0xf4, 0x8c, 0x12, 0x09, 0x26, 0x05, 143 0x46, 0x0d, 0x96, 0x20, 0x64, 0x21, 0x21, 0x25, 0x2e, 0x9e, 0x8c, 0xfc, 0x92, 0xe2, 0x92, 0xd2, 144 0xb4, 0xb4, 0xb0, 0xcc, 0xd4, 0x72, 0x09, 0x66, 0xb0, 0x12, 0x14, 0x31, 0x27, 0x81, 0x13, 0x8f, 145 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc6, 0x63, 0x39, 0x86, 0x24, 146 0x36, 0xb0, 0x03, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x19, 0xda, 0x34, 0xae, 0x00, 147 0x00, 0x00, 148 } 149 150 func (m *PingRequest) Marshal() (dAtA []byte, err error) { 151 size := m.Size() 152 dAtA = make([]byte, size) 153 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 154 if err != nil { 155 return nil, err 156 } 157 return dAtA[:n], nil 158 } 159 160 func (m *PingRequest) MarshalTo(dAtA []byte) (int, error) { 161 size := m.Size() 162 return m.MarshalToSizedBuffer(dAtA[:size]) 163 } 164 165 func (m *PingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 166 i := len(dAtA) 167 _ = i 168 var l int 169 _ = l 170 if m.XXX_unrecognized != nil { 171 i -= len(m.XXX_unrecognized) 172 copy(dAtA[i:], m.XXX_unrecognized) 173 } 174 return len(dAtA) - i, nil 175 } 176 177 func (m *PingResponse) Marshal() (dAtA []byte, err error) { 178 size := m.Size() 179 dAtA = make([]byte, size) 180 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 181 if err != nil { 182 return nil, err 183 } 184 return dAtA[:n], nil 185 } 186 187 func (m *PingResponse) MarshalTo(dAtA []byte) (int, error) { 188 size := m.Size() 189 return m.MarshalToSizedBuffer(dAtA[:size]) 190 } 191 192 func (m *PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 193 i := len(dAtA) 194 _ = i 195 var l int 196 _ = l 197 if m.XXX_unrecognized != nil { 198 i -= len(m.XXX_unrecognized) 199 copy(dAtA[i:], m.XXX_unrecognized) 200 } 201 if m.HotstuffView != 0 { 202 i = encodeVarintPing(dAtA, i, uint64(m.HotstuffView)) 203 i-- 204 dAtA[i] = 0x18 205 } 206 if m.BlockHeight != 0 { 207 i = encodeVarintPing(dAtA, i, uint64(m.BlockHeight)) 208 i-- 209 dAtA[i] = 0x10 210 } 211 if len(m.Version) > 0 { 212 i -= len(m.Version) 213 copy(dAtA[i:], m.Version) 214 i = encodeVarintPing(dAtA, i, uint64(len(m.Version))) 215 i-- 216 dAtA[i] = 0xa 217 } 218 return len(dAtA) - i, nil 219 } 220 221 func encodeVarintPing(dAtA []byte, offset int, v uint64) int { 222 offset -= sovPing(v) 223 base := offset 224 for v >= 1<<7 { 225 dAtA[offset] = uint8(v&0x7f | 0x80) 226 v >>= 7 227 offset++ 228 } 229 dAtA[offset] = uint8(v) 230 return base 231 } 232 func (m *PingRequest) Size() (n int) { 233 if m == nil { 234 return 0 235 } 236 var l int 237 _ = l 238 if m.XXX_unrecognized != nil { 239 n += len(m.XXX_unrecognized) 240 } 241 return n 242 } 243 244 func (m *PingResponse) Size() (n int) { 245 if m == nil { 246 return 0 247 } 248 var l int 249 _ = l 250 l = len(m.Version) 251 if l > 0 { 252 n += 1 + l + sovPing(uint64(l)) 253 } 254 if m.BlockHeight != 0 { 255 n += 1 + sovPing(uint64(m.BlockHeight)) 256 } 257 if m.HotstuffView != 0 { 258 n += 1 + sovPing(uint64(m.HotstuffView)) 259 } 260 if m.XXX_unrecognized != nil { 261 n += len(m.XXX_unrecognized) 262 } 263 return n 264 } 265 266 func sovPing(x uint64) (n int) { 267 return (math_bits.Len64(x|1) + 6) / 7 268 } 269 func sozPing(x uint64) (n int) { 270 return sovPing(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 271 } 272 func (m *PingRequest) 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 ErrIntOverflowPing 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: PingRequest: wiretype end group for non-group") 296 } 297 if fieldNum <= 0 { 298 return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire) 299 } 300 switch fieldNum { 301 default: 302 iNdEx = preIndex 303 skippy, err := skipPing(dAtA[iNdEx:]) 304 if err != nil { 305 return err 306 } 307 if (skippy < 0) || (iNdEx+skippy) < 0 { 308 return ErrInvalidLengthPing 309 } 310 if (iNdEx + skippy) > l { 311 return io.ErrUnexpectedEOF 312 } 313 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 314 iNdEx += skippy 315 } 316 } 317 318 if iNdEx > l { 319 return io.ErrUnexpectedEOF 320 } 321 return nil 322 } 323 func (m *PingResponse) Unmarshal(dAtA []byte) error { 324 l := len(dAtA) 325 iNdEx := 0 326 for iNdEx < l { 327 preIndex := iNdEx 328 var wire uint64 329 for shift := uint(0); ; shift += 7 { 330 if shift >= 64 { 331 return ErrIntOverflowPing 332 } 333 if iNdEx >= l { 334 return io.ErrUnexpectedEOF 335 } 336 b := dAtA[iNdEx] 337 iNdEx++ 338 wire |= uint64(b&0x7F) << shift 339 if b < 0x80 { 340 break 341 } 342 } 343 fieldNum := int32(wire >> 3) 344 wireType := int(wire & 0x7) 345 if wireType == 4 { 346 return fmt.Errorf("proto: PingResponse: wiretype end group for non-group") 347 } 348 if fieldNum <= 0 { 349 return fmt.Errorf("proto: PingResponse: illegal tag %d (wire type %d)", fieldNum, wire) 350 } 351 switch fieldNum { 352 case 1: 353 if wireType != 2 { 354 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 355 } 356 var stringLen uint64 357 for shift := uint(0); ; shift += 7 { 358 if shift >= 64 { 359 return ErrIntOverflowPing 360 } 361 if iNdEx >= l { 362 return io.ErrUnexpectedEOF 363 } 364 b := dAtA[iNdEx] 365 iNdEx++ 366 stringLen |= uint64(b&0x7F) << shift 367 if b < 0x80 { 368 break 369 } 370 } 371 intStringLen := int(stringLen) 372 if intStringLen < 0 { 373 return ErrInvalidLengthPing 374 } 375 postIndex := iNdEx + intStringLen 376 if postIndex < 0 { 377 return ErrInvalidLengthPing 378 } 379 if postIndex > l { 380 return io.ErrUnexpectedEOF 381 } 382 m.Version = string(dAtA[iNdEx:postIndex]) 383 iNdEx = postIndex 384 case 2: 385 if wireType != 0 { 386 return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) 387 } 388 m.BlockHeight = 0 389 for shift := uint(0); ; shift += 7 { 390 if shift >= 64 { 391 return ErrIntOverflowPing 392 } 393 if iNdEx >= l { 394 return io.ErrUnexpectedEOF 395 } 396 b := dAtA[iNdEx] 397 iNdEx++ 398 m.BlockHeight |= uint64(b&0x7F) << shift 399 if b < 0x80 { 400 break 401 } 402 } 403 case 3: 404 if wireType != 0 { 405 return fmt.Errorf("proto: wrong wireType = %d for field HotstuffView", wireType) 406 } 407 m.HotstuffView = 0 408 for shift := uint(0); ; shift += 7 { 409 if shift >= 64 { 410 return ErrIntOverflowPing 411 } 412 if iNdEx >= l { 413 return io.ErrUnexpectedEOF 414 } 415 b := dAtA[iNdEx] 416 iNdEx++ 417 m.HotstuffView |= uint64(b&0x7F) << shift 418 if b < 0x80 { 419 break 420 } 421 } 422 default: 423 iNdEx = preIndex 424 skippy, err := skipPing(dAtA[iNdEx:]) 425 if err != nil { 426 return err 427 } 428 if (skippy < 0) || (iNdEx+skippy) < 0 { 429 return ErrInvalidLengthPing 430 } 431 if (iNdEx + skippy) > l { 432 return io.ErrUnexpectedEOF 433 } 434 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 435 iNdEx += skippy 436 } 437 } 438 439 if iNdEx > l { 440 return io.ErrUnexpectedEOF 441 } 442 return nil 443 } 444 func skipPing(dAtA []byte) (n int, err error) { 445 l := len(dAtA) 446 iNdEx := 0 447 depth := 0 448 for iNdEx < l { 449 var wire uint64 450 for shift := uint(0); ; shift += 7 { 451 if shift >= 64 { 452 return 0, ErrIntOverflowPing 453 } 454 if iNdEx >= l { 455 return 0, io.ErrUnexpectedEOF 456 } 457 b := dAtA[iNdEx] 458 iNdEx++ 459 wire |= (uint64(b) & 0x7F) << shift 460 if b < 0x80 { 461 break 462 } 463 } 464 wireType := int(wire & 0x7) 465 switch wireType { 466 case 0: 467 for shift := uint(0); ; shift += 7 { 468 if shift >= 64 { 469 return 0, ErrIntOverflowPing 470 } 471 if iNdEx >= l { 472 return 0, io.ErrUnexpectedEOF 473 } 474 iNdEx++ 475 if dAtA[iNdEx-1] < 0x80 { 476 break 477 } 478 } 479 case 1: 480 iNdEx += 8 481 case 2: 482 var length int 483 for shift := uint(0); ; shift += 7 { 484 if shift >= 64 { 485 return 0, ErrIntOverflowPing 486 } 487 if iNdEx >= l { 488 return 0, io.ErrUnexpectedEOF 489 } 490 b := dAtA[iNdEx] 491 iNdEx++ 492 length |= (int(b) & 0x7F) << shift 493 if b < 0x80 { 494 break 495 } 496 } 497 if length < 0 { 498 return 0, ErrInvalidLengthPing 499 } 500 iNdEx += length 501 case 3: 502 depth++ 503 case 4: 504 if depth == 0 { 505 return 0, ErrUnexpectedEndOfGroupPing 506 } 507 depth-- 508 case 5: 509 iNdEx += 4 510 default: 511 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 512 } 513 if iNdEx < 0 { 514 return 0, ErrInvalidLengthPing 515 } 516 if depth == 0 { 517 return iNdEx, nil 518 } 519 } 520 return 0, io.ErrUnexpectedEOF 521 } 522 523 var ( 524 ErrInvalidLengthPing = fmt.Errorf("proto: negative length found during unmarshaling") 525 ErrIntOverflowPing = fmt.Errorf("proto: integer overflow") 526 ErrUnexpectedEndOfGroupPing = fmt.Errorf("proto: unexpected end of group") 527 )