status-go/vendor/github.com/libp2p/go-libp2p-noise/pb/payload.pb.go

426 lines
10 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: payload.proto
package pb
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type NoiseHandshakePayload struct {
IdentityKey []byte `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"`
IdentitySig []byte `protobuf:"bytes,2,opt,name=identity_sig,json=identitySig,proto3" json:"identity_sig,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *NoiseHandshakePayload) Reset() { *m = NoiseHandshakePayload{} }
func (m *NoiseHandshakePayload) String() string { return proto.CompactTextString(m) }
func (*NoiseHandshakePayload) ProtoMessage() {}
func (*NoiseHandshakePayload) Descriptor() ([]byte, []int) {
return fileDescriptor_678c914f1bee6d56, []int{0}
}
func (m *NoiseHandshakePayload) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NoiseHandshakePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NoiseHandshakePayload.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *NoiseHandshakePayload) XXX_Merge(src proto.Message) {
xxx_messageInfo_NoiseHandshakePayload.Merge(m, src)
}
func (m *NoiseHandshakePayload) XXX_Size() int {
return m.Size()
}
func (m *NoiseHandshakePayload) XXX_DiscardUnknown() {
xxx_messageInfo_NoiseHandshakePayload.DiscardUnknown(m)
}
var xxx_messageInfo_NoiseHandshakePayload proto.InternalMessageInfo
func (m *NoiseHandshakePayload) GetIdentityKey() []byte {
if m != nil {
return m.IdentityKey
}
return nil
}
func (m *NoiseHandshakePayload) GetIdentitySig() []byte {
if m != nil {
return m.IdentitySig
}
return nil
}
func (m *NoiseHandshakePayload) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func init() {
proto.RegisterType((*NoiseHandshakePayload)(nil), "pb.NoiseHandshakePayload")
}
func init() { proto.RegisterFile("payload.proto", fileDescriptor_678c914f1bee6d56) }
var fileDescriptor_678c914f1bee6d56 = []byte{
// 152 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x48, 0xac, 0xcc,
0xc9, 0x4f, 0x4c, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0x2a, 0xe4,
0x12, 0xf5, 0xcb, 0xcf, 0x2c, 0x4e, 0xf5, 0x48, 0xcc, 0x4b, 0x29, 0xce, 0x48, 0xcc, 0x4e, 0x0d,
0x80, 0x28, 0x11, 0x52, 0xe4, 0xe2, 0xc9, 0x4c, 0x49, 0xcd, 0x2b, 0xc9, 0x2c, 0xa9, 0x8c, 0xcf,
0x4e, 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0xe2, 0x86, 0x89, 0x79, 0xa7, 0x56, 0xa2,
0x28, 0x29, 0xce, 0x4c, 0x97, 0x60, 0x42, 0x55, 0x12, 0x9c, 0x99, 0x2e, 0x24, 0xc4, 0xc5, 0x92,
0x92, 0x58, 0x92, 0x28, 0xc1, 0x0c, 0x96, 0x02, 0xb3, 0x9d, 0x24, 0x4e, 0x3c, 0x92, 0x63, 0xbc,
0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63,
0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 0x2e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff,
0x51, 0x37, 0xd7, 0x40, 0xa8, 0x00, 0x00, 0x00,
}
func (m *NoiseHandshakePayload) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NoiseHandshakePayload) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *NoiseHandshakePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Data) > 0 {
i -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintPayload(dAtA, i, uint64(len(m.Data)))
i--
dAtA[i] = 0x1a
}
if len(m.IdentitySig) > 0 {
i -= len(m.IdentitySig)
copy(dAtA[i:], m.IdentitySig)
i = encodeVarintPayload(dAtA, i, uint64(len(m.IdentitySig)))
i--
dAtA[i] = 0x12
}
if len(m.IdentityKey) > 0 {
i -= len(m.IdentityKey)
copy(dAtA[i:], m.IdentityKey)
i = encodeVarintPayload(dAtA, i, uint64(len(m.IdentityKey)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintPayload(dAtA []byte, offset int, v uint64) int {
offset -= sovPayload(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *NoiseHandshakePayload) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.IdentityKey)
if l > 0 {
n += 1 + l + sovPayload(uint64(l))
}
l = len(m.IdentitySig)
if l > 0 {
n += 1 + l + sovPayload(uint64(l))
}
l = len(m.Data)
if l > 0 {
n += 1 + l + sovPayload(uint64(l))
}
return n
}
func sovPayload(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozPayload(x uint64) (n int) {
return sovPayload(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *NoiseHandshakePayload) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPayload
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NoiseHandshakePayload: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NoiseHandshakePayload: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field IdentityKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPayload
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthPayload
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthPayload
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.IdentityKey = append(m.IdentityKey[:0], dAtA[iNdEx:postIndex]...)
if m.IdentityKey == nil {
m.IdentityKey = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field IdentitySig", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPayload
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthPayload
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthPayload
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.IdentitySig = append(m.IdentitySig[:0], dAtA[iNdEx:postIndex]...)
if m.IdentitySig == nil {
m.IdentitySig = []byte{}
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPayload
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthPayload
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthPayload
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipPayload(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthPayload
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthPayload
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipPayload(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowPayload
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowPayload
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowPayload
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthPayload
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupPayload
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthPayload
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthPayload = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowPayload = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupPayload = fmt.Errorf("proto: unexpected end of group")
)