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{
|
|
// 359 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xb1, 0x4e, 0xe3, 0x40,
|
|
0x14, 0xf4, 0x26, 0xbe, 0x93, 0x6f, 0xcf, 0x17, 0x45, 0xab, 0x2b, 0xac, 0x14, 0x76, 0x14, 0x1a,
|
|
0x4b, 0x28, 0x6b, 0x29, 0xa1, 0xa2, 0xc3, 0x82, 0x40, 0x01, 0x14, 0x0e, 0x49, 0x41, 0xb7, 0x71,
|
|
0x36, 0xce, 0x4a, 0xf6, 0xae, 0x15, 0xaf, 0x11, 0xf0, 0x25, 0x69, 0x90, 0xf8, 0x9c, 0x94, 0x94,
|
|
0x88, 0xc2, 0x42, 0xa6, 0xe2, 0x2f, 0x50, 0x36, 0x10, 0x2c, 0x44, 0x41, 0xf7, 0x66, 0xde, 0xcc,
|
|
0xd3, 0x3c, 0x0d, 0xb4, 0x32, 0x29, 0x16, 0x24, 0xa2, 0xd1, 0x42, 0xe4, 0xa9, 0x27, 0x6f, 0x52,
|
|
0x9a, 0xe1, 0x74, 0x21, 0xa4, 0x40, 0x66, 0x75, 0xd3, 0xea, 0x46, 0x4c, 0xce, 0xf3, 0x09, 0x0e,
|
|
0x45, 0xe2, 0x45, 0x22, 0x12, 0x9e, 0x12, 0x4d, 0xf2, 0x99, 0x42, 0x0a, 0xa8, 0x69, 0x63, 0xee,
|
|
0xbc, 0xd6, 0xa0, 0x39, 0xdc, 0xf8, 0x8f, 0xd7, 0x7e, 0x84, 0x21, 0x1a, 0x93, 0x98, 0x4d, 0x89,
|
|
0x64, 0x82, 0x1f, 0x12, 0x49, 0x86, 0xec, 0x96, 0x5a, 0xa0, 0x0d, 0x5c, 0x3d, 0xf8, 0x66, 0x83,
|
|
0xf6, 0x60, 0xe3, 0x93, 0x3d, 0x21, 0xd9, 0xdc, 0xaa, 0xb5, 0x81, 0x6b, 0xfa, 0xe6, 0xaa, 0x70,
|
|
0xb4, 0xa7, 0xc2, 0xd1, 0xd7, 0x5c, 0xf0, 0x45, 0x83, 0xce, 0xa0, 0x11, 0xb3, 0x19, 0x95, 0x2c,
|
|
0xa1, 0x56, 0xbd, 0x0d, 0xdc, 0xbf, 0xbd, 0x1d, 0x5c, 0x7d, 0x03, 0x57, 0x33, 0xe1, 0xd3, 0x77,
|
|
0xa9, 0x6f, 0x96, 0x85, 0x63, 0x7c, 0xa0, 0x60, 0x7b, 0xa2, 0x75, 0x07, 0xe0, 0x96, 0x46, 0x03,
|
|
0xa8, 0xe7, 0x9c, 0x49, 0x95, 0xb9, 0xd1, 0x73, 0x7f, 0x70, 0x17, 0x8f, 0x38, 0x93, 0xbe, 0x51,
|
|
0x16, 0x8e, 0xbe, 0x9e, 0x02, 0xe5, 0x47, 0xff, 0xe1, 0xaf, 0x31, 0x89, 0x73, 0xaa, 0x1e, 0xaa,
|
|
0x07, 0x1b, 0xd0, 0xe9, 0x43, 0xa5, 0x41, 0xff, 0xe0, 0x9f, 0x11, 0x8f, 0x59, 0xc2, 0x24, 0x9d,
|
|
0x36, 0x35, 0xd4, 0x80, 0xf0, 0x9c, 0x8a, 0xc1, 0xf0, 0x28, 0x15, 0xe1, 0xbc, 0x09, 0x90, 0x09,
|
|
0x8d, 0x11, 0x67, 0xd7, 0x17, 0x2c, 0xa1, 0xcd, 0xda, 0xbe, 0xbe, 0xbc, 0x77, 0x34, 0xff, 0x60,
|
|
0x55, 0xda, 0xe0, 0xa1, 0xb4, 0xc1, 0x63, 0x69, 0x83, 0xe7, 0xd2, 0x06, 0xcb, 0x17, 0x5b, 0xbb,
|
|
0xdc, 0xad, 0x14, 0xc6, 0xb3, 0x34, 0x0c, 0xbb, 0x53, 0x7a, 0xe5, 0x71, 0x2a, 0x66, 0x59, 0x97,
|
|
0xa4, 0xcc, 0xab, 0xc6, 0x9f, 0xfc, 0x56, 0xad, 0xf5, 0xdf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x74,
|
|
0xed, 0x88, 0xb3, 0x0e, 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")
|
|
)
|