diff --git a/Makefile b/Makefile index 29f43106..b1a3cc3e 100644 --- a/Makefile +++ b/Makefile @@ -16,18 +16,22 @@ export PATH=$(GOPATH)/bin:$(shell echo $$PATH) protos-go: @echo 'Generating protobuf packages (Go)...' # Uncomment if needed - @$(eval P_TIMESTAMP := Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types) - @$(eval P_STRUCT := Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types) @$(eval ROOT_PKG := pkg) @$(eval GOGO_START := GOGO_NO_UNDERSCORE=1 GOGO_EXPORT_ONEOF_INTERFACE=1) @$(eval P_TREE_STORAGE_PATH_PB := $(ROOT_PKG)/acl/treestorage/treepb) @$(eval P_ACL_CHANGES_PATH_PB := $(ROOT_PKG)/acl/aclchanges/aclpb) @$(eval P_PLAINTEXT_CHANGES_PATH_PB := $(ROOT_PKG)/acl/testutils/testchanges/testchangepb) + @$(eval P_SYNC_CHANGES_PATH_PB := service/sync/syncpb) + @$(eval P_TIMESTAMP := Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types) + @$(eval P_STRUCT := Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types) + @$(eval P_ACL_CHANGES := M$(P_ACL_CHANGES_PATH_PB)/protos/aclchanges.proto=github.com/anytypeio/go-anytype-infrastructure-experiments/$(P_ACL_CHANGES_PATH_PB)) # use if needed $(eval PKGMAP := $$(P_TIMESTAMP),$$(P_STRUCT)) $(GOGO_START) protoc --gogofaster_out=:. $(P_ACL_CHANGES_PATH_PB)/protos/*.proto; mv $(P_ACL_CHANGES_PATH_PB)/protos/*.go $(P_ACL_CHANGES_PATH_PB) $(GOGO_START) protoc --gogofaster_out=:. $(P_TREE_STORAGE_PATH_PB)/protos/*.proto; mv $(P_TREE_STORAGE_PATH_PB)/protos/*.go $(P_TREE_STORAGE_PATH_PB) $(GOGO_START) protoc --gogofaster_out=:. $(P_PLAINTEXT_CHANGES_PATH_PB)/protos/*.proto; mv $(P_PLAINTEXT_CHANGES_PATH_PB)/protos/*.go $(P_PLAINTEXT_CHANGES_PATH_PB) + $(eval PKGMAP := $$(P_ACL_CHANGES)) + $(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. $(P_SYNC_CHANGES_PATH_PB)/protos/*.proto; mv $(P_SYNC_CHANGES_PATH_PB)/protos/*.go $(P_SYNC_CHANGES_PATH_PB) build: @$(eval FLAGS := $$(shell govvv -flags -pkg github.com/anytypeio/go-anytype-infrastructure-experiments/app)) diff --git a/pkg/acl/aclchanges/aclpb/aclchanges.pb.go b/pkg/acl/aclchanges/aclpb/aclchanges.pb.go index aad678fd..1cce6bf3 100644 --- a/pkg/acl/aclchanges/aclpb/aclchanges.pb.go +++ b/pkg/acl/aclchanges/aclpb/aclchanges.pb.go @@ -453,7 +453,7 @@ type ACLChangeUserState struct { Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=anytype.ACLChangeUserPermissions" json:"permissions,omitempty"` + Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` IsConfirmed bool `protobuf:"varint,5,opt,name=IsConfirmed,proto3" json:"IsConfirmed,omitempty"` } @@ -530,7 +530,7 @@ type ACLChangeUserAdd struct { Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=anytype.ACLChangeUserPermissions" json:"permissions,omitempty"` + Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` } func (m *ACLChangeUserAdd) Reset() { *m = ACLChangeUserAdd{} } @@ -651,7 +651,7 @@ type ACLChangeUserInvite struct { AcceptPublicKey []byte `protobuf:"bytes,1,opt,name=acceptPublicKey,proto3" json:"acceptPublicKey,omitempty"` EncryptPublicKey []byte `protobuf:"bytes,2,opt,name=encryptPublicKey,proto3" json:"encryptPublicKey,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=anytype.ACLChangeUserPermissions" json:"permissions,omitempty"` + Permissions ACLChangeUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` InviteId string `protobuf:"bytes,5,opt,name=InviteId,proto3" json:"InviteId,omitempty"` } @@ -913,7 +913,7 @@ func (m *ACLChangeReadKeyReplace) GetEncryptedReadKey() []byte { type ACLChangeUserPermissionChange struct { Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Permissions ACLChangeUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=anytype.ACLChangeUserPermissions" json:"permissions,omitempty"` + Permissions ACLChangeUserPermissions `protobuf:"varint,2,opt,name=permissions,proto3,enum=acl.ACLChangeUserPermissions" json:"permissions,omitempty"` } func (m *ACLChangeUserPermissionChange) Reset() { *m = ACLChangeUserPermissionChange{} } @@ -964,21 +964,21 @@ func (m *ACLChangeUserPermissionChange) GetPermissions() ACLChangeUserPermission } func init() { - proto.RegisterEnum("anytype.ACLChangeUserPermissions", ACLChangeUserPermissions_name, ACLChangeUserPermissions_value) - proto.RegisterType((*ACLChange)(nil), "anytype.ACLChange") - proto.RegisterType((*ACLChangeACLContentValue)(nil), "anytype.ACLChange.ACLContentValue") - proto.RegisterType((*ACLChangeACLData)(nil), "anytype.ACLChange.ACLData") - proto.RegisterType((*ACLChangeACLSnapshot)(nil), "anytype.ACLChange.ACLSnapshot") - proto.RegisterType((*ACLChangeACLState)(nil), "anytype.ACLChange.ACLState") - proto.RegisterMapType((map[string]*ACLChangeUserInvite)(nil), "anytype.ACLChange.ACLState.InvitesEntry") - proto.RegisterType((*ACLChangeUserState)(nil), "anytype.ACLChange.UserState") - proto.RegisterType((*ACLChangeUserAdd)(nil), "anytype.ACLChange.UserAdd") - proto.RegisterType((*ACLChangeUserConfirm)(nil), "anytype.ACLChange.UserConfirm") - proto.RegisterType((*ACLChangeUserInvite)(nil), "anytype.ACLChange.UserInvite") - proto.RegisterType((*ACLChangeUserJoin)(nil), "anytype.ACLChange.UserJoin") - proto.RegisterType((*ACLChangeUserRemove)(nil), "anytype.ACLChange.UserRemove") - proto.RegisterType((*ACLChangeReadKeyReplace)(nil), "anytype.ACLChange.ReadKeyReplace") - proto.RegisterType((*ACLChangeUserPermissionChange)(nil), "anytype.ACLChange.UserPermissionChange") + proto.RegisterEnum("acl.ACLChangeUserPermissions", ACLChangeUserPermissions_name, ACLChangeUserPermissions_value) + proto.RegisterType((*ACLChange)(nil), "acl.ACLChange") + proto.RegisterType((*ACLChangeACLContentValue)(nil), "acl.ACLChange.ACLContentValue") + proto.RegisterType((*ACLChangeACLData)(nil), "acl.ACLChange.ACLData") + proto.RegisterType((*ACLChangeACLSnapshot)(nil), "acl.ACLChange.ACLSnapshot") + proto.RegisterType((*ACLChangeACLState)(nil), "acl.ACLChange.ACLState") + proto.RegisterMapType((map[string]*ACLChangeUserInvite)(nil), "acl.ACLChange.ACLState.InvitesEntry") + proto.RegisterType((*ACLChangeUserState)(nil), "acl.ACLChange.UserState") + proto.RegisterType((*ACLChangeUserAdd)(nil), "acl.ACLChange.UserAdd") + proto.RegisterType((*ACLChangeUserConfirm)(nil), "acl.ACLChange.UserConfirm") + proto.RegisterType((*ACLChangeUserInvite)(nil), "acl.ACLChange.UserInvite") + proto.RegisterType((*ACLChangeUserJoin)(nil), "acl.ACLChange.UserJoin") + proto.RegisterType((*ACLChangeUserRemove)(nil), "acl.ACLChange.UserRemove") + proto.RegisterType((*ACLChangeReadKeyReplace)(nil), "acl.ACLChange.ReadKeyReplace") + proto.RegisterType((*ACLChangeUserPermissionChange)(nil), "acl.ACLChange.UserPermissionChange") } func init() { @@ -986,65 +986,64 @@ func init() { } var fileDescriptor_37a022c841a51877 = []byte{ - // 915 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0xf6, 0x24, 0x4d, 0x1d, 0xbf, 0x0e, 0x6d, 0x18, 0xf5, 0x60, 0x79, 0x8b, 0x09, 0x15, 0x82, - 0x08, 0xa1, 0x2c, 0xca, 0x22, 0xbe, 0x84, 0x04, 0x4d, 0x17, 0x48, 0x28, 0x87, 0xd5, 0xac, 0x00, - 0x81, 0xc4, 0x61, 0x6a, 0x0f, 0xad, 0xb5, 0x89, 0x6d, 0x79, 0x26, 0x15, 0xb9, 0xf0, 0x0f, 0x10, - 0xfc, 0x16, 0xae, 0x1c, 0xb8, 0xee, 0x71, 0x8f, 0x1c, 0x51, 0xfb, 0x0f, 0xf8, 0x05, 0x68, 0x3e, - 0xec, 0x38, 0xa9, 0x1d, 0x24, 0xb4, 0x12, 0xe2, 0x10, 0x69, 0xe6, 0x99, 0xe7, 0x1d, 0xbf, 0x1f, - 0xcf, 0xfb, 0x4e, 0xe0, 0xad, 0xec, 0xc9, 0xe5, 0x7d, 0x1a, 0xce, 0xe5, 0x2f, 0xbc, 0xa2, 0xc9, - 0x25, 0xe3, 0x72, 0x99, 0x5d, 0xdc, 0xcf, 0xf2, 0x54, 0xa4, 0xbc, 0x82, 0x8f, 0x14, 0x82, 0x6d, - 0x9a, 0xac, 0xc4, 0x2a, 0x63, 0x27, 0xbf, 0x1d, 0x81, 0x73, 0x7a, 0xf6, 0xc5, 0x99, 0x3a, 0xc5, - 0x03, 0x70, 0x45, 0xce, 0xd8, 0x94, 0xd1, 0x68, 0x16, 0x71, 0x0f, 0x0d, 0xda, 0x43, 0x87, 0x54, - 0x21, 0x1c, 0x00, 0xd0, 0x70, 0x5e, 0x10, 0x5a, 0x8a, 0x50, 0x41, 0xf0, 0x6b, 0x70, 0xc0, 0x13, - 0x9a, 0xf1, 0xab, 0x54, 0x4c, 0x28, 0x67, 0xb3, 0xc8, 0x6b, 0x0f, 0xd0, 0xd0, 0x21, 0x5b, 0x28, - 0x7e, 0x1b, 0x6c, 0x1a, 0xce, 0x1f, 0x52, 0x41, 0xbd, 0xbd, 0x01, 0x1a, 0xba, 0x63, 0x7f, 0x64, - 0x5c, 0x1a, 0x95, 0xee, 0xc8, 0x95, 0x64, 0x90, 0x82, 0x2a, 0xfd, 0x33, 0x71, 0x28, 0xcb, 0xce, - 0x00, 0x0d, 0x7b, 0xa4, 0x0a, 0xe1, 0x11, 0xe0, 0x70, 0x99, 0xe7, 0x2c, 0x11, 0x84, 0xd1, 0xe8, - 0x9c, 0xad, 0xa6, 0x94, 0x5f, 0x79, 0xfb, 0x03, 0x34, 0xdc, 0x23, 0x35, 0x27, 0xf8, 0x18, 0x1c, - 0x11, 0x2f, 0x18, 0x17, 0x74, 0x91, 0x79, 0xf6, 0x00, 0x0d, 0xdb, 0x64, 0x0d, 0x60, 0x1f, 0xba, - 0x71, 0xc4, 0x12, 0x11, 0x8b, 0x95, 0xd7, 0x55, 0x71, 0x94, 0x7b, 0xff, 0xd7, 0x36, 0x1c, 0x4a, - 0x57, 0xd3, 0x44, 0xb0, 0x44, 0x7c, 0x45, 0xe7, 0x4b, 0x86, 0xdf, 0x01, 0x7b, 0xc9, 0x59, 0x7e, - 0x1a, 0x45, 0x1e, 0x6a, 0x8c, 0xea, 0x4b, 0xcd,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, 0xc2, 0x2e, 0xd8, 0xba, 0x44, - 0x51, 0xbf, 0x3d, 0x79, 0xf9, 0xe9, 0x4d, 0x80, 0x9e, 0xdd, 0x04, 0xe8, 0xcf, 0x9b, 0x00, 0xfd, - 0x72, 0x1b, 0x58, 0xcf, 0x6e, 0x03, 0xeb, 0x8f, 0xdb, 0xc0, 0xfa, 0xb6, 0xa3, 0xfe, 0x7f, 0x5e, - 0xec, 0xab, 0xbf, 0x9b, 0x0f, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x12, 0x23, 0x4c, 0xb6, 0xa2, - 0x0a, 0x00, 0x00, + // 912 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xf7, 0x24, 0x4d, 0x13, 0x3f, 0x87, 0x36, 0x0c, 0x2b, 0xd6, 0x8c, 0x96, 0x10, 0x95, 0x15, + 0x8a, 0x10, 0x4a, 0x57, 0x59, 0x21, 0xad, 0x00, 0x55, 0xb4, 0x05, 0x6d, 0x42, 0x39, 0xac, 0x66, + 0xb5, 0x20, 0xb8, 0x4d, 0xed, 0xa1, 0xb5, 0xd6, 0xb1, 0x8d, 0x67, 0x52, 0x29, 0x17, 0x24, 0x4e, + 0x5c, 0x39, 0xf3, 0x55, 0xf8, 0x02, 0x7b, 0xdc, 0x23, 0x37, 0x50, 0x7b, 0xe7, 0xc2, 0x17, 0x40, + 0xf3, 0xc7, 0x8e, 0x93, 0x78, 0x23, 0x21, 0x55, 0x48, 0x7b, 0xa8, 0x34, 0xf3, 0x7b, 0xbf, 0x37, + 0x7d, 0x7f, 0x7e, 0xef, 0x39, 0xf0, 0x20, 0x7b, 0x7e, 0x71, 0xc8, 0x82, 0x58, 0xfd, 0x05, 0x97, + 0x2c, 0xb9, 0xe0, 0x42, 0x1d, 0xb3, 0xf3, 0xc3, 0x2c, 0x4f, 0x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x3d, 0x68, 0x9b, 0xd6, 0x84, 0xbd, 0xe6, 0xc9, + 0x7b, 0x2f, 0xae, 0xfb, 0xe8, 0xe5, 0x75, 0x1f, 0xfd, 0x75, 0xdd, 0x47, 0xbf, 0xde, 0xf4, 0x9d, + 0x97, 0x37, 0x7d, 0xe7, 0x8f, 0x9b, 0xbe, 0xf3, 0x7d, 0x4b, 0xff, 0x66, 0x3c, 0xdf, 0xd5, 0x3f, + 0x11, 0x1f, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x84, 0xb4, 0xc9, 0x56, 0x0a, 0x00, 0x00, } func (m *ACLChange) Marshal() (dAtA []byte, err error) { diff --git a/pkg/acl/aclchanges/aclpb/protos/aclchanges.proto b/pkg/acl/aclchanges/aclpb/protos/aclchanges.proto index 582c5eac..1906e1e5 100644 --- a/pkg/acl/aclchanges/aclpb/protos/aclchanges.proto +++ b/pkg/acl/aclchanges/aclpb/protos/aclchanges.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package anytype; +package acl; option go_package = "aclpb"; // the element of change tree used to store and internal apply smartBlock history diff --git a/service/sync/syncpb/protos/sync.proto b/service/sync/syncpb/protos/sync.proto new file mode 100644 index 00000000..ca2c3fb8 --- /dev/null +++ b/service/sync/syncpb/protos/sync.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package anytype; +option go_package = "syncpb"; + +import "pkg/acl/aclchanges/aclpb/protos/aclchanges.proto"; + +message Sync { + message HeadUpdate { + repeated Head heads = 1; + repeated acl.ACLChange changes = 2; + string senderId = 3; + } + + message Head { + string id = 1; + repeated string snapshotPath = 2; + } + + message Full { + // here with send the request with all changes we have (we already know sender's snapshot path) + message Request { + repeated Head heads = 1; + repeated acl.ACLChange changes = 2; + } + + message Response { + repeated Head heads = 1; + repeated acl.ACLChange changes = 2; + } + } +} \ No newline at end of file diff --git a/service/sync/syncpb/sync.pb.go b/service/sync/syncpb/sync.pb.go new file mode 100644 index 00000000..12ddf234 --- /dev/null +++ b/service/sync/syncpb/sync.pb.go @@ -0,0 +1,1400 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: service/sync/syncpb/protos/sync.proto + +package syncpb + +import ( + fmt "fmt" + aclpb "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/aclchanges/aclpb" + 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 Sync struct { +} + +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_5f66cdd599c6466f, []int{0} +} +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 + +type SyncHeadUpdate struct { + Heads []*SyncHead `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` + Changes []*aclpb.ACLChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,omitempty"` + SenderId string `protobuf:"bytes,3,opt,name=senderId,proto3" json:"senderId,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_5f66cdd599c6466f, []int{0, 0} +} +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() []*SyncHead { + if m != nil { + return m.Heads + } + return nil +} + +func (m *SyncHeadUpdate) GetChanges() []*aclpb.ACLChange { + if m != nil { + return m.Changes + } + return nil +} + +func (m *SyncHeadUpdate) GetSenderId() string { + if m != nil { + return m.SenderId + } + return "" +} + +type SyncHead struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SnapshotPath []string `protobuf:"bytes,2,rep,name=snapshotPath,proto3" json:"snapshotPath,omitempty"` +} + +func (m *SyncHead) Reset() { *m = SyncHead{} } +func (m *SyncHead) String() string { return proto.CompactTextString(m) } +func (*SyncHead) ProtoMessage() {} +func (*SyncHead) Descriptor() ([]byte, []int) { + return fileDescriptor_5f66cdd599c6466f, []int{0, 1} +} +func (m *SyncHead) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SyncHead) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SyncHead.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 *SyncHead) XXX_Merge(src proto.Message) { + xxx_messageInfo_SyncHead.Merge(m, src) +} +func (m *SyncHead) XXX_Size() int { + return m.Size() +} +func (m *SyncHead) XXX_DiscardUnknown() { + xxx_messageInfo_SyncHead.DiscardUnknown(m) +} + +var xxx_messageInfo_SyncHead proto.InternalMessageInfo + +func (m *SyncHead) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *SyncHead) GetSnapshotPath() []string { + if m != nil { + return m.SnapshotPath + } + 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_5f66cdd599c6466f, []int{0, 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 []*SyncHead `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` + Changes []*aclpb.ACLChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,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_5f66cdd599c6466f, []int{0, 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() []*SyncHead { + if m != nil { + return m.Heads + } + return nil +} + +func (m *SyncFullRequest) GetChanges() []*aclpb.ACLChange { + if m != nil { + return m.Changes + } + return nil +} + +type SyncFullResponse struct { + Heads []*SyncHead `protobuf:"bytes,1,rep,name=heads,proto3" json:"heads,omitempty"` + Changes []*aclpb.ACLChange `protobuf:"bytes,2,rep,name=changes,proto3" json:"changes,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_5f66cdd599c6466f, []int{0, 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() []*SyncHead { + if m != nil { + return m.Heads + } + return nil +} + +func (m *SyncFullResponse) GetChanges() []*aclpb.ACLChange { + if m != nil { + return m.Changes + } + return nil +} + +func init() { + proto.RegisterType((*Sync)(nil), "anytype.Sync") + proto.RegisterType((*SyncHeadUpdate)(nil), "anytype.Sync.HeadUpdate") + proto.RegisterType((*SyncHead)(nil), "anytype.Sync.Head") + 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("service/sync/syncpb/protos/sync.proto", fileDescriptor_5f66cdd599c6466f) +} + +var fileDescriptor_5f66cdd599c6466f = []byte{ + // 300 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0x4e, 0x2d, 0x2a, + 0xcb, 0x4c, 0x4e, 0xd5, 0x2f, 0xae, 0xcc, 0x4b, 0x06, 0x13, 0x05, 0x49, 0xfa, 0x05, 0x45, 0xf9, + 0x25, 0xf9, 0xc5, 0x60, 0x9e, 0x1e, 0x98, 0x2d, 0xc4, 0x9e, 0x98, 0x57, 0x59, 0x52, 0x59, 0x90, + 0x2a, 0x65, 0x50, 0x90, 0x9d, 0xae, 0x9f, 0x98, 0x9c, 0x03, 0xc2, 0xc9, 0x19, 0x89, 0x79, 0xe9, + 0xa9, 0xc5, 0x20, 0x26, 0x42, 0x13, 0x42, 0x1c, 0xa2, 0x55, 0xa9, 0x83, 0x99, 0x8b, 0x25, 0xb8, + 0x32, 0x2f, 0x59, 0xaa, 0x86, 0x8b, 0xcb, 0x23, 0x35, 0x31, 0x25, 0xb4, 0x20, 0x25, 0xb1, 0x24, + 0x55, 0x48, 0x83, 0x8b, 0x35, 0x23, 0x35, 0x31, 0xa5, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, + 0x48, 0x48, 0x0f, 0x6a, 0x83, 0x1e, 0x48, 0xad, 0x1e, 0x48, 0x61, 0x10, 0x44, 0x81, 0x90, 0x06, + 0x17, 0x3b, 0xd4, 0x44, 0x09, 0x26, 0xb0, 0x5a, 0x3e, 0xbd, 0xc4, 0xe4, 0x1c, 0x3d, 0x47, 0x67, + 0x1f, 0x67, 0xb0, 0x70, 0x10, 0x4c, 0x5a, 0x48, 0x8a, 0x8b, 0xa3, 0x38, 0x35, 0x2f, 0x25, 0xb5, + 0xc8, 0x33, 0x45, 0x82, 0x59, 0x81, 0x51, 0x83, 0x33, 0x08, 0xce, 0x97, 0xb2, 0xe2, 0x62, 0x01, + 0x19, 0x2a, 0xc4, 0xc7, 0xc5, 0x94, 0x99, 0x22, 0xc1, 0x08, 0x96, 0x65, 0xca, 0x4c, 0x11, 0x52, + 0xe2, 0xe2, 0x29, 0xce, 0x4b, 0x2c, 0x28, 0xce, 0xc8, 0x2f, 0x09, 0x48, 0x2c, 0xc9, 0x00, 0x5b, + 0xc1, 0x19, 0x84, 0x22, 0x26, 0x75, 0x94, 0x91, 0x8b, 0xc5, 0xad, 0x34, 0x27, 0x47, 0x2a, 0x96, + 0x8b, 0x3d, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x84, 0x16, 0xee, 0x97, 0x8a, 0xe3, 0xe2, 0x08, + 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0xa6, 0x49, 0xf8, 0x38, 0x29, 0x9c, 0x78, 0x24, 0xc7, 0x78, + 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, + 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x14, 0x1b, 0x24, 0xe6, 0x93, 0xd8, 0xc0, 0x71, 0x66, 0x0c, 0x08, + 0x00, 0x00, 0xff, 0xff, 0x9a, 0x7b, 0x0b, 0x1c, 0x17, 0x02, 0x00, 0x00, +} + +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 + 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 len(m.SenderId) > 0 { + i -= len(m.SenderId) + copy(dAtA[i:], m.SenderId) + i = encodeVarintSync(dAtA, i, uint64(len(m.SenderId))) + 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-- { + { + size, err := m.Heads[iNdEx].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 *SyncHead) 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 *SyncHead) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SyncHead) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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] = 0x12 + } + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintSync(dAtA, i, uint64(len(m.Id))) + 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 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-- { + { + size, err := m.Heads[iNdEx].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 *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 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-- { + { + size, err := m.Heads[iNdEx].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 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 *Sync) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *SyncHeadUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Heads) > 0 { + for _, e := range m.Heads { + l = e.Size() + 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.SenderId) + if l > 0 { + n += 1 + l + sovSync(uint64(l)) + } + return n +} + +func (m *SyncHead) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + 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)) + } + } + 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 _, e := range m.Heads { + l = e.Size() + 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)) + } + } + return n +} + +func (m *SyncFullResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Heads) > 0 { + for _, e := range m.Heads { + l = e.Size() + 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)) + } + } + 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 *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 { + 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 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.Heads = append(m.Heads, &SyncHead{}) + if err := m.Heads[len(m.Heads)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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.ACLChange{}) + 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 SenderId", 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.SenderId = 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 *SyncHead) 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: Head: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Head: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", 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.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 + 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 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.Heads = append(m.Heads, &SyncHead{}) + if err := m.Heads[len(m.Heads)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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.ACLChange{}) + if err := m.Changes[len(m.Changes)-1].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 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.Heads = append(m.Heads, &SyncHead{}) + if err := m.Heads[len(m.Heads)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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.ACLChange{}) + if err := m.Changes[len(m.Changes)-1].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") +)