2017-11-11 12:18:17 -07:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2021-03-03 00:53:50 -07:00
|
|
|
// source: lib/discover/local.proto
|
2016-07-04 03:40:29 -07:00
|
|
|
|
|
|
|
package discover
|
|
|
|
|
2019-09-03 23:33:29 -07:00
|
|
|
import (
|
|
|
|
fmt "fmt"
|
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
|
|
github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
|
2021-03-03 00:53:50 -07:00
|
|
|
_ "github.com/syncthing/syncthing/proto/ext"
|
2019-09-03 23:33:29 -07:00
|
|
|
io "io"
|
|
|
|
math "math"
|
|
|
|
math_bits "math/bits"
|
|
|
|
)
|
2016-07-04 03:40:29 -07:00
|
|
|
|
|
|
|
// 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.
|
2017-01-02 17:16:21 -07:00
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
2019-09-03 23:33:29 -07:00
|
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
2016-07-04 03:40:29 -07:00
|
|
|
|
|
|
|
type Announce struct {
|
2021-03-03 00:53:50 -07:00
|
|
|
ID github_com_syncthing_syncthing_lib_protocol.DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.DeviceID" json:"id" xml:"id"`
|
|
|
|
Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses" xml:"address"`
|
|
|
|
InstanceID int64 `protobuf:"varint,3,opt,name=instance_id,json=instanceId,proto3" json:"instanceId" xml:"instanceId"`
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
|
2019-01-14 03:53:36 -07:00
|
|
|
func (m *Announce) Reset() { *m = Announce{} }
|
|
|
|
func (m *Announce) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Announce) ProtoMessage() {}
|
|
|
|
func (*Announce) Descriptor() ([]byte, []int) {
|
2021-03-03 00:53:50 -07:00
|
|
|
return fileDescriptor_18afca46562fdaf4, []int{0}
|
2019-01-14 03:53:36 -07:00
|
|
|
}
|
|
|
|
func (m *Announce) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Announce) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Announce.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
2019-09-03 23:33:29 -07:00
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
2019-01-14 03:53:36 -07:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
2019-09-03 23:33:29 -07:00
|
|
|
func (m *Announce) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Announce.Merge(m, src)
|
2019-01-14 03:53:36 -07:00
|
|
|
}
|
|
|
|
func (m *Announce) XXX_Size() int {
|
|
|
|
return m.ProtoSize()
|
|
|
|
}
|
|
|
|
func (m *Announce) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Announce.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Announce proto.InternalMessageInfo
|
2016-07-04 03:40:29 -07:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Announce)(nil), "discover.Announce")
|
|
|
|
}
|
2019-09-03 23:33:29 -07:00
|
|
|
|
2021-03-03 00:53:50 -07:00
|
|
|
func init() { proto.RegisterFile("lib/discover/local.proto", fileDescriptor_18afca46562fdaf4) }
|
2019-09-03 23:33:29 -07:00
|
|
|
|
2021-03-03 00:53:50 -07:00
|
|
|
var fileDescriptor_18afca46562fdaf4 = []byte{
|
|
|
|
// 334 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x6b, 0xe3, 0x30,
|
|
|
|
0x18, 0x86, 0x2d, 0x05, 0x8e, 0x44, 0x77, 0x07, 0x87, 0x27, 0x93, 0x41, 0x0a, 0xbe, 0x0c, 0x81,
|
|
|
|
0x42, 0x3c, 0xb4, 0x53, 0x29, 0x85, 0x1a, 0x2f, 0x1e, 0xba, 0x64, 0xec, 0xd0, 0x10, 0x4b, 0xaa,
|
|
|
|
0x23, 0x70, 0xa4, 0x60, 0x39, 0x21, 0xfd, 0x07, 0x1d, 0x4b, 0xb6, 0x6e, 0xfd, 0x39, 0x19, 0x3d,
|
|
|
|
0x96, 0x0e, 0x82, 0xd8, 0x5b, 0xc6, 0xfc, 0x82, 0x12, 0x25, 0x69, 0x32, 0x76, 0x7b, 0xf5, 0xe8,
|
|
|
|
0x95, 0x78, 0xf8, 0x3e, 0xe4, 0x65, 0x22, 0x09, 0x98, 0xd0, 0x54, 0xcd, 0x79, 0x1e, 0x64, 0x8a,
|
|
|
|
0x8e, 0xb2, 0xfe, 0x34, 0x57, 0x85, 0x72, 0x9b, 0x47, 0xda, 0xfe, 0x9f, 0xf3, 0xa9, 0xd2, 0x81,
|
|
|
|
0xc5, 0xc9, 0xec, 0x29, 0x48, 0x55, 0xaa, 0xec, 0xc1, 0xa6, 0x7d, 0xbd, 0xdd, 0xe2, 0x8b, 0x62,
|
|
|
|
0x1f, 0xfd, 0x37, 0x88, 0x9a, 0x77, 0x52, 0xaa, 0x99, 0xa4, 0xdc, 0x95, 0x08, 0x0a, 0xe6, 0x81,
|
|
|
|
0x0e, 0xe8, 0xfd, 0x09, 0x1f, 0x57, 0x86, 0x38, 0x9f, 0x86, 0x5c, 0xa5, 0xa2, 0x18, 0xcf, 0x92,
|
|
|
|
0x3e, 0x55, 0x93, 0x40, 0x3f, 0x4b, 0x5a, 0x8c, 0x85, 0x4c, 0xcf, 0xd2, 0xce, 0xc9, 0x7e, 0x45,
|
|
|
|
0x55, 0xd6, 0x8f, 0xf8, 0x5c, 0x50, 0x1e, 0x47, 0x95, 0x21, 0x30, 0x8e, 0x36, 0x86, 0x40, 0xc1,
|
|
|
|
0xb6, 0x86, 0x34, 0x17, 0x93, 0xec, 0xda, 0x17, 0xcc, 0x7f, 0x29, 0xbb, 0x60, 0x59, 0x76, 0x61,
|
|
|
|
0x1c, 0x0d, 0xa0, 0x60, 0xee, 0x0d, 0x6a, 0x8d, 0x18, 0xcb, 0xb9, 0xd6, 0x5c, 0x7b, 0xb0, 0xd3,
|
|
|
|
0xe8, 0xb5, 0x42, 0xbc, 0x31, 0xe4, 0x04, 0xb7, 0x86, 0xfc, 0xb5, 0x6f, 0x0f, 0xc4, 0x1f, 0x9c,
|
|
|
|
0xee, 0xdc, 0x21, 0xfa, 0x2d, 0xa4, 0x2e, 0x46, 0x92, 0xf2, 0xa1, 0x60, 0x5e, 0xa3, 0x03, 0x7a,
|
|
|
|
0x8d, 0xf0, 0xb6, 0x32, 0x04, 0xc5, 0x07, 0x6c, 0x15, 0xd0, 0xb1, 0x14, 0xef, 0x54, 0xfe, 0xed,
|
|
|
|
0x55, 0xbe, 0x91, 0xbf, 0x2c, 0xbb, 0x67, 0xfd, 0xc1, 0x59, 0x3b, 0xbc, 0x5f, 0xad, 0xb1, 0x53,
|
|
|
|
0xae, 0xb1, 0xb3, 0xaa, 0x30, 0x28, 0x2b, 0x0c, 0x5e, 0x6b, 0xec, 0xbc, 0xd7, 0x18, 0x94, 0x35,
|
|
|
|
0x76, 0x3e, 0x6a, 0xec, 0x3c, 0x5c, 0xfc, 0x60, 0x38, 0xc7, 0xd5, 0x24, 0xbf, 0xec, 0x98, 0x2e,
|
|
|
|
0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xe8, 0x9a, 0xd0, 0xc7, 0x01, 0x00, 0x00,
|
2019-09-03 23:33:29 -07:00
|
|
|
}
|
|
|
|
|
2017-01-02 17:16:21 -07:00
|
|
|
func (m *Announce) Marshal() (dAtA []byte, err error) {
|
2016-07-04 03:40:29 -07:00
|
|
|
size := m.ProtoSize()
|
2017-01-02 17:16:21 -07:00
|
|
|
dAtA = make([]byte, size)
|
2019-09-03 23:33:29 -07:00
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
2016-07-04 03:40:29 -07:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
return dAtA[:n], nil
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
|
2017-01-02 17:16:21 -07:00
|
|
|
func (m *Announce) MarshalTo(dAtA []byte) (int, error) {
|
2019-09-03 23:33:29 -07:00
|
|
|
size := m.ProtoSize()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Announce) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
2016-07-04 03:40:29 -07:00
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2019-09-03 23:33:29 -07:00
|
|
|
if m.InstanceID != 0 {
|
|
|
|
i = encodeVarintLocal(dAtA, i, uint64(m.InstanceID))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x18
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
if len(m.Addresses) > 0 {
|
2019-09-03 23:33:29 -07:00
|
|
|
for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
i -= len(m.Addresses[iNdEx])
|
|
|
|
copy(dAtA[i:], m.Addresses[iNdEx])
|
|
|
|
i = encodeVarintLocal(dAtA, i, uint64(len(m.Addresses[iNdEx])))
|
|
|
|
i--
|
2017-01-02 17:16:21 -07:00
|
|
|
dAtA[i] = 0x12
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
}
|
2019-09-03 23:33:29 -07:00
|
|
|
{
|
|
|
|
size := m.ID.ProtoSize()
|
|
|
|
i -= size
|
|
|
|
if _, err := m.ID.MarshalTo(dAtA[i:]); err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i = encodeVarintLocal(dAtA, i, uint64(size))
|
2016-07-04 04:16:48 -07:00
|
|
|
}
|
2019-09-03 23:33:29 -07:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
return len(dAtA) - i, nil
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
|
2017-01-02 17:16:21 -07:00
|
|
|
func encodeVarintLocal(dAtA []byte, offset int, v uint64) int {
|
2019-09-03 23:33:29 -07:00
|
|
|
offset -= sovLocal(v)
|
|
|
|
base := offset
|
2016-07-04 03:40:29 -07:00
|
|
|
for v >= 1<<7 {
|
2017-01-02 17:16:21 -07:00
|
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
2016-07-04 03:40:29 -07:00
|
|
|
v >>= 7
|
|
|
|
offset++
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
dAtA[offset] = uint8(v)
|
2019-09-03 23:33:29 -07:00
|
|
|
return base
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
func (m *Announce) ProtoSize() (n int) {
|
2019-01-14 03:53:36 -07:00
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
2016-07-04 03:40:29 -07:00
|
|
|
var l int
|
|
|
|
_ = l
|
2016-10-29 14:56:24 -07:00
|
|
|
l = m.ID.ProtoSize()
|
|
|
|
n += 1 + l + sovLocal(uint64(l))
|
2016-07-04 03:40:29 -07:00
|
|
|
if len(m.Addresses) > 0 {
|
|
|
|
for _, s := range m.Addresses {
|
|
|
|
l = len(s)
|
|
|
|
n += 1 + l + sovLocal(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
2016-07-04 04:16:48 -07:00
|
|
|
if m.InstanceID != 0 {
|
|
|
|
n += 1 + sovLocal(uint64(m.InstanceID))
|
|
|
|
}
|
2016-07-04 03:40:29 -07:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func sovLocal(x uint64) (n int) {
|
2019-09-03 23:33:29 -07:00
|
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
func sozLocal(x uint64) (n int) {
|
|
|
|
return sovLocal(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
func (m *Announce) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
2016-07-04 03:40:29 -07:00
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowLocal
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
b := dAtA[iNdEx]
|
2016-07-04 03:40:29 -07:00
|
|
|
iNdEx++
|
2019-09-03 23:33:29 -07:00
|
|
|
wire |= uint64(b&0x7F) << shift
|
2016-07-04 03:40:29 -07:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: Announce: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Announce: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowLocal
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
b := dAtA[iNdEx]
|
2016-07-04 03:40:29 -07:00
|
|
|
iNdEx++
|
2019-09-03 23:33:29 -07:00
|
|
|
byteLen |= int(b&0x7F) << shift
|
2016-07-04 03:40:29 -07:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthLocal
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
2019-09-03 23:33:29 -07:00
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthLocal
|
|
|
|
}
|
2016-07-04 03:40:29 -07:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2016-10-29 14:56:24 -07:00
|
|
|
return err
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowLocal
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
b := dAtA[iNdEx]
|
2016-07-04 03:40:29 -07:00
|
|
|
iNdEx++
|
2019-09-03 23:33:29 -07:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2016-07-04 03:40:29 -07:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthLocal
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
2019-09-03 23:33:29 -07:00
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthLocal
|
|
|
|
}
|
2016-07-04 03:40:29 -07:00
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
|
2016-07-04 03:40:29 -07:00
|
|
|
iNdEx = postIndex
|
2016-07-04 04:16:48 -07:00
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field InstanceID", wireType)
|
|
|
|
}
|
|
|
|
m.InstanceID = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowLocal
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
b := dAtA[iNdEx]
|
2016-07-04 04:16:48 -07:00
|
|
|
iNdEx++
|
2019-09-03 23:33:29 -07:00
|
|
|
m.InstanceID |= int64(b&0x7F) << shift
|
2016-07-04 04:16:48 -07:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2016-07-04 03:40:29 -07:00
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2017-01-02 17:16:21 -07:00
|
|
|
skippy, err := skipLocal(dAtA[iNdEx:])
|
2016-07-04 03:40:29 -07:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-05-19 04:30:20 -07:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2019-09-03 23:33:29 -07:00
|
|
|
return ErrInvalidLengthLocal
|
|
|
|
}
|
2016-07-04 03:40:29 -07:00
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
func skipLocal(dAtA []byte) (n int, err error) {
|
|
|
|
l := len(dAtA)
|
2016-07-04 03:40:29 -07:00
|
|
|
iNdEx := 0
|
2019-10-18 00:51:04 -07:00
|
|
|
depth := 0
|
2016-07-04 03:40:29 -07:00
|
|
|
for iNdEx < l {
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowLocal
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
b := dAtA[iNdEx]
|
2016-07-04 03:40:29 -07:00
|
|
|
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, ErrIntOverflowLocal
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx++
|
2017-01-02 17:16:21 -07:00
|
|
|
if dAtA[iNdEx-1] < 0x80 {
|
2016-07-04 03:40:29 -07:00
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 1:
|
|
|
|
iNdEx += 8
|
|
|
|
case 2:
|
|
|
|
var length int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return 0, ErrIntOverflowLocal
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
2017-01-02 17:16:21 -07:00
|
|
|
b := dAtA[iNdEx]
|
2016-07-04 03:40:29 -07:00
|
|
|
iNdEx++
|
|
|
|
length |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if length < 0 {
|
|
|
|
return 0, ErrInvalidLengthLocal
|
|
|
|
}
|
2019-09-03 23:33:29 -07:00
|
|
|
iNdEx += length
|
2016-07-04 03:40:29 -07:00
|
|
|
case 3:
|
2019-10-18 00:51:04 -07:00
|
|
|
depth++
|
2016-07-04 03:40:29 -07:00
|
|
|
case 4:
|
2019-10-18 00:51:04 -07:00
|
|
|
if depth == 0 {
|
|
|
|
return 0, ErrUnexpectedEndOfGroupLocal
|
|
|
|
}
|
|
|
|
depth--
|
2016-07-04 03:40:29 -07:00
|
|
|
case 5:
|
|
|
|
iNdEx += 4
|
|
|
|
default:
|
|
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
|
|
}
|
2019-10-18 00:51:04 -07:00
|
|
|
if iNdEx < 0 {
|
|
|
|
return 0, ErrInvalidLengthLocal
|
|
|
|
}
|
|
|
|
if depth == 0 {
|
|
|
|
return iNdEx, nil
|
|
|
|
}
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
2019-10-18 00:51:04 -07:00
|
|
|
return 0, io.ErrUnexpectedEOF
|
2016-07-04 03:40:29 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
2019-10-18 00:51:04 -07:00
|
|
|
ErrInvalidLengthLocal = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
ErrIntOverflowLocal = fmt.Errorf("proto: integer overflow")
|
|
|
|
ErrUnexpectedEndOfGroupLocal = fmt.Errorf("proto: unexpected end of group")
|
2016-07-04 03:40:29 -07:00
|
|
|
)
|