package types
import (
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
)
var (
_ = proto.Marshal
_ = fmt.Errorf
_ = math.Inf
)
const _ = proto.GoGoProtoPackageIsVersion3
type Params struct {
MaxRoutes uint32 `protobuf:"varint,1,opt,name=max_routes,json=maxRoutes,proto3" json:"max_routes,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_1673181069a7f05c, []int{0}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) {
xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
xxx_messageInfo_Params.DiscardUnknown(m)
}
var xxx_messageInfo_Params proto.InternalMessageInfo
func (m *Params) GetMaxRoutes() uint32 {
if m != nil {
return m.MaxRoutes
}
return 0
}
type Route struct {
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"`
}
func (m *Route) Reset() { *m = Route{} }
func (m *Route) String() string { return proto.CompactTextString(m) }
func (*Route) ProtoMessage() {}
func (*Route) Descriptor() ([]byte, []int) {
return fileDescriptor_1673181069a7f05c, []int{1}
}
func (m *Route) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Route.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 *Route) XXX_Merge(src proto.Message) {
xxx_messageInfo_Route.Merge(m, src)
}
func (m *Route) XXX_Size() int {
return m.Size()
}
func (m *Route) XXX_DiscardUnknown() {
xxx_messageInfo_Route.DiscardUnknown(m)
}
var xxx_messageInfo_Route proto.InternalMessageInfo
type Value struct {
Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"`
}
func (m *Value) Reset() { *m = Value{} }
func (m *Value) String() string { return proto.CompactTextString(m) }
func (*Value) ProtoMessage() {}
func (*Value) Descriptor() ([]byte, []int) {
return fileDescriptor_1673181069a7f05c, []int{2}
}
func (m *Value) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Value.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 *Value) XXX_Merge(src proto.Message) {
xxx_messageInfo_Value.Merge(m, src)
}
func (m *Value) XXX_Size() int {
return m.Size()
}
func (m *Value) XXX_DiscardUnknown() {
xxx_messageInfo_Value.DiscardUnknown(m)
}
var xxx_messageInfo_Value proto.InternalMessageInfo
func init() {
proto.RegisterType((*Params)(nil), "cyber.grid.v1beta1.Params")
proto.RegisterType((*Route)(nil), "cyber.grid.v1beta1.Route")
proto.RegisterType((*Value)(nil), "cyber.grid.v1beta1.Value")
}
func init() { proto.RegisterFile("cyber/grid/v1beta1/types.proto", fileDescriptor_1673181069a7f05c) }
var fileDescriptor_1673181069a7f05c = []byte{
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0xbd, 0x4e, 0xc3, 0x30,
0x10, 0xc7, 0x63, 0xfa, 0x21, 0xea, 0x8a, 0xc5, 0x42, 0x28, 0x54, 0xc2, 0xa9, 0x3a, 0x75, 0xa9,
0x4d, 0x61, 0xeb, 0x58, 0x16, 0x46, 0x94, 0x81, 0x81, 0x05, 0x39, 0xa9, 0x15, 0x22, 0x48, 0xae,
0xb2, 0x9d, 0xaa, 0x7d, 0x03, 0x46, 0x1e, 0xa1, 0x33, 0x8f, 0xc1, 0xd4, 0xb1, 0x23, 0x13, 0xa0,
0x76, 0xe9, 0x63, 0xa0, 0xd8, 0x01, 0xfa, 0x02, 0x4c, 0x3e, 0xff, 0x7f, 0xe7, 0xfb, 0xf0, 0x1d,
0xa6, 0xf1, 0x22, 0x92, 0x8a, 0x27, 0x2a, 0x9d, 0xf0, 0xd9, 0x30, 0x92, 0x46, 0x0c, 0xb9, 0x59,
0x4c, 0xa5, 0x66, 0x53, 0x05, 0x06, 0x08, 0xb1, 0x9c, 0x95, 0x9c, 0x55, 0xbc, 0x73, 0x9c, 0x40,
0x02, 0x16, 0xf3, 0xd2, 0x72, 0x9e, 0x1d, 0x1a, 0x83, 0xce, 0x40, 0xf3, 0x48, 0x68, 0xf9, 0x1b,
0x2a, 0x86, 0x34, 0x77, 0xbc, 0x37, 0xc0, 0xcd, 0x1b, 0xa1, 0x44, 0xa6, 0xc9, 0x19, 0xc6, 0x99,
0x98, 0xdf, 0x2b, 0x28, 0x8c, 0xd4, 0x3e, 0xea, 0xa2, 0xfe, 0x51, 0xd8, 0xca, 0xc4, 0x3c, 0xb4,
0xc2, 0xa8, 0xbe, 0x5b, 0x06, 0xa8, 0xf7, 0x86, 0x70, 0xc3, 0x0a, 0xe4, 0x04, 0x37, 0x35, 0x14,
0x2a, 0x96, 0xd6, 0xb5, 0x15, 0x56, 0x37, 0xd2, 0xc5, 0xed, 0x89, 0xd4, 0x26, 0xcd, 0x85, 0x49,
0x21, 0xf7, 0x0f, 0x2c, 0xdc, 0x97, 0x08, 0xc1, 0xf5, 0x5c, 0x64, 0xd2, 0xaf, 0x59, 0x64, 0x6d,
0x22, 0x70, 0x63, 0x26, 0x9e, 0x0a, 0xe9, 0xd7, 0xbb, 0xb5, 0x7e, 0xfb, 0xe2, 0x94, 0xb9, 0xb2,
0x59, 0x59, 0xf6, 0x4f, 0x87, 0xec, 0x0a, 0xd2, 0x7c, 0x7c, 0xbe, 0xfa, 0x08, 0xbc, 0xd7, 0xcf,
0xa0, 0x9f, 0xa4, 0xe6, 0xa1, 0x88, 0x58, 0x0c, 0x19, 0xaf, 0x7a, 0x74, 0xc7, 0x40, 0x4f, 0x1e,
0xab, 0xcf, 0x2a, 0x1f, 0xe8, 0xd0, 0x45, 0x1e, 0x1d, 0x3e, 0x2f, 0x03, 0x6f, 0xb7, 0x0c, 0xbc,
0x9e, 0xc1, 0x8d, 0xdb, 0x52, 0xfa, 0xcb, 0x8a, 0xfe, 0x3f, 0xeb, 0xf8, 0x7a, 0xb5, 0xa1, 0x68,
0xbd, 0xa1, 0xe8, 0x6b, 0x43, 0xd1, 0xcb, 0x96, 0x7a, 0xeb, 0x2d, 0xf5, 0xde, 0xb7, 0xd4, 0xbb,
0x63, 0xfb, 0x41, 0xcb, 0xc1, 0xc6, 0x90, 0x27, 0x4a, 0x6a, 0xcd, 0x13, 0x18, 0xb8, 0x4d, 0x98,
0xbb, 0x5d, 0xb0, 0x09, 0xa2, 0xa6, 0x1d, 0xdd, 0xe5, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c,
0x5d, 0x34, 0xe8, 0x26, 0x02, 0x00, 0x00,
}
func (this *Params) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Params)
if !ok {
that2, ok := that.(Params)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.MaxRoutes != that1.MaxRoutes {
return false
}
return true
}
func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.MaxRoutes != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.MaxRoutes))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Route) 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 *Route) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Route) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Value) > 0 {
for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
}
if len(m.Name) > 0 {
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0x1a
}
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0x12
}
if len(m.Source) > 0 {
i -= len(m.Source)
copy(dAtA[i:], m.Source)
i = encodeVarintTypes(dAtA, i, uint64(len(m.Source)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Value) 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 *Value) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Value) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Value) > 0 {
for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
offset -= sovTypes(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Params) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.MaxRoutes != 0 {
n += 1 + sovTypes(uint64(m.MaxRoutes))
}
return n
}
func (m *Route) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Source)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovTypes(uint64(l))
}
if len(m.Value) > 0 {
for _, e := range m.Value {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func (m *Value) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Value) > 0 {
for _, e := range m.Value {
l = e.Size()
n += 1 + l + sovTypes(uint64(l))
}
}
return n
}
func sovTypes(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozTypes(x uint64) (n int) {
return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Params) 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 ErrIntOverflowTypes
}
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: Params: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxRoutes", wireType)
}
m.MaxRoutes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxRoutes |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Route) 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 ErrIntOverflowTypes
}
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: Route: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Route: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Source = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Destination = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Value = append(m.Value, types.Coin{})
if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Value) 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 ErrIntOverflowTypes
}
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: Value: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTypes
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTypes
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Value = append(m.Value, types.Coin{})
if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTypes
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTypes(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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrIntOverflowTypes
}
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, ErrInvalidLengthTypes
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupTypes
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthTypes
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)