// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: colinearcore/params.proto package types import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" 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 // Params defines the parameters for the module. type Params struct { // hardware options GpuModels map[string]uint32 `protobuf:"bytes,1,rep,name=gpuModels,proto3" json:"gpuModels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // gas config AuctionGas uint32 `protobuf:"varint,2,opt,name=auctionGas,proto3" json:"auctionGas,omitempty"` // auction config AuctionTime uint32 `protobuf:"varint,3,opt,name=auctionTime,proto3" json:"auctionTime,omitempty"` MinLeasePeriod uint32 `protobuf:"varint,4,opt,name=minLeasePeriod,proto3" json:"minLeasePeriod,omitempty"` MaxLeasePeriod uint32 `protobuf:"varint,5,opt,name=maxLeasePeriod,proto3" json:"maxLeasePeriod,omitempty"` AllowedAuctionDenoms []string `protobuf:"bytes,6,rep,name=allowedAuctionDenoms,proto3" json:"allowedAuctionDenoms,omitempty"` // Maximum number of verified providers; this is to prevent buffer overflow // attacks since provider list is not committed to chain state and costs 0 gas MaxVerifiedProviders uint32 `protobuf:"varint,7,opt,name=maxVerifiedProviders,proto3" json:"maxVerifiedProviders,omitempty"` // Minimum required staked CLR to be a provider (i.e. to bid) // 500 CLR ProviderMinLockedUClr uint32 `protobuf:"varint,8,opt,name=providerMinLockedUClr,proto3" json:"providerMinLockedUClr,omitempty"` // Amount slashed when a provider is offline during an audit // 100 CLR ProviderLockedSlashUClr uint32 `protobuf:"varint,9,opt,name=providerLockedSlashUClr,proto3" json:"providerLockedSlashUClr,omitempty"` // Blocks between provider audits // 400 blocks ~400-1200min ProviderAuditFrequency uint32 `protobuf:"varint,10,opt,name=providerAuditFrequency,proto3" json:"providerAuditFrequency,omitempty"` // Blocks before an audit ping must be returned // 3 blocks ~4-12sec ProviderAuditLength uint32 `protobuf:"varint,11,opt,name=providerAuditLength,proto3" json:"providerAuditLength,omitempty"` } func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_54a22962c5c35285, []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) GetGpuModels() map[string]uint32 { if m != nil { return m.GpuModels } return nil } func (m *Params) GetAuctionGas() uint32 { if m != nil { return m.AuctionGas } return 0 } func (m *Params) GetAuctionTime() uint32 { if m != nil { return m.AuctionTime } return 0 } func (m *Params) GetMinLeasePeriod() uint32 { if m != nil { return m.MinLeasePeriod } return 0 } func (m *Params) GetMaxLeasePeriod() uint32 { if m != nil { return m.MaxLeasePeriod } return 0 } func (m *Params) GetAllowedAuctionDenoms() []string { if m != nil { return m.AllowedAuctionDenoms } return nil } func (m *Params) GetMaxVerifiedProviders() uint32 { if m != nil { return m.MaxVerifiedProviders } return 0 } func (m *Params) GetProviderMinLockedUClr() uint32 { if m != nil { return m.ProviderMinLockedUClr } return 0 } func (m *Params) GetProviderLockedSlashUClr() uint32 { if m != nil { return m.ProviderLockedSlashUClr } return 0 } func (m *Params) GetProviderAuditFrequency() uint32 { if m != nil { return m.ProviderAuditFrequency } return 0 } func (m *Params) GetProviderAuditLength() uint32 { if m != nil { return m.ProviderAuditLength } return 0 } func init() { proto.RegisterType((*Params)(nil), "colinear.colinearcore.Params") proto.RegisterMapType((map[string]uint32)(nil), "colinear.colinearcore.Params.GpuModelsEntry") } func init() { proto.RegisterFile("colinearcore/params.proto", fileDescriptor_54a22962c5c35285) } var fileDescriptor_54a22962c5c35285 = []byte{ // 419 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4d, 0x6f, 0xd3, 0x30, 0x18, 0xc7, 0xeb, 0xb5, 0x2b, 0xf4, 0xa9, 0x98, 0x90, 0xe9, 0xc0, 0x4c, 0x22, 0x44, 0x1c, 0x50, 0x0f, 0x28, 0x45, 0x03, 0xc1, 0x34, 0x71, 0x19, 0x6f, 0x93, 0x50, 0x27, 0x55, 0xe1, 0xe5, 0xc0, 0xcd, 0x24, 0x0f, 0x99, 0xb5, 0xc4, 0x0e, 0x76, 0x32, 0x9a, 0x6f, 0xc1, 0x91, 0x23, 0x1f, 0x87, 0xe3, 0x8e, 0x1c, 0x51, 0x7b, 0xe5, 0x43, 0xa0, 0x3a, 0x89, 0x48, 0x50, 0x76, 0xf3, 0xf3, 0xff, 0xfd, 0x7f, 0xf6, 0xc1, 0x0f, 0xdc, 0x0e, 0x54, 0x2c, 0x24, 0x72, 0x1d, 0x28, 0x8d, 0xb3, 0x94, 0x6b, 0x9e, 0x18, 0x2f, 0xd5, 0x2a, 0x53, 0x74, 0xb7, 0x46, 0x5e, 0xb3, 0xb3, 0x37, 0x89, 0x54, 0xa4, 0x6c, 0x63, 0xb6, 0x39, 0x95, 0xe5, 0x7b, 0x7f, 0x06, 0x30, 0x5c, 0x58, 0x9b, 0xbe, 0x81, 0x51, 0x94, 0xe6, 0x27, 0x2a, 0xc4, 0xd8, 0x30, 0xe2, 0xf6, 0xa7, 0xe3, 0xfd, 0x07, 0x5e, 0xe7, 0x5d, 0x5e, 0x69, 0x78, 0xc7, 0x75, 0xfd, 0x95, 0xcc, 0x74, 0xe1, 0xff, 0xd3, 0xa9, 0x03, 0xc0, 0xf3, 0x20, 0x13, 0x4a, 0x1e, 0x73, 0xc3, 0xb6, 0x5c, 0x32, 0xbd, 0xe6, 0x37, 0x12, 0xea, 0xc2, 0xb8, 0x9a, 0xde, 0x89, 0x04, 0x59, 0xdf, 0x16, 0x9a, 0x11, 0xbd, 0x0f, 0x3b, 0x89, 0x90, 0x73, 0xe4, 0x06, 0x17, 0xa8, 0x85, 0x0a, 0xd9, 0xc0, 0x96, 0xfe, 0x4b, 0x6d, 0x8f, 0x2f, 0x9b, 0xbd, 0xed, 0xaa, 0xd7, 0x4a, 0xe9, 0x3e, 0x4c, 0x78, 0x1c, 0xab, 0xaf, 0x18, 0x1e, 0x95, 0xaf, 0xbc, 0x44, 0xa9, 0x12, 0xc3, 0x86, 0x6e, 0x7f, 0x3a, 0xf2, 0x3b, 0xd9, 0xc6, 0x49, 0xf8, 0xf2, 0x03, 0x6a, 0xf1, 0x59, 0x60, 0xb8, 0xd0, 0xea, 0x5c, 0x84, 0xa8, 0x0d, 0xbb, 0x62, 0x5f, 0xe8, 0x64, 0xf4, 0x31, 0xec, 0xa6, 0xd5, 0x70, 0x22, 0xe4, 0x5c, 0x05, 0x67, 0x18, 0xbe, 0x7f, 0x11, 0x6b, 0x76, 0xd5, 0x4a, 0xdd, 0x90, 0x1e, 0xc0, 0xad, 0x1a, 0x94, 0xe9, 0xdb, 0x98, 0x9b, 0x53, 0xeb, 0x8d, 0xac, 0x77, 0x19, 0xa6, 0x4f, 0xe0, 0x66, 0x8d, 0x8e, 0xf2, 0x50, 0x64, 0xaf, 0x35, 0x7e, 0xc9, 0x51, 0x06, 0x05, 0x03, 0x2b, 0x5e, 0x42, 0xe9, 0x43, 0xb8, 0xd1, 0x22, 0x73, 0x94, 0x51, 0x76, 0xca, 0xc6, 0x56, 0xea, 0x42, 0x7b, 0xcf, 0x60, 0xa7, 0xfd, 0xe1, 0xf4, 0x3a, 0xf4, 0xcf, 0xb0, 0x60, 0xc4, 0x25, 0xd3, 0x91, 0xbf, 0x39, 0xd2, 0x09, 0x6c, 0x9f, 0xf3, 0x38, 0xc7, 0xea, 0xcb, 0xcb, 0xe1, 0x70, 0xeb, 0x80, 0x1c, 0x0e, 0xbe, 0xff, 0xb8, 0xdb, 0x7b, 0xfe, 0xf4, 0xe7, 0xca, 0x21, 0x17, 0x2b, 0x87, 0xfc, 0x5e, 0x39, 0xe4, 0xdb, 0xda, 0xe9, 0x5d, 0xac, 0x9d, 0xde, 0xaf, 0xb5, 0xd3, 0xfb, 0x78, 0xa7, 0x5e, 0xb0, 0xd9, 0x72, 0xd6, 0xda, 0xed, 0xac, 0x48, 0xd1, 0x7c, 0x1a, 0xda, 0x75, 0x7d, 0xf4, 0x37, 0x00, 0x00, 0xff, 0xff, 0x05, 0x9c, 0x24, 0xe5, 0xf8, 0x02, 0x00, 0x00, } 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.ProviderAuditLength != 0 { i = encodeVarintParams(dAtA, i, uint64(m.ProviderAuditLength)) i-- dAtA[i] = 0x58 } if m.ProviderAuditFrequency != 0 { i = encodeVarintParams(dAtA, i, uint64(m.ProviderAuditFrequency)) i-- dAtA[i] = 0x50 } if m.ProviderLockedSlashUClr != 0 { i = encodeVarintParams(dAtA, i, uint64(m.ProviderLockedSlashUClr)) i-- dAtA[i] = 0x48 } if m.ProviderMinLockedUClr != 0 { i = encodeVarintParams(dAtA, i, uint64(m.ProviderMinLockedUClr)) i-- dAtA[i] = 0x40 } if m.MaxVerifiedProviders != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MaxVerifiedProviders)) i-- dAtA[i] = 0x38 } if len(m.AllowedAuctionDenoms) > 0 { for iNdEx := len(m.AllowedAuctionDenoms) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.AllowedAuctionDenoms[iNdEx]) copy(dAtA[i:], m.AllowedAuctionDenoms[iNdEx]) i = encodeVarintParams(dAtA, i, uint64(len(m.AllowedAuctionDenoms[iNdEx]))) i-- dAtA[i] = 0x32 } } if m.MaxLeasePeriod != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MaxLeasePeriod)) i-- dAtA[i] = 0x28 } if m.MinLeasePeriod != 0 { i = encodeVarintParams(dAtA, i, uint64(m.MinLeasePeriod)) i-- dAtA[i] = 0x20 } if m.AuctionTime != 0 { i = encodeVarintParams(dAtA, i, uint64(m.AuctionTime)) i-- dAtA[i] = 0x18 } if m.AuctionGas != 0 { i = encodeVarintParams(dAtA, i, uint64(m.AuctionGas)) i-- dAtA[i] = 0x10 } if len(m.GpuModels) > 0 { for k := range m.GpuModels { v := m.GpuModels[k] baseI := i i = encodeVarintParams(dAtA, i, uint64(v)) i-- dAtA[i] = 0x10 i -= len(k) copy(dAtA[i:], k) i = encodeVarintParams(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = encodeVarintParams(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func encodeVarintParams(dAtA []byte, offset int, v uint64) int { offset -= sovParams(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 len(m.GpuModels) > 0 { for k, v := range m.GpuModels { _ = k _ = v mapEntrySize := 1 + len(k) + sovParams(uint64(len(k))) + 1 + sovParams(uint64(v)) n += mapEntrySize + 1 + sovParams(uint64(mapEntrySize)) } } if m.AuctionGas != 0 { n += 1 + sovParams(uint64(m.AuctionGas)) } if m.AuctionTime != 0 { n += 1 + sovParams(uint64(m.AuctionTime)) } if m.MinLeasePeriod != 0 { n += 1 + sovParams(uint64(m.MinLeasePeriod)) } if m.MaxLeasePeriod != 0 { n += 1 + sovParams(uint64(m.MaxLeasePeriod)) } if len(m.AllowedAuctionDenoms) > 0 { for _, s := range m.AllowedAuctionDenoms { l = len(s) n += 1 + l + sovParams(uint64(l)) } } if m.MaxVerifiedProviders != 0 { n += 1 + sovParams(uint64(m.MaxVerifiedProviders)) } if m.ProviderMinLockedUClr != 0 { n += 1 + sovParams(uint64(m.ProviderMinLockedUClr)) } if m.ProviderLockedSlashUClr != 0 { n += 1 + sovParams(uint64(m.ProviderLockedSlashUClr)) } if m.ProviderAuditFrequency != 0 { n += 1 + sovParams(uint64(m.ProviderAuditFrequency)) } if m.ProviderAuditLength != 0 { n += 1 + sovParams(uint64(m.ProviderAuditLength)) } return n } func sovParams(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozParams(x uint64) (n int) { return sovParams(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 ErrIntOverflowParams } 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 != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GpuModels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthParams } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthParams } if postIndex > l { return io.ErrUnexpectedEOF } if m.GpuModels == nil { m.GpuModels = make(map[string]uint32) } var mapkey string var mapvalue uint32 for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { return ErrInvalidLengthParams } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return ErrInvalidLengthParams } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapvalue |= uint32(b&0x7F) << shift if b < 0x80 { break } } } else { iNdEx = entryPreIndex skippy, err := skipParams(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthParams } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.GpuModels[mapkey] = mapvalue iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AuctionGas", wireType) } m.AuctionGas = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.AuctionGas |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AuctionTime", wireType) } m.AuctionTime = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.AuctionTime |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinLeasePeriod", wireType) } m.MinLeasePeriod = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MinLeasePeriod |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxLeasePeriod", wireType) } m.MaxLeasePeriod = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MaxLeasePeriod |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AllowedAuctionDenoms", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } 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 ErrInvalidLengthParams } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthParams } if postIndex > l { return io.ErrUnexpectedEOF } m.AllowedAuctionDenoms = append(m.AllowedAuctionDenoms, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MaxVerifiedProviders", wireType) } m.MaxVerifiedProviders = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.MaxVerifiedProviders |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProviderMinLockedUClr", wireType) } m.ProviderMinLockedUClr = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProviderMinLockedUClr |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProviderLockedSlashUClr", wireType) } m.ProviderLockedSlashUClr = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProviderLockedSlashUClr |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProviderAuditFrequency", wireType) } m.ProviderAuditFrequency = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProviderAuditFrequency |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProviderAuditLength", wireType) } m.ProviderAuditLength = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProviderAuditLength |= uint32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthParams } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipParams(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, ErrIntOverflowParams } 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, ErrIntOverflowParams } 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, ErrIntOverflowParams } 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, ErrInvalidLengthParams } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupParams } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthParams } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )