2020-08-12 09:57:28 +00:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2020-08-13 12:43:47 +00:00
|
|
|
// source: v2/object/types.proto
|
2020-08-12 09:57:28 +00:00
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
package object
|
2020-08-12 09:57:28 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
2020-08-13 12:43:47 +00:00
|
|
|
refs "github.com/nspcc-dev/neofs-api-go/v2/refs"
|
|
|
|
service "github.com/nspcc-dev/neofs-api-go/v2/service"
|
2020-08-12 09:57:28 +00:00
|
|
|
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 of the object payload content
|
|
|
|
type ObjectType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Just a normal object
|
|
|
|
ObjectType_REGULAR ObjectType = 0
|
|
|
|
// Used internally to identify deleted objects
|
|
|
|
ObjectType_TOMBSTONE ObjectType = 1
|
|
|
|
// Identifies that the object holds StorageGroup information
|
|
|
|
ObjectType_STORAGE_GROUP ObjectType = 2
|
|
|
|
)
|
|
|
|
|
|
|
|
var ObjectType_name = map[int32]string{
|
|
|
|
0: "REGULAR",
|
|
|
|
1: "TOMBSTONE",
|
|
|
|
2: "STORAGE_GROUP",
|
|
|
|
}
|
|
|
|
|
|
|
|
var ObjectType_value = map[string]int32{
|
|
|
|
"REGULAR": 0,
|
|
|
|
"TOMBSTONE": 1,
|
|
|
|
"STORAGE_GROUP": 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x ObjectType) String() string {
|
|
|
|
return proto.EnumName(ObjectType_name, int32(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ObjectType) EnumDescriptor() ([]byte, []int) {
|
2020-08-13 12:43:47 +00:00
|
|
|
return fileDescriptor_fcb9e8df342f43c6, []int{0}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
|
2020-08-14 06:49:05 +00:00
|
|
|
// Object Headers
|
2020-08-12 09:57:28 +00:00
|
|
|
type Header struct {
|
|
|
|
// Object's container
|
2020-08-13 12:43:47 +00:00
|
|
|
ContainerId *refs.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Object's owner
|
2020-08-13 12:43:47 +00:00
|
|
|
OwnerId *refs.OwnerID `protobuf:"bytes,2,opt,name=owner_id,json=ownerId,proto3" json:"owner_id,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Epoch when the object was created
|
|
|
|
CreationEpoch uint64 `protobuf:"varint,3,opt,name=creation_epoch,json=creationEpoch,proto3" json:"creation_epoch,omitempty"`
|
|
|
|
// Object format version.
|
|
|
|
// Effectively the version of API library used to create particular object
|
2020-08-13 12:43:47 +00:00
|
|
|
Version *service.Version `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Size of payload in bytes.
|
|
|
|
// 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown
|
|
|
|
PayloadLength uint64 `protobuf:"varint,5,opt,name=payload_length,json=payloadLength,proto3" json:"payload_length,omitempty"`
|
|
|
|
// Hash of payload bytes
|
2020-08-14 06:49:05 +00:00
|
|
|
PayloadHash []byte `protobuf:"bytes,6,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"`
|
|
|
|
// Special object type
|
|
|
|
ObjectType ObjectType `protobuf:"varint,7,opt,name=object_type,json=objectType,proto3,enum=neo.fs.v2.object.ObjectType" json:"object_type,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Homomorphic hash of the object payload.
|
|
|
|
HomomorphicHash []byte `protobuf:"bytes,8,opt,name=homomorphic_hash,json=homomorphicHash,proto3" json:"homomorphic_hash,omitempty"`
|
|
|
|
// Session token, if it was used during Object creation.
|
|
|
|
// Need it to verify integrity and authenticity out of Request scope.
|
2020-08-13 12:43:47 +00:00
|
|
|
SessionToken *service.SessionToken `protobuf:"bytes,9,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
|
2020-08-14 06:49:05 +00:00
|
|
|
// User-defined object attributes
|
|
|
|
Attributes []*Header_Attribute `protobuf:"bytes,10,rep,name=attributes,proto3" json:"attributes,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Position of the object in the split hierarchy.
|
|
|
|
Split *Header_Split `protobuf:"bytes,11,opt,name=split,proto3" json:"split,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) Reset() { *m = Header{} }
|
|
|
|
func (m *Header) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Header) ProtoMessage() {}
|
|
|
|
func (*Header) Descriptor() ([]byte, []int) {
|
2020-08-13 12:43:47 +00:00
|
|
|
return fileDescriptor_fcb9e8df342f43c6, []int{0}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
func (m *Header) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Header.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 *Header) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Header.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Header) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *Header) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Header.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Header proto.InternalMessageInfo
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header) GetContainerId() *refs.ContainerID {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.ContainerId
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header) GetOwnerId() *refs.OwnerID {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.OwnerId
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) GetCreationEpoch() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.CreationEpoch
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header) GetVersion() *service.Version {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) GetPayloadLength() uint64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.PayloadLength
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) GetPayloadHash() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.PayloadHash
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) GetObjectType() ObjectType {
|
|
|
|
if m != nil {
|
|
|
|
return m.ObjectType
|
|
|
|
}
|
|
|
|
return ObjectType_REGULAR
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) GetHomomorphicHash() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.HomomorphicHash
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header) GetSessionToken() *service.SessionToken {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.SessionToken
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) GetAttributes() []*Header_Attribute {
|
|
|
|
if m != nil {
|
|
|
|
return m.Attributes
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) GetSplit() *Header_Split {
|
|
|
|
if m != nil {
|
|
|
|
return m.Split
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Attribute groups the user-defined Key-Value pairs attached to the object
|
|
|
|
type Header_Attribute struct {
|
|
|
|
// string key to the object attribute
|
|
|
|
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
// string value of the object attribute
|
|
|
|
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Attribute) Reset() { *m = Header_Attribute{} }
|
|
|
|
func (m *Header_Attribute) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Header_Attribute) ProtoMessage() {}
|
|
|
|
func (*Header_Attribute) Descriptor() ([]byte, []int) {
|
2020-08-13 12:43:47 +00:00
|
|
|
return fileDescriptor_fcb9e8df342f43c6, []int{0, 0}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
func (m *Header_Attribute) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Header_Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Header_Attribute.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 *Header_Attribute) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Header_Attribute.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Header_Attribute) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *Header_Attribute) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Header_Attribute.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Header_Attribute proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Header_Attribute) GetKey() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Attribute) GetValue() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Value
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// Information about spawning the objects through a payload splitting.
|
|
|
|
type Header_Split struct {
|
2020-08-13 12:43:47 +00:00
|
|
|
// Identifier of the origin object.
|
|
|
|
// Parent and children objects must be within the same container.
|
2020-08-12 09:57:28 +00:00
|
|
|
// Parent object_id is known only to the minor child.
|
2020-08-13 12:43:47 +00:00
|
|
|
Parent *refs.ObjectID `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Previous carries identifier of the left split neighbor.
|
2020-08-13 12:43:47 +00:00
|
|
|
Previous *refs.ObjectID `protobuf:"bytes,2,opt,name=previous,proto3" json:"previous,omitempty"`
|
|
|
|
// `signature` field of the parent object. Used to reconstruct parent.
|
|
|
|
ParentSignature *service.Signature `protobuf:"bytes,3,opt,name=parent_signature,json=parentSignature,proto3" json:"parent_signature,omitempty"`
|
|
|
|
// `header` field of the parent object. Used to reconstruct parent.
|
2020-08-12 09:57:28 +00:00
|
|
|
ParentHeader *Header `protobuf:"bytes,4,opt,name=parent_header,json=parentHeader,proto3" json:"parent_header,omitempty"`
|
|
|
|
// Children carries list of identifiers of the objects generated by splitting the current.
|
2020-08-13 12:43:47 +00:00
|
|
|
Children []*refs.ObjectID `protobuf:"bytes,5,rep,name=children,proto3" json:"children,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Split) Reset() { *m = Header_Split{} }
|
|
|
|
func (m *Header_Split) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Header_Split) ProtoMessage() {}
|
|
|
|
func (*Header_Split) Descriptor() ([]byte, []int) {
|
2020-08-13 12:43:47 +00:00
|
|
|
return fileDescriptor_fcb9e8df342f43c6, []int{0, 1}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
func (m *Header_Split) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Header_Split) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Header_Split.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 *Header_Split) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Header_Split.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Header_Split) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *Header_Split) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Header_Split.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Header_Split proto.InternalMessageInfo
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header_Split) GetParent() *refs.ObjectID {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Parent
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header_Split) GetPrevious() *refs.ObjectID {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Previous
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header_Split) GetParentSignature() *service.Signature {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.ParentSignature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Split) GetParentHeader() *Header {
|
|
|
|
if m != nil {
|
|
|
|
return m.ParentHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Header_Split) GetChildren() []*refs.ObjectID {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Children
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Object structure.
|
|
|
|
type Object struct {
|
|
|
|
// Object's unique identifier.
|
|
|
|
// Object is content-addressed. It means id will change if header or payload
|
|
|
|
// changes. It's calculated as a hash of header field, which contains hash of
|
|
|
|
// object's payload
|
2020-08-13 12:43:47 +00:00
|
|
|
ObjectId *refs.ObjectID `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Signed object_id
|
2020-08-13 12:43:47 +00:00
|
|
|
Signature *service.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
2020-08-12 09:57:28 +00:00
|
|
|
// Object metadata headers
|
|
|
|
Header *Header `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"`
|
|
|
|
// Payload bytes.
|
|
|
|
Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Object) Reset() { *m = Object{} }
|
|
|
|
func (m *Object) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Object) ProtoMessage() {}
|
|
|
|
func (*Object) Descriptor() ([]byte, []int) {
|
2020-08-13 12:43:47 +00:00
|
|
|
return fileDescriptor_fcb9e8df342f43c6, []int{1}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
func (m *Object) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Object.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 *Object) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Object.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Object) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *Object) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Object.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Object proto.InternalMessageInfo
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Object) GetObjectId() *refs.ObjectID {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.ObjectId
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-13 12:43:47 +00:00
|
|
|
func (m *Object) GetSignature() *service.Signature {
|
2020-08-12 09:57:28 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Object) GetHeader() *Header {
|
|
|
|
if m != nil {
|
|
|
|
return m.Header
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Object) GetPayload() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2020-08-13 12:43:47 +00:00
|
|
|
proto.RegisterEnum("neo.fs.v2.object.ObjectType", ObjectType_name, ObjectType_value)
|
|
|
|
proto.RegisterType((*Header)(nil), "neo.fs.v2.object.Header")
|
|
|
|
proto.RegisterType((*Header_Attribute)(nil), "neo.fs.v2.object.Header.Attribute")
|
|
|
|
proto.RegisterType((*Header_Split)(nil), "neo.fs.v2.object.Header.Split")
|
|
|
|
proto.RegisterType((*Object)(nil), "neo.fs.v2.object.Object")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("v2/object/types.proto", fileDescriptor_fcb9e8df342f43c6) }
|
|
|
|
|
|
|
|
var fileDescriptor_fcb9e8df342f43c6 = []byte{
|
2020-08-14 06:49:05 +00:00
|
|
|
// 720 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6e, 0xd3, 0x4e,
|
|
|
|
0x10, 0xc7, 0xeb, 0xa4, 0xf9, 0x37, 0x4e, 0xda, 0xfc, 0xb6, 0x3f, 0x54, 0x2b, 0xa0, 0x10, 0x2a,
|
|
|
|
0x21, 0x05, 0xa4, 0x3a, 0xc8, 0x0d, 0x17, 0xaa, 0x22, 0xa5, 0x34, 0xa4, 0x91, 0x4a, 0x53, 0x6d,
|
|
|
|
0x52, 0x0e, 0xbd, 0x44, 0x8e, 0xbd, 0x89, 0x4d, 0x13, 0xaf, 0xe5, 0x75, 0x5c, 0xe5, 0x4d, 0x78,
|
|
|
|
0x06, 0x24, 0x2e, 0xbc, 0x04, 0x1c, 0x79, 0x04, 0x54, 0x5e, 0x04, 0x79, 0xd7, 0x76, 0x42, 0x4b,
|
|
|
|
0x0b, 0x27, 0x7b, 0xbf, 0xfe, 0x7c, 0x67, 0x76, 0x66, 0x67, 0x0d, 0x0f, 0x02, 0xad, 0x41, 0x47,
|
|
|
|
0x1f, 0x88, 0xe1, 0x37, 0xfc, 0x85, 0x4b, 0x98, 0xea, 0x7a, 0xd4, 0xa7, 0xa8, 0xec, 0x10, 0xaa,
|
|
|
|
0x8e, 0x99, 0x1a, 0x68, 0xaa, 0xf8, 0x5a, 0xd9, 0x0a, 0xb4, 0x86, 0x47, 0xc6, 0x6c, 0x15, 0xab,
|
|
|
|
0x84, 0x6e, 0x46, 0xbc, 0xc0, 0x36, 0x48, 0x63, 0x46, 0x7c, 0x3d, 0x92, 0xb7, 0x57, 0xe4, 0x80,
|
|
|
|
0x78, 0xf6, 0x78, 0x21, 0x3e, 0xec, 0x7c, 0xc9, 0x41, 0xf6, 0x98, 0xe8, 0x26, 0xf1, 0xd0, 0x6b,
|
|
|
|
0x28, 0x1a, 0xd4, 0xf1, 0x75, 0xdb, 0x21, 0xde, 0xd0, 0x36, 0x15, 0xa9, 0x26, 0xd5, 0x65, 0xed,
|
|
|
|
0xa1, 0xba, 0x4c, 0x1c, 0x66, 0x53, 0xdf, 0xc4, 0x4c, 0xf7, 0x08, 0xcb, 0x89, 0xa1, 0x6b, 0x22,
|
|
|
|
0x0d, 0xf2, 0xf4, 0x2a, 0xf2, 0xa6, 0xb8, 0x77, 0xfb, 0xa6, 0xb7, 0x77, 0x25, 0x7c, 0x39, 0x0e,
|
|
|
|
0x76, 0x4d, 0xf4, 0x14, 0x36, 0x0c, 0x8f, 0xe8, 0xbe, 0x4d, 0x9d, 0x21, 0x71, 0xa9, 0x61, 0x29,
|
|
|
|
0xe9, 0x9a, 0x54, 0x5f, 0xc7, 0xa5, 0x58, 0x6d, 0x87, 0x22, 0x6a, 0x42, 0x2e, 0x20, 0x1e, 0xb3,
|
|
|
|
0xa9, 0xa3, 0xac, 0xf3, 0xc8, 0x95, 0x95, 0xc8, 0x51, 0x5d, 0xea, 0x7b, 0x41, 0xe0, 0x18, 0x0d,
|
|
|
|
0x83, 0xbb, 0xfa, 0x62, 0x4a, 0x75, 0x73, 0x38, 0x25, 0xce, 0xc4, 0xb7, 0x94, 0x8c, 0x08, 0x1e,
|
|
|
|
0xa9, 0x27, 0x5c, 0x44, 0x4f, 0xa0, 0x18, 0x63, 0x96, 0xce, 0x2c, 0x25, 0x5b, 0x93, 0xea, 0x45,
|
|
|
|
0x2c, 0x47, 0xda, 0xb1, 0xce, 0x2c, 0x74, 0x00, 0xb2, 0x68, 0xfa, 0x30, 0xec, 0xb5, 0x92, 0xab,
|
|
|
|
0x49, 0xf5, 0x0d, 0xed, 0x91, 0x7a, 0xf3, 0x48, 0xd4, 0x1e, 0x7f, 0x0c, 0x16, 0x2e, 0xc1, 0x40,
|
|
|
|
0x93, 0x77, 0xf4, 0x0c, 0xca, 0x16, 0x9d, 0xd1, 0x19, 0xf5, 0x5c, 0xcb, 0x36, 0x44, 0x96, 0x3c,
|
|
|
|
0xcf, 0xb2, 0xb9, 0xa2, 0xf3, 0x4c, 0x47, 0x50, 0x62, 0x84, 0x85, 0xdb, 0x1f, 0xfa, 0xf4, 0x92,
|
|
|
|
0x38, 0x4a, 0x81, 0xd7, 0xfb, 0xf8, 0x0f, 0xf5, 0xf6, 0x05, 0x37, 0x08, 0x31, 0x5c, 0x64, 0x2b,
|
|
|
|
0x2b, 0x74, 0x08, 0xa0, 0xfb, 0xbe, 0x67, 0x8f, 0xe6, 0x3e, 0x61, 0x0a, 0xd4, 0xd2, 0x75, 0x59,
|
|
|
|
0xdb, 0xb9, 0xbd, 0x5d, 0x71, 0xf0, 0x6a, 0x2b, 0x46, 0xf1, 0x8a, 0x0b, 0x35, 0x21, 0xc3, 0xdc,
|
|
|
|
0xa9, 0xed, 0x2b, 0x32, 0xdf, 0x41, 0xf5, 0x4e, 0x7b, 0x3f, 0xa4, 0xb0, 0x80, 0x2b, 0x7b, 0x50,
|
|
|
|
0x48, 0xc2, 0xa1, 0x32, 0xa4, 0x2f, 0xc9, 0x82, 0x0f, 0x52, 0x01, 0x87, 0xaf, 0xe8, 0x7f, 0xc8,
|
|
|
|
0x04, 0xfa, 0x74, 0x4e, 0xf8, 0x80, 0x14, 0xb0, 0x58, 0x54, 0x3e, 0xa7, 0x20, 0xc3, 0xa3, 0xa0,
|
|
|
|
0x17, 0x90, 0x75, 0x75, 0x8f, 0x38, 0x7e, 0x34, 0x7d, 0xca, 0xad, 0x09, 0xe2, 0xa9, 0xbb, 0x47,
|
|
|
|
0x38, 0xe2, 0x50, 0x13, 0xf2, 0xae, 0x47, 0x02, 0x9b, 0xce, 0x59, 0x34, 0x75, 0x77, 0x7b, 0x12,
|
|
|
|
0x12, 0x75, 0xa0, 0x2c, 0xfc, 0x43, 0x66, 0x4f, 0x1c, 0xdd, 0x9f, 0x7b, 0x84, 0x4f, 0x9e, 0xfc,
|
|
|
|
0xdb, 0xa9, 0x26, 0x9d, 0x8e, 0x19, 0xbc, 0x29, 0x5c, 0x89, 0x80, 0x0e, 0xa0, 0x14, 0x05, 0xb2,
|
|
|
|
0x78, 0x37, 0xa2, 0xf9, 0x54, 0xee, 0xea, 0x16, 0x2e, 0x0a, 0x3c, 0xba, 0x73, 0x4d, 0xc8, 0x1b,
|
|
|
|
0x96, 0x3d, 0x35, 0x3d, 0xe2, 0x28, 0x19, 0x7e, 0x4c, 0xf7, 0xec, 0x3e, 0x26, 0x77, 0xbe, 0x4a,
|
|
|
|
0x90, 0x15, 0x32, 0x7a, 0x09, 0x85, 0x68, 0x32, 0x93, 0x1b, 0x7b, 0x4f, 0x04, 0x81, 0x76, 0x4d,
|
|
|
|
0xf4, 0x0a, 0x0a, 0xcb, 0xc2, 0x53, 0xff, 0x50, 0xf8, 0x12, 0x0f, 0xcf, 0x28, 0xaa, 0x35, 0xfd,
|
|
|
|
0x97, 0x5a, 0x23, 0x0e, 0x29, 0x90, 0x8b, 0x6e, 0x13, 0x6f, 0x4f, 0x11, 0xc7, 0xcb, 0xe7, 0xfb,
|
|
|
|
0x00, 0xcb, 0x3b, 0x83, 0x64, 0xc8, 0xe1, 0x76, 0xe7, 0xfc, 0xa4, 0x85, 0xcb, 0x6b, 0xa8, 0x04,
|
|
|
|
0x85, 0x41, 0xef, 0xdd, 0x61, 0x7f, 0xd0, 0x3b, 0x6d, 0x97, 0x25, 0xf4, 0x1f, 0x94, 0xfa, 0x83,
|
|
|
|
0x1e, 0x6e, 0x75, 0xda, 0xc3, 0x0e, 0xee, 0x9d, 0x9f, 0x95, 0x53, 0x87, 0x17, 0xdf, 0xae, 0xab,
|
|
|
|
0xd2, 0xf7, 0xeb, 0xaa, 0xf4, 0xe3, 0xba, 0x2a, 0x7d, 0xfc, 0x59, 0x5d, 0xbb, 0xd0, 0x26, 0xb6,
|
|
|
|
0x6f, 0xcd, 0x47, 0xaa, 0x41, 0x67, 0x0d, 0x87, 0xb9, 0x86, 0xb1, 0x6b, 0x92, 0xa0, 0xe1, 0x10,
|
|
|
|
0x3a, 0x66, 0xbb, 0xba, 0x6b, 0xef, 0x4e, 0x68, 0x23, 0xf9, 0xbb, 0xee, 0x8b, 0xc7, 0xa7, 0xd4,
|
|
|
|
0xd6, 0x29, 0xa1, 0x6f, 0xfb, 0x6a, 0xeb, 0xac, 0x1b, 0x56, 0x20, 0xb6, 0x33, 0xca, 0xf2, 0xdf,
|
|
|
|
0xe3, 0xde, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x66, 0x06, 0xbc, 0x8e, 0x05, 0x00, 0x00,
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) 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 *Header) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header) 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.Split != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Split.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x5a
|
|
|
|
}
|
|
|
|
if len(m.Attributes) > 0 {
|
|
|
|
for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
{
|
|
|
|
size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x52
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if m.SessionToken != nil {
|
|
|
|
{
|
|
|
|
size, err := m.SessionToken.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x4a
|
|
|
|
}
|
|
|
|
if len(m.HomomorphicHash) > 0 {
|
|
|
|
i -= len(m.HomomorphicHash)
|
|
|
|
copy(dAtA[i:], m.HomomorphicHash)
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.HomomorphicHash)))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x42
|
|
|
|
}
|
|
|
|
if m.ObjectType != 0 {
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.ObjectType))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x38
|
|
|
|
}
|
|
|
|
if len(m.PayloadHash) > 0 {
|
|
|
|
i -= len(m.PayloadHash)
|
|
|
|
copy(dAtA[i:], m.PayloadHash)
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.PayloadHash)))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x32
|
|
|
|
}
|
|
|
|
if m.PayloadLength != 0 {
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.PayloadLength))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x28
|
|
|
|
}
|
|
|
|
if m.Version != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x22
|
|
|
|
}
|
|
|
|
if m.CreationEpoch != 0 {
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(m.CreationEpoch))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x18
|
|
|
|
}
|
|
|
|
if m.OwnerId != nil {
|
|
|
|
{
|
|
|
|
size, err := m.OwnerId.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
|
|
|
if m.ContainerId != nil {
|
|
|
|
{
|
|
|
|
size, err := m.ContainerId.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 (m *Header_Attribute) 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 *Header_Attribute) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Attribute) 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.Value) > 0 {
|
|
|
|
i -= len(m.Value)
|
|
|
|
copy(dAtA[i:], m.Value)
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Value)))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
|
|
|
if len(m.Key) > 0 {
|
|
|
|
i -= len(m.Key)
|
|
|
|
copy(dAtA[i:], m.Key)
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Split) 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 *Header_Split) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Split) 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.Children) > 0 {
|
|
|
|
for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
{
|
|
|
|
size, err := m.Children[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x2a
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if m.ParentHeader != nil {
|
|
|
|
{
|
|
|
|
size, err := m.ParentHeader.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x22
|
|
|
|
}
|
|
|
|
if m.ParentSignature != nil {
|
|
|
|
{
|
|
|
|
size, err := m.ParentSignature.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
}
|
|
|
|
if m.Previous != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Previous.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
|
|
|
if m.Parent != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Parent.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 (m *Object) 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 *Object) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Object) 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.Payload) > 0 {
|
|
|
|
i -= len(m.Payload)
|
|
|
|
copy(dAtA[i:], m.Payload)
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(len(m.Payload)))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x22
|
|
|
|
}
|
|
|
|
if m.Header != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
}
|
|
|
|
if m.Signature != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Signature.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintTypes(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
|
|
|
if m.ObjectId != nil {
|
|
|
|
{
|
|
|
|
size, err := m.ObjectId.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 *Header) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.ContainerId != nil {
|
|
|
|
l = m.ContainerId.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.OwnerId != nil {
|
|
|
|
l = m.OwnerId.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.CreationEpoch != 0 {
|
|
|
|
n += 1 + sovTypes(uint64(m.CreationEpoch))
|
|
|
|
}
|
|
|
|
if m.Version != nil {
|
|
|
|
l = m.Version.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.PayloadLength != 0 {
|
|
|
|
n += 1 + sovTypes(uint64(m.PayloadLength))
|
|
|
|
}
|
|
|
|
l = len(m.PayloadHash)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.ObjectType != 0 {
|
|
|
|
n += 1 + sovTypes(uint64(m.ObjectType))
|
|
|
|
}
|
|
|
|
l = len(m.HomomorphicHash)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.SessionToken != nil {
|
|
|
|
l = m.SessionToken.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if len(m.Attributes) > 0 {
|
|
|
|
for _, e := range m.Attributes {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if m.Split != nil {
|
|
|
|
l = m.Split.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Attribute) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Key)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
l = len(m.Value)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Header_Split) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Parent != nil {
|
|
|
|
l = m.Parent.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Previous != nil {
|
|
|
|
l = m.Previous.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.ParentSignature != nil {
|
|
|
|
l = m.ParentSignature.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.ParentHeader != nil {
|
|
|
|
l = m.ParentHeader.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if len(m.Children) > 0 {
|
|
|
|
for _, e := range m.Children {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if m.XXX_unrecognized != nil {
|
|
|
|
n += len(m.XXX_unrecognized)
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Object) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.ObjectId != nil {
|
|
|
|
l = m.ObjectId.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Signature != nil {
|
|
|
|
l = m.Signature.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
if m.Header != nil {
|
|
|
|
l = m.Header.Size()
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
l = len(m.Payload)
|
|
|
|
if l > 0 {
|
|
|
|
n += 1 + l + sovTypes(uint64(l))
|
|
|
|
}
|
|
|
|
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 *Header) 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: Header: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ContainerId", 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.ContainerId == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.ContainerId = &refs.ContainerID{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.ContainerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field OwnerId", 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.OwnerId == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.OwnerId = &refs.OwnerID{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.OwnerId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CreationEpoch", wireType)
|
|
|
|
}
|
|
|
|
m.CreationEpoch = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowTypes
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.CreationEpoch |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.Version = &service.Version{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 5:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PayloadLength", wireType)
|
|
|
|
}
|
|
|
|
m.PayloadLength = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowTypes
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.PayloadLength |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 6:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field PayloadHash", 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
|
|
|
|
}
|
|
|
|
m.PayloadHash = append(m.PayloadHash[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.PayloadHash == nil {
|
|
|
|
m.PayloadHash = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 7:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ObjectType", wireType)
|
|
|
|
}
|
|
|
|
m.ObjectType = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowTypes
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.ObjectType |= ObjectType(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 8:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field HomomorphicHash", 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
|
|
|
|
}
|
|
|
|
m.HomomorphicHash = append(m.HomomorphicHash[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.HomomorphicHash == nil {
|
|
|
|
m.HomomorphicHash = []byte{}
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 9:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SessionToken", 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.SessionToken == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.SessionToken = &service.SessionToken{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.SessionToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 10:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Attributes", 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.Attributes = append(m.Attributes, &Header_Attribute{})
|
|
|
|
if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 11:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Split", 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.Split == nil {
|
|
|
|
m.Split = &Header_Split{}
|
|
|
|
}
|
|
|
|
if err := m.Split.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 *Header_Attribute) 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: Attribute: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", 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.Value = string(dAtA[iNdEx:postIndex])
|
|
|
|
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 *Header_Split) 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: Split: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Split: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Parent", 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.Parent == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.Parent = &refs.ObjectID{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.Parent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Previous", 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.Previous == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.Previous = &refs.ObjectID{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.Previous.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ParentSignature", 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.ParentSignature == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.ParentSignature = &service.Signature{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.ParentSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ParentHeader", 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.ParentHeader == nil {
|
|
|
|
m.ParentHeader = &Header{}
|
|
|
|
}
|
|
|
|
if err := m.ParentHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 5:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Children", 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
|
|
|
|
}
|
2020-08-13 12:43:47 +00:00
|
|
|
m.Children = append(m.Children, &refs.ObjectID{})
|
2020-08-12 09:57:28 +00:00
|
|
|
if err := m.Children[len(m.Children)-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 {
|
|
|
|
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 *Object) 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: Object: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", 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.ObjectId == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.ObjectId = &refs.ObjectID{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.ObjectId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Signature", 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.Signature == nil {
|
2020-08-13 12:43:47 +00:00
|
|
|
m.Signature = &service.Signature{}
|
2020-08-12 09:57:28 +00:00
|
|
|
}
|
|
|
|
if err := m.Signature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Header", 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.Header == nil {
|
|
|
|
m.Header = &Header{}
|
|
|
|
}
|
|
|
|
if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Payload", 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
|
|
|
|
}
|
|
|
|
m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...)
|
|
|
|
if m.Payload == nil {
|
|
|
|
m.Payload = []byte{}
|
|
|
|
}
|
|
|
|
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 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")
|
|
|
|
)
|