From 98323b0063b94ad4f54d5fb0954df96b70e002a2 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Sun, 25 Dec 2022 21:12:17 +0100 Subject: [PATCH] Refactor spacesyncproto --- client/clientspace/rpchandler.go | 10 +- common/Makefile | 7 +- common/commonspace/headsync/diffsyncer.go | 4 +- .../commonspace/headsync/diffsyncer_test.go | 8 +- common/commonspace/headsync/headsync.go | 2 +- .../object/acl/aclrecordproto/aclrecord.pb.go | 302 +++++++--------- .../acl/aclrecordproto/protos/aclrecord.proto | 2 +- .../treechangeproto/protos/treechange.proto | 2 +- .../tree/treechangeproto/treechange.pb.go | 106 +++--- common/commonspace/objectsync/objectsync.go | 2 +- .../commonspace/objectsync/streamchecker.go | 2 +- common/commonspace/objectsync/streampool.go | 24 +- .../commonspace/objectsync/streampool_test.go | 24 +- common/commonspace/rpchandler.go | 4 +- common/commonspace/spaceservice.go | 4 +- .../mock_spacesyncproto.go | 78 ++--- .../spacesyncproto/protos/spacesync.proto | 18 +- .../commonspace/spacesyncproto/spacesync.go | 10 +- .../spacesyncproto/spacesync.pb.go | 326 +++++++++--------- .../spacesyncproto/spacesync_drpc.pb.go | 144 ++++---- node/nodespace/rpchandler.go | 10 +- 21 files changed, 509 insertions(+), 580 deletions(-) diff --git a/client/clientspace/rpchandler.go b/client/clientspace/rpchandler.go index 223efb84..df6a8dc0 100644 --- a/client/clientspace/rpchandler.go +++ b/client/clientspace/rpchandler.go @@ -10,7 +10,7 @@ type rpcHandler struct { s *service } -func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.PullSpaceRequest) (resp *spacesyncproto.PullSpaceResponse, err error) { +func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.SpacePullRequest) (resp *spacesyncproto.SpacePullResponse, err error) { sp, err := r.s.GetSpace(ctx, request.Id) if err != nil { if err != spacesyncproto.ErrSpaceMissing { @@ -25,7 +25,7 @@ func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.Pull return } - resp = &spacesyncproto.PullSpaceResponse{ + resp = &spacesyncproto.SpacePullResponse{ Payload: &spacesyncproto.SpacePayload{ SpaceHeader: spaceDesc.SpaceHeader, AclPayloadId: spaceDesc.AclId, @@ -37,7 +37,7 @@ func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.Pull return } -func (r *rpcHandler) PushSpace(ctx context.Context, req *spacesyncproto.PushSpaceRequest) (resp *spacesyncproto.PushSpaceResponse, err error) { +func (r *rpcHandler) PushSpace(ctx context.Context, req *spacesyncproto.SpacePushRequest) (resp *spacesyncproto.SpacePushResponse, err error) { description := commonspace.SpaceDescription{ SpaceHeader: req.Payload.SpaceHeader, AclId: req.Payload.AclPayloadId, @@ -50,7 +50,7 @@ func (r *rpcHandler) PushSpace(ctx context.Context, req *spacesyncproto.PushSpac if err != nil { return } - resp = &spacesyncproto.PushSpaceResponse{} + resp = &spacesyncproto.SpacePushResponse{} return } @@ -62,7 +62,7 @@ func (r *rpcHandler) HeadSync(ctx context.Context, req *spacesyncproto.HeadSyncR return sp.SpaceSyncRpc().HeadSync(ctx, req) } -func (r *rpcHandler) Stream(stream spacesyncproto.DRPCSpace_StreamStream) error { +func (r *rpcHandler) Stream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error { msg, err := stream.Recv() if err != nil { return err diff --git a/common/Makefile b/common/Makefile index 8661453c..699dde33 100644 --- a/common/Makefile +++ b/common/Makefile @@ -5,20 +5,17 @@ proto: @echo 'Generating protobuf packages (Go)...' @$(eval GOGO_START := GOGO_NO_UNDERSCORE=1 GOGO_EXPORT_ONEOF_INTERFACE=1) - @$(eval P_ACL_RECORDS_PATH_PB := pkg/acl/aclrecordproto) - @$(eval P_TREE_CHANGES_PATH_PB := pkg/acl/treechangeproto) + @$(eval P_ACL_RECORDS_PATH_PB := commonspace/object/acl/aclrecordproto) + @$(eval P_TREE_CHANGES_PATH_PB := commonspace/object/tree/treechangeproto) @$(eval P_SYNC_CHANGES_PATH_PB := syncproto) - @$(eval P_TEST_CHANGES_PATH_PB := pkg/acl/testutils/testchanges) @$(eval P_ACL_RECORDS := M$(P_ACL_RECORDS_PATH_PB)/protos/aclrecord.proto=github.com/anytypeio/go-anytype-infrastructure-experiments/common/$(P_ACL_RECORDS_PATH_PB)) @$(eval P_TREE_CHANGES := M$(P_TREE_CHANGES_PATH_PB)/protos/treechange.proto=github.com/anytypeio/go-anytype-infrastructure-experiments/common/$(P_TREE_CHANGES_PATH_PB)) $(GOGO_START) protoc --gogofaster_out=:. $(P_ACL_RECORDS_PATH_PB)/protos/*.proto $(GOGO_START) protoc --gogofaster_out=:. $(P_TREE_CHANGES_PATH_PB)/protos/*.proto - $(GOGO_START) protoc --gogofaster_out=:. $(P_TEST_CHANGES_PATH_PB)/proto/*.proto $(eval PKGMAP := $$(P_TREE_CHANGES),$$(P_ACL_RECORDS)) $(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonspace/spacesyncproto/protos/*.proto $(GOGO_START) protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto - test: go test ./... --cover \ No newline at end of file diff --git a/common/commonspace/headsync/diffsyncer.go b/common/commonspace/headsync/diffsyncer.go index ccbe96c7..ef855bf8 100644 --- a/common/commonspace/headsync/diffsyncer.go +++ b/common/commonspace/headsync/diffsyncer.go @@ -146,7 +146,7 @@ func (d *diffSyncer) pingTreesInCache(ctx context.Context, trees []string) { } } -func (d *diffSyncer) sendPushSpaceRequest(ctx context.Context, cl spacesyncproto.DRPCSpaceClient) (err error) { +func (d *diffSyncer) sendPushSpaceRequest(ctx context.Context, cl spacesyncproto.DRPCSpaceSyncClient) (err error) { aclStorage, err := d.storage.ACLStorage() if err != nil { return @@ -178,7 +178,7 @@ func (d *diffSyncer) sendPushSpaceRequest(ctx context.Context, cl spacesyncproto SpaceSettingsPayload: spaceSettingsRoot.RawChange, SpaceSettingsPayloadId: spaceSettingsRoot.Id, } - _, err = cl.PushSpace(ctx, &spacesyncproto.PushSpaceRequest{ + _, err = cl.SpacePush(ctx, &spacesyncproto.SpacePushRequest{ Payload: spacePayload, }) return diff --git a/common/commonspace/headsync/diffsyncer_test.go b/common/commonspace/headsync/diffsyncer_test.go index 6dfe9cbe..9cfb278d 100644 --- a/common/commonspace/headsync/diffsyncer_test.go +++ b/common/commonspace/headsync/diffsyncer_test.go @@ -33,7 +33,7 @@ type pushSpaceRequestMatcher struct { } func (p pushSpaceRequestMatcher) Matches(x interface{}) bool { - res, ok := x.(*spacesyncproto.PushSpaceRequest) + res, ok := x.(*spacesyncproto.SpacePushRequest) if !ok { return false } @@ -101,8 +101,8 @@ func TestDiffSyncer_Sync(t *testing.T) { connectorMock := mock_nodeconf.NewMockConfConnector(ctrl) cacheMock := mock_treegetter.NewMockTreeGetter(ctrl) stMock := mock_spacestorage.NewMockSpaceStorage(ctrl) - clientMock := mock_spacesyncproto.NewMockDRPCSpaceClient(ctrl) - factory := spacesyncproto.ClientFactoryFunc(func(cc drpc.Conn) spacesyncproto.DRPCSpaceClient { + clientMock := mock_spacesyncproto.NewMockDRPCSpaceSyncClient(ctrl) + factory := spacesyncproto.ClientFactoryFunc(func(cc drpc.Conn) spacesyncproto.DRPCSpaceSyncClient { return clientMock }) delState := mock_deletionstate.NewMockDeletionState(ctrl) @@ -186,7 +186,7 @@ func TestDiffSyncer_Sync(t *testing.T) { Root(). Return(aclRoot, nil) clientMock.EXPECT(). - PushSpace(gomock.Any(), newPushSpaceRequestMatcher(spaceId, aclRootId, settingsId, spaceHeader)). + SpacePush(gomock.Any(), newPushSpaceRequestMatcher(spaceId, aclRootId, settingsId, spaceHeader)). Return(nil, nil) require.NoError(t, diffSyncer.Sync(ctx)) diff --git a/common/commonspace/headsync/headsync.go b/common/commonspace/headsync/headsync.go index d6e527db..6f07bca4 100644 --- a/common/commonspace/headsync/headsync.go +++ b/common/commonspace/headsync/headsync.go @@ -54,7 +54,7 @@ func NewHeadSync( diff := ldiff.New(16, 16) l := log.With(zap.String("spaceId", spaceId)) - factory := spacesyncproto.ClientFactoryFunc(spacesyncproto.NewDRPCSpaceClient) + factory := spacesyncproto.ClientFactoryFunc(spacesyncproto.NewDRPCSpaceSyncClient) syncer := newDiffSyncer(spaceId, diff, confConnector, cache, storage, factory, syncStatus, l) periodicSync := periodicsync.NewPeriodicSync(syncPeriod, time.Minute, syncer.Sync, l) diff --git a/common/commonspace/object/acl/aclrecordproto/aclrecord.pb.go b/common/commonspace/object/acl/aclrecordproto/aclrecord.pb.go index ab92d212..ff10ae2b 100644 --- a/common/commonspace/object/acl/aclrecordproto/aclrecord.pb.go +++ b/common/commonspace/object/acl/aclrecordproto/aclrecord.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/acl/aclrecordproto/protos/aclrecord.proto +// source: commonspace/object/acl/aclrecordproto/protos/aclrecord.proto package aclrecordproto @@ -47,7 +47,7 @@ func (x ACLUserPermissions) String() string { } func (ACLUserPermissions) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{0} + return fileDescriptor_c8e9f754f34e929b, []int{0} } type RawACLRecord struct { @@ -61,7 +61,7 @@ func (m *RawACLRecord) Reset() { *m = RawACLRecord{} } func (m *RawACLRecord) String() string { return proto.CompactTextString(m) } func (*RawACLRecord) ProtoMessage() {} func (*RawACLRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{0} + return fileDescriptor_c8e9f754f34e929b, []int{0} } func (m *RawACLRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -127,7 +127,7 @@ func (m *RawACLRecordWithId) Reset() { *m = RawACLRecordWithId{} } func (m *RawACLRecordWithId) String() string { return proto.CompactTextString(m) } func (*RawACLRecordWithId) ProtoMessage() {} func (*RawACLRecordWithId) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{1} + return fileDescriptor_c8e9f754f34e929b, []int{1} } func (m *RawACLRecordWithId) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -182,7 +182,7 @@ func (m *ACLRecord) Reset() { *m = ACLRecord{} } func (m *ACLRecord) String() string { return proto.CompactTextString(m) } func (*ACLRecord) ProtoMessage() {} func (*ACLRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{2} + return fileDescriptor_c8e9f754f34e929b, []int{2} } func (m *ACLRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -260,7 +260,7 @@ func (m *ACLRoot) Reset() { *m = ACLRoot{} } func (m *ACLRoot) String() string { return proto.CompactTextString(m) } func (*ACLRoot) ProtoMessage() {} func (*ACLRoot) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{3} + return fileDescriptor_c8e9f754f34e929b, []int{3} } func (m *ACLRoot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -353,7 +353,7 @@ func (m *ACLContentValue) Reset() { *m = ACLContentValue{} } func (m *ACLContentValue) String() string { return proto.CompactTextString(m) } func (*ACLContentValue) ProtoMessage() {} func (*ACLContentValue) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{4} + return fileDescriptor_c8e9f754f34e929b, []int{4} } func (m *ACLContentValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +471,7 @@ func (m *ACLData) Reset() { *m = ACLData{} } func (m *ACLData) String() string { return proto.CompactTextString(m) } func (*ACLData) ProtoMessage() {} func (*ACLData) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{5} + return fileDescriptor_c8e9f754f34e929b, []int{5} } func (m *ACLData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -517,7 +517,7 @@ func (m *ACLState) Reset() { *m = ACLState{} } func (m *ACLState) String() string { return proto.CompactTextString(m) } func (*ACLState) ProtoMessage() {} func (*ACLState) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{6} + return fileDescriptor_c8e9f754f34e929b, []int{6} } func (m *ACLState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -577,7 +577,7 @@ func (m *ACLUserState) Reset() { *m = ACLUserState{} } func (m *ACLUserState) String() string { return proto.CompactTextString(m) } func (*ACLUserState) ProtoMessage() {} func (*ACLUserState) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{7} + return fileDescriptor_c8e9f754f34e929b, []int{7} } func (m *ACLUserState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +638,7 @@ func (m *ACLUserAdd) Reset() { *m = ACLUserAdd{} } func (m *ACLUserAdd) String() string { return proto.CompactTextString(m) } func (*ACLUserAdd) ProtoMessage() {} func (*ACLUserAdd) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{8} + return fileDescriptor_c8e9f754f34e929b, []int{8} } func (m *ACLUserAdd) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,20 +696,17 @@ func (m *ACLUserAdd) GetPermissions() ACLUserPermissions { } type ACLUserInvite struct { - AcceptPublicKey []byte `protobuf:"bytes,1,opt,name=acceptPublicKey,proto3" json:"acceptPublicKey,omitempty"` - // TODO: change to read key - EncryptPublicKey []byte `protobuf:"bytes,2,opt,name=encryptPublicKey,proto3" json:"encryptPublicKey,omitempty"` + AcceptPublicKey []byte `protobuf:"bytes,1,opt,name=acceptPublicKey,proto3" json:"acceptPublicKey,omitempty"` + EncryptSymKeyHash uint64 `protobuf:"varint,2,opt,name=encryptSymKeyHash,proto3" json:"encryptSymKeyHash,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,3,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` Permissions ACLUserPermissions `protobuf:"varint,4,opt,name=permissions,proto3,enum=aclrecord.ACLUserPermissions" json:"permissions,omitempty"` - // TODO: either derive inviteId from pub keys or think if it is possible to just use ACL record id - InviteId string `protobuf:"bytes,5,opt,name=inviteId,proto3" json:"inviteId,omitempty"` } func (m *ACLUserInvite) Reset() { *m = ACLUserInvite{} } func (m *ACLUserInvite) String() string { return proto.CompactTextString(m) } func (*ACLUserInvite) ProtoMessage() {} func (*ACLUserInvite) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{9} + return fileDescriptor_c8e9f754f34e929b, []int{9} } func (m *ACLUserInvite) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -745,11 +742,11 @@ func (m *ACLUserInvite) GetAcceptPublicKey() []byte { return nil } -func (m *ACLUserInvite) GetEncryptPublicKey() []byte { +func (m *ACLUserInvite) GetEncryptSymKeyHash() uint64 { if m != nil { - return m.EncryptPublicKey + return m.EncryptSymKeyHash } - return nil + return 0 } func (m *ACLUserInvite) GetEncryptedReadKeys() [][]byte { @@ -766,18 +763,11 @@ func (m *ACLUserInvite) GetPermissions() ACLUserPermissions { return ACLUserPermissions_Admin } -func (m *ACLUserInvite) GetInviteId() string { - if m != nil { - return m.InviteId - } - return "" -} - type ACLUserJoin struct { Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryptionKey,proto3" json:"encryptionKey,omitempty"` AcceptSignature []byte `protobuf:"bytes,3,opt,name=acceptSignature,proto3" json:"acceptSignature,omitempty"` - InviteId string `protobuf:"bytes,4,opt,name=inviteId,proto3" json:"inviteId,omitempty"` + AcceptPubKey []byte `protobuf:"bytes,4,opt,name=acceptPubKey,proto3" json:"acceptPubKey,omitempty"` EncryptedReadKeys [][]byte `protobuf:"bytes,5,rep,name=encryptedReadKeys,proto3" json:"encryptedReadKeys,omitempty"` } @@ -785,7 +775,7 @@ func (m *ACLUserJoin) Reset() { *m = ACLUserJoin{} } func (m *ACLUserJoin) String() string { return proto.CompactTextString(m) } func (*ACLUserJoin) ProtoMessage() {} func (*ACLUserJoin) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{10} + return fileDescriptor_c8e9f754f34e929b, []int{10} } func (m *ACLUserJoin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,11 +825,11 @@ func (m *ACLUserJoin) GetAcceptSignature() []byte { return nil } -func (m *ACLUserJoin) GetInviteId() string { +func (m *ACLUserJoin) GetAcceptPubKey() []byte { if m != nil { - return m.InviteId + return m.AcceptPubKey } - return "" + return nil } func (m *ACLUserJoin) GetEncryptedReadKeys() [][]byte { @@ -851,14 +841,14 @@ func (m *ACLUserJoin) GetEncryptedReadKeys() [][]byte { type ACLUserRemove struct { Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - ReadKeyReplaces []*ACLReadKeyReplace `protobuf:"bytes,3,rep,name=readKeyReplaces,proto3" json:"readKeyReplaces,omitempty"` + ReadKeyReplaces []*ACLReadKeyReplace `protobuf:"bytes,2,rep,name=readKeyReplaces,proto3" json:"readKeyReplaces,omitempty"` } func (m *ACLUserRemove) Reset() { *m = ACLUserRemove{} } func (m *ACLUserRemove) String() string { return proto.CompactTextString(m) } func (*ACLUserRemove) ProtoMessage() {} func (*ACLUserRemove) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{11} + return fileDescriptor_c8e9f754f34e929b, []int{11} } func (m *ACLUserRemove) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -911,7 +901,7 @@ func (m *ACLReadKeyReplace) Reset() { *m = ACLReadKeyReplace{} } func (m *ACLReadKeyReplace) String() string { return proto.CompactTextString(m) } func (*ACLReadKeyReplace) ProtoMessage() {} func (*ACLReadKeyReplace) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{12} + return fileDescriptor_c8e9f754f34e929b, []int{12} } func (m *ACLReadKeyReplace) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -970,7 +960,7 @@ func (m *ACLUserPermissionChange) Reset() { *m = ACLUserPermissionChange func (m *ACLUserPermissionChange) String() string { return proto.CompactTextString(m) } func (*ACLUserPermissionChange) ProtoMessage() {} func (*ACLUserPermissionChange) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{13} + return fileDescriptor_c8e9f754f34e929b, []int{13} } func (m *ACLUserPermissionChange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1021,7 +1011,7 @@ func (m *ACLSyncMessage) Reset() { *m = ACLSyncMessage{} } func (m *ACLSyncMessage) String() string { return proto.CompactTextString(m) } func (*ACLSyncMessage) ProtoMessage() {} func (*ACLSyncMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{14} + return fileDescriptor_c8e9f754f34e929b, []int{14} } func (m *ACLSyncMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1069,7 +1059,7 @@ func (m *ACLSyncContentValue) Reset() { *m = ACLSyncContentValue{} } func (m *ACLSyncContentValue) String() string { return proto.CompactTextString(m) } func (*ACLSyncContentValue) ProtoMessage() {} func (*ACLSyncContentValue) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{15} + return fileDescriptor_c8e9f754f34e929b, []int{15} } func (m *ACLSyncContentValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1139,7 +1129,7 @@ func (m *ACLAddRecords) Reset() { *m = ACLAddRecords{} } func (m *ACLAddRecords) String() string { return proto.CompactTextString(m) } func (*ACLAddRecords) ProtoMessage() {} func (*ACLAddRecords) Descriptor() ([]byte, []int) { - return fileDescriptor_14abe0d1b4206d54, []int{16} + return fileDescriptor_c8e9f754f34e929b, []int{16} } func (m *ACLAddRecords) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1198,71 +1188,72 @@ func init() { } func init() { - proto.RegisterFile("pkg/acl/aclrecordproto/protos/aclrecord.proto", fileDescriptor_14abe0d1b4206d54) + proto.RegisterFile("commonspace/object/acl/aclrecordproto/protos/aclrecord.proto", fileDescriptor_c8e9f754f34e929b) } -var fileDescriptor_14abe0d1b4206d54 = []byte{ - // 959 bytes of a gzipped FileDescriptorProto +var fileDescriptor_c8e9f754f34e929b = []byte{ + // 965 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xac, 0x9d, 0x38, 0x7e, 0x76, 0x13, 0x67, 0x80, 0xd4, 0x8a, 0x8a, 0x15, 0xad, 0x38, - 0x44, 0x55, 0x71, 0xc1, 0x20, 0xa5, 0xca, 0x01, 0xe4, 0x9a, 0x22, 0xbb, 0x09, 0x52, 0x35, 0x01, - 0x8a, 0x7a, 0x9b, 0xee, 0x8e, 0x92, 0x51, 0xed, 0xdd, 0xd5, 0xcc, 0xd8, 0xc8, 0x47, 0xce, 0x5c, - 0xe0, 0x1b, 0xc0, 0x07, 0xe1, 0xc4, 0x85, 0x63, 0x2f, 0x48, 0x1c, 0x51, 0xf2, 0x05, 0xb8, 0x73, - 0x41, 0x33, 0xb3, 0xff, 0xd7, 0x89, 0xa8, 0x14, 0xf5, 0x90, 0x64, 0xe6, 0xbd, 0xdf, 0x9b, 0xfc, - 0xde, 0xef, 0xbd, 0x79, 0xb3, 0xf0, 0x61, 0xf4, 0xea, 0xfc, 0x21, 0xf5, 0x66, 0xfa, 0x47, 0x30, - 0x2f, 0x14, 0x7e, 0x24, 0x42, 0x15, 0x3e, 0x34, 0xbf, 0x65, 0x66, 0x1d, 0x18, 0x03, 0x6e, 0xa5, - 0x06, 0xf7, 0x17, 0x04, 0x1d, 0x42, 0xbf, 0x1f, 0x8d, 0x4f, 0x89, 0x31, 0xe0, 0x1e, 0x34, 0x23, - 0xba, 0x9a, 0x85, 0xd4, 0xef, 0xa1, 0x03, 0x74, 0xd8, 0x21, 0xc9, 0x16, 0xdf, 0x83, 0x96, 0xe4, - 0xe7, 0x01, 0x55, 0x0b, 0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x07, 0xc7, 0x99, 0x5f, 0x3d, 0x47, 0x39, 0x3a, + 0x7f, 0x58, 0xa6, 0xba, 0x31, 0x72, 0x1c, 0x3e, 0x82, 0x36, 0xcf, 0x8e, 0x54, 0x45, 0x2f, 0x66, + 0x5d, 0xff, 0x9a, 0x23, 0x29, 0xfa, 0xc1, 0x11, 0xe0, 0xba, 0x28, 0xb8, 0x03, 0x1b, 0x63, 0xc7, + 0x73, 0xfd, 0x7e, 0x03, 0x03, 0x6c, 0xbe, 0xe0, 0xae, 0x64, 0xbc, 0x8f, 0xd4, 0x5a, 0x55, 0x88, + 0xf1, 0xbe, 0xf1, 0xe4, 0xf1, 0x1f, 0x57, 0x03, 0xf4, 0xea, 0x6a, 0x80, 0xfe, 0xbd, 0x1a, 0xa0, + 0x9f, 0xaf, 0x07, 0x8d, 0x57, 0xd7, 0x83, 0xc6, 0x3f, 0xd7, 0x83, 0xc6, 0xcb, 0x0f, 0x5f, 0xeb, + 0x5b, 0xf9, 0x7c, 0x53, 0xff, 0xf9, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x03, 0x77, + 0x62, 0x5b, 0x0b, 0x00, 0x00, } func (m *RawACLRecord) Marshal() (dAtA []byte, err error) { @@ -1843,13 +1834,6 @@ func (m *ACLUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.InviteId) > 0 { - i -= len(m.InviteId) - copy(dAtA[i:], m.InviteId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteId))) - i-- - dAtA[i] = 0x2a - } if m.Permissions != 0 { i = encodeVarintAclrecord(dAtA, i, uint64(m.Permissions)) i-- @@ -1864,12 +1848,10 @@ func (m *ACLUserInvite) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - if len(m.EncryptPublicKey) > 0 { - i -= len(m.EncryptPublicKey) - copy(dAtA[i:], m.EncryptPublicKey) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.EncryptPublicKey))) + if m.EncryptSymKeyHash != 0 { + i = encodeVarintAclrecord(dAtA, i, uint64(m.EncryptSymKeyHash)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } if len(m.AcceptPublicKey) > 0 { i -= len(m.AcceptPublicKey) @@ -1910,10 +1892,10 @@ func (m *ACLUserJoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.InviteId) > 0 { - i -= len(m.InviteId) - copy(dAtA[i:], m.InviteId) - i = encodeVarintAclrecord(dAtA, i, uint64(len(m.InviteId))) + if len(m.AcceptPubKey) > 0 { + i -= len(m.AcceptPubKey) + copy(dAtA[i:], m.AcceptPubKey) + i = encodeVarintAclrecord(dAtA, i, uint64(len(m.AcceptPubKey))) i-- dAtA[i] = 0x22 } @@ -1972,7 +1954,7 @@ func (m *ACLUserRemove) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintAclrecord(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } if len(m.Identity) > 0 { @@ -2482,9 +2464,8 @@ func (m *ACLUserInvite) Size() (n int) { if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } - l = len(m.EncryptPublicKey) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) + if m.EncryptSymKeyHash != 0 { + n += 1 + sovAclrecord(uint64(m.EncryptSymKeyHash)) } if len(m.EncryptedReadKeys) > 0 { for _, b := range m.EncryptedReadKeys { @@ -2495,10 +2476,6 @@ func (m *ACLUserInvite) Size() (n int) { if m.Permissions != 0 { n += 1 + sovAclrecord(uint64(m.Permissions)) } - l = len(m.InviteId) - if l > 0 { - n += 1 + l + sovAclrecord(uint64(l)) - } return n } @@ -2520,7 +2497,7 @@ func (m *ACLUserJoin) Size() (n int) { if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } - l = len(m.InviteId) + l = len(m.AcceptPubKey) if l > 0 { n += 1 + l + sovAclrecord(uint64(l)) } @@ -4359,10 +4336,10 @@ func (m *ACLUserInvite) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptPublicKey", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EncryptSymKeyHash", wireType) } - var byteLen int + m.EncryptSymKeyHash = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord @@ -4372,26 +4349,11 @@ func (m *ACLUserInvite) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.EncryptSymKeyHash |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return ErrInvalidLengthAclrecord - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EncryptPublicKey = append(m.EncryptPublicKey[:0], dAtA[iNdEx:postIndex]...) - if m.EncryptPublicKey == nil { - m.EncryptPublicKey = []byte{} - } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncryptedReadKeys", wireType) @@ -4443,38 +4405,6 @@ func (m *ACLUserInvite) Unmarshal(dAtA []byte) error { break } } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAclrecord - } - 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 ErrInvalidLengthAclrecord - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAclrecord - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InviteId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAclrecord(dAtA[iNdEx:]) @@ -4629,9 +4559,9 @@ func (m *ACLUserJoin) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InviteId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AcceptPubKey", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAclrecord @@ -4641,23 +4571,25 @@ func (m *ACLUserJoin) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthAclrecord } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAclrecord } if postIndex > l { return io.ErrUnexpectedEOF } - m.InviteId = string(dAtA[iNdEx:postIndex]) + m.AcceptPubKey = append(m.AcceptPubKey[:0], dAtA[iNdEx:postIndex]...) + if m.AcceptPubKey == nil { + m.AcceptPubKey = []byte{} + } iNdEx = postIndex case 5: if wireType != 2 { @@ -4775,7 +4707,7 @@ func (m *ACLUserRemove) Unmarshal(dAtA []byte) error { m.Identity = []byte{} } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ReadKeyReplaces", wireType) } diff --git a/common/commonspace/object/acl/aclrecordproto/protos/aclrecord.proto b/common/commonspace/object/acl/aclrecordproto/protos/aclrecord.proto index 51f74853..2eff7074 100644 --- a/common/commonspace/object/acl/aclrecordproto/protos/aclrecord.proto +++ b/common/commonspace/object/acl/aclrecordproto/protos/aclrecord.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package aclrecord; -option go_package = "pkg/acl/aclrecordproto"; +option go_package = "commonspace/object/acl/aclrecordproto"; message RawACLRecord { bytes payload = 1; diff --git a/common/commonspace/object/tree/treechangeproto/protos/treechange.proto b/common/commonspace/object/tree/treechangeproto/protos/treechange.proto index 3a55e031..9bc47b0a 100644 --- a/common/commonspace/object/tree/treechangeproto/protos/treechange.proto +++ b/common/commonspace/object/tree/treechangeproto/protos/treechange.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package treechange; -option go_package = "pkg/acl/treechangeproto"; +option go_package = "commonspace/object/tree/treechangeproto"; // RootChange is a root of a tree message RootChange { diff --git a/common/commonspace/object/tree/treechangeproto/treechange.pb.go b/common/commonspace/object/tree/treechangeproto/treechange.pb.go index 0c97164b..caf98ad2 100644 --- a/common/commonspace/object/tree/treechangeproto/treechange.pb.go +++ b/common/commonspace/object/tree/treechangeproto/treechange.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/acl/treechangeproto/protos/treechange.proto +// source: commonspace/object/tree/treechangeproto/protos/treechange.proto package treechangeproto @@ -42,7 +42,7 @@ func (m *RootChange) Reset() { *m = RootChange{} } func (m *RootChange) String() string { return proto.CompactTextString(m) } func (*RootChange) ProtoMessage() {} func (*RootChange) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{0} + return fileDescriptor_5033f0301ef9b772, []int{0} } func (m *RootChange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -137,7 +137,7 @@ func (m *TreeChange) Reset() { *m = TreeChange{} } func (m *TreeChange) String() string { return proto.CompactTextString(m) } func (*TreeChange) ProtoMessage() {} func (*TreeChange) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{1} + return fileDescriptor_5033f0301ef9b772, []int{1} } func (m *TreeChange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -234,7 +234,7 @@ func (m *RawTreeChange) Reset() { *m = RawTreeChange{} } func (m *RawTreeChange) String() string { return proto.CompactTextString(m) } func (*RawTreeChange) ProtoMessage() {} func (*RawTreeChange) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{2} + return fileDescriptor_5033f0301ef9b772, []int{2} } func (m *RawTreeChange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -289,7 +289,7 @@ func (m *RawTreeChangeWithId) Reset() { *m = RawTreeChangeWithId{} } func (m *RawTreeChangeWithId) String() string { return proto.CompactTextString(m) } func (*RawTreeChangeWithId) ProtoMessage() {} func (*RawTreeChangeWithId) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{3} + return fileDescriptor_5033f0301ef9b772, []int{3} } func (m *RawTreeChangeWithId) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -341,7 +341,7 @@ func (m *TreeSyncMessage) Reset() { *m = TreeSyncMessage{} } func (m *TreeSyncMessage) String() string { return proto.CompactTextString(m) } func (*TreeSyncMessage) ProtoMessage() {} func (*TreeSyncMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{4} + return fileDescriptor_5033f0301ef9b772, []int{4} } func (m *TreeSyncMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -399,7 +399,7 @@ func (m *TreeSyncContentValue) Reset() { *m = TreeSyncContentValue{} } func (m *TreeSyncContentValue) String() string { return proto.CompactTextString(m) } func (*TreeSyncContentValue) ProtoMessage() {} func (*TreeSyncContentValue) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{5} + return fileDescriptor_5033f0301ef9b772, []int{5} } func (m *TreeSyncContentValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -508,7 +508,7 @@ func (m *TreeHeadUpdate) Reset() { *m = TreeHeadUpdate{} } func (m *TreeHeadUpdate) String() string { return proto.CompactTextString(m) } func (*TreeHeadUpdate) ProtoMessage() {} func (*TreeHeadUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{6} + return fileDescriptor_5033f0301ef9b772, []int{6} } func (m *TreeHeadUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -569,7 +569,7 @@ func (m *TreeFullSyncRequest) Reset() { *m = TreeFullSyncRequest{} } func (m *TreeFullSyncRequest) String() string { return proto.CompactTextString(m) } func (*TreeFullSyncRequest) ProtoMessage() {} func (*TreeFullSyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{7} + return fileDescriptor_5033f0301ef9b772, []int{7} } func (m *TreeFullSyncRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -630,7 +630,7 @@ func (m *TreeFullSyncResponse) Reset() { *m = TreeFullSyncResponse{} } func (m *TreeFullSyncResponse) String() string { return proto.CompactTextString(m) } func (*TreeFullSyncResponse) ProtoMessage() {} func (*TreeFullSyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{8} + return fileDescriptor_5033f0301ef9b772, []int{8} } func (m *TreeFullSyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -689,7 +689,7 @@ func (m *TreeErrorResponse) Reset() { *m = TreeErrorResponse{} } func (m *TreeErrorResponse) String() string { return proto.CompactTextString(m) } func (*TreeErrorResponse) ProtoMessage() {} func (*TreeErrorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f177d8514fae978f, []int{9} + return fileDescriptor_5033f0301ef9b772, []int{9} } func (m *TreeErrorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -739,52 +739,52 @@ func init() { } func init() { - proto.RegisterFile("pkg/acl/treechangeproto/protos/treechange.proto", fileDescriptor_f177d8514fae978f) + proto.RegisterFile("commonspace/object/tree/treechangeproto/protos/treechange.proto", fileDescriptor_5033f0301ef9b772) } -var fileDescriptor_f177d8514fae978f = []byte{ - // 647 bytes of a gzipped FileDescriptorProto +var fileDescriptor_5033f0301ef9b772 = []byte{ + // 656 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xc1, 0x6e, 0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0x78, 0x88, 0x87, 0x91, 0x63, 0xeb, 0xb5, 0x32, 0xa4, 0x2e, - 0x40, 0x41, 0x78, 0x32, 0xca, 0xd0, 0x69, 0xe8, 0x45, 0x03, 0x51, 0xbc, 0x32, 0x3e, 0x45, 0x21, - 0xf9, 0x69, 0xe6, 0x34, 0x3d, 0xd2, 0x69, 0xb0, 0x19, 0x40, 0x29, 0x34, 0x05, 0x62, 0xe4, 0x2c, - 0x78, 0xa4, 0xd3, 0x66, 0xfa, 0x99, 0x6e, 0xc1, 0x52, 0x1c, 0x61, 0x22, 0x63, 0x39, 0x72, 0x16, - 0x35, 0x3e, 0x8d, 0xfd, 0xef, 0x36, 0xc0, 0x49, 0x8e, 0x38, 0x11, 0xed, 0xc1, 0x8a, 0xea, 0xa8, - 0x10, 0x29, 0x1c, 0xe2, 0x35, 0x3a, 0xcb, 0xcc, 0x84, 0xaa, 0x6d, 0xd9, 0xf5, 0xb6, 0xee, 0xc0, - 0x9a, 0x48, 0x78, 0x26, 0xfa, 0xa9, 0xdc, 0xe5, 0x42, 0x75, 0x57, 0x34, 0x50, 0x43, 0xd5, 0x3e, - 0x45, 0x4b, 0xe2, 0x09, 0x97, 0x5c, 0xb7, 0xd1, 0x66, 0x26, 0x44, 0xb7, 0x81, 0x86, 0xc3, 0x3c, - 0xc7, 0x44, 0x32, 0xe4, 0xd1, 0x11, 0x8e, 0x02, 0x2e, 0xfa, 0xba, 0xad, 0x26, 0x9b, 0xb3, 0x52, - 0xb5, 0x65, 0xb1, 0x6e, 0x8b, 0x69, 0x41, 0xab, 0x6a, 0x81, 0x32, 0x3c, 0x16, 0xc7, 0x13, 0x7d, - 0xce, 0x92, 0x47, 0x3a, 0x4b, 0xcc, 0x40, 0xfc, 0xa7, 0xb0, 0xca, 0xf8, 0x99, 0x61, 0x92, 0x03, - 0xad, 0x8c, 0x8f, 0x06, 0x29, 0x2f, 0xe6, 0xda, 0x66, 0x65, 0xa8, 0x44, 0x88, 0xb8, 0x97, 0x70,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 0x00, 0x4b, 0x53, 0xb9, 0xa7, 0x43, 0x7a, 0x07, 0x16, 0x79, 0xd8, + 0x0b, 0x90, 0x47, 0x87, 0x91, 0x43, 0x3c, 0xd2, 0x59, 0x64, 0x53, 0x80, 0x3a, 0xd0, 0xd2, 0xa7, + 0x1e, 0x46, 0x8e, 0xad, 0xf7, 0xca, 0x90, 0xba, 0x00, 0x05, 0xe1, 0xc9, 0x30, 0x43, 0xa7, 0xa1, + 0x37, 0x0d, 0x44, 0xf1, 0xca, 0xb8, 0x8f, 0x42, 0xf2, 0x7e, 0xe6, 0x34, 0x3d, 0xd2, 0x69, 0xb0, + 0x29, 0x40, 0x29, 0x34, 0x05, 0x62, 0xe4, 0xcc, 0x79, 0xa4, 0xd3, 0x66, 0xfa, 0x3b, 0xdd, 0x80, + 0x85, 0x38, 0xc2, 0x44, 0xc6, 0x72, 0xe8, 0xcc, 0x6b, 0x7c, 0x12, 0xfb, 0x3f, 0x6d, 0x80, 0x93, + 0x1c, 0x71, 0x2c, 0xda, 0x83, 0x25, 0xd5, 0x51, 0x21, 0x52, 0x38, 0xc4, 0x6b, 0x74, 0x16, 0x99, + 0x09, 0x55, 0xdb, 0xb2, 0xeb, 0x6d, 0xdd, 0x87, 0x15, 0x91, 0xf0, 0x4c, 0x74, 0x53, 0xb9, 0xcb, + 0x85, 0xea, 0xae, 0x68, 0xa0, 0x86, 0xaa, 0x73, 0x8a, 0x96, 0xc4, 0x73, 0x2e, 0xb9, 0x6e, 0xa3, + 0xcd, 0x4c, 0x88, 0x6e, 0x02, 0x0d, 0x07, 0x79, 0x8e, 0x89, 0x64, 0xc8, 0xa3, 0x23, 0x1c, 0x06, + 0x5c, 0x74, 0x75, 0x5b, 0x4d, 0x36, 0x63, 0xa7, 0x6a, 0xcb, 0x7c, 0xdd, 0x16, 0xd3, 0x82, 0x56, + 0xd5, 0x02, 0x65, 0x78, 0x2c, 0x8e, 0xc7, 0xfa, 0x9c, 0x05, 0x8f, 0x74, 0x16, 0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x4e, 0x1d, 0xd4, 0xf2, 0x02, 0x8b, 0x5d, 0xa9, 0xa5, 0xfb, 0xb0, 0x8c, + 0x79, 0x9e, 0xe6, 0x13, 0xb2, 0xa6, 0x26, 0xbb, 0x5b, 0x27, 0xdb, 0x37, 0x93, 0x02, 0x8b, 0x55, + 0xab, 0x76, 0x5b, 0x30, 0xf7, 0x59, 0x59, 0xe5, 0x7f, 0x21, 0xb0, 0x52, 0x75, 0x83, 0xae, 0xc3, + 0x9c, 0x72, 0xa3, 0x7c, 0x83, 0x45, 0x40, 0x1f, 0x43, 0x6b, 0xfc, 0x48, 0x1c, 0xdb, 0x6b, 0x5c, + 0x67, 0x54, 0x65, 0x3e, 0xf5, 0xa1, 0x5d, 0x3e, 0xc2, 0xd7, 0x5c, 0x76, 0x9d, 0x86, 0xe6, 0xad, + 0x60, 0xfe, 0x57, 0x02, 0x6b, 0x33, 0x2c, 0xbd, 0x19, 0x31, 0xdf, 0x48, 0x71, 0xb1, 0xea, 0x13, + 0xb9, 0x19, 0x35, 0x0f, 0xe1, 0xf6, 0x95, 0x89, 0x2a, 0x25, 0x7a, 0xa2, 0xe3, 0xdf, 0xf7, 0x22, + 0xd8, 0x7d, 0xf6, 0xe7, 0xd2, 0x25, 0x17, 0x97, 0x2e, 0xf9, 0x77, 0xe9, 0x92, 0x1f, 0x23, 0xd7, + 0xba, 0x18, 0xb9, 0xd6, 0xdf, 0x91, 0x6b, 0xbd, 0x7f, 0x70, 0xcd, 0xff, 0x9b, 0xd3, 0x79, 0xfd, + 0xf1, 0xe8, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xa5, 0xe2, 0x7c, 0xa1, 0x06, 0x00, 0x00, } func (m *RootChange) Marshal() (dAtA []byte, err error) { diff --git a/common/commonspace/objectsync/objectsync.go b/common/commonspace/objectsync/objectsync.go index 8b821193..5efbba5b 100644 --- a/common/commonspace/objectsync/objectsync.go +++ b/common/commonspace/objectsync/objectsync.go @@ -47,7 +47,7 @@ func NewObjectSync( streamPool := newStreamPool(func(ctx context.Context, senderId string, message *spacesyncproto.ObjectSyncMessage) (err error) { return objectSync.HandleMessage(ctx, senderId, message) }) - clientFactory := spacesyncproto.ClientFactoryFunc(spacesyncproto.NewDRPCSpaceClient) + clientFactory := spacesyncproto.ClientFactoryFunc(spacesyncproto.NewDRPCSpaceSyncClient) syncLog := log.With(zap.String("id", spaceId)) syncCtx, cancel := context.WithCancel(context.Background()) checker := NewStreamChecker( diff --git a/common/commonspace/objectsync/streamchecker.go b/common/commonspace/objectsync/streamchecker.go index 6d199676..16d00f5c 100644 --- a/common/commonspace/objectsync/streamchecker.go +++ b/common/commonspace/objectsync/streamchecker.go @@ -110,7 +110,7 @@ func (s *streamChecker) CheckPeerConnection(peerId string) (err error) { } func (s *streamChecker) createStream(p peer.Peer) (err error) { - stream, err := s.clientFactory.Client(p).Stream(s.syncCtx) + stream, err := s.clientFactory.Client(p).ObjectSyncStream(s.syncCtx) if err != nil { // so here probably the request is failed because there is no such space, // but diffService should handle such cases by sending pushSpace diff --git a/common/commonspace/objectsync/streampool.go b/common/commonspace/objectsync/streampool.go index accda6fc..c9b45630 100644 --- a/common/commonspace/objectsync/streampool.go +++ b/common/commonspace/objectsync/streampool.go @@ -24,8 +24,8 @@ var ErrSyncTimeout = errors.New("too long wait on sync receive") // StreamPool can be made generic to work with different streams type StreamPool interface { ocache.ObjectLastUsage - AddAndReadStreamSync(stream spacesyncproto.SpaceStream) (err error) - AddAndReadStreamAsync(stream spacesyncproto.SpaceStream) (err error) + AddAndReadStreamSync(stream spacesyncproto.ObjectSyncStream) (err error) + AddAndReadStreamAsync(stream spacesyncproto.ObjectSyncStream) (err error) SendSync(peerId string, message *spacesyncproto.ObjectSyncMessage) (reply *spacesyncproto.ObjectSyncMessage, err error) SendAsync(peers []string, message *spacesyncproto.ObjectSyncMessage) (err error) @@ -43,7 +43,7 @@ type responseWaiter struct { type streamPool struct { sync.Mutex - peerStreams map[string]spacesyncproto.SpaceStream + peerStreams map[string]spacesyncproto.ObjectSyncStream messageHandler MessageHandler wg *sync.WaitGroup waiters map[string]responseWaiter @@ -54,7 +54,7 @@ type streamPool struct { func newStreamPool(messageHandler MessageHandler) StreamPool { s := &streamPool{ - peerStreams: make(map[string]spacesyncproto.SpaceStream), + peerStreams: make(map[string]spacesyncproto.ObjectSyncStream), messageHandler: messageHandler, waiters: make(map[string]responseWaiter), wg: &sync.WaitGroup{}, @@ -110,7 +110,7 @@ func (s *streamPool) SendSync( func (s *streamPool) SendAsync(peers []string, message *spacesyncproto.ObjectSyncMessage) (err error) { s.lastUsage.Store(time.Now().Unix()) - getStreams := func() (streams []spacesyncproto.SpaceStream) { + getStreams := func() (streams []spacesyncproto.ObjectSyncStream) { for _, pId := range peers { stream, err := s.getOrDeleteStream(pId) if err != nil { @@ -139,7 +139,7 @@ func (s *streamPool) SendAsync(peers []string, message *spacesyncproto.ObjectSyn return err } -func (s *streamPool) getOrDeleteStream(id string) (stream spacesyncproto.SpaceStream, err error) { +func (s *streamPool) getOrDeleteStream(id string) (stream spacesyncproto.ObjectSyncStream, err error) { stream, exists := s.peerStreams[id] if !exists { err = ErrEmptyPeer @@ -156,7 +156,7 @@ func (s *streamPool) getOrDeleteStream(id string) (stream spacesyncproto.SpaceSt return } -func (s *streamPool) getAllStreams() (streams []spacesyncproto.SpaceStream) { +func (s *streamPool) getAllStreams() (streams []spacesyncproto.ObjectSyncStream) { s.Lock() defer s.Unlock() Loop: @@ -188,7 +188,7 @@ func (s *streamPool) BroadcastAsync(message *spacesyncproto.ObjectSyncMessage) ( return nil } -func (s *streamPool) AddAndReadStreamAsync(stream spacesyncproto.SpaceStream) (err error) { +func (s *streamPool) AddAndReadStreamAsync(stream spacesyncproto.ObjectSyncStream) (err error) { peerId, err := s.addStream(stream) if err != nil { return @@ -197,7 +197,7 @@ func (s *streamPool) AddAndReadStreamAsync(stream spacesyncproto.SpaceStream) (e return } -func (s *streamPool) AddAndReadStreamSync(stream spacesyncproto.SpaceStream) (err error) { +func (s *streamPool) AddAndReadStreamSync(stream spacesyncproto.ObjectSyncStream) (err error) { peerId, err := s.addStream(stream) if err != nil { return @@ -205,7 +205,7 @@ func (s *streamPool) AddAndReadStreamSync(stream spacesyncproto.SpaceStream) (er return s.readPeerLoop(peerId, stream) } -func (s *streamPool) addStream(stream spacesyncproto.SpaceStream) (peerId string, err error) { +func (s *streamPool) addStream(stream spacesyncproto.ObjectSyncStream) (peerId string, err error) { s.Lock() peerId, err = peer.CtxPeerId(stream.Context()) if err != nil { @@ -245,7 +245,7 @@ func (s *streamPool) Close() (err error) { return nil } -func (s *streamPool) readPeerLoop(peerId string, stream spacesyncproto.SpaceStream) (err error) { +func (s *streamPool) readPeerLoop(peerId string, stream spacesyncproto.ObjectSyncStream) (err error) { log.With(zap.String("replyId", peerId)).Debug("reading stream from peer") defer s.wg.Done() limiter := make(chan struct{}, maxSimultaneousOperationsPerStream) @@ -301,7 +301,7 @@ Loop: return } -func (s *streamPool) removePeer(peerId string, stream spacesyncproto.SpaceStream) (err error) { +func (s *streamPool) removePeer(peerId string, stream spacesyncproto.ObjectSyncStream) (err error) { s.Lock() defer s.Unlock() mapStream, ok := s.peerStreams[peerId] diff --git a/common/commonspace/objectsync/streampool_test.go b/common/commonspace/objectsync/streampool_test.go index bf32bbf9..7fe34317 100644 --- a/common/commonspace/objectsync/streampool_test.go +++ b/common/commonspace/objectsync/streampool_test.go @@ -12,7 +12,7 @@ import ( ) type testServer struct { - stream chan spacesyncproto.DRPCSpace_StreamStream + stream chan spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream addLog func(ctx context.Context, req *consensusproto.AddLogRequest) error addRecord func(ctx context.Context, req *consensusproto.AddRecordRequest) error releaseStream chan error @@ -23,20 +23,20 @@ func (t *testServer) HeadSync(ctx context.Context, request *spacesyncproto.HeadS panic("implement me") } -func (t *testServer) PushSpace(ctx context.Context, request *spacesyncproto.PushSpaceRequest) (*spacesyncproto.PushSpaceResponse, error) { +func (t *testServer) SpacePush(ctx context.Context, request *spacesyncproto.SpacePushRequest) (*spacesyncproto.SpacePushResponse, error) { panic("implement me") } -func (t *testServer) PullSpace(ctx context.Context, request *spacesyncproto.PullSpaceRequest) (*spacesyncproto.PullSpaceResponse, error) { +func (t *testServer) SpacePull(ctx context.Context, request *spacesyncproto.SpacePullRequest) (*spacesyncproto.SpacePullResponse, error) { panic("implement me") } -func (t *testServer) Stream(stream spacesyncproto.DRPCSpace_StreamStream) error { +func (t *testServer) ObjectSyncStream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error { t.stream <- stream return <-t.releaseStream } -func (t *testServer) waitStream(test *testing.T) spacesyncproto.DRPCSpace_StreamStream { +func (t *testServer) waitStream(test *testing.T) spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream { select { case <-time.After(time.Second * 5): test.Fatalf("waiteStream timeout") @@ -49,9 +49,9 @@ func (t *testServer) waitStream(test *testing.T) spacesyncproto.DRPCSpace_Stream type fixture struct { testServer *testServer drpcTS *rpctest.TesServer - client spacesyncproto.DRPCSpaceClient - clientStream spacesyncproto.DRPCSpace_StreamStream - serverStream spacesyncproto.DRPCSpace_StreamStream + client spacesyncproto.DRPCSpaceSyncClient + clientStream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream + serverStream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream pool *streamPool clientId string serverId string @@ -64,12 +64,12 @@ func newFixture(t *testing.T, clientId, serverId string, handler MessageHandler) clientId: clientId, serverId: serverId, } - fx.testServer.stream = make(chan spacesyncproto.DRPCSpace_StreamStream, 1) - require.NoError(t, spacesyncproto.DRPCRegisterSpace(fx.drpcTS.Mux, fx.testServer)) - fx.client = spacesyncproto.NewDRPCSpaceClient(fx.drpcTS.Dial(peer.CtxWithPeerId(context.Background(), clientId))) + fx.testServer.stream = make(chan spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream, 1) + require.NoError(t, spacesyncproto.DRPCRegisterSpaceSync(fx.drpcTS.Mux, fx.testServer)) + fx.client = spacesyncproto.NewDRPCSpaceSyncClient(fx.drpcTS.Dial(peer.CtxWithPeerId(context.Background(), clientId))) var err error - fx.clientStream, err = fx.client.Stream(peer.CtxWithPeerId(context.Background(), serverId)) + fx.clientStream, err = fx.client.ObjectSyncStream(peer.CtxWithPeerId(context.Background(), serverId)) require.NoError(t, err) fx.serverStream = fx.testServer.waitStream(t) fx.pool = newStreamPool(handler).(*streamPool) diff --git a/common/commonspace/rpchandler.go b/common/commonspace/rpchandler.go index 99f506bf..6a454b28 100644 --- a/common/commonspace/rpchandler.go +++ b/common/commonspace/rpchandler.go @@ -7,7 +7,7 @@ import ( type RpcHandler interface { HeadSync(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) - Stream(stream spacesyncproto.DRPCSpace_StreamStream) error + Stream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error } type rpcHandler struct { @@ -18,7 +18,7 @@ func (r *rpcHandler) HeadSync(ctx context.Context, req *spacesyncproto.HeadSyncR return r.s.HeadSync().HandleRangeRequest(ctx, req) } -func (r *rpcHandler) Stream(stream spacesyncproto.DRPCSpace_StreamStream) (err error) { +func (r *rpcHandler) Stream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) (err error) { // TODO: if needed we can launch full sync here return r.s.ObjectSync().StreamPool().AddAndReadStreamSync(stream) } diff --git a/common/commonspace/spaceservice.go b/common/commonspace/spaceservice.go index 914fd950..69e992b2 100644 --- a/common/commonspace/spaceservice.go +++ b/common/commonspace/spaceservice.go @@ -169,8 +169,8 @@ func (s *spaceService) getSpaceStorageFromRemote(ctx context.Context, id string) return } - cl := spacesyncproto.NewDRPCSpaceClient(p) - res, err := cl.PullSpace(ctx, &spacesyncproto.PullSpaceRequest{Id: id}) + cl := spacesyncproto.NewDRPCSpaceSyncClient(p) + res, err := cl.SpacePull(ctx, &spacesyncproto.SpacePullRequest{Id: id}) if err != nil { return } diff --git a/common/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go b/common/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go index 0df3a6ff..7c44b32a 100644 --- a/common/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go +++ b/common/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacesyncproto (interfaces: DRPCSpaceClient) +// Source: github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacesyncproto (interfaces: DRPCSpaceSyncClient) // Package mock_spacesyncproto is a generated GoMock package. package mock_spacesyncproto @@ -13,31 +13,31 @@ import ( drpc "storj.io/drpc" ) -// MockDRPCSpaceClient is a mock of DRPCSpaceClient interface. -type MockDRPCSpaceClient struct { +// MockDRPCSpaceSyncClient is a mock of DRPCSpaceSyncClient interface. +type MockDRPCSpaceSyncClient struct { ctrl *gomock.Controller - recorder *MockDRPCSpaceClientMockRecorder + recorder *MockDRPCSpaceSyncClientMockRecorder } -// MockDRPCSpaceClientMockRecorder is the mock recorder for MockDRPCSpaceClient. -type MockDRPCSpaceClientMockRecorder struct { - mock *MockDRPCSpaceClient +// MockDRPCSpaceSyncClientMockRecorder is the mock recorder for MockDRPCSpaceSyncClient. +type MockDRPCSpaceSyncClientMockRecorder struct { + mock *MockDRPCSpaceSyncClient } -// NewMockDRPCSpaceClient creates a new mock instance. -func NewMockDRPCSpaceClient(ctrl *gomock.Controller) *MockDRPCSpaceClient { - mock := &MockDRPCSpaceClient{ctrl: ctrl} - mock.recorder = &MockDRPCSpaceClientMockRecorder{mock} +// NewMockDRPCSpaceSyncClient creates a new mock instance. +func NewMockDRPCSpaceSyncClient(ctrl *gomock.Controller) *MockDRPCSpaceSyncClient { + mock := &MockDRPCSpaceSyncClient{ctrl: ctrl} + mock.recorder = &MockDRPCSpaceSyncClientMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockDRPCSpaceClient) EXPECT() *MockDRPCSpaceClientMockRecorder { +func (m *MockDRPCSpaceSyncClient) EXPECT() *MockDRPCSpaceSyncClientMockRecorder { return m.recorder } // DRPCConn mocks base method. -func (m *MockDRPCSpaceClient) DRPCConn() drpc.Conn { +func (m *MockDRPCSpaceSyncClient) DRPCConn() drpc.Conn { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DRPCConn") ret0, _ := ret[0].(drpc.Conn) @@ -45,13 +45,13 @@ func (m *MockDRPCSpaceClient) DRPCConn() drpc.Conn { } // DRPCConn indicates an expected call of DRPCConn. -func (mr *MockDRPCSpaceClientMockRecorder) DRPCConn() *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) DRPCConn() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DRPCConn", reflect.TypeOf((*MockDRPCSpaceClient)(nil).DRPCConn)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DRPCConn", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).DRPCConn)) } // HeadSync mocks base method. -func (m *MockDRPCSpaceClient) HeadSync(arg0 context.Context, arg1 *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { +func (m *MockDRPCSpaceSyncClient) HeadSync(arg0 context.Context, arg1 *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "HeadSync", arg0, arg1) ret0, _ := ret[0].(*spacesyncproto.HeadSyncResponse) @@ -60,52 +60,52 @@ func (m *MockDRPCSpaceClient) HeadSync(arg0 context.Context, arg1 *spacesyncprot } // HeadSync indicates an expected call of HeadSync. -func (mr *MockDRPCSpaceClientMockRecorder) HeadSync(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDRPCSpaceSyncClientMockRecorder) HeadSync(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadSync", reflect.TypeOf((*MockDRPCSpaceClient)(nil).HeadSync), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadSync", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).HeadSync), arg0, arg1) } -// PullSpace mocks base method. -func (m *MockDRPCSpaceClient) PullSpace(arg0 context.Context, arg1 *spacesyncproto.PullSpaceRequest) (*spacesyncproto.PullSpaceResponse, error) { +// ObjectSyncStream mocks base method. +func (m *MockDRPCSpaceSyncClient) ObjectSyncStream(arg0 context.Context) (spacesyncproto.DRPCSpaceSync_ObjectSyncStreamClient, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PullSpace", arg0, arg1) - ret0, _ := ret[0].(*spacesyncproto.PullSpaceResponse) + ret := m.ctrl.Call(m, "ObjectSyncStream", arg0) + ret0, _ := ret[0].(spacesyncproto.DRPCSpaceSync_ObjectSyncStreamClient) ret1, _ := ret[1].(error) return ret0, ret1 } -// PullSpace indicates an expected call of PullSpace. -func (mr *MockDRPCSpaceClientMockRecorder) PullSpace(arg0, arg1 interface{}) *gomock.Call { +// ObjectSyncStream indicates an expected call of ObjectSyncStream. +func (mr *MockDRPCSpaceSyncClientMockRecorder) ObjectSyncStream(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullSpace", reflect.TypeOf((*MockDRPCSpaceClient)(nil).PullSpace), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObjectSyncStream", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).ObjectSyncStream), arg0) } -// PushSpace mocks base method. -func (m *MockDRPCSpaceClient) PushSpace(arg0 context.Context, arg1 *spacesyncproto.PushSpaceRequest) (*spacesyncproto.PushSpaceResponse, error) { +// SpacePull mocks base method. +func (m *MockDRPCSpaceSyncClient) SpacePull(arg0 context.Context, arg1 *spacesyncproto.SpacePullRequest) (*spacesyncproto.SpacePullResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PushSpace", arg0, arg1) - ret0, _ := ret[0].(*spacesyncproto.PushSpaceResponse) + ret := m.ctrl.Call(m, "SpacePull", arg0, arg1) + ret0, _ := ret[0].(*spacesyncproto.SpacePullResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// PushSpace indicates an expected call of PushSpace. -func (mr *MockDRPCSpaceClientMockRecorder) PushSpace(arg0, arg1 interface{}) *gomock.Call { +// SpacePull indicates an expected call of SpacePull. +func (mr *MockDRPCSpaceSyncClientMockRecorder) SpacePull(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PushSpace", reflect.TypeOf((*MockDRPCSpaceClient)(nil).PushSpace), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpacePull", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).SpacePull), arg0, arg1) } -// Stream mocks base method. -func (m *MockDRPCSpaceClient) Stream(arg0 context.Context) (spacesyncproto.DRPCSpace_StreamClient, error) { +// SpacePush mocks base method. +func (m *MockDRPCSpaceSyncClient) SpacePush(arg0 context.Context, arg1 *spacesyncproto.SpacePushRequest) (*spacesyncproto.SpacePushResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Stream", arg0) - ret0, _ := ret[0].(spacesyncproto.DRPCSpace_StreamClient) + ret := m.ctrl.Call(m, "SpacePush", arg0, arg1) + ret0, _ := ret[0].(*spacesyncproto.SpacePushResponse) ret1, _ := ret[1].(error) return ret0, ret1 } -// Stream indicates an expected call of Stream. -func (mr *MockDRPCSpaceClientMockRecorder) Stream(arg0 interface{}) *gomock.Call { +// SpacePush indicates an expected call of SpacePush. +func (mr *MockDRPCSpaceSyncClientMockRecorder) SpacePush(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stream", reflect.TypeOf((*MockDRPCSpaceClient)(nil).Stream), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpacePush", reflect.TypeOf((*MockDRPCSpaceSyncClient)(nil).SpacePush), arg0, arg1) } diff --git a/common/commonspace/spacesyncproto/protos/spacesync.proto b/common/commonspace/spacesyncproto/protos/spacesync.proto index 0582fffc..a9b911db 100644 --- a/common/commonspace/spacesyncproto/protos/spacesync.proto +++ b/common/commonspace/spacesyncproto/protos/spacesync.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package anySpace; +package spacesync; option go_package = "commonspace/spacesyncproto"; @@ -10,15 +10,15 @@ enum ErrCodes { ErrorOffset = 100; } -service Space { +service SpaceSync { // HeadSync compares all objects and their hashes in a space rpc HeadSync(HeadSyncRequest) returns (HeadSyncResponse); // PushSpace sends new space to the node - rpc PushSpace(PushSpaceRequest) returns (PushSpaceResponse); + rpc SpacePush(SpacePushRequest) returns (SpacePushResponse); // PullSpace gets space from the remote peer - rpc PullSpace(PullSpaceRequest) returns (PullSpaceResponse); + rpc SpacePull(SpacePullRequest) returns (SpacePullResponse); // Stream opens object sync stream with node or client - rpc Stream(stream ObjectSyncMessage) returns (stream ObjectSyncMessage); + rpc ObjectSyncStream(stream ObjectSyncMessage) returns (stream ObjectSyncMessage); } // HeadSyncRange presenting a request for one range @@ -63,20 +63,20 @@ message ObjectSyncMessage { } // PushSpaceRequest is a request to add space on a node containing only one acl record -message PushSpaceRequest { +message SpacePushRequest { SpacePayload payload = 1; } // PushSpaceResponse is an empty response -message PushSpaceResponse {} +message SpacePushResponse {} // PullSpaceRequest is a request to request a space on a node that doesn't have it -message PullSpaceRequest { +message SpacePullRequest { string id = 1; } // PullSpaceResponse is a response with header and acl root -message PullSpaceResponse { +message SpacePullResponse { SpacePayload payload = 1; } diff --git a/common/commonspace/spacesyncproto/spacesync.go b/common/commonspace/spacesyncproto/spacesync.go index 7c55930f..49cfc4a5 100644 --- a/common/commonspace/spacesyncproto/spacesync.go +++ b/common/commonspace/spacesyncproto/spacesync.go @@ -1,18 +1,18 @@ -//go:generate mockgen -destination mock_spacesyncproto/mock_spacesyncproto.go github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacesyncproto DRPCSpaceClient +//go:generate mockgen -destination mock_spacesyncproto/mock_spacesyncproto.go github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/spacesyncproto DRPCSpaceSyncClient package spacesyncproto import ( "storj.io/drpc" ) -type SpaceStream = DRPCSpace_StreamStream +type ObjectSyncStream = DRPCSpaceSync_ObjectSyncStreamStream -type ClientFactoryFunc func(cc drpc.Conn) DRPCSpaceClient +type ClientFactoryFunc func(cc drpc.Conn) DRPCSpaceSyncClient -func (c ClientFactoryFunc) Client(cc drpc.Conn) DRPCSpaceClient { +func (c ClientFactoryFunc) Client(cc drpc.Conn) DRPCSpaceSyncClient { return c(cc) } type ClientFactory interface { - Client(cc drpc.Conn) DRPCSpaceClient + Client(cc drpc.Conn) DRPCSpaceSyncClient } diff --git a/common/commonspace/spacesyncproto/spacesync.pb.go b/common/commonspace/spacesyncproto/spacesync.pb.go index d0672626..c38245ae 100644 --- a/common/commonspace/spacesyncproto/spacesync.pb.go +++ b/common/commonspace/spacesyncproto/spacesync.pb.go @@ -396,22 +396,22 @@ func (m *ObjectSyncMessage) GetObjectId() string { } // PushSpaceRequest is a request to add space on a node containing only one acl record -type PushSpaceRequest struct { +type SpacePushRequest struct { Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *PushSpaceRequest) Reset() { *m = PushSpaceRequest{} } -func (m *PushSpaceRequest) String() string { return proto.CompactTextString(m) } -func (*PushSpaceRequest) ProtoMessage() {} -func (*PushSpaceRequest) Descriptor() ([]byte, []int) { +func (m *SpacePushRequest) Reset() { *m = SpacePushRequest{} } +func (m *SpacePushRequest) String() string { return proto.CompactTextString(m) } +func (*SpacePushRequest) ProtoMessage() {} +func (*SpacePushRequest) Descriptor() ([]byte, []int) { return fileDescriptor_80e49f1f4ac27799, []int{6} } -func (m *PushSpaceRequest) XXX_Unmarshal(b []byte) error { +func (m *SpacePushRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PushSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SpacePushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PushSpaceRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_SpacePushRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -421,19 +421,19 @@ func (m *PushSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *PushSpaceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PushSpaceRequest.Merge(m, src) +func (m *SpacePushRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpacePushRequest.Merge(m, src) } -func (m *PushSpaceRequest) XXX_Size() int { +func (m *SpacePushRequest) XXX_Size() int { return m.Size() } -func (m *PushSpaceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PushSpaceRequest.DiscardUnknown(m) +func (m *SpacePushRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SpacePushRequest.DiscardUnknown(m) } -var xxx_messageInfo_PushSpaceRequest proto.InternalMessageInfo +var xxx_messageInfo_SpacePushRequest proto.InternalMessageInfo -func (m *PushSpaceRequest) GetPayload() *SpacePayload { +func (m *SpacePushRequest) GetPayload() *SpacePayload { if m != nil { return m.Payload } @@ -441,21 +441,21 @@ func (m *PushSpaceRequest) GetPayload() *SpacePayload { } // PushSpaceResponse is an empty response -type PushSpaceResponse struct { +type SpacePushResponse struct { } -func (m *PushSpaceResponse) Reset() { *m = PushSpaceResponse{} } -func (m *PushSpaceResponse) String() string { return proto.CompactTextString(m) } -func (*PushSpaceResponse) ProtoMessage() {} -func (*PushSpaceResponse) Descriptor() ([]byte, []int) { +func (m *SpacePushResponse) Reset() { *m = SpacePushResponse{} } +func (m *SpacePushResponse) String() string { return proto.CompactTextString(m) } +func (*SpacePushResponse) ProtoMessage() {} +func (*SpacePushResponse) Descriptor() ([]byte, []int) { return fileDescriptor_80e49f1f4ac27799, []int{7} } -func (m *PushSpaceResponse) XXX_Unmarshal(b []byte) error { +func (m *SpacePushResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PushSpaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SpacePushResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PushSpaceResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_SpacePushResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -465,35 +465,35 @@ func (m *PushSpaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *PushSpaceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PushSpaceResponse.Merge(m, src) +func (m *SpacePushResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpacePushResponse.Merge(m, src) } -func (m *PushSpaceResponse) XXX_Size() int { +func (m *SpacePushResponse) XXX_Size() int { return m.Size() } -func (m *PushSpaceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PushSpaceResponse.DiscardUnknown(m) +func (m *SpacePushResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SpacePushResponse.DiscardUnknown(m) } -var xxx_messageInfo_PushSpaceResponse proto.InternalMessageInfo +var xxx_messageInfo_SpacePushResponse proto.InternalMessageInfo // PullSpaceRequest is a request to request a space on a node that doesn't have it -type PullSpaceRequest struct { +type SpacePullRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (m *PullSpaceRequest) Reset() { *m = PullSpaceRequest{} } -func (m *PullSpaceRequest) String() string { return proto.CompactTextString(m) } -func (*PullSpaceRequest) ProtoMessage() {} -func (*PullSpaceRequest) Descriptor() ([]byte, []int) { +func (m *SpacePullRequest) Reset() { *m = SpacePullRequest{} } +func (m *SpacePullRequest) String() string { return proto.CompactTextString(m) } +func (*SpacePullRequest) ProtoMessage() {} +func (*SpacePullRequest) Descriptor() ([]byte, []int) { return fileDescriptor_80e49f1f4ac27799, []int{8} } -func (m *PullSpaceRequest) XXX_Unmarshal(b []byte) error { +func (m *SpacePullRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PullSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SpacePullRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PullSpaceRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_SpacePullRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -503,19 +503,19 @@ func (m *PullSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *PullSpaceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullSpaceRequest.Merge(m, src) +func (m *SpacePullRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpacePullRequest.Merge(m, src) } -func (m *PullSpaceRequest) XXX_Size() int { +func (m *SpacePullRequest) XXX_Size() int { return m.Size() } -func (m *PullSpaceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PullSpaceRequest.DiscardUnknown(m) +func (m *SpacePullRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SpacePullRequest.DiscardUnknown(m) } -var xxx_messageInfo_PullSpaceRequest proto.InternalMessageInfo +var xxx_messageInfo_SpacePullRequest proto.InternalMessageInfo -func (m *PullSpaceRequest) GetId() string { +func (m *SpacePullRequest) GetId() string { if m != nil { return m.Id } @@ -523,22 +523,22 @@ func (m *PullSpaceRequest) GetId() string { } // PullSpaceResponse is a response with header and acl root -type PullSpaceResponse struct { +type SpacePullResponse struct { Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *PullSpaceResponse) Reset() { *m = PullSpaceResponse{} } -func (m *PullSpaceResponse) String() string { return proto.CompactTextString(m) } -func (*PullSpaceResponse) ProtoMessage() {} -func (*PullSpaceResponse) Descriptor() ([]byte, []int) { +func (m *SpacePullResponse) Reset() { *m = SpacePullResponse{} } +func (m *SpacePullResponse) String() string { return proto.CompactTextString(m) } +func (*SpacePullResponse) ProtoMessage() {} +func (*SpacePullResponse) Descriptor() ([]byte, []int) { return fileDescriptor_80e49f1f4ac27799, []int{9} } -func (m *PullSpaceResponse) XXX_Unmarshal(b []byte) error { +func (m *SpacePullResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PullSpaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *SpacePullResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PullSpaceResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_SpacePullResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -548,19 +548,19 @@ func (m *PullSpaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *PullSpaceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullSpaceResponse.Merge(m, src) +func (m *SpacePullResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpacePullResponse.Merge(m, src) } -func (m *PullSpaceResponse) XXX_Size() int { +func (m *SpacePullResponse) XXX_Size() int { return m.Size() } -func (m *PullSpaceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PullSpaceResponse.DiscardUnknown(m) +func (m *SpacePullResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SpacePullResponse.DiscardUnknown(m) } -var xxx_messageInfo_PullSpaceResponse proto.InternalMessageInfo +var xxx_messageInfo_SpacePullResponse proto.InternalMessageInfo -func (m *PullSpaceResponse) GetPayload() *SpacePayload { +func (m *SpacePullResponse) GetPayload() *SpacePayload { if m != nil { return m.Payload } @@ -1038,25 +1038,25 @@ func (m *SettingsData) GetSnapshot() *SpaceSettingsSnapshot { } func init() { - proto.RegisterEnum("anySpace.ErrCodes", ErrCodes_name, ErrCodes_value) - proto.RegisterType((*HeadSyncRange)(nil), "anySpace.HeadSyncRange") - proto.RegisterType((*HeadSyncResult)(nil), "anySpace.HeadSyncResult") - proto.RegisterType((*HeadSyncResultElement)(nil), "anySpace.HeadSyncResultElement") - proto.RegisterType((*HeadSyncRequest)(nil), "anySpace.HeadSyncRequest") - proto.RegisterType((*HeadSyncResponse)(nil), "anySpace.HeadSyncResponse") - proto.RegisterType((*ObjectSyncMessage)(nil), "anySpace.ObjectSyncMessage") - proto.RegisterType((*PushSpaceRequest)(nil), "anySpace.PushSpaceRequest") - proto.RegisterType((*PushSpaceResponse)(nil), "anySpace.PushSpaceResponse") - proto.RegisterType((*PullSpaceRequest)(nil), "anySpace.PullSpaceRequest") - proto.RegisterType((*PullSpaceResponse)(nil), "anySpace.PullSpaceResponse") - proto.RegisterType((*SpacePayload)(nil), "anySpace.SpacePayload") - proto.RegisterType((*SpaceHeader)(nil), "anySpace.SpaceHeader") - proto.RegisterType((*RawSpaceHeader)(nil), "anySpace.RawSpaceHeader") - proto.RegisterType((*RawSpaceHeaderWithId)(nil), "anySpace.RawSpaceHeaderWithId") - proto.RegisterType((*SpaceSettingsContent)(nil), "anySpace.SpaceSettingsContent") - proto.RegisterType((*ObjectDelete)(nil), "anySpace.ObjectDelete") - proto.RegisterType((*SpaceSettingsSnapshot)(nil), "anySpace.SpaceSettingsSnapshot") - proto.RegisterType((*SettingsData)(nil), "anySpace.SettingsData") + proto.RegisterEnum("spacesync.ErrCodes", ErrCodes_name, ErrCodes_value) + proto.RegisterType((*HeadSyncRange)(nil), "spacesync.HeadSyncRange") + proto.RegisterType((*HeadSyncResult)(nil), "spacesync.HeadSyncResult") + proto.RegisterType((*HeadSyncResultElement)(nil), "spacesync.HeadSyncResultElement") + proto.RegisterType((*HeadSyncRequest)(nil), "spacesync.HeadSyncRequest") + proto.RegisterType((*HeadSyncResponse)(nil), "spacesync.HeadSyncResponse") + proto.RegisterType((*ObjectSyncMessage)(nil), "spacesync.ObjectSyncMessage") + proto.RegisterType((*SpacePushRequest)(nil), "spacesync.SpacePushRequest") + proto.RegisterType((*SpacePushResponse)(nil), "spacesync.SpacePushResponse") + proto.RegisterType((*SpacePullRequest)(nil), "spacesync.SpacePullRequest") + proto.RegisterType((*SpacePullResponse)(nil), "spacesync.SpacePullResponse") + proto.RegisterType((*SpacePayload)(nil), "spacesync.SpacePayload") + proto.RegisterType((*SpaceHeader)(nil), "spacesync.SpaceHeader") + proto.RegisterType((*RawSpaceHeader)(nil), "spacesync.RawSpaceHeader") + proto.RegisterType((*RawSpaceHeaderWithId)(nil), "spacesync.RawSpaceHeaderWithId") + proto.RegisterType((*SpaceSettingsContent)(nil), "spacesync.SpaceSettingsContent") + proto.RegisterType((*ObjectDelete)(nil), "spacesync.ObjectDelete") + proto.RegisterType((*SpaceSettingsSnapshot)(nil), "spacesync.SpaceSettingsSnapshot") + proto.RegisterType((*SettingsData)(nil), "spacesync.SettingsData") } func init() { @@ -1064,63 +1064,63 @@ func init() { } var fileDescriptor_80e49f1f4ac27799 = []byte{ - // 882 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x6e, 0x9c, 0xc4, 0x7e, 0xd9, 0xba, 0xee, 0x90, 0x96, 0xc5, 0x45, 0x4b, 0x34, 0x07, - 0x14, 0x71, 0x48, 0x8a, 0x41, 0x80, 0x54, 0x0e, 0xd0, 0xda, 0x55, 0x2d, 0x54, 0x12, 0x8d, 0x41, - 0x48, 0x08, 0x0e, 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, 0x9e, 0xcd, - 0xd8, 0x64, 0x02, 0xfd, 0x92, 0x9b, 0x48, 0xcd, 0x71, 0x9b, 0xf6, 0x46, 0x0f, 0x5b, 0x6d, 0x75, - 0x94, 0x9c, 0xa8, 0x9a, 0x28, 0x4d, 0x86, 0x6b, 0xa2, 0x6c, 0x33, 0xdb, 0x33, 0xd8, 0x9b, 0xeb, - 0x54, 0xf0, 0x15, 0x79, 0xb8, 0xbd, 0x44, 0x35, 0xfa, 0x1f, 0xbd, 0xc9, 0x78, 0x6c, 0x3d, 0xb2, - 0x9e, 0x7c, 0xfc, 0xf7, 0x95, 0x67, 0xbd, 0xbe, 0xf2, 0xac, 0x7f, 0xaf, 0x3c, 0xeb, 0x8f, 0x6b, - 0xaf, 0xf3, 0xfa, 0xda, 0xeb, 0xfc, 0x73, 0xed, 0x75, 0xbe, 0x1f, 0xdd, 0xfe, 0x97, 0xe1, 0xe5, - 0x1e, 0xfe, 0x7c, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x86, 0xe7, 0xfa, 0x57, 0x08, - 0x00, 0x00, + // 887 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0x6e, 0x9c, 0x26, 0x7e, 0xb3, 0x75, 0xdd, 0x21, 0x85, 0xc5, 0x8d, 0x5c, 0x6b, 0x0e, + 0x28, 0xe2, 0xd0, 0x8f, 0x14, 0x81, 0x10, 0x70, 0xa0, 0x89, 0x4b, 0x2d, 0x54, 0x52, 0x8d, 0x41, + 0x48, 0x48, 0x20, 0x4d, 0x77, 0xdf, 0xd8, 0x8b, 0xd6, 0x33, 0xcb, 0xce, 0x98, 0xc6, 0x07, 0x0e, + 0x9c, 0xb8, 0xf2, 0x17, 0xf8, 0x0f, 0xfc, 0x08, 0x8e, 0x3d, 0x72, 0x44, 0xc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27, 0x8e, 0xdb, 0x70, 0x4a, 0xbe, 0x6b, 0xc3, 0xa9, 0x11, 0x1d, 0x83, 0x41, + 0x45, 0xfe, 0x33, 0x9d, 0x22, 0x5f, 0x92, 0x83, 0x8d, 0xdd, 0xaa, 0xfd, 0x67, 0x18, 0xbe, 0xd1, + 0x7a, 0xe8, 0x3c, 0x74, 0x9e, 0x7c, 0xf4, 0xcf, 0xc5, 0xc8, 0x79, 0x7d, 0x31, 0x72, 0xfe, 0xbb, + 0x18, 0x39, 0x7f, 0x5e, 0x8e, 0x3a, 0xaf, 0x2f, 0x47, 0x9d, 0x7f, 0x2f, 0x47, 0x9d, 0x1f, 0x86, + 0xd7, 0xff, 0xa4, 0x78, 0x79, 0xc3, 0xfe, 0x79, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, + 0xf0, 0x9f, 0x14, 0x77, 0x08, 0x00, 0x00, } func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) { @@ -1379,7 +1379,7 @@ func (m *ObjectSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PushSpaceRequest) Marshal() (dAtA []byte, err error) { +func (m *SpacePushRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1389,12 +1389,12 @@ func (m *PushSpaceRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PushSpaceRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SpacePushRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PushSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SpacePushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1414,7 +1414,7 @@ func (m *PushSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PushSpaceResponse) Marshal() (dAtA []byte, err error) { +func (m *SpacePushResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1424,12 +1424,12 @@ func (m *PushSpaceResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PushSpaceResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SpacePushResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PushSpaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SpacePushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1437,7 +1437,7 @@ func (m *PushSpaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PullSpaceRequest) Marshal() (dAtA []byte, err error) { +func (m *SpacePullRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1447,12 +1447,12 @@ func (m *PullSpaceRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PullSpaceRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *SpacePullRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PullSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SpacePullRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1467,7 +1467,7 @@ func (m *PullSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PullSpaceResponse) Marshal() (dAtA []byte, err error) { +func (m *SpacePullResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1477,12 +1477,12 @@ func (m *PullSpaceResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PullSpaceResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *SpacePullResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PullSpaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SpacePullResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1984,7 +1984,7 @@ func (m *ObjectSyncMessage) Size() (n int) { return n } -func (m *PushSpaceRequest) Size() (n int) { +func (m *SpacePushRequest) Size() (n int) { if m == nil { return 0 } @@ -1997,7 +1997,7 @@ func (m *PushSpaceRequest) Size() (n int) { return n } -func (m *PushSpaceResponse) Size() (n int) { +func (m *SpacePushResponse) Size() (n int) { if m == nil { return 0 } @@ -2006,7 +2006,7 @@ func (m *PushSpaceResponse) Size() (n int) { return n } -func (m *PullSpaceRequest) Size() (n int) { +func (m *SpacePullRequest) Size() (n int) { if m == nil { return 0 } @@ -2019,7 +2019,7 @@ func (m *PullSpaceRequest) Size() (n int) { return n } -func (m *PullSpaceResponse) Size() (n int) { +func (m *SpacePullResponse) Size() (n int) { if m == nil { return 0 } @@ -2937,7 +2937,7 @@ func (m *ObjectSyncMessage) Unmarshal(dAtA []byte) error { } return nil } -func (m *PushSpaceRequest) Unmarshal(dAtA []byte) error { +func (m *SpacePushRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2960,10 +2960,10 @@ func (m *PushSpaceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PushSpaceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpacePushRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PushSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpacePushRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3023,7 +3023,7 @@ func (m *PushSpaceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PushSpaceResponse) Unmarshal(dAtA []byte) error { +func (m *SpacePushResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3046,10 +3046,10 @@ func (m *PushSpaceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PushSpaceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SpacePushResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PushSpaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpacePushResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3073,7 +3073,7 @@ func (m *PushSpaceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PullSpaceRequest) Unmarshal(dAtA []byte) error { +func (m *SpacePullRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3096,10 +3096,10 @@ func (m *PullSpaceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PullSpaceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SpacePullRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PullSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpacePullRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3155,7 +3155,7 @@ func (m *PullSpaceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PullSpaceResponse) Unmarshal(dAtA []byte) error { +func (m *SpacePullResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3178,10 +3178,10 @@ func (m *PullSpaceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PullSpaceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SpacePullResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PullSpaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SpacePullResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/common/commonspace/spacesyncproto/spacesync_drpc.pb.go b/common/commonspace/spacesyncproto/spacesync_drpc.pb.go index b1a0a929..2c82a645 100644 --- a/common/commonspace/spacesyncproto/spacesync_drpc.pb.go +++ b/common/commonspace/spacesyncproto/spacesync_drpc.pb.go @@ -37,76 +37,76 @@ func (drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto) JSONU return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) } -type DRPCSpaceClient interface { +type DRPCSpaceSyncClient interface { DRPCConn() drpc.Conn HeadSync(ctx context.Context, in *HeadSyncRequest) (*HeadSyncResponse, error) - PushSpace(ctx context.Context, in *PushSpaceRequest) (*PushSpaceResponse, error) - PullSpace(ctx context.Context, in *PullSpaceRequest) (*PullSpaceResponse, error) - Stream(ctx context.Context) (DRPCSpace_StreamClient, error) + SpacePush(ctx context.Context, in *SpacePushRequest) (*SpacePushResponse, error) + SpacePull(ctx context.Context, in *SpacePullRequest) (*SpacePullResponse, error) + ObjectSyncStream(ctx context.Context) (DRPCSpaceSync_ObjectSyncStreamClient, error) } -type drpcSpaceClient struct { +type drpcSpaceSyncClient struct { cc drpc.Conn } -func NewDRPCSpaceClient(cc drpc.Conn) DRPCSpaceClient { - return &drpcSpaceClient{cc} +func NewDRPCSpaceSyncClient(cc drpc.Conn) DRPCSpaceSyncClient { + return &drpcSpaceSyncClient{cc} } -func (c *drpcSpaceClient) DRPCConn() drpc.Conn { return c.cc } +func (c *drpcSpaceSyncClient) DRPCConn() drpc.Conn { return c.cc } -func (c *drpcSpaceClient) HeadSync(ctx context.Context, in *HeadSyncRequest) (*HeadSyncResponse, error) { +func (c *drpcSpaceSyncClient) HeadSync(ctx context.Context, in *HeadSyncRequest) (*HeadSyncResponse, error) { out := new(HeadSyncResponse) - err := c.cc.Invoke(ctx, "/anySpace.Space/HeadSync", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) + err := c.cc.Invoke(ctx, "/spacesync.SpaceSync/HeadSync", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) if err != nil { return nil, err } return out, nil } -func (c *drpcSpaceClient) PushSpace(ctx context.Context, in *PushSpaceRequest) (*PushSpaceResponse, error) { - out := new(PushSpaceResponse) - err := c.cc.Invoke(ctx, "/anySpace.Space/PushSpace", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) +func (c *drpcSpaceSyncClient) SpacePush(ctx context.Context, in *SpacePushRequest) (*SpacePushResponse, error) { + out := new(SpacePushResponse) + err := c.cc.Invoke(ctx, "/spacesync.SpaceSync/SpacePush", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) if err != nil { return nil, err } return out, nil } -func (c *drpcSpaceClient) PullSpace(ctx context.Context, in *PullSpaceRequest) (*PullSpaceResponse, error) { - out := new(PullSpaceResponse) - err := c.cc.Invoke(ctx, "/anySpace.Space/PullSpace", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) +func (c *drpcSpaceSyncClient) SpacePull(ctx context.Context, in *SpacePullRequest) (*SpacePullResponse, error) { + out := new(SpacePullResponse) + err := c.cc.Invoke(ctx, "/spacesync.SpaceSync/SpacePull", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, in, out) if err != nil { return nil, err } return out, nil } -func (c *drpcSpaceClient) Stream(ctx context.Context) (DRPCSpace_StreamClient, error) { - stream, err := c.cc.NewStream(ctx, "/anySpace.Space/Stream", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}) +func (c *drpcSpaceSyncClient) ObjectSyncStream(ctx context.Context) (DRPCSpaceSync_ObjectSyncStreamClient, error) { + stream, err := c.cc.NewStream(ctx, "/spacesync.SpaceSync/ObjectSyncStream", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}) if err != nil { return nil, err } - x := &drpcSpace_StreamClient{stream} + x := &drpcSpaceSync_ObjectSyncStreamClient{stream} return x, nil } -type DRPCSpace_StreamClient interface { +type DRPCSpaceSync_ObjectSyncStreamClient interface { drpc.Stream Send(*ObjectSyncMessage) error Recv() (*ObjectSyncMessage, error) } -type drpcSpace_StreamClient struct { +type drpcSpaceSync_ObjectSyncStreamClient struct { drpc.Stream } -func (x *drpcSpace_StreamClient) Send(m *ObjectSyncMessage) error { +func (x *drpcSpaceSync_ObjectSyncStreamClient) Send(m *ObjectSyncMessage) error { return x.MsgSend(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}) } -func (x *drpcSpace_StreamClient) Recv() (*ObjectSyncMessage, error) { +func (x *drpcSpaceSync_ObjectSyncStreamClient) Recv() (*ObjectSyncMessage, error) { m := new(ObjectSyncMessage) if err := x.MsgRecv(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}); err != nil { return nil, err @@ -114,148 +114,148 @@ func (x *drpcSpace_StreamClient) Recv() (*ObjectSyncMessage, error) { return m, nil } -func (x *drpcSpace_StreamClient) RecvMsg(m *ObjectSyncMessage) error { +func (x *drpcSpaceSync_ObjectSyncStreamClient) RecvMsg(m *ObjectSyncMessage) error { return x.MsgRecv(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}) } -type DRPCSpaceServer interface { +type DRPCSpaceSyncServer interface { HeadSync(context.Context, *HeadSyncRequest) (*HeadSyncResponse, error) - PushSpace(context.Context, *PushSpaceRequest) (*PushSpaceResponse, error) - PullSpace(context.Context, *PullSpaceRequest) (*PullSpaceResponse, error) - Stream(DRPCSpace_StreamStream) error + SpacePush(context.Context, *SpacePushRequest) (*SpacePushResponse, error) + SpacePull(context.Context, *SpacePullRequest) (*SpacePullResponse, error) + ObjectSyncStream(DRPCSpaceSync_ObjectSyncStreamStream) error } -type DRPCSpaceUnimplementedServer struct{} +type DRPCSpaceSyncUnimplementedServer struct{} -func (s *DRPCSpaceUnimplementedServer) HeadSync(context.Context, *HeadSyncRequest) (*HeadSyncResponse, error) { +func (s *DRPCSpaceSyncUnimplementedServer) HeadSync(context.Context, *HeadSyncRequest) (*HeadSyncResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCSpaceUnimplementedServer) PushSpace(context.Context, *PushSpaceRequest) (*PushSpaceResponse, error) { +func (s *DRPCSpaceSyncUnimplementedServer) SpacePush(context.Context, *SpacePushRequest) (*SpacePushResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCSpaceUnimplementedServer) PullSpace(context.Context, *PullSpaceRequest) (*PullSpaceResponse, error) { +func (s *DRPCSpaceSyncUnimplementedServer) SpacePull(context.Context, *SpacePullRequest) (*SpacePullResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCSpaceUnimplementedServer) Stream(DRPCSpace_StreamStream) error { +func (s *DRPCSpaceSyncUnimplementedServer) ObjectSyncStream(DRPCSpaceSync_ObjectSyncStreamStream) error { return drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -type DRPCSpaceDescription struct{} +type DRPCSpaceSyncDescription struct{} -func (DRPCSpaceDescription) NumMethods() int { return 4 } +func (DRPCSpaceSyncDescription) NumMethods() int { return 4 } -func (DRPCSpaceDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { +func (DRPCSpaceSyncDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { case 0: - return "/anySpace.Space/HeadSync", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, + return "/spacesync.SpaceSync/HeadSync", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCSpaceServer). + return srv.(DRPCSpaceSyncServer). HeadSync( ctx, in1.(*HeadSyncRequest), ) - }, DRPCSpaceServer.HeadSync, true + }, DRPCSpaceSyncServer.HeadSync, true case 1: - return "/anySpace.Space/PushSpace", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, + return "/spacesync.SpaceSync/SpacePush", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCSpaceServer). - PushSpace( + return srv.(DRPCSpaceSyncServer). + SpacePush( ctx, - in1.(*PushSpaceRequest), + in1.(*SpacePushRequest), ) - }, DRPCSpaceServer.PushSpace, true + }, DRPCSpaceSyncServer.SpacePush, true case 2: - return "/anySpace.Space/PullSpace", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, + return "/spacesync.SpaceSync/SpacePull", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCSpaceServer). - PullSpace( + return srv.(DRPCSpaceSyncServer). + SpacePull( ctx, - in1.(*PullSpaceRequest), + in1.(*SpacePullRequest), ) - }, DRPCSpaceServer.PullSpace, true + }, DRPCSpaceSyncServer.SpacePull, true case 3: - return "/anySpace.Space/Stream", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, + return "/spacesync.SpaceSync/ObjectSyncStream", drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return nil, srv.(DRPCSpaceServer). - Stream( - &drpcSpace_StreamStream{in1.(drpc.Stream)}, + return nil, srv.(DRPCSpaceSyncServer). + ObjectSyncStream( + &drpcSpaceSync_ObjectSyncStreamStream{in1.(drpc.Stream)}, ) - }, DRPCSpaceServer.Stream, true + }, DRPCSpaceSyncServer.ObjectSyncStream, true default: return "", nil, nil, nil, false } } -func DRPCRegisterSpace(mux drpc.Mux, impl DRPCSpaceServer) error { - return mux.Register(impl, DRPCSpaceDescription{}) +func DRPCRegisterSpaceSync(mux drpc.Mux, impl DRPCSpaceSyncServer) error { + return mux.Register(impl, DRPCSpaceSyncDescription{}) } -type DRPCSpace_HeadSyncStream interface { +type DRPCSpaceSync_HeadSyncStream interface { drpc.Stream SendAndClose(*HeadSyncResponse) error } -type drpcSpace_HeadSyncStream struct { +type drpcSpaceSync_HeadSyncStream struct { drpc.Stream } -func (x *drpcSpace_HeadSyncStream) SendAndClose(m *HeadSyncResponse) error { +func (x *drpcSpaceSync_HeadSyncStream) SendAndClose(m *HeadSyncResponse) error { if err := x.MsgSend(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}); err != nil { return err } return x.CloseSend() } -type DRPCSpace_PushSpaceStream interface { +type DRPCSpaceSync_SpacePushStream interface { drpc.Stream - SendAndClose(*PushSpaceResponse) error + SendAndClose(*SpacePushResponse) error } -type drpcSpace_PushSpaceStream struct { +type drpcSpaceSync_SpacePushStream struct { drpc.Stream } -func (x *drpcSpace_PushSpaceStream) SendAndClose(m *PushSpaceResponse) error { +func (x *drpcSpaceSync_SpacePushStream) SendAndClose(m *SpacePushResponse) error { if err := x.MsgSend(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}); err != nil { return err } return x.CloseSend() } -type DRPCSpace_PullSpaceStream interface { +type DRPCSpaceSync_SpacePullStream interface { drpc.Stream - SendAndClose(*PullSpaceResponse) error + SendAndClose(*SpacePullResponse) error } -type drpcSpace_PullSpaceStream struct { +type drpcSpaceSync_SpacePullStream struct { drpc.Stream } -func (x *drpcSpace_PullSpaceStream) SendAndClose(m *PullSpaceResponse) error { +func (x *drpcSpaceSync_SpacePullStream) SendAndClose(m *SpacePullResponse) error { if err := x.MsgSend(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}); err != nil { return err } return x.CloseSend() } -type DRPCSpace_StreamStream interface { +type DRPCSpaceSync_ObjectSyncStreamStream interface { drpc.Stream Send(*ObjectSyncMessage) error Recv() (*ObjectSyncMessage, error) } -type drpcSpace_StreamStream struct { +type drpcSpaceSync_ObjectSyncStreamStream struct { drpc.Stream } -func (x *drpcSpace_StreamStream) Send(m *ObjectSyncMessage) error { +func (x *drpcSpaceSync_ObjectSyncStreamStream) Send(m *ObjectSyncMessage) error { return x.MsgSend(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}) } -func (x *drpcSpace_StreamStream) Recv() (*ObjectSyncMessage, error) { +func (x *drpcSpaceSync_ObjectSyncStreamStream) Recv() (*ObjectSyncMessage, error) { m := new(ObjectSyncMessage) if err := x.MsgRecv(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}); err != nil { return nil, err @@ -263,6 +263,6 @@ func (x *drpcSpace_StreamStream) Recv() (*ObjectSyncMessage, error) { return m, nil } -func (x *drpcSpace_StreamStream) RecvMsg(m *ObjectSyncMessage) error { +func (x *drpcSpaceSync_ObjectSyncStreamStream) RecvMsg(m *ObjectSyncMessage) error { return x.MsgRecv(m, drpcEncoding_File_commonspace_spacesyncproto_protos_spacesync_proto{}) } diff --git a/node/nodespace/rpchandler.go b/node/nodespace/rpchandler.go index f7b3f6a1..0e9d7da4 100644 --- a/node/nodespace/rpchandler.go +++ b/node/nodespace/rpchandler.go @@ -10,7 +10,7 @@ type rpcHandler struct { s *service } -func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.PullSpaceRequest) (resp *spacesyncproto.PullSpaceResponse, err error) { +func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.SpacePullRequest) (resp *spacesyncproto.SpacePullResponse, err error) { sp, err := r.s.GetSpace(ctx, request.Id) if err != nil { if err != spacesyncproto.ErrSpaceMissing { @@ -25,7 +25,7 @@ func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.Pull return } - resp = &spacesyncproto.PullSpaceResponse{ + resp = &spacesyncproto.SpacePullResponse{ Payload: &spacesyncproto.SpacePayload{ SpaceHeader: spaceDesc.SpaceHeader, AclPayloadId: spaceDesc.AclId, @@ -37,7 +37,7 @@ func (r *rpcHandler) PullSpace(ctx context.Context, request *spacesyncproto.Pull return } -func (r *rpcHandler) PushSpace(ctx context.Context, req *spacesyncproto.PushSpaceRequest) (resp *spacesyncproto.PushSpaceResponse, err error) { +func (r *rpcHandler) PushSpace(ctx context.Context, req *spacesyncproto.SpacePushRequest) (resp *spacesyncproto.SpacePushResponse, err error) { description := commonspace.SpaceDescription{ SpaceHeader: req.Payload.SpaceHeader, AclId: req.Payload.AclPayloadId, @@ -50,7 +50,7 @@ func (r *rpcHandler) PushSpace(ctx context.Context, req *spacesyncproto.PushSpac if err != nil { return } - resp = &spacesyncproto.PushSpaceResponse{} + resp = &spacesyncproto.SpacePushResponse{} return } @@ -62,7 +62,7 @@ func (r *rpcHandler) HeadSync(ctx context.Context, req *spacesyncproto.HeadSyncR return sp.SpaceSyncRpc().HeadSync(ctx, req) } -func (r *rpcHandler) Stream(stream spacesyncproto.DRPCSpace_StreamStream) error { +func (r *rpcHandler) Stream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error { msg, err := stream.Recv() if err != nil { return err