mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 14:07:02 +09:00
Marshall fixes
This commit is contained in:
parent
6dac7dcda4
commit
ec87ee56de
4 changed files with 828 additions and 60 deletions
|
@ -51,6 +51,7 @@ func (c *nonVerifiableChangeBuilder) Unmarshall(rawChange *treechangeproto.RawTr
|
||||||
|
|
||||||
type ChangeBuilder interface {
|
type ChangeBuilder interface {
|
||||||
Unmarshall(rawIdChange *treechangeproto.RawTreeChangeWithId, verify bool) (ch *Change, err error)
|
Unmarshall(rawIdChange *treechangeproto.RawTreeChangeWithId, verify bool) (ch *Change, err error)
|
||||||
|
UnmarshallReduced(rawIdChange *treechangeproto.RawTreeChangeWithId) (ch *Change, err error)
|
||||||
Build(payload BuilderContent) (ch *Change, raw *treechangeproto.RawTreeChangeWithId, err error)
|
Build(payload BuilderContent) (ch *Change, raw *treechangeproto.RawTreeChangeWithId, err error)
|
||||||
BuildRoot(payload InitialContent) (ch *Change, raw *treechangeproto.RawTreeChangeWithId, err error)
|
BuildRoot(payload InitialContent) (ch *Change, raw *treechangeproto.RawTreeChangeWithId, err error)
|
||||||
BuildDerivedRoot(payload InitialDerivedContent) (ch *Change, raw *treechangeproto.RawTreeChangeWithId, err error)
|
BuildDerivedRoot(payload InitialDerivedContent) (ch *Change, raw *treechangeproto.RawTreeChangeWithId, err error)
|
||||||
|
@ -111,6 +112,26 @@ func (c *changeBuilder) Unmarshall(rawIdChange *treechangeproto.RawTreeChangeWit
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *changeBuilder) UnmarshallReduced(rawIdChange *treechangeproto.RawTreeChangeWithId) (ch *Change, err error) {
|
||||||
|
if rawIdChange.GetRawChange() == nil {
|
||||||
|
err = ErrEmptyChange
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
c.rawTreeCh.Signature = c.rawTreeCh.Signature[:0]
|
||||||
|
c.rawTreeCh.Payload = c.rawTreeCh.Payload[:0]
|
||||||
|
raw := c.rawTreeCh
|
||||||
|
err = proto.Unmarshal(rawIdChange.GetRawChange(), raw)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ch, err = c.unmarshallReducedRawChange(raw, rawIdChange.Id)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (c *changeBuilder) BuildRoot(payload InitialContent) (ch *Change, rawIdChange *treechangeproto.RawTreeChangeWithId, err error) {
|
func (c *changeBuilder) BuildRoot(payload InitialContent) (ch *Change, rawIdChange *treechangeproto.RawTreeChangeWithId, err error) {
|
||||||
identity, err := payload.PrivKey.GetPublic().Marshall()
|
identity, err := payload.PrivKey.GetPublic().Marshall()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -308,6 +329,36 @@ func (c *changeBuilder) unmarshallRawChange(raw *treechangeproto.RawTreeChange,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *changeBuilder) unmarshallReducedRawChange(raw *treechangeproto.RawTreeChange, id string) (ch *Change, err error) {
|
||||||
|
if c.isRoot(id) {
|
||||||
|
unmarshalled := &treechangeproto.RootChange{}
|
||||||
|
err = proto.Unmarshal(raw.Payload, unmarshalled)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// key will be empty for derived roots
|
||||||
|
var key crypto.PubKey
|
||||||
|
if !unmarshalled.IsDerived {
|
||||||
|
key, err = c.keys.PubKeyFromProto(unmarshalled.Identity)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ch = NewChangeFromRoot(id, key, unmarshalled, raw.Signature, unmarshalled.IsDerived)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
unmarshalled := &treechangeproto.ReducedTreeChange{}
|
||||||
|
err = proto.Unmarshal(raw.Payload, unmarshalled)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ch = &Change{
|
||||||
|
Id: id,
|
||||||
|
PreviousIds: unmarshalled.TreeHeadIds,
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (c *changeBuilder) isRoot(id string) bool {
|
func (c *changeBuilder) isRoot(id string) bool {
|
||||||
if c.rootChange != nil {
|
if c.rootChange != nil {
|
||||||
return c.rootChange.Id == id
|
return c.rootChange.Id == id
|
||||||
|
|
|
@ -276,7 +276,7 @@ func (r *rawChangeLoader) loadAppendEntry(id string) (entry rawCacheEntry, err e
|
||||||
size := len(rawChange.RawChange)
|
size := len(rawChange.RawChange)
|
||||||
r.buf = rawChange.RawChange
|
r.buf = rawChange.RawChange
|
||||||
|
|
||||||
change, err := r.changeBuilder.Unmarshall(rawChange, false)
|
change, err := r.changeBuilder.UnmarshallReduced(rawChange)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,31 @@ message TreeChange {
|
||||||
string dataType = 9;
|
string dataType = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TreeChange is a change of a tree
|
||||||
|
message NoDataTreeChange {
|
||||||
|
// TreeHeadIds are previous ids for this TreeChange
|
||||||
|
repeated string treeHeadIds = 1;
|
||||||
|
// AclHeadId is a cid of latest acl record at the time of this change
|
||||||
|
string aclHeadId = 2;
|
||||||
|
// SnapshotBaseId is a snapshot (root) of the tree where this change is added
|
||||||
|
string snapshotBaseId = 3;
|
||||||
|
// ReadKeyId is the id of the read key
|
||||||
|
string readKeyId = 5;
|
||||||
|
// Timestamp is this change creation timestamp
|
||||||
|
int64 timestamp = 6;
|
||||||
|
// Identity is a public key with which the raw payload of this change is signed
|
||||||
|
bytes identity = 7;
|
||||||
|
// IsSnapshot indicates whether this change contains a snapshot of state
|
||||||
|
bool isSnapshot = 8;
|
||||||
|
// DataType indicates some special parameters of data for the client
|
||||||
|
string dataType = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ReducedTreeChange {
|
||||||
|
// TreeHeadIds are previous ids for this TreeChange
|
||||||
|
repeated string treeHeadIds = 1;
|
||||||
|
}
|
||||||
|
|
||||||
// RawTreeChange is a marshalled TreeChange (or RootChange) payload and a signature of this payload
|
// RawTreeChange is a marshalled TreeChange (or RootChange) payload and a signature of this payload
|
||||||
message RawTreeChange {
|
message RawTreeChange {
|
||||||
// Payload is a byte payload containing TreeChange
|
// Payload is a byte payload containing TreeChange
|
||||||
|
|
|
@ -280,6 +280,160 @@ func (m *TreeChange) GetDataType() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TreeChange is a change of a tree
|
||||||
|
type NoDataTreeChange struct {
|
||||||
|
// TreeHeadIds are previous ids for this TreeChange
|
||||||
|
TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"`
|
||||||
|
// AclHeadId is a cid of latest acl record at the time of this change
|
||||||
|
AclHeadId string `protobuf:"bytes,2,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"`
|
||||||
|
// SnapshotBaseId is a snapshot (root) of the tree where this change is added
|
||||||
|
SnapshotBaseId string `protobuf:"bytes,3,opt,name=snapshotBaseId,proto3" json:"snapshotBaseId,omitempty"`
|
||||||
|
// ReadKeyId is the id of the read key
|
||||||
|
ReadKeyId string `protobuf:"bytes,5,opt,name=readKeyId,proto3" json:"readKeyId,omitempty"`
|
||||||
|
// Timestamp is this change creation timestamp
|
||||||
|
Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||||
|
// Identity is a public key with which the raw payload of this change is signed
|
||||||
|
Identity []byte `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"`
|
||||||
|
// IsSnapshot indicates whether this change contains a snapshot of state
|
||||||
|
IsSnapshot bool `protobuf:"varint,8,opt,name=isSnapshot,proto3" json:"isSnapshot,omitempty"`
|
||||||
|
// DataType indicates some special parameters of data for the client
|
||||||
|
DataType string `protobuf:"bytes,9,opt,name=dataType,proto3" json:"dataType,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) Reset() { *m = NoDataTreeChange{} }
|
||||||
|
func (m *NoDataTreeChange) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*NoDataTreeChange) ProtoMessage() {}
|
||||||
|
func (*NoDataTreeChange) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_5033f0301ef9b772, []int{2}
|
||||||
|
}
|
||||||
|
func (m *NoDataTreeChange) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *NoDataTreeChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_NoDataTreeChange.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 *NoDataTreeChange) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_NoDataTreeChange.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *NoDataTreeChange) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *NoDataTreeChange) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_NoDataTreeChange.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_NoDataTreeChange proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetTreeHeadIds() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.TreeHeadIds
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetAclHeadId() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.AclHeadId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetSnapshotBaseId() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.SnapshotBaseId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetReadKeyId() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ReadKeyId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetTimestamp() int64 {
|
||||||
|
if m != nil {
|
||||||
|
return m.Timestamp
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetIdentity() []byte {
|
||||||
|
if m != nil {
|
||||||
|
return m.Identity
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetIsSnapshot() bool {
|
||||||
|
if m != nil {
|
||||||
|
return m.IsSnapshot
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) GetDataType() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.DataType
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type ReducedTreeChange struct {
|
||||||
|
// TreeHeadIds are previous ids for this TreeChange
|
||||||
|
TreeHeadIds []string `protobuf:"bytes,1,rep,name=treeHeadIds,proto3" json:"treeHeadIds,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ReducedTreeChange) Reset() { *m = ReducedTreeChange{} }
|
||||||
|
func (m *ReducedTreeChange) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*ReducedTreeChange) ProtoMessage() {}
|
||||||
|
func (*ReducedTreeChange) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_5033f0301ef9b772, []int{3}
|
||||||
|
}
|
||||||
|
func (m *ReducedTreeChange) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *ReducedTreeChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_ReducedTreeChange.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 *ReducedTreeChange) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_ReducedTreeChange.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *ReducedTreeChange) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *ReducedTreeChange) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_ReducedTreeChange.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_ReducedTreeChange proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *ReducedTreeChange) GetTreeHeadIds() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.TreeHeadIds
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// RawTreeChange is a marshalled TreeChange (or RootChange) payload and a signature of this payload
|
// RawTreeChange is a marshalled TreeChange (or RootChange) payload and a signature of this payload
|
||||||
type RawTreeChange struct {
|
type RawTreeChange struct {
|
||||||
// Payload is a byte payload containing TreeChange
|
// Payload is a byte payload containing TreeChange
|
||||||
|
@ -292,7 +446,7 @@ func (m *RawTreeChange) Reset() { *m = RawTreeChange{} }
|
||||||
func (m *RawTreeChange) String() string { return proto.CompactTextString(m) }
|
func (m *RawTreeChange) String() string { return proto.CompactTextString(m) }
|
||||||
func (*RawTreeChange) ProtoMessage() {}
|
func (*RawTreeChange) ProtoMessage() {}
|
||||||
func (*RawTreeChange) Descriptor() ([]byte, []int) {
|
func (*RawTreeChange) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{2}
|
return fileDescriptor_5033f0301ef9b772, []int{4}
|
||||||
}
|
}
|
||||||
func (m *RawTreeChange) XXX_Unmarshal(b []byte) error {
|
func (m *RawTreeChange) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -347,7 +501,7 @@ func (m *RawTreeChangeWithId) Reset() { *m = RawTreeChangeWithId{} }
|
||||||
func (m *RawTreeChangeWithId) String() string { return proto.CompactTextString(m) }
|
func (m *RawTreeChangeWithId) String() string { return proto.CompactTextString(m) }
|
||||||
func (*RawTreeChangeWithId) ProtoMessage() {}
|
func (*RawTreeChangeWithId) ProtoMessage() {}
|
||||||
func (*RawTreeChangeWithId) Descriptor() ([]byte, []int) {
|
func (*RawTreeChangeWithId) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{3}
|
return fileDescriptor_5033f0301ef9b772, []int{5}
|
||||||
}
|
}
|
||||||
func (m *RawTreeChangeWithId) XXX_Unmarshal(b []byte) error {
|
func (m *RawTreeChangeWithId) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -399,7 +553,7 @@ func (m *TreeSyncMessage) Reset() { *m = TreeSyncMessage{} }
|
||||||
func (m *TreeSyncMessage) String() string { return proto.CompactTextString(m) }
|
func (m *TreeSyncMessage) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeSyncMessage) ProtoMessage() {}
|
func (*TreeSyncMessage) ProtoMessage() {}
|
||||||
func (*TreeSyncMessage) Descriptor() ([]byte, []int) {
|
func (*TreeSyncMessage) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{4}
|
return fileDescriptor_5033f0301ef9b772, []int{6}
|
||||||
}
|
}
|
||||||
func (m *TreeSyncMessage) XXX_Unmarshal(b []byte) error {
|
func (m *TreeSyncMessage) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -457,7 +611,7 @@ func (m *TreeSyncContentValue) Reset() { *m = TreeSyncContentValue{} }
|
||||||
func (m *TreeSyncContentValue) String() string { return proto.CompactTextString(m) }
|
func (m *TreeSyncContentValue) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeSyncContentValue) ProtoMessage() {}
|
func (*TreeSyncContentValue) ProtoMessage() {}
|
||||||
func (*TreeSyncContentValue) Descriptor() ([]byte, []int) {
|
func (*TreeSyncContentValue) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{5}
|
return fileDescriptor_5033f0301ef9b772, []int{7}
|
||||||
}
|
}
|
||||||
func (m *TreeSyncContentValue) XXX_Unmarshal(b []byte) error {
|
func (m *TreeSyncContentValue) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -566,7 +720,7 @@ func (m *TreeHeadUpdate) Reset() { *m = TreeHeadUpdate{} }
|
||||||
func (m *TreeHeadUpdate) String() string { return proto.CompactTextString(m) }
|
func (m *TreeHeadUpdate) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeHeadUpdate) ProtoMessage() {}
|
func (*TreeHeadUpdate) ProtoMessage() {}
|
||||||
func (*TreeHeadUpdate) Descriptor() ([]byte, []int) {
|
func (*TreeHeadUpdate) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{6}
|
return fileDescriptor_5033f0301ef9b772, []int{8}
|
||||||
}
|
}
|
||||||
func (m *TreeHeadUpdate) XXX_Unmarshal(b []byte) error {
|
func (m *TreeHeadUpdate) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -627,7 +781,7 @@ func (m *TreeFullSyncRequest) Reset() { *m = TreeFullSyncRequest{} }
|
||||||
func (m *TreeFullSyncRequest) String() string { return proto.CompactTextString(m) }
|
func (m *TreeFullSyncRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeFullSyncRequest) ProtoMessage() {}
|
func (*TreeFullSyncRequest) ProtoMessage() {}
|
||||||
func (*TreeFullSyncRequest) Descriptor() ([]byte, []int) {
|
func (*TreeFullSyncRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{7}
|
return fileDescriptor_5033f0301ef9b772, []int{9}
|
||||||
}
|
}
|
||||||
func (m *TreeFullSyncRequest) XXX_Unmarshal(b []byte) error {
|
func (m *TreeFullSyncRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -688,7 +842,7 @@ func (m *TreeFullSyncResponse) Reset() { *m = TreeFullSyncResponse{} }
|
||||||
func (m *TreeFullSyncResponse) String() string { return proto.CompactTextString(m) }
|
func (m *TreeFullSyncResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeFullSyncResponse) ProtoMessage() {}
|
func (*TreeFullSyncResponse) ProtoMessage() {}
|
||||||
func (*TreeFullSyncResponse) Descriptor() ([]byte, []int) {
|
func (*TreeFullSyncResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{8}
|
return fileDescriptor_5033f0301ef9b772, []int{10}
|
||||||
}
|
}
|
||||||
func (m *TreeFullSyncResponse) XXX_Unmarshal(b []byte) error {
|
func (m *TreeFullSyncResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -748,7 +902,7 @@ func (m *TreeErrorResponse) Reset() { *m = TreeErrorResponse{} }
|
||||||
func (m *TreeErrorResponse) String() string { return proto.CompactTextString(m) }
|
func (m *TreeErrorResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeErrorResponse) ProtoMessage() {}
|
func (*TreeErrorResponse) ProtoMessage() {}
|
||||||
func (*TreeErrorResponse) Descriptor() ([]byte, []int) {
|
func (*TreeErrorResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{9}
|
return fileDescriptor_5033f0301ef9b772, []int{11}
|
||||||
}
|
}
|
||||||
func (m *TreeErrorResponse) XXX_Unmarshal(b []byte) error {
|
func (m *TreeErrorResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -801,7 +955,7 @@ func (m *TreeChangeInfo) Reset() { *m = TreeChangeInfo{} }
|
||||||
func (m *TreeChangeInfo) String() string { return proto.CompactTextString(m) }
|
func (m *TreeChangeInfo) String() string { return proto.CompactTextString(m) }
|
||||||
func (*TreeChangeInfo) ProtoMessage() {}
|
func (*TreeChangeInfo) ProtoMessage() {}
|
||||||
func (*TreeChangeInfo) Descriptor() ([]byte, []int) {
|
func (*TreeChangeInfo) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_5033f0301ef9b772, []int{10}
|
return fileDescriptor_5033f0301ef9b772, []int{12}
|
||||||
}
|
}
|
||||||
func (m *TreeChangeInfo) XXX_Unmarshal(b []byte) error {
|
func (m *TreeChangeInfo) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
|
@ -848,6 +1002,8 @@ func init() {
|
||||||
proto.RegisterEnum("treechange.ErrorCodes", ErrorCodes_name, ErrorCodes_value)
|
proto.RegisterEnum("treechange.ErrorCodes", ErrorCodes_name, ErrorCodes_value)
|
||||||
proto.RegisterType((*RootChange)(nil), "treechange.RootChange")
|
proto.RegisterType((*RootChange)(nil), "treechange.RootChange")
|
||||||
proto.RegisterType((*TreeChange)(nil), "treechange.TreeChange")
|
proto.RegisterType((*TreeChange)(nil), "treechange.TreeChange")
|
||||||
|
proto.RegisterType((*NoDataTreeChange)(nil), "treechange.NoDataTreeChange")
|
||||||
|
proto.RegisterType((*ReducedTreeChange)(nil), "treechange.ReducedTreeChange")
|
||||||
proto.RegisterType((*RawTreeChange)(nil), "treechange.RawTreeChange")
|
proto.RegisterType((*RawTreeChange)(nil), "treechange.RawTreeChange")
|
||||||
proto.RegisterType((*RawTreeChangeWithId)(nil), "treechange.RawTreeChangeWithId")
|
proto.RegisterType((*RawTreeChangeWithId)(nil), "treechange.RawTreeChangeWithId")
|
||||||
proto.RegisterType((*TreeSyncMessage)(nil), "treechange.TreeSyncMessage")
|
proto.RegisterType((*TreeSyncMessage)(nil), "treechange.TreeSyncMessage")
|
||||||
|
@ -864,56 +1020,57 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_5033f0301ef9b772 = []byte{
|
var fileDescriptor_5033f0301ef9b772 = []byte{
|
||||||
// 769 bytes of a gzipped FileDescriptorProto
|
// 797 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xbd, 0x6e, 0xe3, 0x46,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbd, 0x8e, 0xdb, 0x46,
|
||||||
0x10, 0xe6, 0x52, 0xb2, 0x65, 0x8d, 0x64, 0x9d, 0xb2, 0xe7, 0x82, 0x38, 0x24, 0x0c, 0x41, 0x04,
|
0x10, 0xe6, 0x52, 0x77, 0xa7, 0xd3, 0x9c, 0x4e, 0x96, 0xd7, 0x57, 0x10, 0x46, 0xc2, 0x10, 0x44,
|
||||||
0x89, 0x90, 0xe2, 0x0c, 0x5c, 0xaa, 0x04, 0x01, 0x0e, 0xb1, 0xee, 0x47, 0xc2, 0x21, 0xc9, 0x61,
|
0x90, 0x08, 0x29, 0x7c,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, 0x85, 0x12, 0xf1, 0xff, 0x27, 0x00, 0x2c, 0x49, 0xe4, 0x58, 0x87,
|
0xa9, 0xb9, 0xca, 0x1a, 0x7c, 0xcb, 0x20, 0x14, 0x2a, 0x24, 0xfc, 0x97, 0x00, 0xb0, 0x34, 0x55,
|
||||||
0xf4, 0x63, 0xe8, 0xf2, 0x60, 0x31, 0x41, 0x1e, 0x4e, 0x43, 0x87, 0x78, 0x64, 0xd4, 0x65, 0x25,
|
0x63, 0x13, 0xd2, 0x8f, 0xa0, 0xc7, 0xa3, 0xc5, 0x04, 0xb9, 0x98, 0x0a, 0x8f, 0x04, 0x64, 0xd4,
|
||||||
0x40, 0x1d, 0xe8, 0xe8, 0xae, 0xd3, 0xd0, 0xb1, 0xf5, 0xbd, 0x22, 0xa4, 0x2e, 0x80, 0x21, 0x7c,
|
0x63, 0x15, 0x40, 0x3d, 0xe8, 0x9a, 0xae, 0x53, 0xe1, 0xb9, 0xe6, 0x59, 0x19, 0x52, 0x1f, 0xc0,
|
||||||
0xbb, 0x4e, 0xd1, 0x69, 0xe9, 0x9b, 0x15, 0x44, 0xf1, 0xca, 0x68, 0x89, 0x42, 0xf2, 0x65, 0xea,
|
0x12, 0x3e, 0x5d, 0x67, 0xe8, 0x75, 0xcc, 0xc3, 0x1a, 0xa2, 0x79, 0x55, 0xbc, 0x44, 0xa9, 0xf8,
|
||||||
0xb4, 0x3d, 0x32, 0x6a, 0xb1, 0x12, 0xa0, 0x14, 0xda, 0x02, 0x31, 0x74, 0xf6, 0x3c, 0x32, 0xea,
|
0x32, 0xf3, 0xf6, 0x02, 0x32, 0xea, 0xb0, 0x0a, 0xa0, 0x14, 0xf6, 0x24, 0xa2, 0xf0, 0xf6, 0x03,
|
||||||
0x33, 0x7d, 0x4d, 0x1f, 0xc1, 0x41, 0x14, 0x62, 0x2c, 0x23, 0xb9, 0x76, 0xf6, 0x35, 0xbe, 0x89,
|
0x32, 0xea, 0x33, 0x73, 0x4f, 0x6f, 0xc2, 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36, 0xd9, 0x64, 0x4c, 0x2c, 0x56, 0xc9,
|
0x5b, 0x89, 0xe9, 0x73, 0x74, 0xfb, 0x93, 0x7a, 0xf9, 0x0e, 0xc9, 0xac, 0x56, 0x12, 0xfe, 0xe9,
|
||||||
0xa7, 0xaf, 0xe0, 0xc1, 0x6c, 0xb5, 0x58, 0x28, 0x56, 0x86, 0xbf, 0xac, 0x50, 0xc8, 0x5d, 0xe2,
|
0xc2, 0xc9, 0xae, 0x16, 0xf4, 0x5b, 0x80, 0x39, 0x72, 0xf1, 0x2c, 0x13, 0x5c, 0x61, 0x21, 0xec,
|
||||||
0x14, 0xc5, 0x8b, 0x7a, 0xda, 0xc4, 0x62, 0xcd, 0x4a, 0xfa, 0x03, 0x0c, 0x4b, 0x48, 0xa4, 0x49,
|
0x66, 0x5b, 0xd8, 0x64, 0x93, 0x31, 0x71, 0x58, 0x2d, 0x9f, 0x3e, 0x84, 0x6b, 0xb3, 0xd5, 0x62,
|
||||||
0x2c, 0xcc, 0x9e, 0xee, 0x70, 0xea, 0x45, 0x23, 0x6f, 0x62, 0xb1, 0xad, 0x5a, 0xfa, 0x1c, 0x0e,
|
0xa1, 0x59, 0x19, 0xfe, 0xbc, 0x42, 0xa9, 0x76, 0x89, 0xd3, 0x14, 0xf7, 0x9b, 0x69, 0x13, 0x87,
|
||||||
0x31, 0xcb, 0x92, 0x6c, 0x43, 0xd6, 0xd6, 0x64, 0x9f, 0x34, 0xc9, 0x9e, 0x57, 0x93, 0x26, 0x16,
|
0xb5, 0x2b, 0xe9, 0x23, 0x18, 0x56, 0x90, 0xcc, 0xd2, 0x44, 0xda, 0xfd, 0x6e, 0x87, 0x53, 0xf7,
|
||||||
0xab, 0x57, 0x9d, 0x74, 0x60, 0xef, 0x42, 0x59, 0xe5, 0xff, 0x46, 0x60, 0x50, 0x77, 0x83, 0x1e,
|
0x5b, 0x79, 0x13, 0x87, 0x6d, 0xd5, 0xd2, 0x7b, 0x70, 0x8c, 0x79, 0x9e, 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xf6, 0xdd, 0x5f, 0x17,
|
||||||
0xeb, 0xbf, 0xaf, 0x3e, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x34, 0xb3, 0x76, 0xbd, 0x07, 0x00,
|
0x3e, 0x79, 0x77, 0xe1, 0x93, 0x7f, 0x2e, 0x7c, 0xf2, 0xf6, 0xd2, 0x77, 0xde, 0x5d, 0xfa, 0xce,
|
||||||
0x00,
|
0xdf, 0x97, 0xbe, 0xf3, 0xe2, 0xf3, 0xf7, 0xfc, 0x4f, 0xf3, 0xf2, 0xc0, 0xfc, 0x7c, 0xf9, 0x5f,
|
||||||
|
0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x59, 0x45, 0x6c, 0x05, 0x09, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *RootChange) Marshal() (dAtA []byte, err error) {
|
func (m *RootChange) Marshal() (dAtA []byte, err error) {
|
||||||
|
@ -1085,6 +1242,120 @@ func (m *TreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) 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 *NoDataTreeChange) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.DataType) > 0 {
|
||||||
|
i -= len(m.DataType)
|
||||||
|
copy(dAtA[i:], m.DataType)
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(len(m.DataType)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x4a
|
||||||
|
}
|
||||||
|
if m.IsSnapshot {
|
||||||
|
i--
|
||||||
|
if m.IsSnapshot {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x40
|
||||||
|
}
|
||||||
|
if len(m.Identity) > 0 {
|
||||||
|
i -= len(m.Identity)
|
||||||
|
copy(dAtA[i:], m.Identity)
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(len(m.Identity)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x3a
|
||||||
|
}
|
||||||
|
if m.Timestamp != 0 {
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(m.Timestamp))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x30
|
||||||
|
}
|
||||||
|
if len(m.ReadKeyId) > 0 {
|
||||||
|
i -= len(m.ReadKeyId)
|
||||||
|
copy(dAtA[i:], m.ReadKeyId)
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(len(m.ReadKeyId)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x2a
|
||||||
|
}
|
||||||
|
if len(m.SnapshotBaseId) > 0 {
|
||||||
|
i -= len(m.SnapshotBaseId)
|
||||||
|
copy(dAtA[i:], m.SnapshotBaseId)
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(len(m.SnapshotBaseId)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
if len(m.AclHeadId) > 0 {
|
||||||
|
i -= len(m.AclHeadId)
|
||||||
|
copy(dAtA[i:], m.AclHeadId)
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(len(m.AclHeadId)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if len(m.TreeHeadIds) > 0 {
|
||||||
|
for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
i -= len(m.TreeHeadIds[iNdEx])
|
||||||
|
copy(dAtA[i:], m.TreeHeadIds[iNdEx])
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx])))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ReducedTreeChange) 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 *ReducedTreeChange) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ReducedTreeChange) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.TreeHeadIds) > 0 {
|
||||||
|
for iNdEx := len(m.TreeHeadIds) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
i -= len(m.TreeHeadIds[iNdEx])
|
||||||
|
copy(dAtA[i:], m.TreeHeadIds[iNdEx])
|
||||||
|
i = encodeVarintTreechange(dAtA, i, uint64(len(m.TreeHeadIds[iNdEx])))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (m *RawTreeChange) Marshal() (dAtA []byte, err error) {
|
func (m *RawTreeChange) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
|
@ -1654,6 +1925,62 @@ func (m *TreeChange) Size() (n int) {
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *NoDataTreeChange) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.TreeHeadIds) > 0 {
|
||||||
|
for _, s := range m.TreeHeadIds {
|
||||||
|
l = len(s)
|
||||||
|
n += 1 + l + sovTreechange(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
l = len(m.AclHeadId)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTreechange(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.SnapshotBaseId)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTreechange(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.ReadKeyId)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTreechange(uint64(l))
|
||||||
|
}
|
||||||
|
if m.Timestamp != 0 {
|
||||||
|
n += 1 + sovTreechange(uint64(m.Timestamp))
|
||||||
|
}
|
||||||
|
l = len(m.Identity)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTreechange(uint64(l))
|
||||||
|
}
|
||||||
|
if m.IsSnapshot {
|
||||||
|
n += 2
|
||||||
|
}
|
||||||
|
l = len(m.DataType)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTreechange(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ReducedTreeChange) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.TreeHeadIds) > 0 {
|
||||||
|
for _, s := range m.TreeHeadIds {
|
||||||
|
l = len(s)
|
||||||
|
n += 1 + l + sovTreechange(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func (m *RawTreeChange) Size() (n int) {
|
func (m *RawTreeChange) Size() (n int) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
return 0
|
return 0
|
||||||
|
@ -2489,6 +2816,371 @@ func (m *TreeChange) Unmarshal(dAtA []byte) error {
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *NoDataTreeChange) 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 ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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: NoDataTreeChange: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: NoDataTreeChange: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex]))
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.AclHeadId = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotBaseId", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.SnapshotBaseId = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 5:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyId", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.ReadKeyId = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 6:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
|
||||||
|
}
|
||||||
|
m.Timestamp = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.Timestamp |= int64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 7:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType)
|
||||||
|
}
|
||||||
|
var byteLen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
byteLen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if byteLen < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + byteLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...)
|
||||||
|
if m.Identity == nil {
|
||||||
|
m.Identity = []byte{}
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 8:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field IsSnapshot", wireType)
|
||||||
|
}
|
||||||
|
var v int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
v |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.IsSnapshot = bool(v != 0)
|
||||||
|
case 9:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field DataType", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.DataType = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTreechange(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *ReducedTreeChange) 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 ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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: ReducedTreeChange: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: ReducedTreeChange: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field TreeHeadIds", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowTreechange
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.TreeHeadIds = append(m.TreeHeadIds, string(dAtA[iNdEx:postIndex]))
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipTreechange(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthTreechange
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (m *RawTreeChange) Unmarshal(dAtA []byte) error {
|
func (m *RawTreeChange) Unmarshal(dAtA []byte) error {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue