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