663 lines
17 KiB
Go
663 lines
17 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: storagegroup/types.proto
|
|
|
|
package storagegroup
|
|
|
|
import (
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/golang/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.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type StorageGroup_Lifetime_Unit int32
|
|
|
|
const (
|
|
// Unlimited set if storage group always valid
|
|
StorageGroup_Lifetime_Unlimited StorageGroup_Lifetime_Unit = 0
|
|
// NeoFSEpoch set if storage group is valid until lifetime NeoFS epoch
|
|
StorageGroup_Lifetime_NeoFSEpoch StorageGroup_Lifetime_Unit = 1
|
|
// UnixTime set if storage group is valid until lifetime unix timestamp
|
|
StorageGroup_Lifetime_UnixTime StorageGroup_Lifetime_Unit = 2
|
|
)
|
|
|
|
var StorageGroup_Lifetime_Unit_name = map[int32]string{
|
|
0: "Unlimited",
|
|
1: "NeoFSEpoch",
|
|
2: "UnixTime",
|
|
}
|
|
|
|
var StorageGroup_Lifetime_Unit_value = map[string]int32{
|
|
"Unlimited": 0,
|
|
"NeoFSEpoch": 1,
|
|
"UnixTime": 2,
|
|
}
|
|
|
|
func (x StorageGroup_Lifetime_Unit) String() string {
|
|
return proto.EnumName(StorageGroup_Lifetime_Unit_name, int32(x))
|
|
}
|
|
|
|
func (StorageGroup_Lifetime_Unit) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_cfa54edc899249a8, []int{0, 0, 0}
|
|
}
|
|
|
|
type StorageGroup struct {
|
|
// ValidationDataSize is size of the all object's payloads included into storage group
|
|
ValidationDataSize uint64 `protobuf:"varint,1,opt,name=ValidationDataSize,proto3" json:"ValidationDataSize,omitempty"`
|
|
// ValidationHash is homomorphic hash of all object's payloads included into storage group
|
|
ValidationHash Hash `protobuf:"bytes,2,opt,name=ValidationHash,proto3,customtype=Hash" json:"ValidationHash"`
|
|
// Lifetime is time until storage group is valid
|
|
Lifetime *StorageGroup_Lifetime `protobuf:"bytes,3,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *StorageGroup) Reset() { *m = StorageGroup{} }
|
|
func (*StorageGroup) ProtoMessage() {}
|
|
func (*StorageGroup) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_cfa54edc899249a8, []int{0}
|
|
}
|
|
func (m *StorageGroup) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *StorageGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
func (m *StorageGroup) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StorageGroup.Merge(m, src)
|
|
}
|
|
func (m *StorageGroup) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *StorageGroup) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StorageGroup.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StorageGroup proto.InternalMessageInfo
|
|
|
|
func (m *StorageGroup) GetValidationDataSize() uint64 {
|
|
if m != nil {
|
|
return m.ValidationDataSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *StorageGroup) GetLifetime() *StorageGroup_Lifetime {
|
|
if m != nil {
|
|
return m.Lifetime
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type StorageGroup_Lifetime struct {
|
|
// Unit is lifetime type
|
|
Unit StorageGroup_Lifetime_Unit `protobuf:"varint,1,opt,name=unit,proto3,enum=storagegroup.StorageGroup_Lifetime_Unit" json:"unit,omitempty"`
|
|
// Value for lifetime
|
|
Value int64 `protobuf:"varint,2,opt,name=Value,proto3" json:"Value,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *StorageGroup_Lifetime) Reset() { *m = StorageGroup_Lifetime{} }
|
|
func (m *StorageGroup_Lifetime) String() string { return proto.CompactTextString(m) }
|
|
func (*StorageGroup_Lifetime) ProtoMessage() {}
|
|
func (*StorageGroup_Lifetime) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_cfa54edc899249a8, []int{0, 0}
|
|
}
|
|
func (m *StorageGroup_Lifetime) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *StorageGroup_Lifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
func (m *StorageGroup_Lifetime) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_StorageGroup_Lifetime.Merge(m, src)
|
|
}
|
|
func (m *StorageGroup_Lifetime) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *StorageGroup_Lifetime) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_StorageGroup_Lifetime.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_StorageGroup_Lifetime proto.InternalMessageInfo
|
|
|
|
func (m *StorageGroup_Lifetime) GetUnit() StorageGroup_Lifetime_Unit {
|
|
if m != nil {
|
|
return m.Unit
|
|
}
|
|
return StorageGroup_Lifetime_Unlimited
|
|
}
|
|
|
|
func (m *StorageGroup_Lifetime) GetValue() int64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("storagegroup.StorageGroup_Lifetime_Unit", StorageGroup_Lifetime_Unit_name, StorageGroup_Lifetime_Unit_value)
|
|
proto.RegisterType((*StorageGroup)(nil), "storagegroup.StorageGroup")
|
|
proto.RegisterType((*StorageGroup_Lifetime)(nil), "storagegroup.StorageGroup.Lifetime")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("storagegroup/types.proto", fileDescriptor_cfa54edc899249a8) }
|
|
|
|
var fileDescriptor_cfa54edc899249a8 = []byte{
|
|
// 353 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0x31, 0x4f, 0xc2, 0x40,
|
|
0x18, 0xed, 0x41, 0x35, 0xf5, 0xac, 0x84, 0x5c, 0x1c, 0x1a, 0x86, 0x96, 0xe0, 0xd2, 0x85, 0x36,
|
|
0x01, 0x27, 0xc7, 0xaa, 0xe8, 0xa0, 0x0e, 0x45, 0x18, 0xdc, 0x8e, 0x72, 0x94, 0x4b, 0xda, 0xbb,
|
|
0x86, 0x5e, 0x8d, 0xfa, 0x4b, 0x58, 0x4c, 0xfc, 0x39, 0x8c, 0x8e, 0xc6, 0xa1, 0x31, 0x75, 0xf2,
|
|
0x5f, 0x18, 0xae, 0x8a, 0x8d, 0x71, 0x70, 0xfb, 0xde, 0xfb, 0xde, 0xfb, 0xf2, 0xbd, 0x3c, 0x68,
|
|
0xa4, 0x82, 0x2f, 0x70, 0x48, 0xc2, 0x05, 0xcf, 0x12, 0x57, 0xdc, 0x27, 0x24, 0x75, 0x92, 0x05,
|
|
0x17, 0x1c, 0xe9, 0xd5, 0x4d, 0xab, 0x1b, 0x52, 0x31, 0xcf, 0x26, 0x4e, 0xc0, 0x63, 0x37, 0xe4,
|
|
0x21, 0x77, 0xa5, 0x68, 0x92, 0xcd, 0x24, 0x92, 0x40, 0x4e, 0xa5, 0xb9, 0xf3, 0x51, 0x83, 0xfa,
|
|
0xb0, 0xf4, 0x9f, 0xad, 0xfd, 0xc8, 0x81, 0x68, 0x8c, 0x23, 0x3a, 0xc5, 0x82, 0x72, 0x76, 0x82,
|
|
0x05, 0x1e, 0xd2, 0x07, 0x62, 0x80, 0x36, 0xb0, 0x55, 0xff, 0x8f, 0x0d, 0x3a, 0x84, 0x8d, 0x1f,
|
|
0xf6, 0x1c, 0xa7, 0x73, 0xa3, 0xd6, 0x06, 0xb6, 0xee, 0xe9, 0xab, 0xdc, 0x52, 0x5e, 0x73, 0x4b,
|
|
0x5d, 0x73, 0xfe, 0x2f, 0x0d, 0xba, 0x84, 0x5a, 0x44, 0x67, 0x44, 0xd0, 0x98, 0x18, 0xf5, 0x36,
|
|
0xb0, 0x77, 0x7b, 0x07, 0x4e, 0x35, 0x86, 0x53, 0xfd, 0xc9, 0xb9, 0xf8, 0x92, 0x7a, 0x7a, 0x91,
|
|
0x5b, 0xda, 0x37, 0xf2, 0x37, 0x27, 0x5a, 0x8f, 0x00, 0x6e, 0x68, 0x34, 0x80, 0x6a, 0xc6, 0xa8,
|
|
0x90, 0x3f, 0x37, 0x7a, 0xf6, 0x3f, 0xee, 0x3a, 0x23, 0x46, 0x85, 0xa7, 0x15, 0xb9, 0xa5, 0xae,
|
|
0x27, 0x5f, 0xfa, 0xd1, 0x3e, 0xdc, 0x1a, 0xe3, 0x28, 0x23, 0x32, 0x50, 0xdd, 0x2f, 0x41, 0xa7,
|
|
0x0f, 0xa5, 0x06, 0xed, 0xc1, 0x9d, 0x11, 0x8b, 0x68, 0x4c, 0x05, 0x99, 0x36, 0x15, 0xd4, 0x80,
|
|
0xf0, 0x8a, 0xf0, 0xc1, 0xf0, 0x34, 0xe1, 0xc1, 0xbc, 0x09, 0x90, 0x0e, 0xb5, 0x11, 0xa3, 0x77,
|
|
0xd7, 0x34, 0x26, 0xcd, 0xda, 0x91, 0xba, 0x7c, 0xb2, 0x14, 0xef, 0x78, 0x55, 0x98, 0xe0, 0xb9,
|
|
0x30, 0xc1, 0x4b, 0x61, 0x82, 0xb7, 0xc2, 0x04, 0xcb, 0x77, 0x53, 0xb9, 0xa9, 0x16, 0xc6, 0xd2,
|
|
0x24, 0x08, 0xba, 0x53, 0x72, 0xeb, 0x32, 0xc2, 0x67, 0x69, 0xb7, 0xac, 0xab, 0x1a, 0x60, 0xb2,
|
|
0x2d, 0xb9, 0xfe, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x91, 0x55, 0xe3, 0x01, 0x10, 0x02, 0x00,
|
|
0x00,
|
|
}
|
|
|
|
func (m *StorageGroup) 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 *StorageGroup) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *StorageGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Lifetime != nil {
|
|
{
|
|
size, err := m.Lifetime.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
{
|
|
size := m.ValidationHash.Size()
|
|
i -= size
|
|
if _, err := m.ValidationHash.MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
if m.ValidationDataSize != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.ValidationDataSize))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *StorageGroup_Lifetime) 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 *StorageGroup_Lifetime) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *StorageGroup_Lifetime) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Value != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Value))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.Unit != 0 {
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.Unit))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
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 *StorageGroup) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.ValidationDataSize != 0 {
|
|
n += 1 + sovTypes(uint64(m.ValidationDataSize))
|
|
}
|
|
l = m.ValidationHash.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
if m.Lifetime != nil {
|
|
l = m.Lifetime.Size()
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *StorageGroup_Lifetime) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Unit != 0 {
|
|
n += 1 + sovTypes(uint64(m.Unit))
|
|
}
|
|
if m.Value != 0 {
|
|
n += 1 + sovTypes(uint64(m.Value))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
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 *StorageGroup) 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: StorageGroup: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: StorageGroup: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValidationDataSize", wireType)
|
|
}
|
|
m.ValidationDataSize = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ValidationDataSize |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValidationHash", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := m.ValidationHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Lifetime", 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
|
|
}
|
|
if m.Lifetime == nil {
|
|
m.Lifetime = &StorageGroup_Lifetime{}
|
|
}
|
|
if err := m.Lifetime.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 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *StorageGroup_Lifetime) 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: Lifetime: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Lifetime: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
|
|
}
|
|
m.Unit = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Unit |= StorageGroup_Lifetime_Unit(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
m.Value = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowTypes
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Value |= int64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipTypes(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthTypes
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
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")
|
|
)
|