// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: syncproto/proto/sync.proto package syncproto import ( fmt "fmt" aclpb "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/aclchanges/aclpb" treepb "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/treestorage/treepb" proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MessageType int32 const ( MessageType_MessageTypeSystem MessageType = 0 MessageType_MessageTypeSpace MessageType = 1 MessageType_MessageTypeSync MessageType = 2 ) var MessageType_name = map[int32]string{ 0: "MessageTypeSystem", 1: "MessageTypeSpace", 2: "MessageTypeSync", } var MessageType_value = map[string]int32{ "MessageTypeSystem": 0, "MessageTypeSpace": 1, "MessageTypeSync": 2, } func (x MessageType) String() string { return proto.EnumName(MessageType_name, int32(x)) } func (MessageType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{0} } type SystemErrorCode int32 const ( SystemError_UNKNOWN SystemErrorCode = 0 SystemError_UNSUPPORTED_PROTOCOL_VERSION SystemErrorCode = 10 ) var SystemErrorCode_name = map[int32]string{ 0: "UNKNOWN", 10: "UNSUPPORTED_PROTOCOL_VERSION", } var SystemErrorCode_value = map[string]int32{ "UNKNOWN": 0, "UNSUPPORTED_PROTOCOL_VERSION": 10, } func (x SystemErrorCode) String() string { return proto.EnumName(SystemErrorCode_name, int32(x)) } func (SystemErrorCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 3, 0} } type Message struct { Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } func (m *Message) Reset() { *m = Message{} } func (m *Message) String() string { return proto.CompactTextString(m) } func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{0} } func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Message.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 *Message) XXX_Merge(src proto.Message) { xxx_messageInfo_Message.Merge(m, src) } func (m *Message) XXX_Size() int { return m.Size() } func (m *Message) XXX_DiscardUnknown() { xxx_messageInfo_Message.DiscardUnknown(m) } var xxx_messageInfo_Message proto.InternalMessageInfo func (m *Message) GetHeader() *Header { if m != nil { return m.Header } return nil } func (m *Message) GetData() []byte { if m != nil { return m.Data } return nil } type Header struct { TraceId []byte `protobuf:"bytes,1,opt,name=traceId,proto3" json:"traceId,omitempty"` RequestId uint64 `protobuf:"varint,2,opt,name=requestId,proto3" json:"requestId,omitempty"` ReplyId uint64 `protobuf:"varint,3,opt,name=replyId,proto3" json:"replyId,omitempty"` Type MessageType `protobuf:"varint,4,opt,name=type,proto3,enum=anytype.MessageType" json:"type,omitempty"` DebugInfo string `protobuf:"bytes,5,opt,name=debugInfo,proto3" json:"debugInfo,omitempty"` } func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{1} } 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 func (m *Header) GetTraceId() []byte { if m != nil { return m.TraceId } return nil } func (m *Header) GetRequestId() uint64 { if m != nil { return m.RequestId } return 0 } func (m *Header) GetReplyId() uint64 { if m != nil { return m.ReplyId } return 0 } func (m *Header) GetType() MessageType { if m != nil { return m.Type } return MessageType_MessageTypeSystem } func (m *Header) GetDebugInfo() string { if m != nil { return m.DebugInfo } return "" } type System struct { Handshake *SystemHandshake `protobuf:"bytes,1,opt,name=handshake,proto3" json:"handshake,omitempty"` Ping *SystemPing `protobuf:"bytes,2,opt,name=ping,proto3" json:"ping,omitempty"` Ack *SystemAck `protobuf:"bytes,3,opt,name=ack,proto3" json:"ack,omitempty"` } func (m *System) Reset() { *m = System{} } func (m *System) String() string { return proto.CompactTextString(m) } func (*System) ProtoMessage() {} func (*System) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2} } func (m *System) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *System) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_System.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 *System) XXX_Merge(src proto.Message) { xxx_messageInfo_System.Merge(m, src) } func (m *System) XXX_Size() int { return m.Size() } func (m *System) XXX_DiscardUnknown() { xxx_messageInfo_System.DiscardUnknown(m) } var xxx_messageInfo_System proto.InternalMessageInfo func (m *System) GetHandshake() *SystemHandshake { if m != nil { return m.Handshake } return nil } func (m *System) GetPing() *SystemPing { if m != nil { return m.Ping } return nil } func (m *System) GetAck() *SystemAck { if m != nil { return m.Ack } return nil } type SystemHandshake struct { ProtocolVersion string `protobuf:"bytes,1,opt,name=protocolVersion,proto3" json:"protocolVersion,omitempty"` } func (m *SystemHandshake) Reset() { *m = SystemHandshake{} } func (m *SystemHandshake) String() string { return proto.CompactTextString(m) } func (*SystemHandshake) ProtoMessage() {} func (*SystemHandshake) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 0} } func (m *SystemHandshake) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SystemHandshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SystemHandshake.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 *SystemHandshake) XXX_Merge(src proto.Message) { xxx_messageInfo_SystemHandshake.Merge(m, src) } func (m *SystemHandshake) XXX_Size() int { return m.Size() } func (m *SystemHandshake) XXX_DiscardUnknown() { xxx_messageInfo_SystemHandshake.DiscardUnknown(m) } var xxx_messageInfo_SystemHandshake proto.InternalMessageInfo func (m *SystemHandshake) GetProtocolVersion() string { if m != nil { return m.ProtocolVersion } return "" } type SystemPing struct { UnixTime uint64 `protobuf:"varint,1,opt,name=unixTime,proto3" json:"unixTime,omitempty"` } func (m *SystemPing) Reset() { *m = SystemPing{} } func (m *SystemPing) String() string { return proto.CompactTextString(m) } func (*SystemPing) ProtoMessage() {} func (*SystemPing) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 1} } func (m *SystemPing) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SystemPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SystemPing.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 *SystemPing) XXX_Merge(src proto.Message) { xxx_messageInfo_SystemPing.Merge(m, src) } func (m *SystemPing) XXX_Size() int { return m.Size() } func (m *SystemPing) XXX_DiscardUnknown() { xxx_messageInfo_SystemPing.DiscardUnknown(m) } var xxx_messageInfo_SystemPing proto.InternalMessageInfo func (m *SystemPing) GetUnixTime() uint64 { if m != nil { return m.UnixTime } return 0 } type SystemAck struct { Error *SystemError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } func (m *SystemAck) Reset() { *m = SystemAck{} } func (m *SystemAck) String() string { return proto.CompactTextString(m) } func (*SystemAck) ProtoMessage() {} func (*SystemAck) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 2} } func (m *SystemAck) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SystemAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SystemAck.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 *SystemAck) XXX_Merge(src proto.Message) { xxx_messageInfo_SystemAck.Merge(m, src) } func (m *SystemAck) XXX_Size() int { return m.Size() } func (m *SystemAck) XXX_DiscardUnknown() { xxx_messageInfo_SystemAck.DiscardUnknown(m) } var xxx_messageInfo_SystemAck proto.InternalMessageInfo func (m *SystemAck) GetError() *SystemError { if m != nil { return m.Error } return nil } type SystemError struct { Code SystemErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=anytype.SystemErrorCode" json:"code,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` } func (m *SystemError) Reset() { *m = SystemError{} } func (m *SystemError) String() string { return proto.CompactTextString(m) } func (*SystemError) ProtoMessage() {} func (*SystemError) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{2, 3} } func (m *SystemError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SystemError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SystemError.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 *SystemError) XXX_Merge(src proto.Message) { xxx_messageInfo_SystemError.Merge(m, src) } func (m *SystemError) XXX_Size() int { return m.Size() } func (m *SystemError) XXX_DiscardUnknown() { xxx_messageInfo_SystemError.DiscardUnknown(m) } var xxx_messageInfo_SystemError proto.InternalMessageInfo func (m *SystemError) GetCode() SystemErrorCode { if m != nil { return m.Code } return SystemError_UNKNOWN } func (m *SystemError) GetDescription() string { if m != nil { return m.Description } return "" } type Sync struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` Message *SyncContentValue `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } func (m *Sync) Reset() { *m = Sync{} } func (m *Sync) String() string { return proto.CompactTextString(m) } func (*Sync) ProtoMessage() {} func (*Sync) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3} } func (m *Sync) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Sync) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Sync.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 *Sync) XXX_Merge(src proto.Message) { xxx_messageInfo_Sync.Merge(m, src) } func (m *Sync) XXX_Size() int { return m.Size() } func (m *Sync) XXX_DiscardUnknown() { xxx_messageInfo_Sync.DiscardUnknown(m) } var xxx_messageInfo_Sync proto.InternalMessageInfo func (m *Sync) GetSpaceId() string { if m != nil { return m.SpaceId } return "" } func (m *Sync) GetMessage() *SyncContentValue { if m != nil { return m.Message } return nil } type SyncContentValue struct { // Types that are valid to be assigned to Value: // *SyncContentValueValueOfHeadUpdate // *SyncContentValueValueOfFullSyncRequest // *SyncContentValueValueOfFullSyncResponse Value IsSyncContentValueValue `protobuf_oneof:"value"` } func (m *SyncContentValue) Reset() { *m = SyncContentValue{} } func (m *SyncContentValue) String() string { return proto.CompactTextString(m) } func (*SyncContentValue) ProtoMessage() {} func (*SyncContentValue) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 0} } func (m *SyncContentValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SyncContentValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SyncContentValue.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 *SyncContentValue) XXX_Merge(src proto.Message) { xxx_messageInfo_SyncContentValue.Merge(m, src) } func (m *SyncContentValue) XXX_Size() int { return m.Size() } func (m *SyncContentValue) XXX_DiscardUnknown() { xxx_messageInfo_SyncContentValue.DiscardUnknown(m) } var xxx_messageInfo_SyncContentValue proto.InternalMessageInfo type IsSyncContentValueValue interface { IsSyncContentValueValue() MarshalTo([]byte) (int, error) Size() int } type SyncContentValueValueOfHeadUpdate struct { HeadUpdate *SyncHeadUpdate `protobuf:"bytes,1,opt,name=headUpdate,proto3,oneof" json:"headUpdate,omitempty"` } type SyncContentValueValueOfFullSyncRequest struct { FullSyncRequest *SyncFullRequest `protobuf:"bytes,2,opt,name=fullSyncRequest,proto3,oneof" json:"fullSyncRequest,omitempty"` } type SyncContentValueValueOfFullSyncResponse struct { FullSyncResponse *SyncFullResponse `protobuf:"bytes,3,opt,name=fullSyncResponse,proto3,oneof" json:"fullSyncResponse,omitempty"` } func (*SyncContentValueValueOfHeadUpdate) IsSyncContentValueValue() {} func (*SyncContentValueValueOfFullSyncRequest) IsSyncContentValueValue() {} func (*SyncContentValueValueOfFullSyncResponse) IsSyncContentValueValue() {} func (m *SyncContentValue) GetValue() IsSyncContentValueValue { if m != nil { return m.Value } return nil } func (m *SyncContentValue) GetHeadUpdate() *SyncHeadUpdate { if x, ok := m.GetValue().(*SyncContentValueValueOfHeadUpdate); ok { return x.HeadUpdate } return nil } func (m *SyncContentValue) GetFullSyncRequest() *SyncFullRequest { if x, ok := m.GetValue().(*SyncContentValueValueOfFullSyncRequest); ok { return x.FullSyncRequest } return nil } func (m *SyncContentValue) GetFullSyncResponse() *SyncFullResponse { if x, ok := m.GetValue().(*SyncContentValueValueOfFullSyncResponse); ok { return x.FullSyncResponse } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*SyncContentValue) XXX_OneofWrappers() []interface{} { return []interface{}{ (*SyncContentValueValueOfHeadUpdate)(nil), (*SyncContentValueValueOfFullSyncRequest)(nil), (*SyncContentValueValueOfFullSyncResponse)(nil), } } type SyncHeadUpdate struct { Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"` SnapshotPath []string `protobuf:"bytes,4,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"` } func (m *SyncHeadUpdate) Reset() { *m = SyncHeadUpdate{} } func (m *SyncHeadUpdate) String() string { return proto.CompactTextString(m) } func (*SyncHeadUpdate) ProtoMessage() {} func (*SyncHeadUpdate) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 1} } func (m *SyncHeadUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SyncHeadUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SyncHeadUpdate.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 *SyncHeadUpdate) XXX_Merge(src proto.Message) { xxx_messageInfo_SyncHeadUpdate.Merge(m, src) } func (m *SyncHeadUpdate) XXX_Size() int { return m.Size() } func (m *SyncHeadUpdate) XXX_DiscardUnknown() { xxx_messageInfo_SyncHeadUpdate.DiscardUnknown(m) } var xxx_messageInfo_SyncHeadUpdate proto.InternalMessageInfo func (m *SyncHeadUpdate) GetHeads() []string { if m != nil { return m.Heads } return nil } func (m *SyncHeadUpdate) GetChanges() []*aclpb.RawChange { if m != nil { return m.Changes } return nil } func (m *SyncHeadUpdate) GetTreeId() string { if m != nil { return m.TreeId } return "" } func (m *SyncHeadUpdate) GetSnapshotPath() []string { if m != nil { return m.SnapshotPath } return nil } func (m *SyncHeadUpdate) GetTreeHeader() *treepb.TreeHeader { if m != nil { return m.TreeHeader } return nil } type SyncFull struct { } func (m *SyncFull) Reset() { *m = SyncFull{} } func (m *SyncFull) String() string { return proto.CompactTextString(m) } func (*SyncFull) ProtoMessage() {} func (*SyncFull) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 2} } func (m *SyncFull) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SyncFull) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SyncFull.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 *SyncFull) XXX_Merge(src proto.Message) { xxx_messageInfo_SyncFull.Merge(m, src) } func (m *SyncFull) XXX_Size() int { return m.Size() } func (m *SyncFull) XXX_DiscardUnknown() { xxx_messageInfo_SyncFull.DiscardUnknown(m) } var xxx_messageInfo_SyncFull proto.InternalMessageInfo // here with send the request with all changes we have (we already know sender's snapshot path) type SyncFullRequest struct { Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"` SnapshotPath []string `protobuf:"bytes,4,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"` } func (m *SyncFullRequest) Reset() { *m = SyncFullRequest{} } func (m *SyncFullRequest) String() string { return proto.CompactTextString(m) } func (*SyncFullRequest) ProtoMessage() {} func (*SyncFullRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 2, 0} } func (m *SyncFullRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SyncFullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SyncFullRequest.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 *SyncFullRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_SyncFullRequest.Merge(m, src) } func (m *SyncFullRequest) XXX_Size() int { return m.Size() } func (m *SyncFullRequest) XXX_DiscardUnknown() { xxx_messageInfo_SyncFullRequest.DiscardUnknown(m) } var xxx_messageInfo_SyncFullRequest proto.InternalMessageInfo func (m *SyncFullRequest) GetHeads() []string { if m != nil { return m.Heads } return nil } func (m *SyncFullRequest) GetChanges() []*aclpb.RawChange { if m != nil { return m.Changes } return nil } func (m *SyncFullRequest) GetTreeId() string { if m != nil { return m.TreeId } return "" } func (m *SyncFullRequest) GetSnapshotPath() []string { if m != nil { return m.SnapshotPath } return nil } func (m *SyncFullRequest) GetTreeHeader() *treepb.TreeHeader { if m != nil { return m.TreeHeader } return nil } type SyncFullResponse struct { Heads []string `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` Changes []*aclpb.RawChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` TreeId string `protobuf:"bytes,3,opt,name=treeId,proto3" json:"treeId,omitempty"` SnapshotPath []string `protobuf:"bytes,4,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` TreeHeader *treepb.TreeHeader `protobuf:"bytes,5,opt,name=treeHeader,proto3" json:"treeHeader,omitempty"` } func (m *SyncFullResponse) Reset() { *m = SyncFullResponse{} } func (m *SyncFullResponse) String() string { return proto.CompactTextString(m) } func (*SyncFullResponse) ProtoMessage() {} func (*SyncFullResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4b28dfdd48a89166, []int{3, 2, 1} } func (m *SyncFullResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *SyncFullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_SyncFullResponse.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 *SyncFullResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_SyncFullResponse.Merge(m, src) } func (m *SyncFullResponse) XXX_Size() int { return m.Size() } func (m *SyncFullResponse) XXX_DiscardUnknown() { xxx_messageInfo_SyncFullResponse.DiscardUnknown(m) } var xxx_messageInfo_SyncFullResponse proto.InternalMessageInfo func (m *SyncFullResponse) GetHeads() []string { if m != nil { return m.Heads } return nil } func (m *SyncFullResponse) GetChanges() []*aclpb.RawChange { if m != nil { return m.Changes } return nil } func (m *SyncFullResponse) GetTreeId() string { if m != nil { return m.TreeId } return "" } func (m *SyncFullResponse) GetSnapshotPath() []string { if m != nil { return m.SnapshotPath } return nil } func (m *SyncFullResponse) GetTreeHeader() *treepb.TreeHeader { if m != nil { return m.TreeHeader } return nil } func init() { proto.RegisterEnum("anytype.MessageType", MessageType_name, MessageType_value) proto.RegisterEnum("anytype.SystemErrorCode", SystemErrorCode_name, SystemErrorCode_value) proto.RegisterType((*Message)(nil), "anytype.Message") proto.RegisterType((*Header)(nil), "anytype.Header") proto.RegisterType((*System)(nil), "anytype.System") proto.RegisterType((*SystemHandshake)(nil), "anytype.System.Handshake") proto.RegisterType((*SystemPing)(nil), "anytype.System.Ping") proto.RegisterType((*SystemAck)(nil), "anytype.System.Ack") proto.RegisterType((*SystemError)(nil), "anytype.System.Error") proto.RegisterType((*Sync)(nil), "anytype.Sync") proto.RegisterType((*SyncContentValue)(nil), "anytype.Sync.ContentValue") proto.RegisterType((*SyncHeadUpdate)(nil), "anytype.Sync.HeadUpdate") proto.RegisterType((*SyncFull)(nil), "anytype.Sync.Full") proto.RegisterType((*SyncFullRequest)(nil), "anytype.Sync.Full.Request") proto.RegisterType((*SyncFullResponse)(nil), "anytype.Sync.Full.Response") } func init() { proto.RegisterFile("syncproto/proto/sync.proto", fileDescriptor_4b28dfdd48a89166) } var fileDescriptor_4b28dfdd48a89166 = []byte{ // 799 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xd1, 0x6e, 0xe3, 0x44, 0x14, 0xf5, 0x24, 0x4e, 0xbc, 0xbe, 0xae, 0x5a, 0x33, 0xdb, 0x45, 0xc6, 0xac, 0x22, 0x2b, 0x02, 0x61, 0x01, 0x72, 0x57, 0x81, 0x15, 0x12, 0x6f, 0xbb, 0xa1, 0x55, 0x22, 0x20, 0x89, 0x26, 0x49, 0x91, 0x78, 0x59, 0x4d, 0xed, 0xd9, 0x24, 0x8a, 0x3b, 0x36, 0x1e, 0x07, 0xc8, 0x5f, 0xec, 0x37, 0xf0, 0x0d, 0x48, 0x20, 0xbe, 0x80, 0xc7, 0x7d, 0xe4, 0x11, 0xb5, 0x12, 0x1f, 0x01, 0x2f, 0x68, 0xc6, 0x76, 0xe2, 0x66, 0xfb, 0x03, 0xfb, 0xd0, 0x66, 0xee, 0xb9, 0xe7, 0x5c, 0x9f, 0x1b, 0xdf, 0xb9, 0x01, 0x57, 0x6c, 0x79, 0x98, 0x66, 0x49, 0x9e, 0x9c, 0x15, 0xff, 0x65, 0x1c, 0xa8, 0x23, 0x36, 0x28, 0xdf, 0xe6, 0xdb, 0x94, 0xb9, 0x4f, 0xd2, 0xf5, 0xe2, 0x8c, 0x86, 0xb1, 0xfc, 0x0b, 0x97, 0x94, 0x2f, 0x98, 0x90, 0xc7, 0xf4, 0xaa, 0xd0, 0x88, 0x1a, 0x5e, 0x48, 0xdd, 0x4f, 0x2b, 0x45, 0x9e, 0x31, 0x26, 0xf2, 0x24, 0xa3, 0x0b, 0xa6, 0xce, 0x7b, 0x8d, 0x8c, 0x0a, 0x76, 0xf7, 0x02, 0x8c, 0x6f, 0x99, 0x10, 0x74, 0xc1, 0xf0, 0x47, 0xd0, 0x5e, 0x32, 0x1a, 0xb1, 0xcc, 0x41, 0x1e, 0xf2, 0xad, 0xde, 0x49, 0x50, 0x9a, 0x08, 0x06, 0x0a, 0x26, 0x65, 0x1a, 0x63, 0xd0, 0x23, 0x9a, 0x53, 0xa7, 0xe1, 0x21, 0xff, 0x88, 0xa8, 0x73, 0xf7, 0x17, 0x04, 0xed, 0x82, 0x86, 0x1d, 0x30, 0xf2, 0x8c, 0x86, 0x6c, 0x18, 0xa9, 0x42, 0x47, 0xa4, 0x0a, 0xf1, 0x63, 0x30, 0x33, 0xf6, 0xc3, 0x86, 0x89, 0x7c, 0x18, 0x29, 0xb5, 0x4e, 0xf6, 0x80, 0xd4, 0x65, 0x2c, 0x8d, 0xb7, 0xc3, 0xc8, 0x69, 0xaa, 0x5c, 0x15, 0x62, 0x1f, 0x74, 0xe9, 0xc3, 0xd1, 0x3d, 0xe4, 0x1f, 0xf7, 0x4e, 0x77, 0xbe, 0x4a, 0xe7, 0xb3, 0x6d, 0xca, 0x88, 0x62, 0xc8, 0x27, 0x44, 0xec, 0x6a, 0xb3, 0x18, 0xf2, 0x97, 0x89, 0xd3, 0xf2, 0x90, 0x6f, 0x92, 0x3d, 0xd0, 0xfd, 0xb5, 0x09, 0xed, 0xe9, 0x56, 0xe4, 0xec, 0x1a, 0x7f, 0x01, 0xe6, 0x92, 0xf2, 0x48, 0x2c, 0xe9, 0x9a, 0x95, 0xfd, 0xbe, 0xb7, 0xab, 0x5b, 0x70, 0x82, 0x41, 0x45, 0x20, 0x7b, 0xae, 0xf4, 0x92, 0xae, 0xf8, 0x42, 0xd9, 0xb7, 0x6a, 0x5e, 0x4a, 0xcd, 0x64, 0xc5, 0x17, 0x44, 0x31, 0xf0, 0x87, 0xd0, 0xa4, 0xe1, 0x5a, 0xf5, 0x62, 0xf5, 0x1e, 0x1e, 0x12, 0x9f, 0x85, 0x6b, 0x22, 0xf3, 0xee, 0x53, 0x30, 0x07, 0xb5, 0xea, 0x27, 0xea, 0xbd, 0x84, 0x49, 0x7c, 0xc9, 0x32, 0xb1, 0x4a, 0xb8, 0x32, 0x67, 0x92, 0x43, 0xd8, 0xed, 0x82, 0x2e, 0x9f, 0x85, 0x5d, 0x78, 0xb0, 0xe1, 0xab, 0x9f, 0x67, 0xab, 0xeb, 0xa2, 0x0f, 0x9d, 0xec, 0x62, 0xb7, 0x07, 0xcd, 0x67, 0xe1, 0x1a, 0x7f, 0x02, 0x2d, 0x96, 0x65, 0x49, 0x56, 0x7a, 0x7e, 0x74, 0x68, 0xe5, 0x5c, 0x26, 0x49, 0xc1, 0x71, 0x5f, 0x21, 0x68, 0x29, 0x00, 0x07, 0xa0, 0x87, 0x49, 0x54, 0x54, 0x3d, 0xee, 0xb9, 0xf7, 0xaa, 0x82, 0x7e, 0x12, 0x31, 0xa2, 0x78, 0xd8, 0x03, 0x2b, 0x62, 0x22, 0xcc, 0x56, 0x69, 0x2e, 0x7d, 0x37, 0x94, 0xef, 0x3a, 0xd4, 0x7d, 0x0a, 0xba, 0xe4, 0x63, 0x0b, 0x8c, 0xf9, 0xe8, 0xeb, 0xd1, 0xf8, 0xbb, 0x91, 0xad, 0x61, 0x0f, 0x1e, 0xcf, 0x47, 0xd3, 0xf9, 0x64, 0x32, 0x26, 0xb3, 0xf3, 0xaf, 0x5e, 0x4c, 0xc8, 0x78, 0x36, 0xee, 0x8f, 0xbf, 0x79, 0x71, 0x79, 0x4e, 0xa6, 0xc3, 0xf1, 0xc8, 0x86, 0xee, 0xbf, 0x6d, 0xd0, 0xa7, 0x5b, 0x1e, 0xca, 0x09, 0x11, 0xe9, 0x7e, 0xb2, 0x4c, 0x52, 0x85, 0xf8, 0x73, 0x30, 0xae, 0x8b, 0x61, 0x28, 0x9b, 0xac, 0xdb, 0xe5, 0x61, 0xd0, 0x4f, 0x78, 0xce, 0x78, 0x7e, 0x49, 0xe3, 0x0d, 0x23, 0x15, 0xd5, 0xfd, 0x07, 0xc1, 0x51, 0x3d, 0x83, 0xbf, 0x04, 0x90, 0x33, 0x3e, 0x4f, 0x23, 0x9a, 0x57, 0x63, 0xe1, 0xdc, 0xad, 0x34, 0xd8, 0xe5, 0x07, 0x1a, 0xa9, 0xb1, 0xf1, 0x05, 0x9c, 0xbc, 0xdc, 0xc4, 0xb1, 0x24, 0x91, 0x62, 0xa6, 0xef, 0xb7, 0x72, 0xb1, 0x89, 0xe3, 0xa0, 0x64, 0x0c, 0x34, 0x72, 0x28, 0xc2, 0x43, 0xb0, 0xf7, 0x90, 0x48, 0x13, 0x2e, 0x58, 0x39, 0x43, 0xef, 0xdf, 0x5b, 0xa8, 0xa0, 0x0c, 0x34, 0xf2, 0x86, 0xec, 0xb9, 0x01, 0xad, 0x1f, 0x65, 0x5f, 0xee, 0x1f, 0x08, 0x60, 0x6f, 0x1c, 0x9f, 0x42, 0x4b, 0x1a, 0x17, 0x0e, 0xf2, 0x9a, 0xbe, 0x49, 0x8a, 0x00, 0xfb, 0x60, 0x94, 0x9b, 0xc4, 0x69, 0x78, 0x4d, 0xdf, 0xea, 0x1d, 0x07, 0x34, 0x8c, 0x03, 0x42, 0x7f, 0xea, 0x2b, 0x98, 0x54, 0x69, 0xfc, 0x2e, 0xb4, 0xe5, 0x0a, 0x29, 0x2f, 0xaa, 0x49, 0xca, 0x08, 0x77, 0xe1, 0x48, 0x70, 0x9a, 0x8a, 0x65, 0x92, 0x4f, 0x68, 0xbe, 0x74, 0x74, 0x55, 0xfe, 0x0e, 0x86, 0x9f, 0x00, 0x48, 0x76, 0xb1, 0x2b, 0xd4, 0x15, 0xb5, 0x7a, 0x76, 0xa0, 0x36, 0xd2, 0x6c, 0x87, 0x93, 0x1a, 0xc7, 0xfd, 0xaf, 0x01, 0xba, 0xec, 0xd5, 0xfd, 0x0d, 0x81, 0x51, 0x7d, 0x4b, 0x6f, 0x57, 0x0b, 0xbf, 0x23, 0x78, 0x50, 0xbd, 0x95, 0xb7, 0xcb, 0xfa, 0xc7, 0x63, 0xb0, 0x6a, 0x6b, 0x16, 0x3f, 0x82, 0x77, 0x6a, 0x61, 0xb1, 0x0a, 0x6c, 0x0d, 0x9f, 0x82, 0x5d, 0x87, 0xe5, 0xad, 0xb4, 0x11, 0x7e, 0x08, 0x27, 0x77, 0xc8, 0x3c, 0xb4, 0x1b, 0xcf, 0x3f, 0xf8, 0xf3, 0xa6, 0x83, 0x5e, 0xdf, 0x74, 0xd0, 0xdf, 0x37, 0x1d, 0xf4, 0xea, 0xb6, 0xa3, 0xbd, 0xbe, 0xed, 0x68, 0x7f, 0xdd, 0x76, 0xb4, 0xef, 0xe1, 0x6c, 0xf7, 0x8b, 0x78, 0xd5, 0x56, 0x1f, 0x9f, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x71, 0xf4, 0xb0, 0xb9, 0x25, 0x07, 0x00, 0x00, } func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Data) > 0 { i -= len(m.Data) copy(dAtA[i:], m.Data) i = encodeVarintSync(dAtA, i, uint64(len(m.Data))) i-- dAtA[i] = 0x12 } if m.Header != nil { { size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } 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 len(m.DebugInfo) > 0 { i -= len(m.DebugInfo) copy(dAtA[i:], m.DebugInfo) i = encodeVarintSync(dAtA, i, uint64(len(m.DebugInfo))) i-- dAtA[i] = 0x2a } if m.Type != 0 { i = encodeVarintSync(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x20 } if m.ReplyId != 0 { i = encodeVarintSync(dAtA, i, uint64(m.ReplyId)) i-- dAtA[i] = 0x18 } if m.RequestId != 0 { i = encodeVarintSync(dAtA, i, uint64(m.RequestId)) i-- dAtA[i] = 0x10 } if len(m.TraceId) > 0 { i -= len(m.TraceId) copy(dAtA[i:], m.TraceId) i = encodeVarintSync(dAtA, i, uint64(len(m.TraceId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *System) 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 *System) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *System) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Ack != nil { { size, err := m.Ack.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.Ping != nil { { size, err := m.Ping.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.Handshake != nil { { size, err := m.Handshake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *SystemHandshake) 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 *SystemHandshake) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SystemHandshake) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ProtocolVersion) > 0 { i -= len(m.ProtocolVersion) copy(dAtA[i:], m.ProtocolVersion) i = encodeVarintSync(dAtA, i, uint64(len(m.ProtocolVersion))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *SystemPing) 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 *SystemPing) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SystemPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.UnixTime != 0 { i = encodeVarintSync(dAtA, i, uint64(m.UnixTime)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *SystemAck) 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 *SystemAck) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SystemAck) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Error != nil { { size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *SystemError) 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 *SystemError) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SystemError) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) i = encodeVarintSync(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0x12 } if m.Code != 0 { i = encodeVarintSync(dAtA, i, uint64(m.Code)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *Sync) 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 *Sync) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Sync) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Message != nil { { size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) i = encodeVarintSync(dAtA, i, uint64(len(m.SpaceId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *SyncContentValue) 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 *SyncContentValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncContentValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Value != nil { { size := m.Value.Size() i -= size if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *SyncContentValueValueOfHeadUpdate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncContentValueValueOfHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.HeadUpdate != nil { { size, err := m.HeadUpdate.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *SyncContentValueValueOfFullSyncRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncContentValueValueOfFullSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.FullSyncRequest != nil { { size, err := m.FullSyncRequest.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } return len(dAtA) - i, nil } func (m *SyncContentValueValueOfFullSyncResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncContentValueValueOfFullSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.FullSyncResponse != nil { { size, err := m.FullSyncResponse.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } func (m *SyncHeadUpdate) 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 *SyncHeadUpdate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncHeadUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.TreeHeader != nil { { size, err := m.TreeHeader.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } if len(m.SnapshotPath) > 0 { for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SnapshotPath[iNdEx]) copy(dAtA[i:], m.SnapshotPath[iNdEx]) i = encodeVarintSync(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(m.TreeId) > 0 { i -= len(m.TreeId) copy(dAtA[i:], m.TreeId) i = encodeVarintSync(dAtA, i, uint64(len(m.TreeId))) i-- dAtA[i] = 0x1a } if len(m.Changes) > 0 { for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } if len(m.Heads) > 0 { for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Heads[iNdEx]) copy(dAtA[i:], m.Heads[iNdEx]) i = encodeVarintSync(dAtA, i, uint64(len(m.Heads[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *SyncFull) 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 *SyncFull) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncFull) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *SyncFullRequest) 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 *SyncFullRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncFullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.TreeHeader != nil { { size, err := m.TreeHeader.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } if len(m.SnapshotPath) > 0 { for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SnapshotPath[iNdEx]) copy(dAtA[i:], m.SnapshotPath[iNdEx]) i = encodeVarintSync(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(m.TreeId) > 0 { i -= len(m.TreeId) copy(dAtA[i:], m.TreeId) i = encodeVarintSync(dAtA, i, uint64(len(m.TreeId))) i-- dAtA[i] = 0x1a } if len(m.Changes) > 0 { for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } if len(m.Heads) > 0 { for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Heads[iNdEx]) copy(dAtA[i:], m.Heads[iNdEx]) i = encodeVarintSync(dAtA, i, uint64(len(m.Heads[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *SyncFullResponse) 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 *SyncFullResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *SyncFullResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.TreeHeader != nil { { size, err := m.TreeHeader.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } if len(m.SnapshotPath) > 0 { for iNdEx := len(m.SnapshotPath) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SnapshotPath[iNdEx]) copy(dAtA[i:], m.SnapshotPath[iNdEx]) i = encodeVarintSync(dAtA, i, uint64(len(m.SnapshotPath[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(m.TreeId) > 0 { i -= len(m.TreeId) copy(dAtA[i:], m.TreeId) i = encodeVarintSync(dAtA, i, uint64(len(m.TreeId))) i-- dAtA[i] = 0x1a } if len(m.Changes) > 0 { for iNdEx := len(m.Changes) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Changes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSync(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } if len(m.Heads) > 0 { for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Heads[iNdEx]) copy(dAtA[i:], m.Heads[iNdEx]) i = encodeVarintSync(dAtA, i, uint64(len(m.Heads[iNdEx]))) i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func encodeVarintSync(dAtA []byte, offset int, v uint64) int { offset -= sovSync(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Message) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Header != nil { l = m.Header.Size() n += 1 + l + sovSync(uint64(l)) } l = len(m.Data) if l > 0 { n += 1 + l + sovSync(uint64(l)) } return n } func (m *Header) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.TraceId) if l > 0 { n += 1 + l + sovSync(uint64(l)) } if m.RequestId != 0 { n += 1 + sovSync(uint64(m.RequestId)) } if m.ReplyId != 0 { n += 1 + sovSync(uint64(m.ReplyId)) } if m.Type != 0 { n += 1 + sovSync(uint64(m.Type)) } l = len(m.DebugInfo) if l > 0 { n += 1 + l + sovSync(uint64(l)) } return n } func (m *System) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Handshake != nil { l = m.Handshake.Size() n += 1 + l + sovSync(uint64(l)) } if m.Ping != nil { l = m.Ping.Size() n += 1 + l + sovSync(uint64(l)) } if m.Ack != nil { l = m.Ack.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SystemHandshake) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.ProtocolVersion) if l > 0 { n += 1 + l + sovSync(uint64(l)) } return n } func (m *SystemPing) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.UnixTime != 0 { n += 1 + sovSync(uint64(m.UnixTime)) } return n } func (m *SystemAck) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Error != nil { l = m.Error.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SystemError) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Code != 0 { n += 1 + sovSync(uint64(m.Code)) } l = len(m.Description) if l > 0 { n += 1 + l + sovSync(uint64(l)) } return n } func (m *Sync) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.SpaceId) if l > 0 { n += 1 + l + sovSync(uint64(l)) } if m.Message != nil { l = m.Message.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SyncContentValue) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Value != nil { n += m.Value.Size() } return n } func (m *SyncContentValueValueOfHeadUpdate) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.HeadUpdate != nil { l = m.HeadUpdate.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SyncContentValueValueOfFullSyncRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.FullSyncRequest != nil { l = m.FullSyncRequest.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SyncContentValueValueOfFullSyncResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.FullSyncResponse != nil { l = m.FullSyncResponse.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SyncHeadUpdate) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Heads) > 0 { for _, s := range m.Heads { l = len(s) n += 1 + l + sovSync(uint64(l)) } } if len(m.Changes) > 0 { for _, e := range m.Changes { l = e.Size() n += 1 + l + sovSync(uint64(l)) } } l = len(m.TreeId) if l > 0 { n += 1 + l + sovSync(uint64(l)) } if len(m.SnapshotPath) > 0 { for _, s := range m.SnapshotPath { l = len(s) n += 1 + l + sovSync(uint64(l)) } } if m.TreeHeader != nil { l = m.TreeHeader.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SyncFull) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *SyncFullRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Heads) > 0 { for _, s := range m.Heads { l = len(s) n += 1 + l + sovSync(uint64(l)) } } if len(m.Changes) > 0 { for _, e := range m.Changes { l = e.Size() n += 1 + l + sovSync(uint64(l)) } } l = len(m.TreeId) if l > 0 { n += 1 + l + sovSync(uint64(l)) } if len(m.SnapshotPath) > 0 { for _, s := range m.SnapshotPath { l = len(s) n += 1 + l + sovSync(uint64(l)) } } if m.TreeHeader != nil { l = m.TreeHeader.Size() n += 1 + l + sovSync(uint64(l)) } return n } func (m *SyncFullResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Heads) > 0 { for _, s := range m.Heads { l = len(s) n += 1 + l + sovSync(uint64(l)) } } if len(m.Changes) > 0 { for _, e := range m.Changes { l = e.Size() n += 1 + l + sovSync(uint64(l)) } } l = len(m.TreeId) if l > 0 { n += 1 + l + sovSync(uint64(l)) } if len(m.SnapshotPath) > 0 { for _, s := range m.SnapshotPath { l = len(s) n += 1 + l + sovSync(uint64(l)) } } if m.TreeHeader != nil { l = m.TreeHeader.Size() n += 1 + l + sovSync(uint64(l)) } return n } func sovSync(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozSync(x uint64) (n int) { return sovSync(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Message) 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 ErrIntOverflowSync } 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: Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: 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 ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } 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 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) if m.Data == nil { m.Data = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } 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 ErrIntOverflowSync } 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 TraceId", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.TraceId = append(m.TraceId[:0], dAtA[iNdEx:postIndex]...) if m.TraceId == nil { m.TraceId = []byte{} } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) } m.RequestId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RequestId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ReplyId", wireType) } m.ReplyId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ReplyId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Type |= MessageType(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DebugInfo", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.DebugInfo = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *System) 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 ErrIntOverflowSync } 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: System: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: System: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Handshake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.Handshake == nil { m.Handshake = &SystemHandshake{} } if err := m.Handshake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ping", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.Ping == nil { m.Ping = &SystemPing{} } if err := m.Ping.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ack", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.Ack == nil { m.Ack = &SystemAck{} } if err := m.Ack.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SystemHandshake) 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 ErrIntOverflowSync } 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: Handshake: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Handshake: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProtocolVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.ProtocolVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SystemPing) 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 ErrIntOverflowSync } 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: Ping: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Ping: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UnixTime", wireType) } m.UnixTime = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.UnixTime |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SystemAck) 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 ErrIntOverflowSync } 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: Ack: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Ack: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.Error == nil { m.Error = &SystemError{} } if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SystemError) 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 ErrIntOverflowSync } 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: Error: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Error: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Code |= SystemErrorCode(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *Sync) 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 ErrIntOverflowSync } 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: Sync: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sync: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.Message == nil { m.Message = &SyncContentValue{} } if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SyncContentValue) 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 ErrIntOverflowSync } 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: ContentValue: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ContentValue: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HeadUpdate", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } v := &SyncHeadUpdate{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &SyncContentValueValueOfHeadUpdate{v} iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FullSyncRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } v := &SyncFullRequest{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &SyncContentValueValueOfFullSyncRequest{v} iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FullSyncResponse", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } v := &SyncFullResponse{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Value = &SyncContentValueValueOfFullSyncResponse{v} iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SyncHeadUpdate) 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 ErrIntOverflowSync } 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: HeadUpdate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: HeadUpdate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Changes = append(m.Changes, &aclpb.RawChange{}) if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.TreeId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TreeHeader", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.TreeHeader == nil { m.TreeHeader = &treepb.TreeHeader{} } if err := m.TreeHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SyncFull) 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 ErrIntOverflowSync } 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: Full: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Full: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SyncFullRequest) 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 ErrIntOverflowSync } 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: Request: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Changes = append(m.Changes, &aclpb.RawChange{}) if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.TreeId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TreeHeader", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.TreeHeader == nil { m.TreeHeader = &treepb.TreeHeader{} } if err := m.TreeHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *SyncFullResponse) 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 ErrIntOverflowSync } 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: Response: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Changes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.Changes = append(m.Changes, &aclpb.RawChange{}) if err := m.Changes[len(m.Changes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.TreeId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SnapshotPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } 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 ErrInvalidLengthSync } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } m.SnapshotPath = append(m.SnapshotPath, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TreeHeader", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSync } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSync } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSync } if postIndex > l { return io.ErrUnexpectedEOF } if m.TreeHeader == nil { m.TreeHeader = &treepb.TreeHeader{} } if err := m.TreeHeader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSync(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSync } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipSync(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, ErrIntOverflowSync } 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, ErrIntOverflowSync } 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, ErrIntOverflowSync } 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, ErrInvalidLengthSync } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupSync } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthSync } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthSync = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSync = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSync = fmt.Errorf("proto: unexpected end of group") )