mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
1078 lines
26 KiB
Go
1078 lines
26 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: blob.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
fmt "fmt"
|
|
github_com_cubefs_cubefs_blobstore_common_codemode "github.com/cubefs/cubefs/blobstore/common/codemode"
|
|
_ "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
|
|
|
|
type Location struct {
|
|
ClusterID ClusterID `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3,casttype=ClusterID" json:"cluster_id,omitempty"`
|
|
CodeMode github_com_cubefs_cubefs_blobstore_common_codemode.CodeMode `protobuf:"varint,2,opt,name=codemode,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/codemode.CodeMode" json:"code_mode"`
|
|
Size_ uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
|
|
SliceSize uint32 `protobuf:"varint,4,opt,name=slice_size,json=sliceSize,proto3" json:"blob_size"`
|
|
Crc uint32 `protobuf:"varint,5,opt,name=crc,proto3" json:"crc,omitempty"`
|
|
Slices []Slice `protobuf:"bytes,6,rep,name=slices,proto3" json:"blobs"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Location) Reset() { *m = Location{} }
|
|
func (m *Location) String() string { return proto.CompactTextString(m) }
|
|
func (*Location) ProtoMessage() {}
|
|
func (*Location) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6903d1e8a20272e8, []int{0}
|
|
}
|
|
func (m *Location) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Location.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 *Location) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Location.Merge(m, src)
|
|
}
|
|
func (m *Location) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Location) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Location.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Location proto.InternalMessageInfo
|
|
|
|
func (m *Location) GetClusterID() ClusterID {
|
|
if m != nil {
|
|
return m.ClusterID
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Location) GetCodeMode() github_com_cubefs_cubefs_blobstore_common_codemode.CodeMode {
|
|
if m != nil {
|
|
return m.CodeMode
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Location) GetSize_() uint64 {
|
|
if m != nil {
|
|
return m.Size_
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Location) GetSliceSize() uint32 {
|
|
if m != nil {
|
|
return m.SliceSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Location) GetCrc() uint32 {
|
|
if m != nil {
|
|
return m.Crc
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Location) GetSlices() []Slice {
|
|
if m != nil {
|
|
return m.Slices
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Blob struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Location Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location"`
|
|
Sealed bool `protobuf:"varint,3,opt,name=sealed,proto3" json:"sealed,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Blob) Reset() { *m = Blob{} }
|
|
func (m *Blob) String() string { return proto.CompactTextString(m) }
|
|
func (*Blob) ProtoMessage() {}
|
|
func (*Blob) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6903d1e8a20272e8, []int{1}
|
|
}
|
|
func (m *Blob) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Blob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Blob.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 *Blob) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Blob.Merge(m, src)
|
|
}
|
|
func (m *Blob) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Blob) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Blob.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Blob proto.InternalMessageInfo
|
|
|
|
func (m *Blob) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Blob) GetLocation() Location {
|
|
if m != nil {
|
|
return m.Location
|
|
}
|
|
return Location{}
|
|
}
|
|
|
|
func (m *Blob) GetSealed() bool {
|
|
if m != nil {
|
|
return m.Sealed
|
|
}
|
|
return false
|
|
}
|
|
|
|
type Slice struct {
|
|
MinSliceID BlobID `protobuf:"varint,1,opt,name=min_slice_id,json=minSliceId,proto3,casttype=BlobID" json:"min_bid"`
|
|
Vid Vid `protobuf:"varint,2,opt,name=vid,proto3,casttype=Vid" json:"vid,omitempty"`
|
|
Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
|
|
ValidSize uint64 `protobuf:"varint,4,opt,name=validSize,proto3" json:"validSize,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Slice) Reset() { *m = Slice{} }
|
|
func (m *Slice) String() string { return proto.CompactTextString(m) }
|
|
func (*Slice) ProtoMessage() {}
|
|
func (*Slice) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_6903d1e8a20272e8, []int{2}
|
|
}
|
|
func (m *Slice) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Slice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Slice.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 *Slice) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Slice.Merge(m, src)
|
|
}
|
|
func (m *Slice) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Slice) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Slice.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Slice proto.InternalMessageInfo
|
|
|
|
func (m *Slice) GetMinSliceID() BlobID {
|
|
if m != nil {
|
|
return m.MinSliceID
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Slice) GetVid() Vid {
|
|
if m != nil {
|
|
return m.Vid
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Slice) GetCount() uint32 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Slice) GetValidSize() uint64 {
|
|
if m != nil {
|
|
return m.ValidSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Location)(nil), "cubefs.blobstore.common.proto.Location")
|
|
proto.RegisterType((*Blob)(nil), "cubefs.blobstore.common.proto.Blob")
|
|
proto.RegisterType((*Slice)(nil), "cubefs.blobstore.common.proto.Slice")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("blob.proto", fileDescriptor_6903d1e8a20272e8) }
|
|
|
|
var fileDescriptor_6903d1e8a20272e8 = []byte{
|
|
// 458 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x51, 0x41, 0x8b, 0xd3, 0x40,
|
|
0x14, 0x36, 0x9b, 0x34, 0x9b, 0xbc, 0xb5, 0x20, 0xc3, 0xb2, 0xc4, 0x45, 0x3b, 0xa5, 0x0a, 0xf6,
|
|
0x20, 0x09, 0xac, 0x27, 0xd9, 0x5b, 0xb6, 0x1e, 0x82, 0xee, 0x65, 0x0a, 0x22, 0x5e, 0x4a, 0x33,
|
|
0x33, 0xd6, 0x81, 0x24, 0x23, 0x4d, 0xba, 0x07, 0xc1, 0x9f, 0xe2, 0xff, 0xd9, 0xa3, 0x3f, 0x40,
|
|
0x06, 0xc9, 0xb1, 0x3f, 0xa1, 0x27, 0x99, 0x97, 0xa4, 0x7a, 0xd2, 0x53, 0xbe, 0xf7, 0xbd, 0x6f,
|
|
0xde, 0xfb, 0xf2, 0x3d, 0x80, 0xbc, 0xd0, 0x79, 0xfc, 0x65, 0xab, 0x1b, 0x4d, 0x9e, 0xf2, 0x5d,
|
|
0x2e, 0x3f, 0xd5, 0xb1, 0xa5, 0xea, 0x46, 0x6f, 0x65, 0xcc, 0x75, 0x59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
|
func (m *Location) 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 *Location) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Location) 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 len(m.Slices) > 0 {
|
|
for iNdEx := len(m.Slices) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Slices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintBlob(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
}
|
|
if m.Crc != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.Crc))
|
|
i--
|
|
dAtA[i] = 0x28
|
|
}
|
|
if m.SliceSize != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.SliceSize))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if m.Size_ != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.Size_))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.CodeMode != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.CodeMode))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.ClusterID != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.ClusterID))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Blob) 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 *Blob) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Blob) 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.Sealed {
|
|
i--
|
|
if m.Sealed {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
{
|
|
size, err := m.Location.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintBlob(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
if len(m.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintBlob(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Slice) 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 *Slice) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Slice) 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.ValidSize != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.ValidSize))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if m.Count != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.Count))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if m.Vid != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.Vid))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if m.MinSliceID != 0 {
|
|
i = encodeVarintBlob(dAtA, i, uint64(m.MinSliceID))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintBlob(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovBlob(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *Location) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.ClusterID != 0 {
|
|
n += 1 + sovBlob(uint64(m.ClusterID))
|
|
}
|
|
if m.CodeMode != 0 {
|
|
n += 1 + sovBlob(uint64(m.CodeMode))
|
|
}
|
|
if m.Size_ != 0 {
|
|
n += 1 + sovBlob(uint64(m.Size_))
|
|
}
|
|
if m.SliceSize != 0 {
|
|
n += 1 + sovBlob(uint64(m.SliceSize))
|
|
}
|
|
if m.Crc != 0 {
|
|
n += 1 + sovBlob(uint64(m.Crc))
|
|
}
|
|
if len(m.Slices) > 0 {
|
|
for _, e := range m.Slices {
|
|
l = e.Size()
|
|
n += 1 + l + sovBlob(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Blob) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovBlob(uint64(l))
|
|
}
|
|
l = m.Location.Size()
|
|
n += 1 + l + sovBlob(uint64(l))
|
|
if m.Sealed {
|
|
n += 2
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Slice) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.MinSliceID != 0 {
|
|
n += 1 + sovBlob(uint64(m.MinSliceID))
|
|
}
|
|
if m.Vid != 0 {
|
|
n += 1 + sovBlob(uint64(m.Vid))
|
|
}
|
|
if m.Count != 0 {
|
|
n += 1 + sovBlob(uint64(m.Count))
|
|
}
|
|
if m.ValidSize != 0 {
|
|
n += 1 + sovBlob(uint64(m.ValidSize))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovBlob(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozBlob(x uint64) (n int) {
|
|
return sovBlob(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *Location) 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 ErrIntOverflowBlob
|
|
}
|
|
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: Location: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ClusterID", wireType)
|
|
}
|
|
m.ClusterID = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ClusterID |= ClusterID(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CodeMode", wireType)
|
|
}
|
|
m.CodeMode = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.CodeMode |= github_com_cubefs_cubefs_blobstore_common_codemode.CodeMode(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
|
|
}
|
|
m.Size_ = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Size_ |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SliceSize", wireType)
|
|
}
|
|
m.SliceSize = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.SliceSize |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Crc", wireType)
|
|
}
|
|
m.Crc = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Crc |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Slices", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Slices = append(m.Slices, Slice{})
|
|
if err := m.Slices[len(m.Slices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBlob(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
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 *Blob) 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 ErrIntOverflowBlob
|
|
}
|
|
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: Blob: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Blob: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
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 ErrIntOverflowBlob
|
|
}
|
|
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 ErrInvalidLengthBlob
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Sealed", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.Sealed = bool(v != 0)
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBlob(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
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 *Slice) 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 ErrIntOverflowBlob
|
|
}
|
|
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: Slice: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Slice: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MinSliceID", wireType)
|
|
}
|
|
m.MinSliceID = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.MinSliceID |= BlobID(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Vid", wireType)
|
|
}
|
|
m.Vid = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Vid |= Vid(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
|
|
}
|
|
m.Count = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Count |= uint32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValidSize", wireType)
|
|
}
|
|
m.ValidSize = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowBlob
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.ValidSize |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipBlob(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthBlob
|
|
}
|
|
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 skipBlob(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, ErrIntOverflowBlob
|
|
}
|
|
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, ErrIntOverflowBlob
|
|
}
|
|
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, ErrIntOverflowBlob
|
|
}
|
|
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, ErrInvalidLengthBlob
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupBlob
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthBlob
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthBlob = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowBlob = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupBlob = fmt.Errorf("proto: unexpected end of group")
|
|
)
|