diff --git a/.mockery.yaml b/.mockery.yaml index 5d4479f50..63008e6b3 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -1,10 +1,10 @@ dir: "{{.InterfaceDir}}/mock_{{.PackageName}}" -testonly: True +#testonly: True with-expecter: True all: False outpkg: "mock_{{.PackageName}}" packages: - github.com/anyproto/anytype-heart/space/typeprovider: + github.com/anyproto/anytype-heart/space/spacecore/typeprovider: interfaces: SmartBlockTypeProvider: github.com/anyproto/anytype-heart/core/wallet: @@ -15,7 +15,7 @@ packages: Sender: github.com/anyproto/anytype-heart/core/block/getblock: interfaces: - Picker: + ObjectGetter: github.com/anyproto/anytype-heart/pkg/lib/core: interfaces: Service: @@ -38,12 +38,26 @@ packages: github.com/anyproto/anytype-heart/core/system_object: interfaces: Service: + deriver: github.com/anyproto/anytype-heart/core/filestorage/filesync: interfaces: FileSync: - github.com/anyproto/anytype-heart/space: - interfaces: - Service: github.com/anyproto/anytype-heart/core/subscription: interfaces: CollectionService: + github.com/anyproto/anytype-heart/core/block/object/objectcache: + interfaces: + Cache: + github.com/anyproto/anytype-heart/core/indexer: + interfaces: + Indexer: + github.com/anyproto/anytype-heart/space/spacecore: + interfaces: + SpaceCoreService: + github.com/anyproto/anytype-heart/space/techspace: + interfaces: + TechSpace: + github.com/anyproto/anytype-heart/space: + interfaces: + bundledObjectsInstaller: + isNewAccount: diff --git a/clientlibrary/service/discovery_android.go b/clientlibrary/service/discovery_android.go index 59918b2e7..96e2f0991 100644 --- a/clientlibrary/service/discovery_android.go +++ b/clientlibrary/service/discovery_android.go @@ -3,7 +3,7 @@ package service import ( "fmt" - "github.com/anyproto/anytype-heart/space/localdiscovery" + "github.com/anyproto/anytype-heart/space/spacecore/localdiscovery" ) type AndroidDiscoveryProxy interface { diff --git a/core/anytype/account/service.go b/core/anytype/account/service.go index dfd816f18..6e52c1363 100644 --- a/core/anytype/account/service.go +++ b/core/anytype/account/service.go @@ -4,19 +4,22 @@ import ( "context" "fmt" "path/filepath" + "sync" "github.com/anyproto/any-sync/app" "github.com/anyproto/anytype-heart/core/anytype/config" - "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/core/block/editor/state" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" + "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/wallet" - "github.com/anyproto/anytype-heart/pkg/lib/core" "github.com/anyproto/anytype-heart/pkg/lib/gateway" "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" + "github.com/anyproto/anytype-heart/pkg/lib/threads" "github.com/anyproto/anytype-heart/space" + "github.com/anyproto/anytype-heart/space/spacecore" ) const CName = "account" @@ -26,15 +29,22 @@ var log = logging.Logger(CName) type Service interface { app.Component GetInfo(ctx context.Context, spaceID string) (*model.AccountInfo, error) + Delete(ctx context.Context) (spacecore.NetworkStatus, error) + RevertDeletion(ctx context.Context) error + AccountID() string + PersonalSpaceID() string } type service struct { - spaceService space.Service - coreService core.Service + spaceCore spacecore.SpaceCoreService + spaceService space.SpaceService wallet wallet.Wallet gateway gateway.Gateway config *config.Config - blockService *block.Service + objectCache objectcache.Cache + + once sync.Once + personalSpaceID string } func New() Service { @@ -42,13 +52,30 @@ func New() Service { } func (s *service) Init(a *app.App) (err error) { - s.spaceService = app.MustComponent[space.Service](a) - s.coreService = app.MustComponent[core.Service](a) + s.spaceService = app.MustComponent[space.SpaceService](a) + s.spaceCore = app.MustComponent[spacecore.SpaceCoreService](a) s.wallet = app.MustComponent[wallet.Wallet](a) s.gateway = app.MustComponent[gateway.Gateway](a) s.config = app.MustComponent[*config.Config](a) - s.blockService = app.MustComponent[*block.Service](a) - return nil + s.objectCache = app.MustComponent[objectcache.Cache](a) + s.personalSpaceID, err = s.spaceCore.DeriveID(context.Background(), spacecore.SpaceType) + return +} + +func (s *service) Delete(ctx context.Context) (spacecore.NetworkStatus, error) { + return spacecore.NetworkStatus{}, fmt.Errorf("not implemented") +} + +func (s *service) RevertDeletion(ctx context.Context) error { + return fmt.Errorf("not implemented") +} + +func (s *service) AccountID() string { + return s.wallet.Account().SignKey.GetPublic().Account() +} + +func (s *service) PersonalSpaceID() string { + return s.personalSpaceID } func (s *service) Name() (name string) { @@ -59,7 +86,7 @@ func (s *service) GetInfo(ctx context.Context, spaceID string) (*model.AccountIn deviceKey := s.wallet.GetDevicePrivkey() deviceId := deviceKey.GetPublic().Account() - analyticsId, err := s.getAnalyticsID() + analyticsId, err := s.getAnalyticsID(ctx) if err != nil { log.Errorf("failed to get analytics id: %s", err) } @@ -75,14 +102,20 @@ func (s *service) GetInfo(ctx context.Context, spaceID string) (*model.AccountIn cfg.CustomFileStorePath = s.wallet.RepoPath() } - ids, err := s.coreService.DerivePredefinedObjects(ctx, spaceID, false) + // TODO Temporary + personalIds, err := s.getIds(ctx, s.PersonalSpaceID()) if err != nil { - return nil, fmt.Errorf("derive predefined objects: %w", err) + return nil, fmt.Errorf("failed to get derived ids: %w", err) + } + + ids, err := s.getIds(ctx, spaceID) + if err != nil { + return nil, fmt.Errorf("failed to get derived ids: %w", err) } return &model.AccountInfo{ HomeObjectId: ids.Home, ArchiveObjectId: ids.Archive, - ProfileObjectId: ids.Profile, + ProfileObjectId: personalIds.Profile, MarketplaceWorkspaceId: addr.AnytypeMarketplaceWorkspace, AccountSpaceId: spaceID, WorkspaceObjectId: ids.Workspace, @@ -96,12 +129,26 @@ func (s *service) GetInfo(ctx context.Context, spaceID string) (*model.AccountIn }, nil } -func (s *service) getAnalyticsID() (string, error) { +func (s *service) getIds(ctx context.Context, spaceID string) (ids threads.DerivedSmartblockIds, err error) { + sp, err := s.spaceService.Get(ctx, spaceID) + if err != nil { + return + } + return sp.DerivedIDs(), nil +} + +func (s *service) getAnalyticsID(ctx context.Context) (string, error) { if s.config.AnalyticsId != "" { return s.config.AnalyticsId, nil } - accountObjectID := s.coreService.AccountObjects().Workspace - sb, err := s.blockService.PickBlock(context.Background(), accountObjectID) + ids, err := s.getIds(ctx, s.personalSpaceID) + if err != nil { + return "", fmt.Errorf("failed to get derived ids: %w", err) + } + sb, err := s.objectCache.GetObject(ctx, domain.FullID{ + ObjectID: ids.Workspace, + SpaceID: s.personalSpaceID, + }) if err != nil { return "", err } diff --git a/core/anytype/bootstrap.go b/core/anytype/bootstrap.go index de8935842..038ae5b0a 100644 --- a/core/anytype/bootstrap.go +++ b/core/anytype/bootstrap.go @@ -35,6 +35,7 @@ import ( "github.com/anyproto/anytype-heart/core/block/editor/converter" "github.com/anyproto/anytype-heart/core/block/export" importer "github.com/anyproto/anytype-heart/core/block/import" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/block/object/objectcache" "github.com/anyproto/anytype-heart/core/block/object/objectcreator" "github.com/anyproto/anytype-heart/core/block/object/objectgraph" @@ -66,14 +67,16 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/clientserver" - "github.com/anyproto/anytype-heart/space/credentialprovider" - "github.com/anyproto/anytype-heart/space/localdiscovery" - "github.com/anyproto/anytype-heart/space/peermanager" - "github.com/anyproto/anytype-heart/space/peerstore" - "github.com/anyproto/anytype-heart/space/storage" - "github.com/anyproto/anytype-heart/space/syncstatusprovider" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/clientserver" + "github.com/anyproto/anytype-heart/space/spacecore/credentialprovider" + "github.com/anyproto/anytype-heart/space/spacecore/localdiscovery" + "github.com/anyproto/anytype-heart/space/spacecore/peermanager" + "github.com/anyproto/anytype-heart/space/spacecore/peerstore" + "github.com/anyproto/anytype-heart/space/spacecore/storage" + "github.com/anyproto/anytype-heart/space/spacecore/syncstatusprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" + "github.com/anyproto/anytype-heart/space/techspace" "github.com/anyproto/anytype-heart/util/builtinobjects" "github.com/anyproto/anytype-heart/util/builtintemplate" "github.com/anyproto/anytype-heart/util/linkpreview" @@ -199,11 +202,12 @@ func Bootstrap(a *app.App, components ...app.Component) { Register(credentialprovider.New()). Register(commonspace.New()). Register(rpcstore.New()). - Register(space.New()). Register(filestore.New()). Register(fileservice.New()). Register(filestorage.New()). Register(filesync.New()). + Register(spacecore.New()). + Register(idresolver.New()). Register(localdiscovery.New()). Register(peermanager.New()). Register(typeprovider.New()). @@ -239,6 +243,8 @@ func Bootstrap(a *app.App, components ...app.Component) { Register(objectcreator.NewCreator()). Register(kanban.New()). Register(editor.NewObjectFactory()). + Register(techspace.New()). + Register(space.New()). Register(objectgraph.NewBuilder()). Register(account.New()) } diff --git a/core/anytype/config/config.go b/core/anytype/config/config.go index d88c1c829..8a25c68bd 100644 --- a/core/anytype/config/config.go +++ b/core/anytype/config/config.go @@ -236,6 +236,10 @@ func (c *Config) GetConfigPath() string { return filepath.Join(c.RepoPath, ConfigFileName) } +func (c *Config) IsNewAccount() bool { + return c.NewAccount +} + func getRandomPort() (int, error) { addr, err := net.ResolveTCPAddr("tcp", "0.0.0.0:0") if err != nil { diff --git a/core/application/account_create.go b/core/application/account_create.go index 0c72a64bb..4f16bcf09 100644 --- a/core/application/account_create.go +++ b/core/application/account_create.go @@ -16,7 +16,6 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" "github.com/anyproto/anytype-heart/util/pbtypes" ) @@ -87,7 +86,7 @@ func (s *Service) handleCustomStorageLocation(req *pb.RpcAccountCreateRequest, a func (s *Service) setAccountAndProfileDetails(ctx context.Context, req *pb.RpcAccountCreateRequest, newAcc *model.Account) error { newAcc.Name = req.Name - spaceID := app.MustComponent[space.Service](s.app).AccountId() + spaceID := app.MustComponent[account.Service](s.app).PersonalSpaceID() var err error newAcc.Info, err = app.MustComponent[account.Service](s.app).GetInfo(ctx, spaceID) if err != nil { diff --git a/core/application/account_create_from_export.go b/core/application/account_create_from_export.go index 05b4d946e..bf8110d71 100644 --- a/core/application/account_create_from_export.go +++ b/core/application/account_create_from_export.go @@ -14,13 +14,13 @@ import ( "github.com/anyproto/any-sync/util/crypto" "github.com/anyproto/anytype-heart/core/anytype" + "github.com/anyproto/anytype-heart/core/anytype/account" "github.com/anyproto/anytype-heart/core/anytype/config" "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/metrics" "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core" - "github.com/anyproto/anytype-heart/space" "github.com/anyproto/anytype-heart/util/builtinobjects" "github.com/anyproto/anytype-heart/util/constant" oserror "github.com/anyproto/anytype-heart/util/os" @@ -110,7 +110,7 @@ func (s *Service) CreateAccountFromExport(req *pb.RpcAccountRecoverFromLegacyExp return "", err } - spaceID := app.MustComponent[space.Service](s.app).AccountId() + spaceID := app.MustComponent[account.Service](s.app).PersonalSpaceID() if err = s.app.MustComponent(builtinobjects.CName).(builtinobjects.BuiltinObjects).InjectMigrationDashboard(spaceID); err != nil { return "", errors.Join(ErrBadInput, err) } diff --git a/core/application/account_delete.go b/core/application/account_delete.go index e7a79ff24..727d54a10 100644 --- a/core/application/account_delete.go +++ b/core/application/account_delete.go @@ -4,10 +4,11 @@ import ( "context" "errors" + "github.com/anyproto/anytype-heart/core/anytype/account" "github.com/anyproto/anytype-heart/core/configfetcher" "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" + "github.com/anyproto/anytype-heart/space/spacecore" ) var ( @@ -18,26 +19,44 @@ var ( func (s *Service) AccountDelete(ctx context.Context, req *pb.RpcAccountDeleteRequest) (*model.AccountStatus, error) { s.lock.RLock() defer s.lock.RUnlock() - - spaceService := s.app.MustComponent(space.CName).(space.Service) - resp, err := spaceService.DeleteAccount(ctx, req.Revert) - status := &model.AccountStatus{ - StatusType: model.AccountStatusType(resp.Status), - DeletionDate: resp.DeletionDate.Unix(), + convErr := func(err error) error { + switch err { + case spacecore.ErrSpaceIsDeleted: + return ErrAccountIsAlreadyDeleted + case spacecore.ErrSpaceDeletionPending: + return ErrAccountIsAlreadyDeleted + case spacecore.ErrSpaceIsCreated: + return ErrAccountIsActive + default: + return err + } + } + var ( + accountService = s.app.MustComponent(account.CName).(account.Service) + status *model.AccountStatus + ) + if !req.Revert { + networkStatus, err := accountService.Delete(ctx) + if err != nil { + return nil, convErr(err) + } + status = &model.AccountStatus{ + StatusType: model.AccountStatusType(networkStatus.Status), + DeletionDate: networkStatus.DeletionDate.Unix(), + } + } else { + err := accountService.RevertDeletion(ctx) + if err != nil { + return nil, convErr(err) + } + status = &model.AccountStatus{ + StatusType: model.AccountStatusType(spacecore.SpaceStatusCreated), + } } // so we will receive updated account status s.refreshRemoteAccountState() - - switch err { - case space.ErrSpaceIsDeleted: - return nil, ErrAccountIsAlreadyDeleted - case space.ErrSpaceDeletionPending: - return nil, ErrAccountIsAlreadyDeleted - case space.ErrSpaceIsCreated: - return nil, ErrAccountIsActive - } - return status, err + return status, nil } func (s *Service) refreshRemoteAccountState() { diff --git a/core/application/account_enable_local_network_sync.go b/core/application/account_enable_local_network_sync.go index 802de8d22..34d0218c9 100644 --- a/core/application/account_enable_local_network_sync.go +++ b/core/application/account_enable_local_network_sync.go @@ -3,7 +3,7 @@ package application import ( "github.com/anyproto/any-sync/app" - "github.com/anyproto/anytype-heart/space/localdiscovery" + "github.com/anyproto/anytype-heart/space/spacecore/localdiscovery" ) func (s *Service) EnableLocalNetworkSync() error { diff --git a/core/application/account_select.go b/core/application/account_select.go index 87b6ff1ea..21d128caa 100644 --- a/core/application/account_select.go +++ b/core/application/account_select.go @@ -19,7 +19,6 @@ import ( "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/core" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" ) // we cannot check the constant error from badger because they hardcoded it there @@ -50,7 +49,7 @@ func (s *Service) AccountSelect(ctx context.Context, req *pb.RpcAccountSelectReq objectCache := app.MustComponent[objectcache.Cache](s.app) objectCache.CloseBlocks() - spaceID := app.MustComponent[space.Service](s.app).AccountId() + spaceID := app.MustComponent[account.Service](s.app).PersonalSpaceID() acc := &model.Account{Id: req.Id} var err error acc.Info, err = app.MustComponent[account.Service](s.app).GetInfo(ctx, spaceID) @@ -122,7 +121,7 @@ func (s *Service) AccountSelect(ctx context.Context, req *pb.RpcAccountSelectReq } acc := &model.Account{Id: req.Id} - spaceID := app.MustComponent[space.Service](s.app).AccountId() + spaceID := app.MustComponent[account.Service](s.app).PersonalSpaceID() acc.Info, err = app.MustComponent[account.Service](s.app).GetInfo(ctx, spaceID) return acc, nil } diff --git a/core/block/cache.go b/core/block/cache.go index 572443fd3..fd6c71295 100644 --- a/core/block/cache.go +++ b/core/block/cache.go @@ -6,16 +6,18 @@ import ( "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/editor/state" + "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/session" ) -type Picker interface { - PickBlock(ctx context.Context, objectID string) (sb smartblock.SmartBlock, err error) +type ObjectGetter interface { + GetObject(ctx context.Context, objectID string) (sb smartblock.SmartBlock, err error) + GetObjectByFullID(ctx context.Context, id domain.FullID) (sb smartblock.SmartBlock, err error) } -func Do[t any](p Picker, objectID string, apply func(sb t) error) error { +func Do[t any](p ObjectGetter, objectID string, apply func(sb t) error) error { ctx := context.Background() - sb, err := p.PickBlock(ctx, objectID) + sb, err := p.GetObject(ctx, objectID) if err != nil { return err } @@ -31,8 +33,25 @@ func Do[t any](p Picker, objectID string, apply func(sb t) error) error { return apply(bb) } -func DoContext[t any](p Picker, ctx context.Context, objectID string, apply func(sb t) error) error { - sb, err := p.PickBlock(ctx, objectID) +func DoContext[t any](p ObjectGetter, ctx context.Context, objectID string, apply func(sb t) error) error { + sb, err := p.GetObject(ctx, objectID) + if err != nil { + return err + } + + bb, ok := sb.(t) + if !ok { + var dummy = new(t) + return fmt.Errorf("the interface %T is not implemented in %T", dummy, sb) + } + + sb.Lock() + defer sb.Unlock() + return apply(bb) +} + +func DoContextFullID[t any](p ObjectGetter, ctx context.Context, id domain.FullID, apply func(sb t) error) error { + sb, err := p.GetObjectByFullID(ctx, id) if err != nil { return err } @@ -50,7 +69,7 @@ func DoContext[t any](p Picker, ctx context.Context, objectID string, apply func // DoState2 picks two blocks and perform an action on them. The order of locks is always the same for two ids. // It correctly handles the case when two ids are the same. -func DoState2[t1, t2 any](s Picker, firstID, secondID string, f func(*state.State, *state.State, t1, t2) error) error { +func DoState2[t1, t2 any](s ObjectGetter, firstID, secondID string, f func(*state.State, *state.State, t1, t2) error) error { if firstID == secondID { return DoStateAsync(s, firstID, func(st *state.State, b t1) error { // Check that b satisfies t2 @@ -76,9 +95,9 @@ func DoState2[t1, t2 any](s Picker, firstID, secondID string, f func(*state.Stat }) } -func DoStateAsync[t any](p Picker, id string, apply func(s *state.State, sb t) error, flags ...smartblock.ApplyFlag) error { +func DoStateAsync[t any](p ObjectGetter, id string, apply func(s *state.State, sb t) error, flags ...smartblock.ApplyFlag) error { ctx := context.Background() - sb, err := p.PickBlock(ctx, id) + sb, err := p.GetObject(ctx, id) if err != nil { return err } @@ -102,8 +121,8 @@ func DoStateAsync[t any](p Picker, id string, apply func(s *state.State, sb t) e } // TODO rename to something more meaningful -func DoStateCtx[t any](p Picker, ctx session.Context, id string, apply func(s *state.State, sb t) error, flags ...smartblock.ApplyFlag) error { - sb, err := p.PickBlock(context.Background(), id) +func DoStateCtx[t any](p ObjectGetter, ctx session.Context, id string, apply func(s *state.State, sb t) error, flags ...smartblock.ApplyFlag) error { + sb, err := p.GetObject(context.Background(), id) if err != nil { return err } diff --git a/core/block/collection/service.go b/core/block/collection/service.go index 4503bdffd..0b9f24a86 100644 --- a/core/block/collection/service.go +++ b/core/block/collection/service.go @@ -35,7 +35,7 @@ type Service struct { lock *sync.RWMutex collections map[string]map[string]chan []string systemObjectService system_object.Service - picker block.Picker + picker block.ObjectGetter objectStore objectstore.ObjectStore } @@ -47,7 +47,7 @@ func New() *Service { } func (s *Service) Init(a *app.App) (err error) { - s.picker = app.MustComponent[block.Picker](a) + s.picker = app.MustComponent[block.ObjectGetter](a) s.objectStore = app.MustComponent[objectstore.ObjectStore](a) s.systemObjectService = app.MustComponent[system_object.Service](a) return nil diff --git a/core/block/collection/service_test.go b/core/block/collection/service_test.go index 741eedbf6..8a4b83faa 100644 --- a/core/block/collection/service_test.go +++ b/core/block/collection/service_test.go @@ -26,7 +26,11 @@ type testPicker struct { sb smartblock.SmartBlock } -func (t *testPicker) PickBlock(ctx context.Context, id string) (sb smartblock.SmartBlock, err error) { +func (t *testPicker) GetObject(ctx context.Context, id string) (sb smartblock.SmartBlock, err error) { + return t.sb, nil +} + +func (t *testPicker) GetObjectByFullID(ctx context.Context, id domain.FullID) (sb smartblock.SmartBlock, err error) { return t.sb, nil } diff --git a/core/block/create.go b/core/block/create.go index 798f64f42..6d6048d92 100644 --- a/core/block/create.go +++ b/core/block/create.go @@ -6,7 +6,6 @@ import ( "github.com/gogo/protobuf/types" - "github.com/anyproto/anytype-heart/core/block/editor" "github.com/anyproto/anytype-heart/core/block/editor/basic" "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/editor/state" @@ -31,13 +30,13 @@ func (s *Service) TemplateCreateFromObject(ctx context.Context, id string) (temp return fmt.Errorf("can't make template from this obect type") } objectTypeKeys = b.ObjectTypeKeys() - st, err = b.TemplateCreateFromObjectState() + st, err = s.templateCreateFromObjectState(b) return err }); err != nil { return } - spaceID, err := s.ResolveSpaceID(id) + spaceID, err := s.resolver.ResolveSpaceID(id) if err != nil { return "", fmt.Errorf("resolve spaceID: %w", err) } @@ -49,6 +48,23 @@ func (s *Service) TemplateCreateFromObject(ctx context.Context, id string) (temp return } +func (s *Service) templateCreateFromObjectState(sb smartblock.SmartBlock) (*state.State, error) { + st := sb.NewState().Copy() + st.SetLocalDetails(nil) + targetObjectTypeID, err := s.systemObjectService.GetTypeIdByKey(context.Background(), sb.SpaceID(), st.ObjectTypeKey()) + if err != nil { + return nil, fmt.Errorf("get type id by key: %s", err) + } + st.SetDetail(bundle.RelationKeyTargetObjectType.String(), pbtypes.String(targetObjectTypeID)) + st.SetObjectTypeKeys([]domain.TypeKey{bundle.TypeKeyTemplate, st.ObjectTypeKey()}) + for _, rel := range sb.Relations(st) { + if rel.DataSource == model.Relation_details && !rel.Hidden { + st.RemoveDetail(rel.Key) + } + } + return st, nil +} + func (s *Service) TemplateClone(spaceID string, id string) (templateID string, err error) { var ( st *state.State @@ -104,7 +120,7 @@ func (s *Service) ObjectDuplicate(ctx context.Context, id string) (objectID stri return } - spaceID, err := s.spaceService.ResolveSpaceID(id) + spaceID, err := s.resolver.ResolveSpaceID(id) if err != nil { return "", fmt.Errorf("resolve spaceID: %w", err) } @@ -146,39 +162,11 @@ func (s *Service) TemplateCreateFromObjectByObjectType(ctx context.Context, obje } func (s *Service) CreateWorkspace(ctx context.Context, req *pb.RpcWorkspaceCreateRequest) (spaceID string, err error) { - spc, err := s.spaceService.CreateSpace(ctx) + newSpace, err := s.spaceService.Create(ctx) if err != nil { - return "", fmt.Errorf("create space: %w", err) - } - - predefinedObjectIDs, err := s.anytype.DerivePredefinedObjects(ctx, spc.Id(), true) - if err != nil { - // TODO Delete space? - return "", fmt.Errorf("derive workspace object for space %s: %w", spc.Id(), err) - } - - err = DoStateAsync(s, s.anytype.AccountObjects().Workspace, func(st *state.State, b *editor.Workspaces) error { - spaces := pbtypes.CopyVal(st.Store().GetFields()["spaces"]) - if spaces == nil { - spaces = pbtypes.Struct(&types.Struct{ - Fields: map[string]*types.Value{ - spc.Id(): pbtypes.String(predefinedObjectIDs.Workspace), - }, - }) - } else { - spaces.GetStructValue().Fields[spc.Id()] = pbtypes.String(predefinedObjectIDs.Workspace) - } - st.SetInStore([]string{"spaces"}, spaces) - return nil - }) - if err != nil { - return "", fmt.Errorf("add space to account space: %w", err) - } - - err = s.indexer.EnsurePreinstalledObjects(spc.Id()) - if err != nil { - return "", fmt.Errorf("reindex space %s: %w", spc.Id(), err) + return "", fmt.Errorf("error creating space: %w", err) } + predefinedObjectIDs := newSpace.DerivedIDs() err = Do(s, predefinedObjectIDs.Workspace, func(b basic.DetailsSettable) error { details := make([]*pb.RpcObjectSetDetailsDetail, 0, len(req.Details.GetFields())) @@ -191,14 +179,13 @@ func (s *Service) CreateWorkspace(ctx context.Context, req *pb.RpcWorkspaceCreat return b.SetDetails(nil, details, true) }) if err != nil { - return "", fmt.Errorf("set details for space %s: %w", spc.Id(), err) + return "", fmt.Errorf("set details for space %s: %w", newSpace.Id(), err) } - - _, err = s.builtinObjectService.CreateObjectsForUseCase(nil, spc.Id(), req.UseCase) + _, err = s.builtinObjectService.CreateObjectsForUseCase(nil, newSpace.Id(), req.UseCase) if err != nil { return "", fmt.Errorf("import use-case: %w", err) } - return spc.Id(), err + return newSpace.Id(), err } // CreateLinkToTheNewObject creates an object and stores the link to it in the context block diff --git a/core/block/create_object.go b/core/block/create_object.go deleted file mode 100644 index c7999dbb6..000000000 --- a/core/block/create_object.go +++ /dev/null @@ -1,76 +0,0 @@ -package block - -import ( - "context" - "fmt" - "time" - - "github.com/anyproto/any-sync/commonspace" - "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" - - "github.com/anyproto/anytype-heart/core/block/editor/smartblock" - "github.com/anyproto/anytype-heart/core/block/object/objectcache" - "github.com/anyproto/anytype-heart/core/domain" - coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" -) - -func (s *Service) CreateTreePayload(ctx context.Context, spaceID string, tp coresb.SmartBlockType, createdTime time.Time) (treestorage.TreeStorageCreatePayload, error) { - space, err := s.spaceService.GetSpace(ctx, spaceID) - if err != nil { - return treestorage.TreeStorageCreatePayload{}, err - } - return s.CreateTreePayloadWithSpaceAndCreatedTime(ctx, space, tp, createdTime) -} - -func (s *Service) CreateTreePayloadWithSpace(ctx context.Context, space commonspace.Space, tp coresb.SmartBlockType) (treestorage.TreeStorageCreatePayload, error) { - return s.CreateTreePayloadWithSpaceAndCreatedTime(ctx, space, tp, time.Now()) -} - -func (s *Service) CreateTreePayloadWithSpaceAndCreatedTime(ctx context.Context, space commonspace.Space, tp coresb.SmartBlockType, createdTime time.Time) (treestorage.TreeStorageCreatePayload, error) { - changePayload, err := createChangePayload(tp, nil) - if err != nil { - return treestorage.TreeStorageCreatePayload{}, err - } - treePayload, err := createPayload(space.Id(), s.commonAccount.Account().SignKey, changePayload, createdTime.Unix()) - if err != nil { - return treestorage.TreeStorageCreatePayload{}, err - } - return space.TreeBuilder().CreateTree(ctx, treePayload) -} - -func (s *Service) CreateTreeObjectWithPayload(ctx context.Context, spaceID string, payload treestorage.TreeStorageCreatePayload, initFunc smartblock.InitFunc) (sb smartblock.SmartBlock, err error) { - space, err := s.spaceService.GetSpace(ctx, spaceID) - if err != nil { - return nil, err - } - id := domain.FullID{ - SpaceID: spaceID, - ObjectID: payload.RootRawChange.Id, - } - tr, err := space.TreeBuilder().PutTree(ctx, payload, nil) - if err != nil { - err = fmt.Errorf("failed to put tree: %w", err) - return - } - if tr != nil { - tr.Close() - } - return s.cacheCreatedObject(ctx, id, initFunc) -} - -func (s *Service) CreateTreeObject(ctx context.Context, spaceID string, tp coresb.SmartBlockType, initFunc smartblock.InitFunc) (sb smartblock.SmartBlock, err error) { - space, err := s.spaceService.GetSpace(ctx, spaceID) - if err != nil { - return nil, err - } - payload, err := s.CreateTreePayloadWithSpace(ctx, space, tp) - if err != nil { - return nil, err - } - return s.CreateTreeObjectWithPayload(ctx, spaceID, payload, initFunc) -} - -func (s *Service) cacheCreatedObject(ctx context.Context, id domain.FullID, initFunc smartblock.InitFunc) (sb smartblock.SmartBlock, err error) { - ctx = objectcache.ContextWithCreateOption(ctx, initFunc) - return s.objectCache.GetObject(ctx, id) -} diff --git a/core/block/delete.go b/core/block/delete.go index 98a120b8d..37ab8aaa4 100644 --- a/core/block/delete.go +++ b/core/block/delete.go @@ -18,7 +18,7 @@ import ( ) func (s *Service) DeleteObject(objectID string) (err error) { - spaceID, err := s.spaceService.ResolveSpaceID(objectID) + spaceID, err := s.resolver.ResolveSpaceID(objectID) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -70,7 +70,8 @@ func (s *Service) DeleteObject(objectID string) (err error) { }) default: var space commonspace.Space - space, err = s.spaceService.GetSpace(context.Background(), spaceID) + // TODO: [MR] should we do this via spaceService instead? + space, err = s.spaceCore.Get(context.Background(), spaceID) if err != nil { return } diff --git a/core/block/derive.go b/core/block/derive.go deleted file mode 100644 index ac1342706..000000000 --- a/core/block/derive.go +++ /dev/null @@ -1,115 +0,0 @@ -package block - -import ( - "context" - "errors" - "fmt" - "time" - - "github.com/anyproto/any-sync/commonspace" - "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" - "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" - "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" - "github.com/anyproto/any-sync/commonspace/spacesyncproto" - "go.uber.org/zap" - - "github.com/anyproto/anytype-heart/core/block/editor/smartblock" - "github.com/anyproto/anytype-heart/core/block/editor/state" - "github.com/anyproto/anytype-heart/core/block/object/objectcache" - "github.com/anyproto/anytype-heart/core/block/source" - "github.com/anyproto/anytype-heart/core/domain" -) - -const ( - derivedObjectLoadTimeout = time.Minute * 30 -) - -// DeriveTreeCreatePayload creates payload for the tree of derived object. -// Method should be called before DeriveObject to prepare payload -func (s *Service) DeriveTreeCreatePayload( - ctx context.Context, - spaceID string, - key domain.UniqueKey, -) (treestorage.TreeStorageCreatePayload, error) { - space, err := s.spaceService.GetSpace(ctx, spaceID) - if err != nil { - return treestorage.TreeStorageCreatePayload{}, err - } - changePayload, err := createChangePayload(key.SmartblockType(), key) - if err != nil { - return treestorage.TreeStorageCreatePayload{}, err - } - treePayload := derivePayload(space.Id(), s.commonAccount.Account().SignKey, changePayload) - create, err := space.TreeBuilder().CreateTree(context.Background(), treePayload) - return create, err -} - -// DeriveObject derives the object with id specified in the payload and triggers cache.Get -// DeriveTreeCreatePayload should be called first to prepare the payload and derive the tree -func (s *Service) DeriveObject( - ctx context.Context, spaceID string, payload treestorage.TreeStorageCreatePayload, newAccount bool, -) (err error) { - space, err := s.spaceService.GetSpace(ctx, spaceID) - if err != nil { - return fmt.Errorf("get space: %w", err) - } - _, err = s.getDerivedObject(ctx, space, &payload, newAccount, func(id string) *smartblock.InitContext { - return &smartblock.InitContext{Ctx: ctx, SpaceID: spaceID, State: state.NewDoc(id, nil).(*state.State)} - }) - if err != nil { - log.With(zap.Error(err)).Debug("derived object with error") - return - } - return nil -} - -func (s *Service) DeriveTreeObjectWithUniqueKey(ctx context.Context, spaceID string, key domain.UniqueKey, initFunc smartblock.InitFunc) (sb smartblock.SmartBlock, err error) { - payload, err := s.DeriveTreeCreatePayload(ctx, spaceID, key) - if err != nil { - return nil, err - } - return s.CreateTreeObjectWithPayload(ctx, spaceID, payload, initFunc) -} - -func (s *Service) getDerivedObject( - ctx context.Context, space commonspace.Space, payload *treestorage.TreeStorageCreatePayload, newAccount bool, initFunc smartblock.InitFunc, -) (sb smartblock.SmartBlock, err error) { - id := domain.FullID{ - SpaceID: space.Id(), - ObjectID: payload.RootRawChange.Id, - } - if newAccount { - var tr objecttree.ObjectTree - tr, err = space.TreeBuilder().PutTree(ctx, *payload, nil) - s.predefinedObjectWasMissing = true - if err != nil { - if !errors.Is(err, treestorage.ErrTreeExists) { - err = fmt.Errorf("failed to put tree: %w", err) - return - } - s.predefinedObjectWasMissing = false - // the object exists locally - return s.objectCache.GetObjectWithTimeout(ctx, id) - } - tr.Close() - return s.cacheCreatedObject(ctx, id, initFunc) - } - - // timing out when getting objects from remote - // here we set very long timeout, because we must load these documents - ctx, cancel := context.WithTimeout(ctx, derivedObjectLoadTimeout) - - // TODO: revive p2p (right now we are not ready to load from local clients due to the fact that we need to know when local peers connect) - ctx = objectcache.ContextWithBuildOptions(ctx, source.BuildOptions{}) - defer cancel() - - sb, err = s.objectCache.GetObjectWithTimeout(ctx, id) - if err != nil { - if errors.Is(err, treechangeproto.ErrGetTree) { - err = spacesyncproto.ErrSpaceMissing - } - err = fmt.Errorf("failed to get object from node: %w", err) - return - } - return -} diff --git a/core/block/editor/basic/basic.go b/core/block/editor/basic/basic.go index e3cd19092..834790dd2 100644 --- a/core/block/editor/basic/basic.go +++ b/core/block/editor/basic/basic.go @@ -374,7 +374,7 @@ func (bs *basic) AddRelationAndSet(ctx session.Context, systemObjectService syst return smartblock.ErrSimpleBlockNotFound } - rel, err := systemObjectService.FetchRelationByKey(s.SpaceID(), req.RelationKey) + rel, err := systemObjectService.FetchRelationByKey(bs.SpaceID(), req.RelationKey) if err != nil { return } diff --git a/core/block/editor/basic/details.go b/core/block/editor/basic/details.go index a2df4d8b4..61255ad95 100644 --- a/core/block/editor/basic/details.go +++ b/core/block/editor/basic/details.go @@ -104,7 +104,7 @@ func (bs *basic) createDetailUpdate(st *state.State, detail *pb.RpcObjectSetDeta if err := bs.addRelationLink(detail.Key, st); err != nil { return nil, err } - if err := bs.validateDetailFormat(st.SpaceID(), detail.Key, detail.Value); err != nil { + if err := bs.validateDetailFormat(bs.SpaceID(), detail.Key, detail.Value); err != nil { return nil, fmt.Errorf("failed to validate relation: %w", err) } } @@ -259,7 +259,7 @@ func (bs *basic) setDetailSpecialCases(st *state.State, detail *pb.RpcObjectSetD func (bs *basic) addRelationLink(relationKey string, st *state.State) error { // TODO: add relation.WithWorkspaceId(workspaceId) filter - rel, err := bs.systemObjectService.FetchRelationByKey(st.SpaceID(), relationKey) + rel, err := bs.systemObjectService.FetchRelationByKey(bs.SpaceID(), relationKey) if err != nil || rel == nil { return fmt.Errorf("failed to get relation: %w", err) } diff --git a/core/block/editor/bookmark/bookmark.go b/core/block/editor/bookmark/bookmark.go index 894b05c76..32ac84080 100644 --- a/core/block/editor/bookmark/bookmark.go +++ b/core/block/editor/bookmark/bookmark.go @@ -26,7 +26,7 @@ var log = logging.Logger("bookmark") func NewBookmark( sb smartblock.SmartBlock, - picker getblock.Picker, + picker getblock.ObjectGetter, bookmarkSvc BookmarkService, objectStore objectstore.ObjectStore, ) Bookmark { @@ -51,7 +51,7 @@ type BookmarkService interface { type sbookmark struct { smartblock.SmartBlock - picker getblock.Picker + picker getblock.ObjectGetter bookmarkSvc BookmarkService objectStore objectstore.ObjectStore } diff --git a/core/block/editor/converter/layout.go b/core/block/editor/converter/layout.go index 99628c958..9729978e6 100644 --- a/core/block/editor/converter/layout.go +++ b/core/block/editor/converter/layout.go @@ -18,7 +18,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/database" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" "github.com/anyproto/anytype-heart/util/slice" ) diff --git a/core/block/editor/dataview/dataview.go b/core/block/editor/dataview/dataview.go index afbd67d29..4753389d6 100644 --- a/core/block/editor/dataview/dataview.go +++ b/core/block/editor/dataview/dataview.go @@ -23,7 +23,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" "github.com/anyproto/anytype-heart/util/slice" ) @@ -105,7 +105,7 @@ func (d *sdataview) SetSource(ctx session.Context, blockId string, source []stri return d.Apply(s, smartblock.NoRestrictions) } - dvContent, _, err := BlockBySource(s.SpaceID(), d.sbtProvider, d.systemObjectService, source) + dvContent, _, err := BlockBySource(d.SpaceID(), d.sbtProvider, d.systemObjectService, source) if err != nil { return } @@ -130,7 +130,7 @@ func (d *sdataview) AddRelations(ctx session.Context, blockId string, relationKe return err } for _, key := range relationKeys { - relation, err2 := d.systemObjectService.FetchRelationByKey(s.SpaceID(), key) + relation, err2 := d.systemObjectService.FetchRelationByKey(d.SpaceID(), key) if err2 != nil { return err2 } diff --git a/core/block/editor/factory.go b/core/block/editor/factory.go index 3bc4b42d8..de8c82373 100644 --- a/core/block/editor/factory.go +++ b/core/block/editor/factory.go @@ -1,10 +1,12 @@ package editor import ( + "context" "fmt" "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" + "github.com/gogo/protobuf/types" "github.com/anyproto/anytype-heart/core/anytype/config" "github.com/anyproto/anytype-heart/core/block/editor/bookmark" @@ -22,11 +24,24 @@ import ( coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" ) var log = logging.Logger("anytype-mw-editor") +type spaceIndexer interface { + smartblock.Indexer + ReindexSpace(spaceID string) error +} + +type personalIDProvider interface { + PersonalSpaceID() string +} + +type bundledObjectsInstaller interface { + InstallBundledObjects(ctx context.Context, spaceID string, ids []string) ([]string, []*types.Struct, error) +} + type ObjectFactory struct { anytype core.Service bookmarkService bookmark.BookmarkService @@ -40,10 +55,11 @@ type ObjectFactory struct { tempDirProvider core.TempDirProvider fileService files.Service config *config.Config - picker getblock.Picker + picker getblock.ObjectGetter eventSender event.Sender restrictionService restriction.Service - indexer smartblock.Indexer + indexer spaceIndexer + spaceService spaceService objectDeriver objectDeriver } @@ -65,10 +81,11 @@ func (f *ObjectFactory) Init(a *app.App) (err error) { f.tempDirProvider = app.MustComponent[core.TempDirProvider](a) f.sbtProvider = app.MustComponent[typeprovider.SmartBlockTypeProvider](a) f.layoutConverter = app.MustComponent[converter.LayoutConverter](a) - f.picker = app.MustComponent[getblock.Picker](a) - f.indexer = app.MustComponent[smartblock.Indexer](a) + f.picker = app.MustComponent[getblock.ObjectGetter](a) + f.indexer = app.MustComponent[spaceIndexer](a) f.eventSender = app.MustComponent[event.Sender](a) f.objectDeriver = app.MustComponent[objectDeriver](a) + f.spaceService = app.MustComponent[spaceService](a) return nil } @@ -214,6 +231,11 @@ func (f *ObjectFactory) New(sbType coresb.SmartBlockType) (smartblock.SmartBlock f.eventSender, f.objectDeriver, ), nil + case coresb.SmartBlockTypeSpaceView: + return newSpaceView( + sb, + f.spaceService, + ), nil case coresb.SmartBlockTypeMissingObject: return NewMissingObject(sb), nil case coresb.SmartBlockTypeWidget: diff --git a/core/block/editor/file/file.go b/core/block/editor/file/file.go index 7ec85c331..dd9bd1279 100644 --- a/core/block/editor/file/file.go +++ b/core/block/editor/file/file.go @@ -47,7 +47,7 @@ func NewFile( idGetter PredefinedObjectsGetter, tempDirProvider core.TempDirProvider, fileService files.Service, - picker getblock.Picker, + picker getblock.ObjectGetter, ) File { return &sfile{ SmartBlock: sb, @@ -88,7 +88,7 @@ type sfile struct { fileSource BlockService tempDirProvider core.TempDirProvider fileService files.Service - picker getblock.Picker + picker getblock.ObjectGetter predefinedObjects PredefinedObjectsGetter } @@ -322,7 +322,7 @@ type dropFilesProcess struct { id string spaceID string s BlockService - picker getblock.Picker + picker getblock.ObjectGetter fileService files.Service tempDirProvider core.TempDirProvider root *dropFileEntry diff --git a/core/block/editor/file/uploader.go b/core/block/editor/file/uploader.go index c8b448b66..ade2f6f5d 100644 --- a/core/block/editor/file/uploader.go +++ b/core/block/editor/file/uploader.go @@ -45,7 +45,7 @@ func NewUploader( s BlockService, fileService files.Service, provider core.TempDirProvider, - picker getblock.Picker, + picker getblock.ObjectGetter, ) Uploader { return &uploader{ spaceID: spaceID, @@ -107,7 +107,7 @@ func (ur UploadResult) ToBlock() file.Block { type uploader struct { spaceID string service BlockService - picker getblock.Picker + picker getblock.ObjectGetter block file.Block getReader func(ctx context.Context) (*fileReader, error) name string diff --git a/core/block/editor/file/uploader_test.go b/core/block/editor/file/uploader_test.go index 0490dc2ab..92e4f4bb9 100644 --- a/core/block/editor/file/uploader_test.go +++ b/core/block/editor/file/uploader_test.go @@ -42,7 +42,7 @@ func TestUploader_Upload(t *testing.T) { fx.fileService.EXPECT().ImageAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(im, nil) im.EXPECT().GetOriginalFile(gomock.Any()).Return(fx.file, nil) b := newBlock(model.BlockContentFile_Image) - fx.picker.EXPECT().PickBlock(mock.Anything, mock.Anything).Return(nil, nil) + fx.picker.EXPECT().GetObject(mock.Anything, mock.Anything).Return(nil, nil) fx.file.EXPECT().Meta().Return(&files.FileMeta{Media: "image/jpg"}).AnyTimes() res := fx.Uploader.SetBlock(b).SetFile("./testdata/unnamed.jpg").Upload(ctx) require.NoError(t, res.Err) @@ -55,7 +55,7 @@ func TestUploader_Upload(t *testing.T) { fx := newFixture(t) defer fx.tearDown() im := fx.newImage("123") - fx.picker.EXPECT().PickBlock(mock.Anything, mock.Anything).Return(nil, nil) + fx.picker.EXPECT().GetObject(mock.Anything, mock.Anything).Return(nil, nil) fx.fileService.EXPECT().ImageAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(im, nil) im.EXPECT().GetOriginalFile(gomock.Any()) res := fx.Uploader.AutoType(true).SetFile("./testdata/unnamed.jpg").Upload(ctx) @@ -71,7 +71,7 @@ func TestUploader_Upload(t *testing.T) { Added: time.Now(), } // fx.anytype.EXPECT().ImageAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, image.ErrFormat) - fx.picker.EXPECT().PickBlock(mock.Anything, mock.Anything).Return(nil, nil) + fx.picker.EXPECT().GetObject(mock.Anything, mock.Anything).Return(nil, nil) fx.fileService.EXPECT().FileAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(fx.newFile("123", meta), nil) b := newBlock(model.BlockContentFile_Image) res := fx.Uploader.SetBlock(b).SetFile("./testdata/test.txt").Upload(ctx) @@ -92,7 +92,7 @@ func TestUploader_Upload(t *testing.T) { fx := newFixture(t) defer fx.tearDown() im := fx.newImage("123") - fx.picker.EXPECT().PickBlock(mock.Anything, mock.Anything).Return(nil, nil) + fx.picker.EXPECT().GetObject(mock.Anything, mock.Anything).Return(nil, nil) fx.fileService.EXPECT().ImageAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(im, nil) im.EXPECT().GetOriginalFile(gomock.Any()) res := fx.Uploader.AutoType(true).SetUrl(serv.URL + "/unnamed.jpg").Upload(ctx) @@ -115,7 +115,7 @@ func TestUploader_Upload(t *testing.T) { fx := newFixture(t) defer fx.tearDown() im := fx.newImage("123") - fx.picker.EXPECT().PickBlock(mock.Anything, mock.Anything).Return(nil, nil) + fx.picker.EXPECT().GetObject(mock.Anything, mock.Anything).Return(nil, nil) fx.fileService.EXPECT().ImageAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(im, nil) im.EXPECT().GetOriginalFile(gomock.Any()) res := fx.Uploader.AutoType(true).SetUrl(serv.URL + "/unnamed.jpg").Upload(ctx) @@ -137,7 +137,7 @@ func TestUploader_Upload(t *testing.T) { fx := newFixture(t) defer fx.tearDown() im := fx.newImage("123") - fx.picker.EXPECT().PickBlock(mock.Anything, mock.Anything).Return(nil, nil) + fx.picker.EXPECT().GetObject(mock.Anything, mock.Anything).Return(nil, nil) fx.fileService.EXPECT().ImageAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(im, nil) im.EXPECT().GetOriginalFile(gomock.Any()) res := fx.Uploader.AutoType(true).SetUrl(serv.URL + "/unnamed.jpg?text=text").Upload(ctx) @@ -151,7 +151,7 @@ func TestUploader_Upload(t *testing.T) { t.Run("bytes", func(t *testing.T) { fx := newFixture(t) defer fx.tearDown() - fx.picker.EXPECT().PickBlock(mock.Anything, mock.Anything).Return(nil, nil) + fx.picker.EXPECT().GetObject(mock.Anything, mock.Anything).Return(nil, nil) fx.fileService.EXPECT().FileAdd(gomock.Any(), gomock.Any(), gomock.Any()).Return(fx.newFile("123", &files.FileMeta{}), nil) res := fx.Uploader.SetBytes([]byte("my bytes")).SetName("filename").Upload(ctx) require.NoError(t, res.Err) @@ -161,7 +161,7 @@ func TestUploader_Upload(t *testing.T) { } func newFixture(t *testing.T) *uplFixture { - picker := mock_getblock.NewMockPicker(t) + picker := mock_getblock.NewMockObjectGetter(t) fx := &uplFixture{ ctrl: gomock.NewController(t), picker: picker, @@ -181,7 +181,7 @@ type uplFixture struct { file *testMock.MockFile fileService *testMock.MockFileService ctrl *gomock.Controller - picker *mock_getblock.MockPicker + picker *mock_getblock.MockObjectGetter } func (fx *uplFixture) newImage(hash string) *testMock.MockImage { diff --git a/core/block/editor/page.go b/core/block/editor/page.go index 73bc287c6..4b5c8e6a5 100644 --- a/core/block/editor/page.go +++ b/core/block/editor/page.go @@ -23,7 +23,7 @@ import ( coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) @@ -48,7 +48,7 @@ func NewPage( objectStore objectstore.ObjectStore, anytype core.Service, fileBlockService file.BlockService, - picker getblock.Picker, + picker getblock.ObjectGetter, bookmarkService bookmark.BookmarkService, systemObjectService system_object.Service, tempDirProvider core.TempDirProvider, @@ -124,7 +124,7 @@ func (p *Page) CreationStateMigration(ctx *smartblock.InitContext) migration.Mig if err != nil { log.Errorf("failed to create unique key: %v", err) } else { - otype, err := p.systemObjectService.GetObjectByUniqueKey(s.SpaceID(), uk) + otype, err := p.systemObjectService.GetObjectByUniqueKey(p.SpaceID(), uk) if err != nil { log.Errorf("failed to get object by unique key: %v", err) } else { diff --git a/core/block/editor/profile.go b/core/block/editor/profile.go index 032a2b241..639c21caf 100644 --- a/core/block/editor/profile.go +++ b/core/block/editor/profile.go @@ -46,7 +46,7 @@ func NewProfile( systemObjectService system_object.Service, fileBlockService file.BlockService, anytype core.Service, - picker getblock.Picker, + picker getblock.ObjectGetter, bookmarkService bookmark.BookmarkService, tempDirProvider core.TempDirProvider, layoutConverter converter.LayoutConverter, diff --git a/core/block/editor/smartblock/smartblock.go b/core/block/editor/smartblock/smartblock.go index 04a231862..754fe0c8a 100644 --- a/core/block/editor/smartblock/smartblock.go +++ b/core/block/editor/smartblock/smartblock.go @@ -126,7 +126,6 @@ type SmartBlock interface { AddRelationLinks(ctx session.Context, relationIds ...string) (err error) AddRelationLinksToState(s *state.State, relationIds ...string) (err error) RemoveExtraRelations(ctx session.Context, relationKeys []string) (err error) - TemplateCreateFromObjectState() (*state.State, error) SetVerticalAlign(ctx session.Context, align model.BlockVerticalAlign, ids ...string) error SetIsDeleted() IsDeleted() bool @@ -872,7 +871,7 @@ func (sb *smartBlock) AddRelationLinksToState(s *state.State, relationKeys ...st if len(relationKeys) == 0 { return } - relations, err := sb.systemObjectService.FetchRelationByKeys(s.SpaceID(), relationKeys...) + relations, err := sb.systemObjectService.FetchRelationByKeys(sb.SpaceID(), relationKeys...) if err != nil { return } @@ -989,23 +988,6 @@ func (sb *smartBlock) SetVerticalAlign(ctx session.Context, align model.BlockVer return sb.Apply(s) } -func (sb *smartBlock) TemplateCreateFromObjectState() (*state.State, error) { - st := sb.NewState().Copy() - st.SetLocalDetails(nil) - targetObjectTypeID, err := sb.systemObjectService.GetTypeIdByKey(context.Background(), st.SpaceID(), st.ObjectTypeKey()) - if err != nil { - return nil, fmt.Errorf("get type id by key: %s", err) - } - st.SetDetail(bundle.RelationKeyTargetObjectType.String(), pbtypes.String(targetObjectTypeID)) - st.SetObjectTypeKeys([]domain.TypeKey{bundle.TypeKeyTemplate, st.ObjectTypeKey()}) - for _, rel := range sb.Relations(st) { - if rel.DataSource == model.Relation_details && !rel.Hidden { - st.RemoveDetail(rel.Key) - } - } - return st, nil -} - func (sb *smartBlock) RemoveExtraRelations(ctx session.Context, relationIds []string) (err error) { st := sb.NewStateCtx(ctx) st.RemoveRelation(relationIds...) diff --git a/core/block/editor/spaceview.go b/core/block/editor/spaceview.go new file mode 100644 index 000000000..79b7a0756 --- /dev/null +++ b/core/block/editor/spaceview.go @@ -0,0 +1,89 @@ +package editor + +import ( + "errors" + "time" + + "github.com/gogo/protobuf/proto" + + "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + "github.com/anyproto/anytype-heart/core/block/editor/state" + "github.com/anyproto/anytype-heart/pkg/lib/bundle" + "github.com/anyproto/anytype-heart/pkg/lib/pb/model" + "github.com/anyproto/anytype-heart/space/spaceinfo" + "github.com/anyproto/anytype-heart/util/pbtypes" +) + +var ErrIncorrectSpaceInfo = errors.New("space info is incorrect") + +type spaceService interface { + OnViewCreated(spaceID string) +} + +// SpaceView is a wrapper around smartblock.SmartBlock that indicates the current space state +type SpaceView struct { + smartblock.SmartBlock + spaceService spaceService +} + +// newSpaceView creates a new SpaceView with given deps +func newSpaceView(sb smartblock.SmartBlock, spaceService spaceService) *SpaceView { + return &SpaceView{ + SmartBlock: sb, + spaceService: spaceService, + } +} + +// Init initializes SpaceView +func (s *SpaceView) Init(ctx *smartblock.InitContext) (err error) { + if err = s.SmartBlock.Init(ctx); err != nil { + return + } + spaceID, err := s.targetSpaceID() + if err != nil { + return + } + + s.DisableLayouts() + s.spaceService.OnViewCreated(spaceID) + return s.setSpaceInfo(ctx.State, spaceinfo.SpaceInfo{}) +} + +func (s *SpaceView) TryClose(objectTTL time.Duration) (res bool, err error) { + return false, nil +} + +func (s *SpaceView) SetSpaceInfo(info spaceinfo.SpaceInfo) (err error) { + st := s.NewState() + if err = s.setSpaceInfo(st, info); err != nil { + return + } + return s.Apply(st) +} + +func (s *SpaceView) setSpaceInfo(st *state.State, info spaceinfo.SpaceInfo) (err error) { + st.SetLocalDetail(bundle.RelationKeySpaceLocalStatus.String(), pbtypes.Int64(int64(info.LocalStatus))) + st.SetLocalDetail(bundle.RelationKeySpaceRemoteStatus.String(), pbtypes.Int64(int64(info.RemoteStatus))) + return +} + +// targetSpaceID returns space id from the root of space object's tree +func (s *SpaceView) targetSpaceID() (id string, err error) { + changeInfo := s.Tree().ChangeInfo() + if changeInfo == nil { + return "", ErrIncorrectSpaceInfo + } + var ( + changePayload = &model.ObjectChangePayload{} + spaceHeader = &model.SpaceObjectHeader{} + ) + err = proto.Unmarshal(changeInfo.ChangePayload, changePayload) + if err != nil { + return "", ErrIncorrectSpaceInfo + } + err = proto.Unmarshal(changePayload.Data, spaceHeader) + if err != nil { + return "", ErrIncorrectSpaceInfo + } + return spaceHeader.SpaceID, nil +} diff --git a/core/block/editor/sub_objects_migration.go b/core/block/editor/sub_objects_migration.go index fe4a52ebf..9e7b31377 100644 --- a/core/block/editor/sub_objects_migration.go +++ b/core/block/editor/sub_objects_migration.go @@ -10,6 +10,7 @@ import ( "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/editor/state" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/pkg/lib/bundle" smartblock2 "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" @@ -17,7 +18,7 @@ import ( ) type objectDeriver interface { - DeriveTreeObjectWithUniqueKey(ctx context.Context, spaceID string, key domain.UniqueKey, initFunc smartblock.InitFunc) (sb smartblock.SmartBlock, err error) + DeriveTreeObject(ctx context.Context, spaceID string, params objectcache.TreeDerivationParams) (sb smartblock.SmartBlock, err error) } // Migrate legacy sub-objects to ordinary objects @@ -51,15 +52,18 @@ func (m *subObjectsMigration) migrateSubObject( if err != nil { return "", fmt.Errorf("unmarshal unique key: %w", err) } - sb, err := m.objectDeriver.DeriveTreeObjectWithUniqueKey(ctx, m.workspace.SpaceID(), uniqueKey, func(id string) *smartblock.InitContext { - st := state.NewDocWithUniqueKey(id, nil, uniqueKey).NewState() - st.SetDetails(details) - st.SetObjectTypeKey(typeKey) - return &smartblock.InitContext{ - IsNewObject: true, - State: st, - SpaceID: m.workspace.SpaceID(), - } + sb, err := m.objectDeriver.DeriveTreeObject(ctx, m.workspace.SpaceID(), objectcache.TreeDerivationParams{ + Key: uniqueKey, + InitFunc: func(id string) *smartblock.InitContext { + st := state.NewDocWithUniqueKey(id, nil, uniqueKey).NewState() + st.SetDetails(details) + st.SetObjectTypeKey(typeKey) + return &smartblock.InitContext{ + IsNewObject: true, + State: st, + SpaceID: m.workspace.SpaceID(), + } + }, }) if err != nil { return "", err diff --git a/core/block/editor/template.go b/core/block/editor/template.go index 15fd7b157..0bd5acb84 100644 --- a/core/block/editor/template.go +++ b/core/block/editor/template.go @@ -19,14 +19,14 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/core" coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) type Template struct { *Page - picker getblock.Picker + picker getblock.ObjectGetter } func NewTemplate( @@ -34,7 +34,7 @@ func NewTemplate( objectStore objectstore.ObjectStore, anytype core.Service, fileBlockService file.BlockService, - picker getblock.Picker, + picker getblock.ObjectGetter, bookmarkService bookmark.BookmarkService, systemObjectService system_object.Service, tempDirProvider core.TempDirProvider, diff --git a/core/block/editor/template_test.go b/core/block/editor/template_test.go index 3d163d591..a291dd4eb 100644 --- a/core/block/editor/template_test.go +++ b/core/block/editor/template_test.go @@ -32,7 +32,6 @@ func NewTemplateTest(t *testing.T, ctrl *gomock.Controller, templateName string) objectStore := testMock.NewMockObjectStore(ctrl) systemObjectService := mock_system_object.NewMockService(t) - systemObjectService.EXPECT().GetObjectTypes(mock.Anything).Return(nil, nil).Maybe() templ := &Template{ Page: &Page{ SmartBlock: sb, diff --git a/core/block/editor/workspaces.go b/core/block/editor/workspaces.go index bd9ab3928..5ba8b9829 100644 --- a/core/block/editor/workspaces.go +++ b/core/block/editor/workspaces.go @@ -19,7 +19,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/core" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/core/block/export/export.go b/core/block/export/export.go index 1b4c4c600..fc39ec8ee 100644 --- a/core/block/export/export.go +++ b/core/block/export/export.go @@ -19,6 +19,7 @@ import ( "github.com/anyproto/anytype-heart/core/block" sb "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/getblock" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/block/process" "github.com/anyproto/anytype-heart/core/converter" "github.com/anyproto/anytype-heart/core/converter/dot" @@ -38,8 +39,8 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/constant" oserror "github.com/anyproto/anytype-heart/util/os" "github.com/anyproto/anytype-heart/util/pbtypes" @@ -59,13 +60,14 @@ type Export interface { type export struct { blockService *block.Service - picker getblock.Picker + picker getblock.ObjectGetter objectStore objectstore.ObjectStore coreService core.Service sbtProvider typeprovider.SmartBlockTypeProvider fileService files.Service systemObjectService system_object.Service - spaceService space.Service + spaceService spacecore.SpaceCoreService + resolver idresolver.Resolver } func New() Export { @@ -77,10 +79,11 @@ func (e *export) Init(a *app.App) (err error) { e.coreService = a.MustComponent(core.CName).(core.Service) e.objectStore = a.MustComponent(objectstore.CName).(objectstore.ObjectStore) e.fileService = app.MustComponent[files.Service](a) - e.picker = app.MustComponent[getblock.Picker](a) + e.picker = app.MustComponent[getblock.ObjectGetter](a) + e.resolver = a.MustComponent(idresolver.CName).(idresolver.Resolver) e.sbtProvider = app.MustComponent[typeprovider.SmartBlockTypeProvider](a) e.systemObjectService = app.MustComponent[system_object.Service](a) - e.spaceService = app.MustComponent[space.Service](a) + e.spaceService = app.MustComponent[spacecore.SpaceCoreService](a) return } @@ -375,7 +378,7 @@ func (e *export) saveFiles(ctx context.Context, b sb.SmartBlock, queue process.Q } func (e *export) saveFile(ctx context.Context, wr writer, hash string) (err error) { - spaceID, err := e.spaceService.ResolveSpaceID(hash) + spaceID, err := e.resolver.ResolveSpaceID(hash) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } diff --git a/core/block/files.go b/core/block/files.go index 76988b696..c4c6d4567 100644 --- a/core/block/files.go +++ b/core/block/files.go @@ -81,7 +81,7 @@ func (s *Service) DownloadFile(ctx context.Context, req *pb.RpcFileDownloadReque } func (s *Service) getFileOrLargestImage(ctx context.Context, hash string) (files.File, error) { - spaceID, err := s.spaceService.ResolveSpaceID(hash) + spaceID, err := s.resolver.ResolveSpaceID(hash) if err != nil { return nil, fmt.Errorf("resolve spaceID: %w", err) } diff --git a/core/block/getblock/getblock.go b/core/block/getblock/getblock.go index de8d24234..ef847e52e 100644 --- a/core/block/getblock/getblock.go +++ b/core/block/getblock/getblock.go @@ -7,13 +7,13 @@ import ( "github.com/anyproto/anytype-heart/core/block/editor/smartblock" ) -type Picker interface { - PickBlock(ctx context.Context, id string) (sb smartblock.SmartBlock, err error) +type ObjectGetter interface { + GetObject(ctx context.Context, id string) (sb smartblock.SmartBlock, err error) } -func Do[t any](p Picker, objectID string, apply func(sb t) error) error { +func Do[t any](p ObjectGetter, objectID string, apply func(sb t) error) error { ctx := context.Background() - sb, err := p.PickBlock(ctx, objectID) + sb, err := p.GetObject(ctx, objectID) if err != nil { return err } diff --git a/core/block/getblock/mock_getblock/mock_ObjectGetter.go b/core/block/getblock/mock_getblock/mock_ObjectGetter.go new file mode 100644 index 000000000..2dc4b2e72 --- /dev/null +++ b/core/block/getblock/mock_getblock/mock_ObjectGetter.go @@ -0,0 +1,94 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_getblock + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock" +) + +// MockObjectGetter is an autogenerated mock type for the ObjectGetter type +type MockObjectGetter struct { + mock.Mock +} + +type MockObjectGetter_Expecter struct { + mock *mock.Mock +} + +func (_m *MockObjectGetter) EXPECT() *MockObjectGetter_Expecter { + return &MockObjectGetter_Expecter{mock: &_m.Mock} +} + +// GetObject provides a mock function with given fields: ctx, id +func (_m *MockObjectGetter) GetObject(ctx context.Context, id string) (smartblock.SmartBlock, error) { + ret := _m.Called(ctx, id) + + var r0 smartblock.SmartBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (smartblock.SmartBlock, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string) smartblock.SmartBlock); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(smartblock.SmartBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockObjectGetter_GetObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObject' +type MockObjectGetter_GetObject_Call struct { + *mock.Call +} + +// GetObject is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *MockObjectGetter_Expecter) GetObject(ctx interface{}, id interface{}) *MockObjectGetter_GetObject_Call { + return &MockObjectGetter_GetObject_Call{Call: _e.mock.On("GetObject", ctx, id)} +} + +func (_c *MockObjectGetter_GetObject_Call) Run(run func(ctx context.Context, id string)) *MockObjectGetter_GetObject_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockObjectGetter_GetObject_Call) Return(sb smartblock.SmartBlock, err error) *MockObjectGetter_GetObject_Call { + _c.Call.Return(sb, err) + return _c +} + +func (_c *MockObjectGetter_GetObject_Call) RunAndReturn(run func(context.Context, string) (smartblock.SmartBlock, error)) *MockObjectGetter_GetObject_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockObjectGetter interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockObjectGetter creates a new instance of MockObjectGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockObjectGetter(t mockConstructorTestingTNewMockObjectGetter) *MockObjectGetter { + mock := &MockObjectGetter{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/block/getblock/mock_getblock/mock_Picker.go b/core/block/getblock/mock_getblock/mock_Picker.go deleted file mode 100644 index 4c124e296..000000000 --- a/core/block/getblock/mock_getblock/mock_Picker.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by mockery v2.26.1. DO NOT EDIT. - -package mock_getblock - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock" -) - -// MockPicker is an autogenerated mock type for the Picker type -type MockPicker struct { - mock.Mock -} - -type MockPicker_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPicker) EXPECT() *MockPicker_Expecter { - return &MockPicker_Expecter{mock: &_m.Mock} -} - -// PickBlock provides a mock function with given fields: ctx, id -func (_m *MockPicker) PickBlock(ctx context.Context, id string) (smartblock.SmartBlock, error) { - ret := _m.Called(ctx, id) - - var r0 smartblock.SmartBlock - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (smartblock.SmartBlock, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) smartblock.SmartBlock); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(smartblock.SmartBlock) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPicker_PickBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PickBlock' -type MockPicker_PickBlock_Call struct { - *mock.Call -} - -// PickBlock is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockPicker_Expecter) PickBlock(ctx interface{}, id interface{}) *MockPicker_PickBlock_Call { - return &MockPicker_PickBlock_Call{Call: _e.mock.On("PickBlock", ctx, id)} -} - -func (_c *MockPicker_PickBlock_Call) Run(run func(ctx context.Context, id string)) *MockPicker_PickBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPicker_PickBlock_Call) Return(sb smartblock.SmartBlock, err error) *MockPicker_PickBlock_Call { - _c.Call.Return(sb, err) - return _c -} - -func (_c *MockPicker_PickBlock_Call) RunAndReturn(run func(context.Context, string) (smartblock.SmartBlock, error)) *MockPicker_PickBlock_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTNewMockPicker interface { - mock.TestingT - Cleanup(func()) -} - -// NewMockPicker creates a new instance of MockPicker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockPicker(t mockConstructorTestingTNewMockPicker) *MockPicker { - mock := &MockPicker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/block/import/importer.go b/core/block/import/importer.go index 839000a28..6c7be849a 100644 --- a/core/block/import/importer.go +++ b/core/block/import/importer.go @@ -16,7 +16,6 @@ import ( "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/core/block/collection" - "github.com/anyproto/anytype-heart/core/block/getblock" "github.com/anyproto/anytype-heart/core/block/import/converter" "github.com/anyproto/anytype-heart/core/block/import/csv" "github.com/anyproto/anytype-heart/core/block/import/html" @@ -27,6 +26,8 @@ import ( "github.com/anyproto/anytype-heart/core/block/import/txt" "github.com/anyproto/anytype-heart/core/block/import/web" "github.com/anyproto/anytype-heart/core/block/import/workerpool" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" "github.com/anyproto/anytype-heart/core/block/process" "github.com/anyproto/anytype-heart/core/filestorage/filesync" "github.com/anyproto/anytype-heart/pb" @@ -37,7 +38,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) @@ -81,14 +82,14 @@ func (i *Import) Init(a *app.App) (err error) { for _, c := range converters { i.converters[c.Name()] = c } - - picker := app.MustComponent[getblock.Picker](a) - factory := syncer.New(syncer.NewFileSyncer(i.s), syncer.NewBookmarkSyncer(i.s), syncer.NewIconSyncer(i.s, picker)) + objectCache := app.MustComponent[objectcache.Cache](a) + resolver := a.MustComponent(idresolver.CName).(idresolver.Resolver) + factory := syncer.New(syncer.NewFileSyncer(i.s), syncer.NewBookmarkSyncer(i.s), syncer.NewIconSyncer(i.s, resolver)) store := app.MustComponent[objectstore.ObjectStore](a) - i.objectIDGetter = NewObjectIDGetter(store, coreService, i.s) + i.objectIDGetter = NewObjectIDGetter(store, coreService, objectCache) fileStore := app.MustComponent[filestore.FileStore](a) relationSyncer := syncer.NewFileRelationSyncer(i.s, fileStore) - i.oc = NewCreator(i.s, coreService, factory, store, relationSyncer, fileStore, picker) + i.oc = NewCreator(i.s, objectCache, coreService, factory, store, relationSyncer, fileStore) i.sbtProvider = app.MustComponent[typeprovider.SmartBlockTypeProvider](a) i.fileSync = a.MustComponent(filesync.CName).(filesync.FileSync) return nil diff --git a/core/block/import/mock.go b/core/block/import/mock.go index 86e483c8d..d17fcaa33 100644 --- a/core/block/import/mock.go +++ b/core/block/import/mock.go @@ -14,10 +14,9 @@ import ( time "time" treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" + converter "github.com/anyproto/anytype-heart/core/block/import/converter" types "github.com/gogo/protobuf/types" gomock "go.uber.org/mock/gomock" - - converter "github.com/anyproto/anytype-heart/core/block/import/converter" ) // MockCreator is a mock of Creator interface. diff --git a/core/block/import/objectcreator.go b/core/block/import/objectcreator.go index 74c529873..4763ee687 100644 --- a/core/block/import/objectcreator.go +++ b/core/block/import/objectcreator.go @@ -3,6 +3,7 @@ package importer import ( "context" "errors" + "fmt" "path" "sync" @@ -13,13 +14,14 @@ import ( "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/core/block/editor/basic" - sb "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/editor/state" "github.com/anyproto/anytype-heart/core/block/editor/template" "github.com/anyproto/anytype-heart/core/block/getblock" "github.com/anyproto/anytype-heart/core/block/history" "github.com/anyproto/anytype-heart/core/block/import/converter" "github.com/anyproto/anytype-heart/core/block/import/syncer" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" "github.com/anyproto/anytype-heart/core/block/simple" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/pb" @@ -37,7 +39,7 @@ const relationsLimit = 10 type ObjectCreator struct { service *block.Service - picker getblock.Picker + objectCache objectcache.Cache core core.Service objectStore objectstore.ObjectStore relationSyncer syncer.RelationSyncer @@ -47,12 +49,12 @@ type ObjectCreator struct { } func NewCreator(service *block.Service, + cache objectcache.Cache, core core.Service, syncFactory *syncer.Factory, objectStore objectstore.ObjectStore, relationSyncer syncer.RelationSyncer, fileStore filestore.FileStore, - picker getblock.Picker, ) Creator { return &ObjectCreator{ service: service, @@ -61,7 +63,7 @@ func NewCreator(service *block.Service, objectStore: objectStore, relationSyncer: relationSyncer, fileStore: fileStore, - picker: picker, + objectCache: cache, } } @@ -196,23 +198,31 @@ func (oc *ObjectCreator) createNewObject( st *state.State, newID string, oldIDtoNew map[string]string) (*types.Struct, error) { - sb, err := oc.service.CreateTreeObjectWithPayload(ctx, spaceID, payload, func(id string) *sb.InitContext { - return &sb.InitContext{ + var respDetails *types.Struct + sb, err := oc.objectCache.CreateTreeObjectWithPayload(ctx, spaceID, payload, func(id string) *smartblock.InitContext { + return &smartblock.InitContext{ Ctx: ctx, IsNewObject: true, State: st, SpaceID: spaceID, } }) - if errors.Is(err, treestorage.ErrTreeExists) { - sb, err = oc.picker.PickBlock(ctx, newID) - } - if err != nil { + if err == nil { + respDetails = sb.Details() + } else if errors.Is(err, treestorage.ErrTreeExists) { + err = getblock.Do(oc.service, newID, func(sb smartblock.SmartBlock) error { + respDetails = sb.Details() + return nil + }) + if err != nil { + return nil, fmt.Errorf("get existing object %s: %w", newID, err) + } + } else { log.With("objectID", newID).Errorf("failed to create %s: %s", newID, err.Error()) return nil, err } log.With("objectID", newID).Infof("import object created %s", pbtypes.GetString(st.CombinedDetails(), bundle.RelationKeyName.String())) - respDetails := sb.Details() + // update collection after we create it if st.Store() != nil { oc.updateLinksInCollections(st, oldIDtoNew, true) @@ -337,7 +347,7 @@ func (oc *ObjectCreator) handleCoverRelation(spaceID string, st *state.State) [] func (oc *ObjectCreator) resetState(newID string, st *state.State) *types.Struct { var respDetails *types.Struct - err := getblock.Do(oc.picker, newID, func(b sb.SmartBlock) error { + err := block.Do(oc.service, newID, func(b smartblock.SmartBlock) error { err := history.ResetToVersion(b, st) if err != nil { log.With(zap.String("object id", newID)).Errorf("failed to set state %s: %s", newID, err.Error()) @@ -383,7 +393,7 @@ func (oc *ObjectCreator) setArchived(snapshot *model.SmartBlockSnapshotBase, new func (oc *ObjectCreator) syncFilesAndLinks(newID string) error { tasks := make([]func() error, 0) // todo: rewrite it in order not to create state with URLs inside links - err := getblock.Do(oc.picker, newID, func(b sb.SmartBlock) error { + err := block.Do(oc.service, newID, func(b smartblock.SmartBlock) error { st := b.NewState() return st.Iterate(func(bl simple.Block) (isContinue bool) { s := oc.syncFactory.GetSyncer(bl) @@ -412,7 +422,7 @@ func (oc *ObjectCreator) syncFilesAndLinks(newID string) error { } func (oc *ObjectCreator) updateLinksInCollections(st *state.State, oldIDtoNew map[string]string, isNewCollection bool) { - err := block.Do(oc.service, st.RootId(), func(b sb.SmartBlock) error { + err := block.Do(oc.service, st.RootId(), func(b smartblock.SmartBlock) error { originalState := b.NewState() var existedObjects []string if !isNewCollection { diff --git a/core/block/import/objectidgetter.go b/core/block/import/objectidgetter.go index d9654f281..d4650f4e4 100644 --- a/core/block/import/objectidgetter.go +++ b/core/block/import/objectidgetter.go @@ -9,8 +9,8 @@ import ( "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" "github.com/gogo/protobuf/types" - "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/core/block/import/converter" + "github.com/anyproto/anytype-heart/core/block/object/payloadcreator" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core" @@ -41,10 +41,10 @@ type ObjectIDGetter struct { objectStore objectstore.ObjectStore core core.Service createPayload map[string]treestorage.TreeStorageCreatePayload - service *block.Service + service payloadcreator.PayloadCreator } -func NewObjectIDGetter(objectStore objectstore.ObjectStore, core core.Service, service *block.Service) IDGetter { +func NewObjectIDGetter(objectStore objectstore.ObjectStore, core core.Service, service payloadcreator.PayloadCreator) IDGetter { return &ObjectIDGetter{ objectStore: objectStore, service: service, @@ -90,12 +90,17 @@ func (ou *ObjectIDGetter) Get( if err != nil { return "", treestorage.TreeStorageCreatePayload{}, err } - payload, err = ou.service.DeriveTreeCreatePayload(context.Background(), spaceID, uk) + payload, err = ou.service.DeriveTreePayload(context.Background(), spaceID, payloadcreator.PayloadDerivationParams{ + Key: uk, + }) if err != nil { return "", treestorage.TreeStorageCreatePayload{}, fmt.Errorf("derive tree create payload: %w", err) } } else { - payload, err = ou.service.CreateTreePayload(context.Background(), spaceID, sbType, createdTime) + payload, err = ou.service.CreateTreePayload(context.Background(), spaceID, payloadcreator.PayloadCreationParams{ + Time: createdTime, + SmartblockType: sbType, + }) if err != nil { return "", treestorage.TreeStorageCreatePayload{}, fmt.Errorf("create tree payload: %w", err) } diff --git a/core/block/import/pb/converter.go b/core/block/import/pb/converter.go index 982b3deda..56bb4b8cc 100644 --- a/core/block/import/pb/converter.go +++ b/core/block/import/pb/converter.go @@ -29,7 +29,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/constant" "github.com/anyproto/anytype-heart/util/pbtypes" "github.com/anyproto/anytype-heart/util/slice" diff --git a/core/block/import/syncer/icon.go b/core/block/import/syncer/icon.go index c85057469..31685c603 100644 --- a/core/block/import/syncer/icon.go +++ b/core/block/import/syncer/icon.go @@ -10,7 +10,7 @@ import ( "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/core/block/editor/basic" "github.com/anyproto/anytype-heart/core/block/editor/smartblock" - "github.com/anyproto/anytype-heart/core/block/getblock" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/block/simple" "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/logging" @@ -20,12 +20,12 @@ import ( var log = logging.Logger("import") type IconSyncer struct { - service *block.Service - picker getblock.Picker + service *block.Service + resolver idresolver.Resolver } -func NewIconSyncer(service *block.Service, picker getblock.Picker) *IconSyncer { - return &IconSyncer{service: service, picker: picker} +func NewIconSyncer(service *block.Service, resolver idresolver.Resolver) *IconSyncer { + return &IconSyncer{service: service, resolver: resolver} } func (is *IconSyncer) Sync(id string, b simple.Block) error { @@ -38,7 +38,7 @@ func (is *IconSyncer) Sync(id string, b simple.Block) error { if strings.HasPrefix(icon, "http://") || strings.HasPrefix(icon, "https://") { req = pb.RpcFileUploadRequest{Url: icon} } - spaceID, err := is.service.ResolveSpaceID(id) + spaceID, err := is.resolver.ResolveSpaceID(id) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -47,7 +47,7 @@ func (is *IconSyncer) Sync(id string, b simple.Block) error { log.Errorf("failed uploading icon image file: %s", oserror.TransformError(err)) } - err = getblock.Do(is.picker, id, func(sb smartblock.SmartBlock) error { + err = block.Do(is.service, id, func(sb smartblock.SmartBlock) error { updater := sb.(basic.Updatable) upErr := updater.Update(nil, func(simpleBlock simple.Block) error { simpleBlock.Model().GetText().IconImage = hash diff --git a/core/block/object/idresolver/resolver.go b/core/block/object/idresolver/resolver.go new file mode 100644 index 000000000..e4636b2a7 --- /dev/null +++ b/core/block/object/idresolver/resolver.go @@ -0,0 +1,44 @@ +package idresolver + +import ( + "sync" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/spacestorage" + + "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" + "github.com/anyproto/anytype-heart/space/spacecore/storage" +) + +const CName = "block.object.resolver" + +type Resolver interface { + app.Component + ResolveSpaceID(objectID string) (string, error) +} + +func New() Resolver { + return &resolver{} +} + +type resolver struct { + storage storage.ClientStorage + sync.Mutex +} + +func (r *resolver) Init(a *app.App) (err error) { + r.storage = a.MustComponent(spacestorage.CName).(storage.ClientStorage) + return +} + +func (r *resolver) Name() (name string) { + return CName +} + +func (r *resolver) ResolveSpaceID(objectID string) (string, error) { + // TODO: [MR] remove it, because maybe we don't need it + if addr.IsBundledId(objectID) { + return addr.AnytypeMarketplaceWorkspace, nil + } + return r.storage.GetSpaceID(objectID) +} diff --git a/core/block/object/objectcache/cache.go b/core/block/object/objectcache/cache.go index 9f9036a6e..3e3e60144 100644 --- a/core/block/object/objectcache/cache.go +++ b/core/block/object/objectcache/cache.go @@ -5,16 +5,18 @@ import ( "errors" "time" + "github.com/anyproto/any-sync/accountservice" "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/app/ocache" + "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" - "github.com/anyproto/anytype-heart/core/block/editor" "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + "github.com/anyproto/anytype-heart/core/block/object/payloadcreator" "github.com/anyproto/anytype-heart/core/block/source" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/pkg/lib/logging" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" ) var log = logging.Logger("anytype-mw-object-cache") @@ -38,10 +40,21 @@ type cacheOpts struct { putObject smartblock.SmartBlock } +const CName = "client.object.objectcache" + +type InitFunc = func(id string) *smartblock.InitContext + +type objectFactory interface { + InitObject(id string, initCtx *smartblock.InitContext) (sb smartblock.SmartBlock, err error) +} + type Cache interface { app.ComponentRunnable + payloadcreator.PayloadCreator - PickBlock(ctx context.Context, objectID string) (sb smartblock.SmartBlock, err error) + CreateTreeObject(ctx context.Context, spaceID string, params TreeCreationParams) (sb smartblock.SmartBlock, err error) + CreateTreeObjectWithPayload(ctx context.Context, spaceID string, payload treestorage.TreeStorageCreatePayload, initFunc InitFunc) (sb smartblock.SmartBlock, err error) + DeriveTreeObject(ctx context.Context, spaceID string, params TreeDerivationParams) (sb smartblock.SmartBlock, err error) GetObject(ctx context.Context, id domain.FullID) (sb smartblock.SmartBlock, err error) GetObjectWithTimeout(ctx context.Context, id domain.FullID) (sb smartblock.SmartBlock, err error) DoLockedIfNotExists(objectID string, proc func() error) error @@ -49,12 +62,18 @@ type Cache interface { CloseBlocks() } +type personalIDProvider interface { + PersonalSpaceID() string +} + type objectCache struct { - objectFactory *editor.ObjectFactory - sbtProvider typeprovider.SmartBlockTypeProvider - spaceService space.Service - cache ocache.OCache - closing chan struct{} + objectFactory objectFactory + sbtProvider typeprovider.SmartBlockTypeProvider + spaceService spacecore.SpaceCoreService + provider personalIDProvider + accountService accountservice.Service + cache ocache.OCache + closing chan struct{} } func New() Cache { @@ -64,9 +83,11 @@ func New() Cache { } func (c *objectCache) Init(a *app.App) error { - c.objectFactory = app.MustComponent[*editor.ObjectFactory](a) + c.accountService = app.MustComponent[accountservice.Service](a) + c.objectFactory = app.MustComponent[objectFactory](a) + c.provider = app.MustComponent[personalIDProvider](a) c.sbtProvider = app.MustComponent[typeprovider.SmartBlockTypeProvider](a) - c.spaceService = app.MustComponent[space.Service](a) + c.spaceService = app.MustComponent[spacecore.SpaceCoreService](a) c.cache = ocache.New( c.cacheLoad, // ocache.WithLogger(log.Desugar()), @@ -78,7 +99,7 @@ func (c *objectCache) Init(a *app.App) error { } func (c *objectCache) Name() string { - return "object-cache" + return CName } func (c *objectCache) Run(_ context.Context) error { @@ -110,7 +131,6 @@ func ContextWithBuildOptions(ctx context.Context, buildOpts source.BuildOptions) func (c *objectCache) cacheLoad(ctx context.Context, id string) (value ocache.Object, err error) { // TODO Pass options as parameter? opts := ctx.Value(optsKey).(cacheOpts) - buildObject := func(id string) (sb smartblock.SmartBlock, err error) { return c.objectFactory.InitObject(id, &smartblock.InitContext{Ctx: ctx, BuildOpts: opts.buildOption, SpaceID: opts.spaceId}) } @@ -189,19 +209,6 @@ func (c *objectCache) GetObjectWithTimeout(ctx context.Context, id domain.FullID return c.GetObject(ctx, id) } -// PickBlock returns opened smartBlock or opens smartBlock in silent mode -func (c *objectCache) PickBlock(ctx context.Context, objectID string) (sb smartblock.SmartBlock, err error) { - spaceID, err := c.spaceService.ResolveSpaceID(objectID) - if err != nil { - // Object not loaded yet - return nil, source.ErrObjectNotFound - } - return c.GetObjectWithTimeout(ctx, domain.FullID{ - SpaceID: spaceID, - ObjectID: objectID, - }) -} - func (c *objectCache) DoLockedIfNotExists(objectID string, proc func() error) error { return c.cache.DoLockedIfNotExists(objectID, proc) } diff --git a/core/block/object/objectcache/mock_objectcache/mock_Cache.go b/core/block/object/objectcache/mock_objectcache/mock_Cache.go new file mode 100644 index 000000000..6e1e749d9 --- /dev/null +++ b/core/block/object/objectcache/mock_objectcache/mock_Cache.go @@ -0,0 +1,770 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_objectcache + +import ( + context "context" + + app "github.com/anyproto/any-sync/app" + treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" + mock "github.com/stretchr/testify/mock" + + smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + objectcache "github.com/anyproto/anytype-heart/core/block/object/objectcache" + payloadcreator "github.com/anyproto/anytype-heart/core/block/object/payloadcreator" + domain "github.com/anyproto/anytype-heart/core/domain" +) + +// MockCache is an autogenerated mock type for the Cache type +type MockCache struct { + mock.Mock +} + +type MockCache_Expecter struct { + mock *mock.Mock +} + +func (_m *MockCache) EXPECT() *MockCache_Expecter { + return &MockCache_Expecter{mock: &_m.Mock} +} + +// Close provides a mock function with given fields: ctx +func (_m *MockCache) Close(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockCache_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type MockCache_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockCache_Expecter) Close(ctx interface{}) *MockCache_Close_Call { + return &MockCache_Close_Call{Call: _e.mock.On("Close", ctx)} +} + +func (_c *MockCache_Close_Call) Run(run func(ctx context.Context)) *MockCache_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockCache_Close_Call) Return(err error) *MockCache_Close_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockCache_Close_Call) RunAndReturn(run func(context.Context) error) *MockCache_Close_Call { + _c.Call.Return(run) + return _c +} + +// CloseBlocks provides a mock function with given fields: +func (_m *MockCache) CloseBlocks() { + _m.Called() +} + +// MockCache_CloseBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseBlocks' +type MockCache_CloseBlocks_Call struct { + *mock.Call +} + +// CloseBlocks is a helper method to define mock.On call +func (_e *MockCache_Expecter) CloseBlocks() *MockCache_CloseBlocks_Call { + return &MockCache_CloseBlocks_Call{Call: _e.mock.On("CloseBlocks")} +} + +func (_c *MockCache_CloseBlocks_Call) Run(run func()) *MockCache_CloseBlocks_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockCache_CloseBlocks_Call) Return() *MockCache_CloseBlocks_Call { + _c.Call.Return() + return _c +} + +func (_c *MockCache_CloseBlocks_Call) RunAndReturn(run func()) *MockCache_CloseBlocks_Call { + _c.Call.Return(run) + return _c +} + +// CreateTreeObject provides a mock function with given fields: ctx, spaceID, params +func (_m *MockCache) CreateTreeObject(ctx context.Context, spaceID string, params objectcache.TreeCreationParams) (smartblock.SmartBlock, error) { + ret := _m.Called(ctx, spaceID, params) + + var r0 smartblock.SmartBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, objectcache.TreeCreationParams) (smartblock.SmartBlock, error)); ok { + return rf(ctx, spaceID, params) + } + if rf, ok := ret.Get(0).(func(context.Context, string, objectcache.TreeCreationParams) smartblock.SmartBlock); ok { + r0 = rf(ctx, spaceID, params) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(smartblock.SmartBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, objectcache.TreeCreationParams) error); ok { + r1 = rf(ctx, spaceID, params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_CreateTreeObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTreeObject' +type MockCache_CreateTreeObject_Call struct { + *mock.Call +} + +// CreateTreeObject is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - params objectcache.TreeCreationParams +func (_e *MockCache_Expecter) CreateTreeObject(ctx interface{}, spaceID interface{}, params interface{}) *MockCache_CreateTreeObject_Call { + return &MockCache_CreateTreeObject_Call{Call: _e.mock.On("CreateTreeObject", ctx, spaceID, params)} +} + +func (_c *MockCache_CreateTreeObject_Call) Run(run func(ctx context.Context, spaceID string, params objectcache.TreeCreationParams)) *MockCache_CreateTreeObject_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(objectcache.TreeCreationParams)) + }) + return _c +} + +func (_c *MockCache_CreateTreeObject_Call) Return(sb smartblock.SmartBlock, err error) *MockCache_CreateTreeObject_Call { + _c.Call.Return(sb, err) + return _c +} + +func (_c *MockCache_CreateTreeObject_Call) RunAndReturn(run func(context.Context, string, objectcache.TreeCreationParams) (smartblock.SmartBlock, error)) *MockCache_CreateTreeObject_Call { + _c.Call.Return(run) + return _c +} + +// CreateTreeObjectWithPayload provides a mock function with given fields: ctx, spaceID, payload, initFunc +func (_m *MockCache) CreateTreeObjectWithPayload(ctx context.Context, spaceID string, payload treestorage.TreeStorageCreatePayload, initFunc func(string) *smartblock.InitContext) (smartblock.SmartBlock, error) { + ret := _m.Called(ctx, spaceID, payload, initFunc) + + var r0 smartblock.SmartBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, treestorage.TreeStorageCreatePayload, func(string) *smartblock.InitContext) (smartblock.SmartBlock, error)); ok { + return rf(ctx, spaceID, payload, initFunc) + } + if rf, ok := ret.Get(0).(func(context.Context, string, treestorage.TreeStorageCreatePayload, func(string) *smartblock.InitContext) smartblock.SmartBlock); ok { + r0 = rf(ctx, spaceID, payload, initFunc) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(smartblock.SmartBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, treestorage.TreeStorageCreatePayload, func(string) *smartblock.InitContext) error); ok { + r1 = rf(ctx, spaceID, payload, initFunc) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_CreateTreeObjectWithPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTreeObjectWithPayload' +type MockCache_CreateTreeObjectWithPayload_Call struct { + *mock.Call +} + +// CreateTreeObjectWithPayload is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - payload treestorage.TreeStorageCreatePayload +// - initFunc func(string) *smartblock.InitContext +func (_e *MockCache_Expecter) CreateTreeObjectWithPayload(ctx interface{}, spaceID interface{}, payload interface{}, initFunc interface{}) *MockCache_CreateTreeObjectWithPayload_Call { + return &MockCache_CreateTreeObjectWithPayload_Call{Call: _e.mock.On("CreateTreeObjectWithPayload", ctx, spaceID, payload, initFunc)} +} + +func (_c *MockCache_CreateTreeObjectWithPayload_Call) Run(run func(ctx context.Context, spaceID string, payload treestorage.TreeStorageCreatePayload, initFunc func(string) *smartblock.InitContext)) *MockCache_CreateTreeObjectWithPayload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(treestorage.TreeStorageCreatePayload), args[3].(func(string) *smartblock.InitContext)) + }) + return _c +} + +func (_c *MockCache_CreateTreeObjectWithPayload_Call) Return(sb smartblock.SmartBlock, err error) *MockCache_CreateTreeObjectWithPayload_Call { + _c.Call.Return(sb, err) + return _c +} + +func (_c *MockCache_CreateTreeObjectWithPayload_Call) RunAndReturn(run func(context.Context, string, treestorage.TreeStorageCreatePayload, func(string) *smartblock.InitContext) (smartblock.SmartBlock, error)) *MockCache_CreateTreeObjectWithPayload_Call { + _c.Call.Return(run) + return _c +} + +// CreateTreePayload provides a mock function with given fields: ctx, spaceID, params +func (_m *MockCache) CreateTreePayload(ctx context.Context, spaceID string, params payloadcreator.PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error) { + ret := _m.Called(ctx, spaceID, params) + + var r0 treestorage.TreeStorageCreatePayload + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, payloadcreator.PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error)); ok { + return rf(ctx, spaceID, params) + } + if rf, ok := ret.Get(0).(func(context.Context, string, payloadcreator.PayloadCreationParams) treestorage.TreeStorageCreatePayload); ok { + r0 = rf(ctx, spaceID, params) + } else { + r0 = ret.Get(0).(treestorage.TreeStorageCreatePayload) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, payloadcreator.PayloadCreationParams) error); ok { + r1 = rf(ctx, spaceID, params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_CreateTreePayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTreePayload' +type MockCache_CreateTreePayload_Call struct { + *mock.Call +} + +// CreateTreePayload is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - params payloadcreator.PayloadCreationParams +func (_e *MockCache_Expecter) CreateTreePayload(ctx interface{}, spaceID interface{}, params interface{}) *MockCache_CreateTreePayload_Call { + return &MockCache_CreateTreePayload_Call{Call: _e.mock.On("CreateTreePayload", ctx, spaceID, params)} +} + +func (_c *MockCache_CreateTreePayload_Call) Run(run func(ctx context.Context, spaceID string, params payloadcreator.PayloadCreationParams)) *MockCache_CreateTreePayload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(payloadcreator.PayloadCreationParams)) + }) + return _c +} + +func (_c *MockCache_CreateTreePayload_Call) Return(_a0 treestorage.TreeStorageCreatePayload, _a1 error) *MockCache_CreateTreePayload_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockCache_CreateTreePayload_Call) RunAndReturn(run func(context.Context, string, payloadcreator.PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error)) *MockCache_CreateTreePayload_Call { + _c.Call.Return(run) + return _c +} + +// DeriveObjectID provides a mock function with given fields: ctx, spaceID, uniqueKey +func (_m *MockCache) DeriveObjectID(ctx context.Context, spaceID string, uniqueKey domain.UniqueKey) (string, error) { + ret := _m.Called(ctx, spaceID, uniqueKey) + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, domain.UniqueKey) (string, error)); ok { + return rf(ctx, spaceID, uniqueKey) + } + if rf, ok := ret.Get(0).(func(context.Context, string, domain.UniqueKey) string); ok { + r0 = rf(ctx, spaceID, uniqueKey) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, domain.UniqueKey) error); ok { + r1 = rf(ctx, spaceID, uniqueKey) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_DeriveObjectID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveObjectID' +type MockCache_DeriveObjectID_Call struct { + *mock.Call +} + +// DeriveObjectID is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - uniqueKey domain.UniqueKey +func (_e *MockCache_Expecter) DeriveObjectID(ctx interface{}, spaceID interface{}, uniqueKey interface{}) *MockCache_DeriveObjectID_Call { + return &MockCache_DeriveObjectID_Call{Call: _e.mock.On("DeriveObjectID", ctx, spaceID, uniqueKey)} +} + +func (_c *MockCache_DeriveObjectID_Call) Run(run func(ctx context.Context, spaceID string, uniqueKey domain.UniqueKey)) *MockCache_DeriveObjectID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(domain.UniqueKey)) + }) + return _c +} + +func (_c *MockCache_DeriveObjectID_Call) Return(id string, err error) *MockCache_DeriveObjectID_Call { + _c.Call.Return(id, err) + return _c +} + +func (_c *MockCache_DeriveObjectID_Call) RunAndReturn(run func(context.Context, string, domain.UniqueKey) (string, error)) *MockCache_DeriveObjectID_Call { + _c.Call.Return(run) + return _c +} + +// DeriveTreeObject provides a mock function with given fields: ctx, spaceID, params +func (_m *MockCache) DeriveTreeObject(ctx context.Context, spaceID string, params objectcache.TreeDerivationParams) (smartblock.SmartBlock, error) { + ret := _m.Called(ctx, spaceID, params) + + var r0 smartblock.SmartBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, objectcache.TreeDerivationParams) (smartblock.SmartBlock, error)); ok { + return rf(ctx, spaceID, params) + } + if rf, ok := ret.Get(0).(func(context.Context, string, objectcache.TreeDerivationParams) smartblock.SmartBlock); ok { + r0 = rf(ctx, spaceID, params) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(smartblock.SmartBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, objectcache.TreeDerivationParams) error); ok { + r1 = rf(ctx, spaceID, params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_DeriveTreeObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveTreeObject' +type MockCache_DeriveTreeObject_Call struct { + *mock.Call +} + +// DeriveTreeObject is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - params objectcache.TreeDerivationParams +func (_e *MockCache_Expecter) DeriveTreeObject(ctx interface{}, spaceID interface{}, params interface{}) *MockCache_DeriveTreeObject_Call { + return &MockCache_DeriveTreeObject_Call{Call: _e.mock.On("DeriveTreeObject", ctx, spaceID, params)} +} + +func (_c *MockCache_DeriveTreeObject_Call) Run(run func(ctx context.Context, spaceID string, params objectcache.TreeDerivationParams)) *MockCache_DeriveTreeObject_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(objectcache.TreeDerivationParams)) + }) + return _c +} + +func (_c *MockCache_DeriveTreeObject_Call) Return(sb smartblock.SmartBlock, err error) *MockCache_DeriveTreeObject_Call { + _c.Call.Return(sb, err) + return _c +} + +func (_c *MockCache_DeriveTreeObject_Call) RunAndReturn(run func(context.Context, string, objectcache.TreeDerivationParams) (smartblock.SmartBlock, error)) *MockCache_DeriveTreeObject_Call { + _c.Call.Return(run) + return _c +} + +// DeriveTreePayload provides a mock function with given fields: ctx, spaceID, params +func (_m *MockCache) DeriveTreePayload(ctx context.Context, spaceID string, params payloadcreator.PayloadDerivationParams) (treestorage.TreeStorageCreatePayload, error) { + ret := _m.Called(ctx, spaceID, params) + + var r0 treestorage.TreeStorageCreatePayload + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, payloadcreator.PayloadDerivationParams) (treestorage.TreeStorageCreatePayload, error)); ok { + return rf(ctx, spaceID, params) + } + if rf, ok := ret.Get(0).(func(context.Context, string, payloadcreator.PayloadDerivationParams) treestorage.TreeStorageCreatePayload); ok { + r0 = rf(ctx, spaceID, params) + } else { + r0 = ret.Get(0).(treestorage.TreeStorageCreatePayload) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, payloadcreator.PayloadDerivationParams) error); ok { + r1 = rf(ctx, spaceID, params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_DeriveTreePayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveTreePayload' +type MockCache_DeriveTreePayload_Call struct { + *mock.Call +} + +// DeriveTreePayload is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - params payloadcreator.PayloadDerivationParams +func (_e *MockCache_Expecter) DeriveTreePayload(ctx interface{}, spaceID interface{}, params interface{}) *MockCache_DeriveTreePayload_Call { + return &MockCache_DeriveTreePayload_Call{Call: _e.mock.On("DeriveTreePayload", ctx, spaceID, params)} +} + +func (_c *MockCache_DeriveTreePayload_Call) Run(run func(ctx context.Context, spaceID string, params payloadcreator.PayloadDerivationParams)) *MockCache_DeriveTreePayload_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(payloadcreator.PayloadDerivationParams)) + }) + return _c +} + +func (_c *MockCache_DeriveTreePayload_Call) Return(storagePayload treestorage.TreeStorageCreatePayload, err error) *MockCache_DeriveTreePayload_Call { + _c.Call.Return(storagePayload, err) + return _c +} + +func (_c *MockCache_DeriveTreePayload_Call) RunAndReturn(run func(context.Context, string, payloadcreator.PayloadDerivationParams) (treestorage.TreeStorageCreatePayload, error)) *MockCache_DeriveTreePayload_Call { + _c.Call.Return(run) + return _c +} + +// DoLockedIfNotExists provides a mock function with given fields: objectID, proc +func (_m *MockCache) DoLockedIfNotExists(objectID string, proc func() error) error { + ret := _m.Called(objectID, proc) + + var r0 error + if rf, ok := ret.Get(0).(func(string, func() error) error); ok { + r0 = rf(objectID, proc) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockCache_DoLockedIfNotExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoLockedIfNotExists' +type MockCache_DoLockedIfNotExists_Call struct { + *mock.Call +} + +// DoLockedIfNotExists is a helper method to define mock.On call +// - objectID string +// - proc func() error +func (_e *MockCache_Expecter) DoLockedIfNotExists(objectID interface{}, proc interface{}) *MockCache_DoLockedIfNotExists_Call { + return &MockCache_DoLockedIfNotExists_Call{Call: _e.mock.On("DoLockedIfNotExists", objectID, proc)} +} + +func (_c *MockCache_DoLockedIfNotExists_Call) Run(run func(objectID string, proc func() error)) *MockCache_DoLockedIfNotExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(func() error)) + }) + return _c +} + +func (_c *MockCache_DoLockedIfNotExists_Call) Return(_a0 error) *MockCache_DoLockedIfNotExists_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockCache_DoLockedIfNotExists_Call) RunAndReturn(run func(string, func() error) error) *MockCache_DoLockedIfNotExists_Call { + _c.Call.Return(run) + return _c +} + +// GetObject provides a mock function with given fields: ctx, id +func (_m *MockCache) GetObject(ctx context.Context, id domain.FullID) (smartblock.SmartBlock, error) { + ret := _m.Called(ctx, id) + + var r0 smartblock.SmartBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) (smartblock.SmartBlock, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) smartblock.SmartBlock); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(smartblock.SmartBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, domain.FullID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_GetObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObject' +type MockCache_GetObject_Call struct { + *mock.Call +} + +// GetObject is a helper method to define mock.On call +// - ctx context.Context +// - id domain.FullID +func (_e *MockCache_Expecter) GetObject(ctx interface{}, id interface{}) *MockCache_GetObject_Call { + return &MockCache_GetObject_Call{Call: _e.mock.On("GetObject", ctx, id)} +} + +func (_c *MockCache_GetObject_Call) Run(run func(ctx context.Context, id domain.FullID)) *MockCache_GetObject_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(domain.FullID)) + }) + return _c +} + +func (_c *MockCache_GetObject_Call) Return(sb smartblock.SmartBlock, err error) *MockCache_GetObject_Call { + _c.Call.Return(sb, err) + return _c +} + +func (_c *MockCache_GetObject_Call) RunAndReturn(run func(context.Context, domain.FullID) (smartblock.SmartBlock, error)) *MockCache_GetObject_Call { + _c.Call.Return(run) + return _c +} + +// GetObjectWithTimeout provides a mock function with given fields: ctx, id +func (_m *MockCache) GetObjectWithTimeout(ctx context.Context, id domain.FullID) (smartblock.SmartBlock, error) { + ret := _m.Called(ctx, id) + + var r0 smartblock.SmartBlock + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) (smartblock.SmartBlock, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, domain.FullID) smartblock.SmartBlock); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(smartblock.SmartBlock) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, domain.FullID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCache_GetObjectWithTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObjectWithTimeout' +type MockCache_GetObjectWithTimeout_Call struct { + *mock.Call +} + +// GetObjectWithTimeout is a helper method to define mock.On call +// - ctx context.Context +// - id domain.FullID +func (_e *MockCache_Expecter) GetObjectWithTimeout(ctx interface{}, id interface{}) *MockCache_GetObjectWithTimeout_Call { + return &MockCache_GetObjectWithTimeout_Call{Call: _e.mock.On("GetObjectWithTimeout", ctx, id)} +} + +func (_c *MockCache_GetObjectWithTimeout_Call) Run(run func(ctx context.Context, id domain.FullID)) *MockCache_GetObjectWithTimeout_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(domain.FullID)) + }) + return _c +} + +func (_c *MockCache_GetObjectWithTimeout_Call) Return(sb smartblock.SmartBlock, err error) *MockCache_GetObjectWithTimeout_Call { + _c.Call.Return(sb, err) + return _c +} + +func (_c *MockCache_GetObjectWithTimeout_Call) RunAndReturn(run func(context.Context, domain.FullID) (smartblock.SmartBlock, error)) *MockCache_GetObjectWithTimeout_Call { + _c.Call.Return(run) + return _c +} + +// Init provides a mock function with given fields: a +func (_m *MockCache) Init(a *app.App) error { + ret := _m.Called(a) + + var r0 error + if rf, ok := ret.Get(0).(func(*app.App) error); ok { + r0 = rf(a) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockCache_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type MockCache_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - a *app.App +func (_e *MockCache_Expecter) Init(a interface{}) *MockCache_Init_Call { + return &MockCache_Init_Call{Call: _e.mock.On("Init", a)} +} + +func (_c *MockCache_Init_Call) Run(run func(a *app.App)) *MockCache_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*app.App)) + }) + return _c +} + +func (_c *MockCache_Init_Call) Return(err error) *MockCache_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockCache_Init_Call) RunAndReturn(run func(*app.App) error) *MockCache_Init_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *MockCache) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockCache_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockCache_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockCache_Expecter) Name() *MockCache_Name_Call { + return &MockCache_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockCache_Name_Call) Run(run func()) *MockCache_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockCache_Name_Call) Return(name string) *MockCache_Name_Call { + _c.Call.Return(name) + return _c +} + +func (_c *MockCache_Name_Call) RunAndReturn(run func() string) *MockCache_Name_Call { + _c.Call.Return(run) + return _c +} + +// Remove provides a mock function with given fields: ctx, objectID +func (_m *MockCache) Remove(ctx context.Context, objectID string) error { + ret := _m.Called(ctx, objectID) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = rf(ctx, objectID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockCache_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' +type MockCache_Remove_Call struct { + *mock.Call +} + +// Remove is a helper method to define mock.On call +// - ctx context.Context +// - objectID string +func (_e *MockCache_Expecter) Remove(ctx interface{}, objectID interface{}) *MockCache_Remove_Call { + return &MockCache_Remove_Call{Call: _e.mock.On("Remove", ctx, objectID)} +} + +func (_c *MockCache_Remove_Call) Run(run func(ctx context.Context, objectID string)) *MockCache_Remove_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockCache_Remove_Call) Return(_a0 error) *MockCache_Remove_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockCache_Remove_Call) RunAndReturn(run func(context.Context, string) error) *MockCache_Remove_Call { + _c.Call.Return(run) + return _c +} + +// Run provides a mock function with given fields: ctx +func (_m *MockCache) Run(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockCache_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type MockCache_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockCache_Expecter) Run(ctx interface{}) *MockCache_Run_Call { + return &MockCache_Run_Call{Call: _e.mock.On("Run", ctx)} +} + +func (_c *MockCache_Run_Call) Run(run func(ctx context.Context)) *MockCache_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockCache_Run_Call) Return(err error) *MockCache_Run_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockCache_Run_Call) RunAndReturn(run func(context.Context) error) *MockCache_Run_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockCache interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockCache creates a new instance of MockCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockCache(t mockConstructorTestingTNewMockCache) *MockCache { + mock := &MockCache{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/block/payload.go b/core/block/object/objectcache/payload.go similarity index 61% rename from core/block/payload.go rename to core/block/object/objectcache/payload.go index 3e4390317..715ba1d3b 100644 --- a/core/block/payload.go +++ b/core/block/object/objectcache/payload.go @@ -1,4 +1,4 @@ -package block +package objectcache import ( "crypto/rand" @@ -10,10 +10,12 @@ import ( "github.com/anyproto/anytype-heart/core/domain" coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - spaceservice "github.com/anyproto/anytype-heart/space" + "github.com/anyproto/anytype-heart/space/spacecore" ) -func createChangePayload(sbType coresb.SmartBlockType, key domain.UniqueKey) (data []byte, err error) { +const ChangeType = "anytype.object" + +func createChangePayload(sbType coresb.SmartBlockType, key domain.UniqueKey, spaceID string) (data []byte, err error) { var keyStr string if key != nil { if key.SmartblockType() != sbType { @@ -21,15 +23,31 @@ func createChangePayload(sbType coresb.SmartBlockType, key domain.UniqueKey) (da } keyStr = key.InternalKey() } - payload := &model.ObjectChangePayload{SmartBlockType: model.SmartBlockType(sbType), Key: keyStr} + if sbType == coresb.SmartBlockTypeSpaceView { + mdl := &model.SpaceObjectHeader{SpaceID: spaceID} + marshalled, err := mdl.Marshal() + if err != nil { + return nil, err + } + payload.Data = marshalled + } return payload.Marshal() } -func derivePayload(spaceId string, signKey crypto.PrivKey, changePayload []byte) objecttree.ObjectTreeCreatePayload { +func derivePayload(spaceId string, changePayload []byte) objecttree.ObjectTreeDerivePayload { + return objecttree.ObjectTreeDerivePayload{ + ChangeType: spacecore.ChangeType, + ChangePayload: changePayload, + SpaceId: spaceId, + IsEncrypted: true, + } +} + +func derivePersonalPayload(spaceId string, signKey crypto.PrivKey, changePayload []byte) objecttree.ObjectTreeCreatePayload { return objecttree.ObjectTreeCreatePayload{ PrivKey: signKey, - ChangeType: spaceservice.ChangeType, + ChangeType: spacecore.ChangeType, ChangePayload: changePayload, SpaceId: spaceId, IsEncrypted: true, @@ -43,7 +61,7 @@ func createPayload(spaceId string, signKey crypto.PrivKey, changePayload []byte, } return objecttree.ObjectTreeCreatePayload{ PrivKey: signKey, - ChangeType: spaceservice.ChangeType, + ChangeType: spacecore.ChangeType, ChangePayload: changePayload, SpaceId: spaceId, IsEncrypted: true, diff --git a/core/block/payload_test.go b/core/block/object/objectcache/payload_test.go similarity index 86% rename from core/block/payload_test.go rename to core/block/object/objectcache/payload_test.go index 0f0bda7f5..e1b990794 100644 --- a/core/block/payload_test.go +++ b/core/block/object/objectcache/payload_test.go @@ -1,4 +1,4 @@ -package block +package objectcache import ( "testing" @@ -12,7 +12,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" - spaceservice "github.com/anyproto/anytype-heart/space" + spaceservice "github.com/anyproto/anytype-heart/space/spacecore" ) func Test_Payloads(t *testing.T) { @@ -56,12 +56,12 @@ func Test_Payloads(t *testing.T) { }) t.Run("test derive payload", func(t *testing.T) { - firstPayload := derivePayload("spaceId", keys.SignKey, changePayload) - firstRoot, err := objecttree.CreateObjectTreeRoot(firstPayload, aclList) + firstPayload := derivePayload("spaceId", changePayload) + firstRoot, err := objecttree.DeriveObjectTreeRoot(firstPayload, aclList) require.NoError(t, err) - secondPayload := derivePayload("spaceId", keys.SignKey, changePayload) - secondRoot, err := objecttree.CreateObjectTreeRoot(secondPayload, aclList) + secondPayload := derivePayload("spaceId", changePayload) + secondRoot, err := objecttree.DeriveObjectTreeRoot(secondPayload, aclList) require.NoError(t, err) // checking that derived roots are equal diff --git a/core/block/object/objectcache/tree.go b/core/block/object/objectcache/tree.go new file mode 100644 index 000000000..b7686a3b5 --- /dev/null +++ b/core/block/object/objectcache/tree.go @@ -0,0 +1,134 @@ +package objectcache + +import ( + "context" + "fmt" + "time" + + "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" + + "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + "github.com/anyproto/anytype-heart/core/block/object/payloadcreator" + "github.com/anyproto/anytype-heart/core/domain" + coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" +) + +// TreeDerivationParams is a struct for deriving a tree +type TreeDerivationParams struct { + Key domain.UniqueKey + InitFunc InitFunc + TargetSpaceID string +} + +// TreeCreationParams is a struct for creating a tree +type TreeCreationParams struct { + Time time.Time + SmartblockType coresb.SmartBlockType + InitFunc InitFunc + TargetSpaceID string +} + +// CreateTreePayload creates a tree payload for a given space and smart block type +func (c *objectCache) CreateTreePayload(ctx context.Context, spaceID string, params payloadcreator.PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error) { + space, err := c.spaceService.Get(ctx, spaceID) + if err != nil { + return treestorage.TreeStorageCreatePayload{}, err + } + changePayload, err := createChangePayload(params.SmartblockType, nil, params.TargetSpaceID) + if err != nil { + return treestorage.TreeStorageCreatePayload{}, err + } + treePayload, err := createPayload(space.Id(), c.accountService.Account().SignKey, changePayload, params.Time.Unix()) + if err != nil { + return treestorage.TreeStorageCreatePayload{}, err + } + return space.TreeBuilder().CreateTree(ctx, treePayload) +} + +// CreateTreeObject creates a tree object +func (c *objectCache) CreateTreeObject(ctx context.Context, spaceID string, params TreeCreationParams) (sb smartblock.SmartBlock, err error) { + payload, err := c.CreateTreePayload(ctx, spaceID, payloadcreator.PayloadCreationParams{ + Time: params.Time, + SmartblockType: params.SmartblockType, + TargetSpaceID: params.TargetSpaceID, + }) + if err != nil { + return nil, err + } + return c.CreateTreeObjectWithPayload(ctx, spaceID, payload, params.InitFunc) +} + +// CreateTreeObjectWithPayload creates a tree object with a given payload and object init func +func (c *objectCache) CreateTreeObjectWithPayload(ctx context.Context, spaceID string, payload treestorage.TreeStorageCreatePayload, initFunc InitFunc) (sb smartblock.SmartBlock, err error) { + space, err := c.spaceService.Get(ctx, spaceID) + if err != nil { + return nil, err + } + id := domain.FullID{ + SpaceID: spaceID, + ObjectID: payload.RootRawChange.Id, + } + tr, err := space.TreeBuilder().PutTree(ctx, payload, nil) + if err != nil { + return nil, fmt.Errorf("put tree: %w", err) + } + if tr != nil { + tr.Close() + } + ctx = ContextWithCreateOption(ctx, initFunc) + return c.GetObject(ctx, id) +} + +// DeriveTreePayload derives a tree payload for a given space and smart block type +// it takes into account whether it is for personal space and if so uses old derivation logic +// to maintain backward compatibility +func (c *objectCache) DeriveTreePayload(ctx context.Context, spaceID string, params payloadcreator.PayloadDerivationParams) (storagePayload treestorage.TreeStorageCreatePayload, err error) { + space, err := c.spaceService.Get(ctx, spaceID) + if err != nil { + return treestorage.TreeStorageCreatePayload{}, err + } + changePayload, err := createChangePayload(params.Key.SmartblockType(), params.Key, params.TargetSpaceID) + if err != nil { + return treestorage.TreeStorageCreatePayload{}, err + } + accountKeys := c.accountService.Account() + // we have to derive ids differently for personal space + if c.provider.PersonalSpaceID() == spaceID { + treePayload := derivePersonalPayload(space.Id(), accountKeys.SignKey, changePayload) + create, err := space.TreeBuilder().CreateTree(context.Background(), treePayload) + if err != nil { + return storagePayload, err + } + return create, err + } + treePayload := derivePayload(space.Id(), changePayload) + create, err := space.TreeBuilder().DeriveTree(context.Background(), treePayload) + if err != nil { + return storagePayload, err + } + return create, err +} + +// DeriveTreeObject derives a tree object for a given space and smart block type +func (c *objectCache) DeriveTreeObject(ctx context.Context, spaceID string, params TreeDerivationParams) (sb smartblock.SmartBlock, err error) { + payload, err := c.DeriveTreePayload(ctx, spaceID, payloadcreator.PayloadDerivationParams{ + Key: params.Key, + TargetSpaceID: params.TargetSpaceID, + }) + if err != nil { + return nil, err + } + // TODO: [MR] rewrite to use any-sync derivation + return c.CreateTreeObjectWithPayload(ctx, spaceID, payload, params.InitFunc) +} + +func (c *objectCache) DeriveObjectID(ctx context.Context, spaceID string, uniqueKey domain.UniqueKey) (id string, err error) { + payload, err := c.DeriveTreePayload(ctx, spaceID, payloadcreator.PayloadDerivationParams{ + Key: uniqueKey, + TargetSpaceID: spaceID, + }) + if err != nil { + return "", err + } + return payload.RootRawChange.Id, nil +} diff --git a/core/block/object/objectcreator/creator.go b/core/block/object/objectcreator/creator.go index 52305baf0..74bed2f96 100644 --- a/core/block/object/objectcreator/creator.go +++ b/core/block/object/objectcreator/creator.go @@ -16,6 +16,7 @@ import ( "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/editor/state" "github.com/anyproto/anytype-heart/core/block/editor/template" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/system_object" "github.com/anyproto/anytype-heart/metrics" @@ -28,7 +29,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/internalflag" "github.com/anyproto/anytype-heart/util/pbtypes" "github.com/anyproto/anytype-heart/util/uri" @@ -49,7 +50,8 @@ type Service interface { type Creator struct { blockService BlockService - blockPicker block.Picker + objectCache objectcache.Cache + blockPicker block.ObjectGetter objectStore objectstore.ObjectStore collectionService CollectionService systemObjectService system_object.Service @@ -72,7 +74,8 @@ func NewCreator() *Creator { func (c *Creator) Init(a *app.App) (err error) { c.blockService = a.MustComponent(block.CName).(BlockService) - c.blockPicker = a.MustComponent(block.CName).(block.Picker) + c.objectCache = a.MustComponent(objectcache.CName).(objectcache.Cache) + c.blockPicker = a.MustComponent(block.CName).(block.ObjectGetter) c.objectStore = a.MustComponent(objectstore.CName).(objectstore.ObjectStore) c.bookmark = a.MustComponent(bookmark.CName).(bookmark.Service) c.bookmark = a.MustComponent(bookmark.CName).(bookmark.Service) @@ -93,8 +96,6 @@ func (c *Creator) Name() (name string) { // TODO Temporarily type BlockService interface { StateFromTemplate(templateID, name string) (st *state.State, err error) - CreateTreeObject(ctx context.Context, spaceID string, tp coresb.SmartBlockType, initFunc smartblock.InitFunc) (sb smartblock.SmartBlock, err error) - DeriveTreeObjectWithUniqueKey(ctx context.Context, spaceID string, key domain.UniqueKey, initFunc smartblock.InitFunc) (sb smartblock.SmartBlock, err error) TemplateClone(spaceID string, id string) (templateID string, err error) } @@ -168,12 +169,19 @@ func (c *Creator) CreateSmartBlockFromState(ctx context.Context, spaceID string, if err != nil { return "", nil, err } - sb, err = c.blockService.DeriveTreeObjectWithUniqueKey(ctx, spaceID, uk, initFunc) + sb, err = c.objectCache.DeriveTreeObject(ctx, spaceID, objectcache.TreeDerivationParams{ + Key: uk, + InitFunc: initFunc, + }) if err != nil { return "", nil, err } } else { - sb, err = c.blockService.CreateTreeObject(ctx, spaceID, sbType, initFunc) + sb, err = c.objectCache.CreateTreeObject(ctx, spaceID, objectcache.TreeCreationParams{ + Time: time.Now(), + SmartblockType: sbType, + InitFunc: initFunc, + }) if err != nil { return } @@ -306,7 +314,7 @@ func (w *Creator) createRelationOption(ctx context.Context, spaceID string, deta } else if pbtypes.GetString(details, "name") == "" { return "", nil, fmt.Errorf("name is empty") } else if pbtypes.GetString(details, bundle.RelationKeyRelationKey.String()) == "" { - return "", nil, fmt.Errorf("invalid relation key: unknown enum") + return "", nil, fmt.Errorf("invalid relation Key: unknown enum") } uniqueKey, err := getUniqueKeyOrGenerate(coresb.SmartBlockTypeRelationOption, details) @@ -350,9 +358,9 @@ func (w *Creator) createObjectType(ctx context.Context, spaceID string, details for _, relKey := range recommendedRelationKeys { uk, err := domain.NewUniqueKey(coresb.SmartBlockTypeRelation, relKey) if err != nil { - return "", nil, fmt.Errorf("failed to create unique key: %w", err) + return "", nil, fmt.Errorf("failed to create unique Key: %w", err) } - id, err := w.coreService.DeriveObjectId(ctx, spaceID, uk) + id, err := w.objectCache.DeriveObjectID(ctx, spaceID, uk) if err != nil { return "", nil, fmt.Errorf("failed to derive object id: %w", err) } diff --git a/core/block/object/objectgraph/graph.go b/core/block/object/objectgraph/graph.go index c24ea91a2..9d7f56b7c 100644 --- a/core/block/object/objectgraph/graph.go +++ b/core/block/object/objectgraph/graph.go @@ -16,7 +16,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/database" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/core/block/object/payloadcreator/payloadcreator.go b/core/block/object/payloadcreator/payloadcreator.go new file mode 100644 index 000000000..362848732 --- /dev/null +++ b/core/block/object/payloadcreator/payloadcreator.go @@ -0,0 +1,30 @@ +package payloadcreator + +import ( + "context" + "time" + + "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" + + "github.com/anyproto/anytype-heart/core/domain" + coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" +) + +// PayloadDerivationParams is a struct for deriving a payload +type PayloadDerivationParams struct { + Key domain.UniqueKey + TargetSpaceID string +} + +// PayloadCreationParams is a struct for creating a payload +type PayloadCreationParams struct { + Time time.Time + SmartblockType coresb.SmartBlockType + TargetSpaceID string +} + +type PayloadCreator interface { + CreateTreePayload(ctx context.Context, spaceID string, params PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error) + DeriveTreePayload(ctx context.Context, spaceID string, params PayloadDerivationParams) (storagePayload treestorage.TreeStorageCreatePayload, err error) + DeriveObjectID(ctx context.Context, spaceID string, uniqueKey domain.UniqueKey) (id string, err error) +} diff --git a/core/block/object/treemanager/tree_syncer.go b/core/block/object/treemanager/tree_syncer.go deleted file mode 100644 index cf44767d7..000000000 --- a/core/block/object/treemanager/tree_syncer.go +++ /dev/null @@ -1 +0,0 @@ -package treemanager diff --git a/core/block/object/treemanager/tree_manager.go b/core/block/object/treemanager/treemanager.go similarity index 80% rename from core/block/object/treemanager/tree_manager.go rename to core/block/object/treemanager/treemanager.go index b8fd3d4c4..5c9f0e7a9 100644 --- a/core/block/object/treemanager/tree_manager.go +++ b/core/block/object/treemanager/treemanager.go @@ -22,10 +22,6 @@ import ( var log = logging.Logger("anytype-mw-tree-manager") -const ( - concurrentTrees = 10 -) - var errAppIsNotRunning = errors.New("app is not running") type treeManager struct { @@ -35,7 +31,6 @@ type treeManager struct { onDelete func(id domain.FullID) error - syncer map[string]*treeSyncer syncStarted bool syncerLock sync.Mutex } @@ -47,7 +42,6 @@ func New() treemanager.TreeManager { func newTreeManager(onDelete func(id domain.FullID) error) *treeManager { return &treeManager{ onDelete: onDelete, - syncer: make(map[string]*treeSyncer), } } @@ -80,15 +74,6 @@ func (m *treeManager) Close(ctx context.Context) error { return nil } -func (m *treeManager) StartSync() { - m.syncerLock.Lock() - defer m.syncerLock.Unlock() - m.syncStarted = true - for _, syncer := range m.syncer { - syncer.Run() - } -} - // GetTree should only be called by either space services or debug apis, not the client code func (m *treeManager) GetTree(ctx context.Context, spaceId, id string) (tr objecttree.ObjectTree, err error) { if !m.coreService.IsStarted() { @@ -145,19 +130,6 @@ func (m *treeManager) DeleteTree(ctx context.Context, spaceId, treeId string) (e return } -// NewTreeSyncer is called in commonspace.SpaceService/NewSpace, so loading a space into cache in space.Service creates a syncer -func (m *treeManager) NewTreeSyncer(spaceId string, treeManager treemanager.TreeManager) treemanager.TreeSyncer { - m.syncerLock.Lock() - defer m.syncerLock.Unlock() - syncer := newTreeSyncer(spaceId, objectcache.ObjectLoadTimeout, concurrentTrees, treeManager) - m.syncer[spaceId] = syncer - if m.syncStarted { - log.With("spaceID", spaceId).Warn("creating tree syncer after run") - syncer.Run() - } - return syncer -} - func (m *treeManager) sendOnRemoveEvent(ids ...string) { m.eventSender.Broadcast(&pb.Event{ Messages: []*pb.EventMessage{ diff --git a/core/block/object/treemanager/treesyncer_test.go b/core/block/object/treemanager/treesyncer_test.go deleted file mode 100644 index a90874ec4..000000000 --- a/core/block/object/treemanager/treesyncer_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package treemanager - -import ( - "context" - "sync" - "testing" - "time" - - "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" - "github.com/anyproto/any-sync/commonspace/object/tree/objecttree/mock_objecttree" - "github.com/anyproto/any-sync/commonspace/object/tree/synctree/mock_synctree" - "github.com/anyproto/any-sync/commonspace/object/treemanager/mock_treemanager" - "github.com/stretchr/testify/require" - "go.uber.org/mock/gomock" - - "github.com/anyproto/anytype-heart/core/block/object/objectcache" -) - -func TestTreeSyncer(t *testing.T) { - ctrl := gomock.NewController(t) - managerMock := mock_treemanager.NewMockTreeManager(ctrl) - spaceId := "spaceId" - peerId := "peerId" - existingId := "existing" - missingId := "missing" - missingMock := mock_objecttree.NewMockObjectTree(ctrl) - existingMock := mock_synctree.NewMockSyncTree(ctrl) - - t.Run("delayed sync", func(t *testing.T) { - syncer := newTreeSyncer(spaceId, objectcache.ObjectLoadTimeout, 10, managerMock) - syncer.Init() - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(existingMock, nil) - existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, missingId).Return(missingMock, nil) - err := syncer.SyncAll(context.Background(), peerId, []string{existingId}, []string{missingId}) - require.NoError(t, err) - require.NotNil(t, syncer.requestPools[peerId]) - require.NotNil(t, syncer.headPools[peerId]) - - syncer.Run() - time.Sleep(100 * time.Millisecond) - syncer.Close() - }) - - t.Run("sync after run", func(t *testing.T) { - syncer := newTreeSyncer(spaceId, objectcache.ObjectLoadTimeout, 10, managerMock) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(existingMock, nil) - existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, missingId).Return(missingMock, nil) - syncer.Init() - syncer.Run() - err := syncer.SyncAll(context.Background(), peerId, []string{existingId}, []string{missingId}) - require.NoError(t, err) - require.NotNil(t, syncer.requestPools[peerId]) - require.NotNil(t, syncer.headPools[peerId]) - - time.Sleep(100 * time.Millisecond) - syncer.Close() - }) - - t.Run("sync same ids", func(t *testing.T) { - syncer := newTreeSyncer(spaceId, objectcache.ObjectLoadTimeout, 10, managerMock) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(existingMock, nil) - existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, missingId).Return(missingMock, nil) - syncer.Init() - syncer.Run() - err := syncer.SyncAll(context.Background(), peerId, []string{existingId, existingId}, []string{missingId, missingId, missingId}) - require.NoError(t, err) - require.NotNil(t, syncer.requestPools[peerId]) - require.NotNil(t, syncer.headPools[peerId]) - - time.Sleep(100 * time.Millisecond) - syncer.Close() - }) - - t.Run("sync concurrent ids", func(t *testing.T) { - ch := make(chan struct{}, 2) - syncer := newTreeSyncer(spaceId, objectcache.ObjectLoadTimeout, 2, managerMock) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(existingMock, nil) - existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, missingId+"1").DoAndReturn(func(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { - <-ch - return missingMock, nil - }) - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, missingId+"2").DoAndReturn(func(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { - <-ch - return missingMock, nil - }) - syncer.Init() - syncer.Run() - err := syncer.SyncAll(context.Background(), peerId, []string{existingId}, []string{missingId + "1", missingId + "2"}) - require.NoError(t, err) - require.NotNil(t, syncer.requestPools[peerId]) - require.NotNil(t, syncer.headPools[peerId]) - time.Sleep(100 * time.Millisecond) - syncer.Close() - for i := 0; i < 2; i++ { - ch <- struct{}{} - } - }) - - t.Run("sync context cancel", func(t *testing.T) { - var events []string - syncer := newTreeSyncer(spaceId, objectcache.ObjectLoadTimeout, 1, managerMock) - mutex := sync.Mutex{} - managerMock.EXPECT().GetTree(gomock.Any(), spaceId, missingId).DoAndReturn(func(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { - <-ctx.Done() - mutex.Lock() - events = append(events, "after done") - mutex.Unlock() - return missingMock, nil - }) - syncer.Init() - syncer.Run() - err := syncer.SyncAll(context.Background(), peerId, nil, []string{missingId}) - require.NoError(t, err) - require.NotNil(t, syncer.requestPools[peerId]) - require.NotNil(t, syncer.headPools[peerId]) - time.Sleep(100 * time.Millisecond) - mutex.Lock() - events = append(events, "before close") - mutex.Unlock() - syncer.Close() - time.Sleep(100 * time.Millisecond) - mutex.Lock() - require.Equal(t, []string{"before close", "after done"}, events) - mutex.Unlock() - }) -} diff --git a/core/block/object/treemanager/treesyncer.go b/core/block/object/treesyncer/treesyncer.go similarity index 82% rename from core/block/object/treemanager/treesyncer.go rename to core/block/object/treesyncer/treesyncer.go index dc5eea1b8..7bd8f170e 100644 --- a/core/block/object/treemanager/treesyncer.go +++ b/core/block/object/treesyncer/treesyncer.go @@ -1,17 +1,22 @@ -package treemanager +package treesyncer import ( "context" "sync" "time" + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/commonspace/object/tree/synctree" "github.com/anyproto/any-sync/commonspace/object/treemanager" + "github.com/anyproto/any-sync/commonspace/object/treesyncer" "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/streampool" "go.uber.org/zap" ) +var log = logger.NewNamed(treemanager.CName) + type executor struct { pool *streampool.ExecPool objs map[string]struct{} @@ -61,28 +66,51 @@ type treeSyncer struct { isRunning bool } -func newTreeSyncer(spaceId string, timeout time.Duration, concurrentReqs int, treeManager treemanager.TreeManager) *treeSyncer { +func NewTreeSyncer(spaceId string) treesyncer.TreeSyncer { mainCtx, cancel := context.WithCancel(context.Background()) return &treeSyncer{ mainCtx: mainCtx, cancel: cancel, - requests: concurrentReqs, + requests: 10, spaceId: spaceId, - timeout: timeout, + timeout: time.Second * 30, requestPools: map[string]*executor{}, headPools: map[string]*executor{}, - treeManager: treeManager, } } -func (t *treeSyncer) Init() { +func (t *treeSyncer) Init(a *app.App) (err error) { + t.treeManager = app.MustComponent[treemanager.TreeManager](a) + return nil } -func (t *treeSyncer) Run() { +func (t *treeSyncer) Name() (name string) { + return treesyncer.CName +} + +func (t *treeSyncer) Run(ctx context.Context) (err error) { + return nil +} + +func (t *treeSyncer) Close(ctx context.Context) (err error) { + t.Lock() + defer t.Unlock() + t.cancel() + t.isRunning = false + for _, pool := range t.headPools { + pool.close() + } + for _, pool := range t.requestPools { + pool.close() + } + return nil +} + +func (t *treeSyncer) StartSync() { t.Lock() defer t.Unlock() t.isRunning = true - log.Info("starting request pool") + log.Info("starting request pool", zap.String("spaceId", t.spaceId)) for _, p := range t.requestPools { p.run() } @@ -162,17 +190,3 @@ func (t *treeSyncer) updateTree(peerId, id string) { log.Debug("success synctree.SyncWithPeer") } } - -func (t *treeSyncer) Close() error { - t.Lock() - defer t.Unlock() - t.cancel() - t.isRunning = false - for _, pool := range t.headPools { - pool.close() - } - for _, pool := range t.requestPools { - pool.close() - } - return nil -} diff --git a/core/block/object/treesyncer/treesyncer_test.go b/core/block/object/treesyncer/treesyncer_test.go new file mode 100644 index 000000000..069d36836 --- /dev/null +++ b/core/block/object/treesyncer/treesyncer_test.go @@ -0,0 +1,156 @@ +package treesyncer + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" + "github.com/anyproto/any-sync/commonspace/object/tree/objecttree/mock_objecttree" + "github.com/anyproto/any-sync/commonspace/object/tree/synctree/mock_synctree" + "github.com/anyproto/any-sync/commonspace/object/treemanager/mock_treemanager" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/anyproto/anytype-heart/tests/testutil" +) + +type fixture struct { + *treeSyncer + + missingMock *mock_objecttree.MockObjectTree + existingMock *mock_synctree.MockSyncTree + treeManager *mock_treemanager.MockTreeManager +} + +func newFixture(t *testing.T, spaceId string) *fixture { + ctrl := gomock.NewController(t) + treeManager := mock_treemanager.NewMockTreeManager(ctrl) + missingMock := mock_objecttree.NewMockObjectTree(ctrl) + existingMock := mock_synctree.NewMockSyncTree(ctrl) + + a := new(app.App) + a.Register(testutil.PrepareMock(context.Background(), a, treeManager)) + syncer := NewTreeSyncer(spaceId) + err := syncer.Init(a) + require.NoError(t, err) + + return &fixture{ + treeSyncer: syncer.(*treeSyncer), + missingMock: missingMock, + existingMock: existingMock, + treeManager: treeManager, + } +} + +func TestTreeSyncer(t *testing.T) { + + spaceId := "spaceId" + peerId := "peerId" + existingId := "existing" + missingId := "missing" + + t.Run("delayed sync", func(t *testing.T) { + ctx := context.Background() + fx := newFixture(t, spaceId) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(fx.existingMock, nil) + fx.existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, missingId).Return(fx.missingMock, nil) + err := fx.SyncAll(context.Background(), peerId, []string{existingId}, []string{missingId}) + require.NoError(t, err) + require.NotNil(t, fx.requestPools[peerId]) + require.NotNil(t, fx.headPools[peerId]) + + fx.StartSync() + time.Sleep(100 * time.Millisecond) + fx.Close(ctx) + }) + + t.Run("sync after run", func(t *testing.T) { + ctx := context.Background() + fx := newFixture(t, spaceId) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(fx.existingMock, nil) + fx.existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, missingId).Return(fx.missingMock, nil) + fx.StartSync() + err := fx.SyncAll(context.Background(), peerId, []string{existingId}, []string{missingId}) + require.NoError(t, err) + require.NotNil(t, fx.requestPools[peerId]) + require.NotNil(t, fx.headPools[peerId]) + + time.Sleep(100 * time.Millisecond) + fx.Close(ctx) + }) + + t.Run("sync same ids", func(t *testing.T) { + ctx := context.Background() + fx := newFixture(t, spaceId) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(fx.existingMock, nil) + fx.existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, missingId).Return(fx.missingMock, nil) + fx.StartSync() + err := fx.SyncAll(context.Background(), peerId, []string{existingId, existingId}, []string{missingId, missingId, missingId}) + require.NoError(t, err) + require.NotNil(t, fx.requestPools[peerId]) + require.NotNil(t, fx.headPools[peerId]) + + time.Sleep(100 * time.Millisecond) + fx.Close(ctx) + }) + + t.Run("sync concurrent ids", func(t *testing.T) { + ctx := context.Background() + ch := make(chan struct{}, 2) + fx := newFixture(t, spaceId) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, existingId).Return(fx.existingMock, nil) + fx.existingMock.EXPECT().SyncWithPeer(gomock.Any(), peerId).Return(nil) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, missingId+"1").DoAndReturn(func(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { + <-ch + return fx.missingMock, nil + }) + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, missingId+"2").DoAndReturn(func(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { + <-ch + return fx.missingMock, nil + }) + fx.StartSync() + err := fx.SyncAll(context.Background(), peerId, []string{existingId}, []string{missingId + "1", missingId + "2"}) + require.NoError(t, err) + require.NotNil(t, fx.requestPools[peerId]) + require.NotNil(t, fx.headPools[peerId]) + time.Sleep(100 * time.Millisecond) + fx.Close(ctx) + for i := 0; i < 2; i++ { + ch <- struct{}{} + } + }) + + t.Run("sync context cancel", func(t *testing.T) { + ctx := context.Background() + var events []string + fx := newFixture(t, spaceId) + mutex := sync.Mutex{} + fx.treeManager.EXPECT().GetTree(gomock.Any(), spaceId, missingId).DoAndReturn(func(ctx context.Context, spaceId, treeId string) (objecttree.ObjectTree, error) { + <-ctx.Done() + mutex.Lock() + events = append(events, "after done") + mutex.Unlock() + return fx.missingMock, nil + }) + fx.StartSync() + err := fx.SyncAll(context.Background(), peerId, nil, []string{missingId}) + require.NoError(t, err) + require.NotNil(t, fx.requestPools[peerId]) + require.NotNil(t, fx.headPools[peerId]) + time.Sleep(100 * time.Millisecond) + mutex.Lock() + events = append(events, "before close") + mutex.Unlock() + fx.Close(ctx) + time.Sleep(100 * time.Millisecond) + mutex.Lock() + require.Equal(t, []string{"before close", "after done"}, events) + mutex.Unlock() + }) +} diff --git a/core/block/restriction/dataview_test.go b/core/block/restriction/dataview_test.go index b859f841b..5f57baa98 100644 --- a/core/block/restriction/dataview_test.go +++ b/core/block/restriction/dataview_test.go @@ -39,7 +39,6 @@ func TestService_DataviewRestrictions(t *testing.T) { t.Run("ordinary objects don't have restrictions", func(t *testing.T) { objectTypeID := "derivedFrom(page)" - s.systemObjectServiceMock.EXPECT().HasObjectType(objectTypeID).Return(true, nil) restrictions := s.GetRestrictions( newRestrictionHolder( smartblock.SmartBlockTypePage, diff --git a/core/block/restriction/fixture_test.go b/core/block/restriction/fixture_test.go index e92068932..9ed57ba44 100644 --- a/core/block/restriction/fixture_test.go +++ b/core/block/restriction/fixture_test.go @@ -7,19 +7,19 @@ import ( "github.com/anyproto/any-sync/app" "github.com/stretchr/testify/require" + "context" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/system_object/mock_system_object" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore/mock_objectstore" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider/mock_typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider/mock_typeprovider" "github.com/anyproto/anytype-heart/tests/testutil" ) type fixture struct { Service - objectStoreMock *mock_objectstore.MockObjectStore - systemObjectServiceMock *mock_system_object.MockService + objectStoreMock *mock_objectstore.MockObjectStore } func newFixture(t *testing.T) *fixture { @@ -34,14 +34,13 @@ func newFixture(t *testing.T) *fixture { a := &app.App{} a.Register(objectStore) a.Register(sbtProvider) - a.Register(testutil.PrepareMock(a, systemObjectService)) + a.Register(testutil.PrepareMock(context.Background(), a, systemObjectService)) s := New() err := s.Init(a) require.NoError(t, err) return &fixture{ - Service: s, - objectStoreMock: objectStore, - systemObjectServiceMock: systemObjectService, + Service: s, + objectStoreMock: objectStore, } } diff --git a/core/block/restriction/object.go b/core/block/restriction/object.go index 40d9e8ff3..c65a5168f 100644 --- a/core/block/restriction/object.go +++ b/core/block/restriction/object.go @@ -1,7 +1,6 @@ package restriction import ( - "errors" "fmt" "github.com/gogo/protobuf/types" @@ -210,13 +209,6 @@ func (s *service) getObjectRestrictions(rh RestrictionHolder) (r ObjectRestricti r = ObjectRestrictions{} } } - - if !errors.Is(r.Check(model.Restrictions_Template), ErrRestricted) { - if ok, err := s.systemObjectService.HasObjectType(rh.ObjectTypeID()); err != nil || !ok { - r = append(r, model.Restrictions_Template) - } - } - return } diff --git a/core/block/restriction/object_test.go b/core/block/restriction/object_test.go index 782a5a071..a95f74e9d 100644 --- a/core/block/restriction/object_test.go +++ b/core/block/restriction/object_test.go @@ -3,18 +3,15 @@ package restriction import ( "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/anyproto/anytype-heart/pkg/lib/bundle" coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" + "github.com/stretchr/testify/assert" ) // TODO Use constructors instead for initializing restrictionHolder structures by hand. See givenObjectType and givenRelation func TestService_ObjectRestrictionsById(t *testing.T) { rest := newFixture(t) - rest.systemObjectServiceMock.EXPECT().HasObjectType(mock.Anything).Return(false, nil) assert.ErrorIs(t, rest.GetRestrictions(&restrictionHolder{ sbType: coresb.SmartBlockTypeAnytypeProfile, @@ -93,8 +90,6 @@ func TestService_ObjectRestrictionsById(t *testing.T) { // TODO Use constructors instead for initializing restrictionHolder structures by hand. See givenObjectType and givenRelation func TestTemplateRestriction(t *testing.T) { rs := newFixture(t) - rs.systemObjectServiceMock.EXPECT().HasObjectType(bundle.TypeKeyPage.URL()).Return(false, nil) - rs.systemObjectServiceMock.EXPECT().HasObjectType(bundle.TypeKeyContact.URL()).Return(true, nil) assert.ErrorIs(t, rs.GetRestrictions(&restrictionHolder{ // id: "cannot make template from Template smartblock type", @@ -123,15 +118,6 @@ func TestTemplateRestriction(t *testing.T) { model.Restrictions_Template, ), ErrRestricted) - assert.ErrorIs(t, rs.GetRestrictions(&restrictionHolder{ - // id: "cannot make template from object with objectType not added to space", - sbType: coresb.SmartBlockTypePage, - layout: model.ObjectType_basic, - objectTypeID: bundle.TypeKeyPage.URL(), - }).Object.Check( - model.Restrictions_Template, - ), ErrRestricted) - assert.NoError(t, rs.GetRestrictions(&restrictionHolder{ // id: "make template from object with objectType added to space", sbType: coresb.SmartBlockTypePage, diff --git a/core/block/restriction/service.go b/core/block/restriction/service.go index c4f28c63a..f0714ce42 100644 --- a/core/block/restriction/service.go +++ b/core/block/restriction/service.go @@ -12,7 +12,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/core/block/service.go b/core/block/service.go index a34593030..eaa2bb994 100644 --- a/core/block/service.go +++ b/core/block/service.go @@ -26,6 +26,7 @@ import ( "github.com/anyproto/anytype-heart/core/block/editor/state" "github.com/anyproto/anytype-heart/core/block/editor/template" "github.com/anyproto/anytype-heart/core/block/history" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/block/object/objectcache" "github.com/anyproto/anytype-heart/core/block/process" "github.com/anyproto/anytype-heart/core/block/restriction" @@ -49,7 +50,8 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/internalflag" "github.com/anyproto/anytype-heart/util/linkpreview" "github.com/anyproto/anytype-heart/util/mutex" @@ -105,7 +107,6 @@ type objectCreator interface { CreateSmartBlockFromState(ctx context.Context, spaceID string, sbType coresb.SmartBlockType, objectTypeKeys []domain.TypeKey, details *types.Struct, createState *state.State) (id string, newDetails *types.Struct, err error) CreateObject(ctx context.Context, spaceID string, req DetailsGetter, objectTypeKey domain.TypeKey) (id string, details *types.Struct, err error) } - type DetailsGetter interface { GetDetails() *types.Struct } @@ -115,34 +116,27 @@ type InternalFlagsGetter interface { type TemplateIDGetter interface { GetTemplateId() string } - -type indexer interface { - EnsurePreinstalledObjects(spaceID string) error -} - type builtinObjects interface { CreateObjectsForUseCase(ctx session.Context, spaceID string, req pb.RpcObjectImportUseCaseRequestUseCase) (code pb.RpcObjectImportUseCaseResponseErrorCode, err error) } type Service struct { - anytype core.Service - syncStatus syncstatus.Service - eventSender event.Sender - linkPreview linkpreview.LinkPreview - process process.Service - app *app.App - source source.Service - objectStore objectstore.ObjectStore - restriction restriction.Service - bookmark bookmarksvc.Service - systemObjectService system_object.Service - objectCache objectcache.Cache - - indexer indexer - - objectCreator objectCreator - - spaceService space.Service + anytype core.Service + syncStatus syncstatus.Service + eventSender event.Sender + linkPreview linkpreview.LinkPreview + process process.Service + app *app.App + source source.Service + objectStore objectstore.ObjectStore + restriction restriction.Service + bookmark bookmarksvc.Service + systemObjectService system_object.Service + objectCache objectcache.Cache + objectCreator objectCreator + resolver idresolver.Resolver + spaceService space.SpaceService + spaceCore spacecore.SpaceCoreService commonAccount accountservice.Service fileStore filestore.FileStore tempDirProvider core.TempDirProvider @@ -178,18 +172,19 @@ func (s *Service) Init(a *app.App) (err error) { s.bookmark = a.MustComponent("bookmark-importer").(bookmarksvc.Service) s.systemObjectService = a.MustComponent(system_object.CName).(system_object.Service) s.objectCreator = a.MustComponent("objectCreator").(objectCreator) - s.spaceService = a.MustComponent(space.CName).(space.Service) + s.spaceService = a.MustComponent(space.CName).(space.SpaceService) s.commonAccount = a.MustComponent(accountservice.CName).(accountservice.Service) s.fileStore = app.MustComponent[filestore.FileStore](a) s.fileSync = app.MustComponent[filesync.FileSync](a) s.fileService = app.MustComponent[files.Service](a) s.objectCache = app.MustComponent[objectcache.Cache](a) + s.resolver = a.MustComponent(idresolver.CName).(idresolver.Resolver) + s.spaceCore = app.MustComponent[spacecore.SpaceCoreService](a) s.tempDirProvider = app.MustComponent[core.TempDirProvider](a) s.sbtProvider = app.MustComponent[typeprovider.SmartBlockTypeProvider](a) s.layoutConverter = app.MustComponent[converter.LayoutConverter](a) - s.indexer = app.MustComponent[indexer](a) s.builtinObjectService = app.MustComponent[builtinObjects](a) s.app = a return @@ -199,12 +194,23 @@ func (s *Service) Run(ctx context.Context) (err error) { return } -func (s *Service) PickBlock(ctx context.Context, objectID string) (sb smartblock.SmartBlock, err error) { - return s.objectCache.PickBlock(ctx, objectID) +func (s *Service) GetObject(ctx context.Context, objectID string) (sb smartblock.SmartBlock, err error) { + spaceID, err := s.resolver.ResolveSpaceID(objectID) + if err != nil { + return nil, err + } + return s.objectCache.GetObject(ctx, domain.FullID{ + ObjectID: objectID, + SpaceID: spaceID, + }) +} + +func (s *Service) GetObjectByFullID(ctx context.Context, id domain.FullID) (sb smartblock.SmartBlock, err error) { + return s.objectCache.GetObject(ctx, id) } func (s *Service) OpenBlock(sctx session.Context, id string, includeRelationsAsDependentObjects bool) (obj *model.ObjectView, err error) { - spaceID, err := s.spaceService.ResolveSpaceID(id) + spaceID, err := s.resolver.ResolveSpaceID(id) if err != nil { return nil, fmt.Errorf("resolve space id: %w", err) } @@ -358,7 +364,7 @@ func (s *Service) prepareDetailsForInstallingObject(ctx context.Context, spaceID // should never happen return nil, err } - id, err := s.anytype.DeriveObjectId(ctx, spaceID, uniqueKey) + id, err := s.objectCache.DeriveObjectID(ctx, spaceID, uniqueKey) if err != nil { // should never happen return nil, err @@ -378,7 +384,7 @@ func (s *Service) prepareDetailsForInstallingObject(ctx context.Context, spaceID // should never happen return nil, err } - id, err := s.anytype.DeriveObjectId(ctx, spaceID, uniqueKey) + id, err := s.objectCache.DeriveObjectID(ctx, spaceID, uniqueKey) if err != nil { // should never happen return nil, err @@ -617,60 +623,19 @@ func (s *Service) SelectWorkspace(req *pb.RpcWorkspaceSelectRequest) error { } func (s *Service) GetCurrentWorkspace(req *pb.RpcWorkspaceGetCurrentRequest) (string, error) { - return "", nil + panic("should be removed") } func (s *Service) GetAllWorkspaces(req *pb.RpcWorkspaceGetAllRequest) ([]string, error) { - return nil, nil + panic("should be removed") } func (s *Service) SetIsHighlighted(req *pb.RpcWorkspaceSetIsHighlightedRequest) error { - panic("is not implemented") - // workspaceId, _ := s.anytype.GetWorkspaceIdForObject(req.ObjectId) - // return Do(s,ctx, workspaceId, func(b smartblock.SmartBlock) error { - // workspace, ok := b.(*editor.Workspaces) - // if !ok { - // return fmt.Errorf("incorrect object with workspace id") - // } - // return workspace.SetIsHighlighted(req.ObjectId, req.IsHighlighted) - // }) + panic("should be removed") } func (s *Service) ObjectShareByLink(req *pb.RpcObjectShareByLinkRequest) (link string, err error) { - return "", fmt.Errorf("not implemented") - // workspaceId, err := s.anytype.GetWorkspaceIdForObject(req.ObjectId) - // if err == core.ErrObjectDoesNotBelongToWorkspace { - // workspaceId = s.Anytype().AccountObjects().Account - // } - // var key string - // var addrs []string - // err = Do(s,ctx, workspaceId, func(b smartblock.SmartBlock) error { - // workspace, ok := b.(*editor.Workspaces) - // if !ok { - // return fmt.Errorf("incorrect object with workspace id") - // } - // key, addrs, err = workspace.GetObjectKeyAddrs(req.ObjectId) - // return err - // }) - // if err != nil { - // return "", err - // } - // payload := &model.ThreadDeeplinkPayload{ - // Key: key, - // Addrs: addrs, - // } - // marshalledPayload, err := proto.Marshal(payload) - // if err != nil { - // return "", fmt.Errorf("failed to marshal deeplink payload: %w", err) - // } - // encodedPayload := base64.RawStdEncoding.EncodeToString(marshalledPayload) - // - // params := url.Values{} - // params.Add("id", req.ObjectId) - // params.Add("payload", encodedPayload) - // encoded := params.Encode() - // - // return fmt.Sprintf("%s%s", linkObjectShare, encoded), nil + panic("should be removed") } func (s *Service) SetPagesIsArchived(ctx session.Context, req pb.RpcObjectListSetIsArchivedRequest) error { @@ -743,7 +708,7 @@ func (s *Service) setIsArchivedForObjects(spaceID string, objectIDs []string, is func (s *Service) partitionObjectIDsBySpaceID(objectIDs []string) (map[string][]string, error) { res := map[string][]string{} for _, objectID := range objectIDs { - spaceID, err := s.spaceService.ResolveSpaceID(objectID) + spaceID, err := s.resolver.ResolveSpaceID(objectID) if err != nil { return nil, fmt.Errorf("resolve spaceID: %w", err) } @@ -797,7 +762,7 @@ func (s *Service) objectLinksCollectionModify(collectionId string, objectId stri } func (s *Service) SetPageIsFavorite(req pb.RpcObjectSetIsFavoriteRequest) (err error) { - spaceID, err := s.ResolveSpaceID(req.ContextId) + spaceID, err := s.resolver.ResolveSpaceID(req.ContextId) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -805,7 +770,7 @@ func (s *Service) SetPageIsFavorite(req pb.RpcObjectSetIsFavoriteRequest) (err e } func (s *Service) SetPageIsArchived(req pb.RpcObjectSetIsArchivedRequest) (err error) { - spaceID, err := s.ResolveSpaceID(req.ContextId) + spaceID, err := s.resolver.ResolveSpaceID(req.ContextId) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -895,7 +860,7 @@ func (s *Service) ObjectsDuplicate(ctx context.Context, ids []string) (newIds [] } func (s *Service) DeleteArchivedObject(id string) (err error) { - spaceID, err := s.spaceService.ResolveSpaceID(id) + spaceID, err := s.resolver.ResolveSpaceID(id) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -987,10 +952,6 @@ func (s *Service) Close(ctx context.Context) (err error) { return nil } -func (s *Service) ResolveSpaceID(objectID string) (spaceID string, err error) { - return s.spaceService.ResolveSpaceID(objectID) -} - func (s *Service) StateFromTemplate(templateID, name string) (st *state.State, err error) { if templateID == BlankTemplateID || templateID == "" { return s.BlankTemplateState(), nil @@ -1009,7 +970,7 @@ func (s *Service) StateFromTemplate(templateID, name string) (st *state.State, e } func (s *Service) DoFileNonLock(id string, apply func(b file.File) error) error { - sb, err := s.PickBlock(context.Background(), id) + sb, err := s.GetObject(context.Background(), id) if err != nil { return err } @@ -1057,7 +1018,7 @@ func (s *Service) ResetToState(pageID string, st *state.State) (err error) { } func (s *Service) ObjectBookmarkFetch(req pb.RpcObjectBookmarkFetchRequest) (err error) { - spaceID, err := s.spaceService.ResolveSpaceID(req.ContextId) + spaceID, err := s.resolver.ResolveSpaceID(req.ContextId) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -1075,7 +1036,7 @@ func (s *Service) ObjectBookmarkFetch(req pb.RpcObjectBookmarkFetchRequest) (err } func (s *Service) ObjectToBookmark(ctx context.Context, id string, url string) (objectId string, err error) { - spaceID, err := s.spaceService.ResolveSpaceID(id) + spaceID, err := s.resolver.ResolveSpaceID(id) if err != nil { return "", fmt.Errorf("resolve spaceID: %w", err) } diff --git a/core/block/source/service.go b/core/block/source/service.go index 716b31565..b6d5cc04b 100644 --- a/core/block/source/service.go +++ b/core/block/source/service.go @@ -11,6 +11,7 @@ import ( "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" "github.com/anyproto/any-sync/commonspace/object/tree/synctree/updatelistener" "github.com/anyproto/any-sync/commonspace/objecttreebuilder" + "github.com/anyproto/any-sync/commonspace/spacestorage" "github.com/gogo/protobuf/types" "github.com/anyproto/anytype-heart/core/block/editor/state" @@ -22,8 +23,9 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/storage" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" ) const CName = "source" @@ -32,6 +34,11 @@ func New() Service { return &service{} } +type idResolver interface { + BindSpaceID(spaceID string, objectID string) error + ResolveSpaceID(objectID string) (spaceID string, err error) +} + type Service interface { NewSource(ctx context.Context, id string, spaceID string, buildOptions BuildOptions) (source Source, err error) RegisterStaticSource(s Source) error @@ -48,7 +55,8 @@ type service struct { sbtProvider typeprovider.SmartBlockTypeProvider account accountservice.Service fileStore filestore.FileStore - spaceService space.Service + spaceService spacecore.SpaceCoreService + storageService storage.ClientStorage fileService files.Service systemObjectService system_object.Service @@ -64,7 +72,8 @@ func (s *service) Init(a *app.App) (err error) { s.sbtProvider = a.MustComponent(typeprovider.CName).(typeprovider.SmartBlockTypeProvider) s.account = a.MustComponent(accountservice.CName).(accountservice.Service) s.fileStore = app.MustComponent[filestore.FileStore](a) - s.spaceService = app.MustComponent[space.Service](a) + s.spaceService = app.MustComponent[spacecore.SpaceCoreService](a) + s.storageService = a.MustComponent(spacestorage.CName).(storage.ClientStorage) s.systemObjectService = app.MustComponent[system_object.Service](a) s.fileService = app.MustComponent[files.Service](a) @@ -92,7 +101,7 @@ func (s *service) NewSource(ctx context.Context, id string, spaceID string, buil if err != nil { return nil, err } - err = s.spaceService.StoreSpaceID(src.Id(), src.SpaceID()) + err = s.storageService.BindSpaceID(src.SpaceID(), src.Id()) if err != nil { return nil, fmt.Errorf("store space id for object: %w", err) } @@ -125,7 +134,7 @@ func (s *service) newSource(ctx context.Context, id string, spaceID string, buil return staticSrc, nil } - spc, err := s.spaceService.GetSpace(ctx, spaceID) + spc, err := s.spaceService.Get(ctx, spaceID) if err != nil { return nil, fmt.Errorf("get space: %w", err) } @@ -197,7 +206,7 @@ func (s *service) RegisterStaticSource(src Source) error { s.mu.Lock() defer s.mu.Unlock() s.staticIds[src.Id()] = src - err := s.spaceService.StoreSpaceID(src.Id(), src.SpaceID()) + err := s.storageService.BindSpaceID(src.SpaceID(), src.Id()) if err != nil { return fmt.Errorf("store space id for object: %w", err) } diff --git a/core/block/source/source.go b/core/block/source/source.go index 293f7420e..35bde9a92 100644 --- a/core/block/source/source.go +++ b/core/block/source/source.go @@ -25,8 +25,8 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/slice" ) @@ -83,7 +83,7 @@ type sourceDeps struct { coreService core.Service accountService accountservice.Service - spaceService space.Service + spaceService spacecore.SpaceCoreService sbtProvider typeprovider.SmartBlockTypeProvider fileService files.Service systemObjectService system_object.Service @@ -125,7 +125,7 @@ type source struct { coreService core.Service fileService files.Service accountService accountservice.Service - spaceService space.Service + spaceService spacecore.SpaceCoreService sbtProvider typeprovider.SmartBlockTypeProvider systemObjectService system_object.Service } @@ -313,7 +313,7 @@ func checkChangeSize(data []byte, maxSize int) error { } func (s *source) ListIds() (ids []string, err error) { - spc, err := s.spaceService.GetSpace(context.Background(), s.spaceID) + spc, err := s.spaceService.Get(context.Background(), s.spaceID) if err != nil { return } diff --git a/core/configfetcher/configfetcher.go b/core/configfetcher/configfetcher.go index 43f292c96..2b30b2633 100644 --- a/core/configfetcher/configfetcher.go +++ b/core/configfetcher/configfetcher.go @@ -18,7 +18,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" + "github.com/anyproto/anytype-heart/space/spacecore" ) var log = logging.Logger("anytype-mw-configfetcher") @@ -47,6 +47,10 @@ type ConfigFetcher interface { Refetch() } +type personalSpaceIDGetter interface { + PersonalSpaceID() string +} + type configFetcher struct { store objectstore.ObjectStore eventSender event.Sender @@ -55,7 +59,8 @@ type configFetcher struct { periodicSync periodicsync.PeriodicSync client coordinatorclient.CoordinatorClient - spaceService space.Service + spaceService spacecore.SpaceCoreService + account personalSpaceIDGetter wallet wallet.Wallet lastStatus model.AccountStatusType } @@ -91,7 +96,8 @@ func (c *configFetcher) Init(a *app.App) (err error) { c.eventSender = a.MustComponent(event.CName).(event.Sender) c.periodicSync = periodicsync.NewPeriodicSync(refreshIntervalSecs, timeout, c.updateStatus, logger.CtxLogger{Logger: log.Desugar()}) c.client = a.MustComponent(coordinatorclient.CName).(coordinatorclient.CoordinatorClient) - c.spaceService = a.MustComponent(space.CName).(space.Service) + c.spaceService = a.MustComponent(spacecore.CName).(spacecore.SpaceCoreService) + c.account = app.MustComponent[personalSpaceIDGetter](a) c.fetched = make(chan struct{}) return nil } @@ -106,9 +112,10 @@ func (c *configFetcher) updateStatus(ctx context.Context) (err error) { close(c.fetched) }) }() - res, err := c.client.StatusCheck(ctx, c.spaceService.AccountId()) + personalSpaceID := c.account.PersonalSpaceID() + res, err := c.client.StatusCheck(ctx, personalSpaceID) if err == coordinatorproto.ErrSpaceNotExists { - sp, cErr := c.spaceService.GetSpace(ctx, c.spaceService.AccountId()) + sp, cErr := c.spaceService.Get(ctx, personalSpaceID) if cErr != nil { return cErr } diff --git a/core/converter/dot/dot.go b/core/converter/dot/dot.go index 0c79d7662..e93177aca 100644 --- a/core/converter/dot/dot.go +++ b/core/converter/dot/dot.go @@ -19,7 +19,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/core/converter/dot/dot_notsupported.go b/core/converter/dot/dot_notsupported.go index 4bd955971..c3514713b 100644 --- a/core/converter/dot/dot_notsupported.go +++ b/core/converter/dot/dot_notsupported.go @@ -10,7 +10,7 @@ import ( "github.com/anyproto/anytype-heart/core/converter" "github.com/anyproto/anytype-heart/core/system_object" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" ) func NewMultiConverter(format int, _ typeprovider.SmartBlockTypeProvider, _ system_object.Service) converter.MultiConverter { diff --git a/core/converter/graphjson/graphjson.go b/core/converter/graphjson/graphjson.go index 93c7f3a18..79a10c8ac 100644 --- a/core/converter/graphjson/graphjson.go +++ b/core/converter/graphjson/graphjson.go @@ -13,7 +13,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/core/core.go b/core/core.go index 27609c1ee..ba865b9bd 100644 --- a/core/core.go +++ b/core/core.go @@ -17,7 +17,6 @@ import ( "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/core" "github.com/anyproto/anytype-heart/pkg/lib/logging" - "github.com/anyproto/anytype-heart/space" utildebug "github.com/anyproto/anytype-heart/util/debug" ) @@ -64,13 +63,6 @@ func (mw *Middleware) getBlockService() (bs *block.Service, err error) { return nil, ErrNotLoggedIn } -func (mw *Middleware) getAccountService() (a space.Service, err error) { - if a := mw.applicationService.GetApp(); a != nil { - return a.MustComponent(space.CName).(space.Service), nil - } - return nil, ErrNotLoggedIn -} - func (mw *Middleware) doBlockService(f func(bs *block.Service) error) (err error) { bs, err := mw.getBlockService() if err != nil { @@ -99,14 +91,6 @@ func requireApp(a *app.App) { } } -func (mw *Middleware) doAccountService(f func(a space.Service) error) (err error) { - bs, err := mw.getAccountService() - if err != nil { - return - } - return f(bs) -} - func (mw *Middleware) GetAnytype() core.Service { if a := mw.applicationService.GetApp(); a != nil { return a.MustComponent("anytype").(core.Service) diff --git a/core/debug.go b/core/debug.go index ce36d088d..0a9ca3f00 100644 --- a/core/debug.go +++ b/core/debug.go @@ -59,7 +59,7 @@ func (mw *Middleware) DebugTreeHeads(cctx context.Context, req *pb.RpcDebugTreeH } dbg := app.MustComponent(debug.CName).(debug.Debug) - treeInfo, err := dbg.TreeHeads(req.TreeId) + treeInfo, err := dbg.TreeHeads(cctx, req.TreeId) if err != nil { return response(err, debug.TreeInfo{}) } @@ -94,7 +94,7 @@ func (mw *Middleware) DebugSpaceSummary(cctx context.Context, req *pb.RpcDebugSp return response(ErrNotLoggedIn, debug.SpaceSummary{}) } dbg := app.MustComponent(debug.CName).(debug.Debug) - spaceSummary, err := dbg.SpaceSummary() + spaceSummary, err := dbg.SpaceSummary(cctx, req.SpaceId) if err != nil { return response(err, debug.SpaceSummary{}) } @@ -141,7 +141,7 @@ func (mw *Middleware) DebugExportLocalstore(cctx context.Context, req *pb.RpcDeb ) err = mw.doBlockService(func(s *block.Service) error { dbg := mw.applicationService.GetApp().MustComponent(debug.CName).(debug.Debug) - path, err = dbg.DumpLocalstore(req.SpaceId, req.DocIds, req.Path) + path, err = dbg.DumpLocalstore(cctx, req.SpaceId, req.DocIds, req.Path) return err }) return response(path, err) diff --git a/core/debug/service.go b/core/debug/service.go index a571c98cd..89e5578fe 100644 --- a/core/debug/service.go +++ b/core/debug/service.go @@ -19,6 +19,7 @@ import ( "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/core/block/editor/state" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" @@ -36,16 +37,16 @@ func New() Debug { type Debug interface { app.Component DumpTree(ctx context.Context, objectID string, path string, anonymize bool, withSvg bool) (filename string, err error) - DumpLocalstore(spaceID string, objectIds []string, path string) (filename string, err error) - SpaceSummary() (summary SpaceSummary, err error) - TreeHeads(id string) (info TreeInfo, err error) + DumpLocalstore(ctx context.Context, spaceID string, objectIds []string, path string) (filename string, err error) + SpaceSummary(ctx context.Context, spaceID string) (summary SpaceSummary, err error) + TreeHeads(ctx context.Context, id string) (info TreeInfo, err error) } type debug struct { - block *block.Service - store objectstore.ObjectStore - clientService space.Service - spaceService space.Service + block *block.Service + store objectstore.ObjectStore + spaceService space.SpaceService + resolver idresolver.Resolver server *http.Server } @@ -56,9 +57,9 @@ type Debuggable interface { func (d *debug) Init(a *app.App) (err error) { d.store = a.MustComponent(objectstore.CName).(objectstore.ObjectStore) - d.clientService = a.MustComponent(space.CName).(space.Service) d.block = a.MustComponent(block.CName).(*block.Service) - d.spaceService = app.MustComponent[space.Service](a) + d.spaceService = app.MustComponent[space.SpaceService](a) + d.resolver = app.MustComponent[idresolver.Resolver](a) d.initHandlers(a) return nil @@ -123,12 +124,12 @@ type SpaceSummary struct { TreeInfos []TreeInfo } -func (d *debug) SpaceSummary() (summary SpaceSummary, err error) { - spc, err := d.clientService.AccountSpace(context.Background()) +func (d *debug) SpaceSummary(ctx context.Context, spaceID string) (summary SpaceSummary, err error) { + spc, err := d.spaceService.Get(ctx, spaceID) if err != nil { return } - summary.SpaceId = spc.Id() + summary.SpaceId = spaceID for _, t := range spc.DebugAllHeads() { summary.TreeInfos = append(summary.TreeInfos, TreeInfo{ Heads: t.Heads, @@ -138,42 +139,45 @@ func (d *debug) SpaceSummary() (summary SpaceSummary, err error) { return } -func (d *debug) TreeHeads(id string) (info TreeInfo, err error) { - spc, err := d.clientService.AccountSpace(context.Background()) +func (d *debug) TreeHeads(ctx context.Context, id string) (info TreeInfo, err error) { + spcID, err := d.resolver.ResolveSpaceID(id) if err != nil { return } - tree, err := spc.TreeBuilder().BuildHistoryTree(context.Background(), id, objecttreebuilder.HistoryTreeOpts{}) + spc, err := d.spaceService.Get(ctx, spcID) + if err != nil { + return + } + tree, err := spc.TreeBuilder().BuildHistoryTree(ctx, id, objecttreebuilder.HistoryTreeOpts{}) if err != nil { return } info = TreeInfo{ Id: id, Heads: tree.Heads(), - SpaceId: spc.Id(), + SpaceId: spcID, } return } func (d *debug) DumpTree(ctx context.Context, objectID string, path string, anonymize bool, withSvg bool) (filename string, err error) { - // 0 - get space and tree - spc, err := d.clientService.AccountSpace(context.Background()) + // 0 - get space + spcID, err := d.resolver.ResolveSpaceID(objectID) if err != nil { return } - tree, err := spc.TreeBuilder().BuildHistoryTree(context.Background(), objectID, objecttreebuilder.HistoryTreeOpts{BuildFullTree: true}) + spc, err := d.spaceService.Get(ctx, spcID) + if err != nil { + return + } + tree, err := spc.TreeBuilder().BuildHistoryTree(ctx, objectID, objecttreebuilder.HistoryTreeOpts{BuildFullTree: true}) if err != nil { return } - // 1 - create ZIP file // /at.dbg.bafkudtugh626rrqzah3kam4yj4lqbaw4bjayn2rz4ah4n5fpayppbvmq.20220322.121049.23.zip - spaceID, err := d.spaceService.ResolveSpaceID(objectID) - if err != nil { - return "", fmt.Errorf("resolve spaceID: %w", err) - } exporter := &treeExporter{s: d.store, anonymized: anonymize, id: domain.FullID{ - SpaceID: spaceID, + SpaceID: spcID, ObjectID: objectID, }} zipFilename, err := exporter.Export(ctx, path, tree) @@ -208,7 +212,7 @@ func (d *debug) DumpTree(ctx context.Context, objectID string, path string, anon return zipFilename, nil } -func (d *debug) DumpLocalstore(spaceID string, objIds []string, path string) (filename string, err error) { +func (d *debug) DumpLocalstore(ctx context.Context, spaceID string, objIds []string, path string) (filename string, err error) { if len(objIds) == 0 { objIds, err = d.store.ListIds() if err != nil { diff --git a/core/domain/uniquekey.go b/core/domain/uniquekey.go index 1a3a1c5e1..f3776240d 100644 --- a/core/domain/uniquekey.go +++ b/core/domain/uniquekey.go @@ -19,6 +19,7 @@ var smartBlockTypeToKey = map[smartblock.SmartBlockType]string{ smartblock.SmartBlockTypeArchive: "archive", smartblock.SmartBlockTypeProfilePage: "profile", smartblock.SmartBlockTypeWidget: "widget", + smartblock.SmartBlockTypeSpaceView: "spaceview", } // UniqueKey is unique key composed of two parts: smartblock type and internal key. diff --git a/core/files/dag_service_test.go b/core/files/dag_service_test.go deleted file mode 100644 index 4a9945c45..000000000 --- a/core/files/dag_service_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package files - -import ( - "context" - "sync" - - "github.com/ipfs/go-cid" - ipld "github.com/ipfs/go-ipld-format" -) - -// Test dag. Copied from github.com/ipfs/go-ipld-format tests -type testDag struct { - mu sync.Mutex - nodes map[string]ipld.Node -} - -func newTestDag() *testDag { - return &testDag{nodes: make(map[string]ipld.Node)} -} - -func (d *testDag) Get(ctx context.Context, cid cid.Cid) (ipld.Node, error) { - d.mu.Lock() - defer d.mu.Unlock() - if n, ok := d.nodes[cid.KeyString()]; ok { - return n, nil - } - return nil, ipld.ErrNotFound{Cid: cid} -} - -func (d *testDag) GetMany(ctx context.Context, cids []cid.Cid) <-chan *ipld.NodeOption { - d.mu.Lock() - defer d.mu.Unlock() - out := make(chan *ipld.NodeOption, len(cids)) - for _, c := range cids { - if n, ok := d.nodes[c.KeyString()]; ok { - out <- &ipld.NodeOption{Node: n} - } else { - out <- &ipld.NodeOption{Err: ipld.ErrNotFound{c}} - } - } - close(out) - return out -} - -func (d *testDag) Add(ctx context.Context, node ipld.Node) error { - d.mu.Lock() - defer d.mu.Unlock() - d.nodes[node.Cid().KeyString()] = node - return nil -} - -func (d *testDag) AddMany(ctx context.Context, nodes []ipld.Node) error { - d.mu.Lock() - defer d.mu.Unlock() - for _, n := range nodes { - d.nodes[n.Cid().KeyString()] = n - } - return nil -} - -func (d *testDag) Remove(ctx context.Context, c cid.Cid) error { - d.mu.Lock() - defer d.mu.Unlock() - delete(d.nodes, c.KeyString()) - return nil -} - -func (d *testDag) RemoveMany(ctx context.Context, cids []cid.Cid) error { - d.mu.Lock() - defer d.mu.Unlock() - for _, c := range cids { - delete(d.nodes, c.KeyString()) - } - return nil -} - -var _ ipld.DAGService = new(testDag) diff --git a/core/files/files.go b/core/files/files.go index 9ab6e5130..69b9a530b 100644 --- a/core/files/files.go +++ b/core/files/files.go @@ -23,6 +23,7 @@ import ( "github.com/multiformats/go-base32" mh "github.com/multiformats/go-multihash" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/filestorage" "github.com/anyproto/anytype-heart/core/filestorage/filesync" @@ -40,7 +41,6 @@ import ( m "github.com/anyproto/anytype-heart/pkg/lib/mill" "github.com/anyproto/anytype-heart/pkg/lib/mill/schema" "github.com/anyproto/anytype-heart/pkg/lib/pb/storage" - "github.com/anyproto/anytype-heart/space" "github.com/anyproto/anytype-heart/util/pbtypes" ) @@ -75,7 +75,7 @@ type service struct { commonFile fileservice.FileService fileSync filesync.FileSync dagService ipld.DAGService - spaceService space.Service + resolver idresolver.Resolver fileStorage filestorage.FileStorage syncStatusWatcher SyncStatusWatcher objectStore objectstore.ObjectStore @@ -90,11 +90,11 @@ func (s *service) Init(a *app.App) (err error) { s.fileStore = app.MustComponent[filestore.FileStore](a) s.commonFile = app.MustComponent[fileservice.FileService](a) s.fileSync = app.MustComponent[filesync.FileSync](a) - s.spaceService = app.MustComponent[space.Service](a) s.coreService = app.MustComponent[core.Service](a) s.dagService = s.commonFile.DAGService() s.fileStorage = app.MustComponent[filestorage.FileStorage](a) + s.resolver = app.MustComponent[idresolver.Resolver](a) s.objectStore = app.MustComponent[objectstore.ObjectStore](a) s.syncStatusWatcher = app.MustComponent[SyncStatusWatcher](a) return nil diff --git a/core/files/files_test.go b/core/files/files_test.go index d1051a274..60e30f2e8 100644 --- a/core/files/files_test.go +++ b/core/files/files_test.go @@ -20,7 +20,6 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/datastore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" - "github.com/anyproto/anytype-heart/space/mock_space" "github.com/anyproto/anytype-heart/tests/testutil" ) @@ -29,13 +28,27 @@ type dummySyncStatusWatcher struct{} func (w *dummySyncStatusWatcher) Watch(spaceID string, id string, fileFunc func() []string) (new bool, err error) { return false, nil } +func (w *dummySyncStatusWatcher) Init(a *app.App) error { return nil } +func (w *dummySyncStatusWatcher) Name() string { return "dummySyncStatusWatcher" } -func (w *dummySyncStatusWatcher) Init(a *app.App) error { - return nil +type personalSpaceIdStub struct { + personalSpaceId string } -func (w *dummySyncStatusWatcher) Name() string { - return "dummySyncStatusWatcher" +func (s *personalSpaceIdStub) Name() string { return "personalSpaceIdStub" } +func (s *personalSpaceIdStub) Init(a *app.App) error { return nil } +func (s *personalSpaceIdStub) PersonalSpaceID() string { + return s.personalSpaceId +} + +type spaceResolverStub struct { + spaceId string +} + +func (s *spaceResolverStub) Name() string { return "spaceResolverStub" } +func (s *spaceResolverStub) Init(a *app.App) error { return nil } +func (s *spaceResolverStub) ResolveSpaceID(objectID string) (string, error) { + return s.spaceId, nil } func TestFileAdd(t *testing.T) { @@ -50,8 +63,8 @@ func TestFileAdd(t *testing.T) { fileSyncService := filesync.New() spaceId := "space1" - spaceService := mock_space.NewMockService(t) - spaceService.EXPECT().AccountId().Return(spaceId).Maybe() + personalSpaceIdGetter := &personalSpaceIdStub{personalSpaceId: spaceId} + spaceIdResolver := &spaceResolverStub{spaceId: spaceId} coreService := mock_core.NewMockService(t) objectStore := objectstore.NewStoreFixture(t) @@ -64,11 +77,12 @@ func TestFileAdd(t *testing.T) { a.Register(filestore.New()) a.Register(commonFileService) a.Register(fileSyncService) - a.Register(testutil.PrepareRunnableMock(ctx, a, spaceService)) - a.Register(testutil.PrepareRunnableMock(ctx, a, coreService)) - a.Register(testutil.PrepareMock(a, eventSender)) + a.Register(testutil.PrepareMock(ctx, a, coreService)) + a.Register(testutil.PrepareMock(ctx, a, eventSender)) a.Register(blockStorage) a.Register(objectStore) + a.Register(personalSpaceIdGetter) + a.Register(spaceIdResolver) a.Register(&dummySyncStatusWatcher{}) a.Register(rpcStorage) err := a.Start(ctx) diff --git a/core/files/offload.go b/core/files/offload.go index a9d73de03..5d62e18aa 100644 --- a/core/files/offload.go +++ b/core/files/offload.go @@ -14,7 +14,7 @@ import ( ) func (s *service) FileOffload(ctx context.Context, fileID string, includeNotPinned bool) (totalSize uint64, err error) { - spaceID, err := s.spaceService.ResolveSpaceID(fileID) + spaceID, err := s.resolver.ResolveSpaceID(fileID) if err != nil { return 0, fmt.Errorf("resolve spaceID for file %s: %w", fileID, err) } @@ -95,7 +95,7 @@ func (s *service) FileListOffload(ctx context.Context, fileIDs []string, include } for _, fileID := range fileIDs { - spaceID, err := s.spaceService.ResolveSpaceID(fileID) + spaceID, err := s.resolver.ResolveSpaceID(fileID) if err != nil { return 0, 0, fmt.Errorf("resolve spaceID for file %s: %w", fileID, err) } diff --git a/core/filestorage/fileservice.go b/core/filestorage/fileservice.go index 76bf73542..552fd4af0 100644 --- a/core/filestorage/fileservice.go +++ b/core/filestorage/fileservice.go @@ -23,7 +23,7 @@ import ( "github.com/anyproto/anytype-heart/core/filestorage/rpcstore" "github.com/anyproto/anytype-heart/core/wallet" "github.com/anyproto/anytype-heart/pkg/lib/datastore" - "github.com/anyproto/anytype-heart/space/storage" + "github.com/anyproto/anytype-heart/space/spacecore/storage" ) const CName = fileblockstore.CName diff --git a/core/filestorage/filesync/filestore_mock.go b/core/filestorage/filesync/filestore_mock.go index 831d9dff1..61235181c 100644 --- a/core/filestorage/filesync/filestore_mock.go +++ b/core/filestorage/filesync/filestore_mock.go @@ -13,11 +13,10 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - gomock "go.uber.org/mock/gomock" - localstore "github.com/anyproto/anytype-heart/pkg/lib/localstore" filestore "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" storage "github.com/anyproto/anytype-heart/pkg/lib/pb/storage" + gomock "go.uber.org/mock/gomock" ) // MockFileStore is a mock of FileStore interface. diff --git a/core/filestorage/filesync/filesync.go b/core/filestorage/filesync/filesync.go index 044bd183c..6142913cf 100644 --- a/core/filestorage/filesync/filesync.go +++ b/core/filestorage/filesync/filesync.go @@ -20,7 +20,6 @@ import ( "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/datastore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" - "github.com/anyproto/anytype-heart/space" ) const CName = "filesync" @@ -54,23 +53,27 @@ type QueueInfo struct { RemovingQueue []*QueueItem } +type personalSpaceIDGetter interface { + PersonalSpaceID() string +} + type SyncStatus struct { QueueLen int } type fileSync struct { - dbProvider datastore.Datastore - rpcStore rpcstore.RpcStore - queue *fileSyncStore - loopCtx context.Context - loopCancel context.CancelFunc - uploadPingCh chan struct{} - removePingCh chan struct{} - dagService ipld.DAGService - fileStore filestore.FileStore - eventSender event.Sender - onUpload func(spaceID, fileID string) error - spaceService space.Service + dbProvider datastore.Datastore + rpcStore rpcstore.RpcStore + queue *fileSyncStore + loopCtx context.Context + loopCancel context.CancelFunc + uploadPingCh chan struct{} + removePingCh chan struct{} + dagService ipld.DAGService + fileStore filestore.FileStore + eventSender event.Sender + onUpload func(spaceID, fileID string) error + personalIDGetter personalSpaceIDGetter spaceStatsLock sync.Mutex spaceStats map[string]SpaceStat @@ -89,7 +92,7 @@ func (f *fileSync) Init(a *app.App) (err error) { f.rpcStore = a.MustComponent(rpcstore.CName).(rpcstore.Service).NewStore() f.dagService = a.MustComponent(fileservice.CName).(fileservice.FileService).DAGService() f.fileStore = app.MustComponent[filestore.FileStore](a) - f.spaceService = app.MustComponent[space.Service](a) + f.personalIDGetter = app.MustComponent[personalSpaceIDGetter](a) f.eventSender = app.MustComponent[event.Sender](a) f.removePingCh = make(chan struct{}) f.uploadPingCh = make(chan struct{}) @@ -128,7 +131,8 @@ func (f *fileSync) Run(ctx context.Context) (err error) { func (f *fileSync) precacheSpaceStats() { // TODO multi-spaces: init for each space: GO-1681 - spaceID := f.spaceService.AccountId() + // TODO: [MR] adapt to multi-spaces + spaceID := f.personalIDGetter.PersonalSpaceID() _, err := f.SpaceStat(context.Background(), spaceID) if err != nil { // Don't confuse users with 0B limit in case of error, so set default 1GB limit @@ -136,7 +140,7 @@ func (f *fileSync) precacheSpaceStats() { SpaceId: spaceID, BytesLimit: 1024 * 1024 * 1024, // 1 GB }) - log.Error("can't init space stats", zap.String("spaceID", f.spaceService.AccountId()), zap.Error(err)) + log.Error("can't init space stats", zap.String("spaceID", f.personalIDGetter.PersonalSpaceID()), zap.Error(err)) } } diff --git a/core/filestorage/filesync/filesync_test.go b/core/filestorage/filesync/filesync_test.go index fa7c839b3..3f3dfe212 100644 --- a/core/filestorage/filesync/filesync_test.go +++ b/core/filestorage/filesync/filesync_test.go @@ -15,7 +15,6 @@ import ( "github.com/anyproto/any-sync/commonfile/fileproto" "github.com/anyproto/any-sync/commonfile/fileservice" "github.com/anyproto/any-sync/commonspace/syncstatus" - "github.com/dgraph-io/badger/v3" "github.com/ipfs/go-cid" "github.com/samber/lo" "github.com/stretchr/testify/mock" @@ -29,8 +28,6 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/datastore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" "github.com/anyproto/anytype-heart/pkg/lib/pb/storage" - "github.com/anyproto/anytype-heart/space/mock_space" - "github.com/anyproto/anytype-heart/tests/testutil" ) var ctx = context.Background() @@ -81,6 +78,16 @@ func TestFileSync_RemoveFile(t *testing.T) { fx.waitEmptyQueue(t, time.Second*5) } +type personalSpaceIdStub struct { + personalSpaceId string +} + +func (s *personalSpaceIdStub) Name() string { return "personalSpaceIdStub" } +func (s *personalSpaceIdStub) Init(a *app.App) error { return nil } +func (s *personalSpaceIdStub) PersonalSpaceID() string { + return s.personalSpaceId +} + func newFixture(t *testing.T) *fixture { fx := &fixture{ FileSync: New(), @@ -88,12 +95,6 @@ func newFixture(t *testing.T) *fixture { ctrl: gomock.NewController(t), a: new(app.App), } - var err error - bp := &badgerProvider{} - fx.tmpDir, err = os.MkdirTemp("", "*") - require.NoError(t, err) - bp.db, err = badger.Open(badger.DefaultOptions(fx.tmpDir)) - require.NoError(t, err) fx.rpcStore = mock_rpcstore.NewMockRpcStore(fx.ctrl) fx.rpcStore.EXPECT().SpaceInfo(gomock.Any(), "space1").Return(&fileproto.SpaceInfoResponse{LimitBytes: 2 * 1024 * 1024}, nil).AnyTimes() @@ -110,20 +111,21 @@ func newFixture(t *testing.T) *fixture { fileStoreMock.EXPECT().Close(gomock.Any()).AnyTimes() fx.fileStoreMock = fileStoreMock - spaceService := mock_space.NewMockService(t) - spaceService.EXPECT().AccountId().Return("space1").Maybe() + personalSpaceIdGetter := &personalSpaceIdStub{personalSpaceId: "space1"} sender := mock_event.NewMockSender(t) + sender.EXPECT().Name().Return("event") + sender.EXPECT().Init(mock.Anything).Return(nil) sender.EXPECT().Broadcast(mock.Anything).Return().Maybe() fx.a.Register(fx.fileService). Register(filestorage.NewInMemory()). - Register(bp). + Register(datastore.NewInMemory()). Register(mockRpcStoreService). Register(fx.FileSync). Register(fileStoreMock). - Register(testutil.PrepareRunnableMock(ctx, fx.a, spaceService)). - Register(testutil.PrepareMock(fx.a, sender)) + Register(personalSpaceIdGetter). + Register(sender) require.NoError(t, fx.a.Start(ctx)) return fx } @@ -155,31 +157,3 @@ func (f *fixture) Finish(t *testing.T) { defer os.RemoveAll(f.tmpDir) require.NoError(t, f.a.Close(ctx)) } - -type badgerProvider struct { - db *badger.DB -} - -func (b *badgerProvider) Init(a *app.App) (err error) { - return nil -} - -func (b *badgerProvider) Name() (name string) { - return datastore.CName -} - -func (b *badgerProvider) Run(ctx context.Context) (err error) { - return nil -} - -func (b *badgerProvider) Close(ctx context.Context) (err error) { - return b.db.Close() -} - -func (b *badgerProvider) LocalStorage() (*badger.DB, error) { - return b.db, nil -} - -func (b *badgerProvider) SpaceStorage() (*badger.DB, error) { - return b.db, nil -} diff --git a/core/filestorage/rpchandler.go b/core/filestorage/rpchandler.go index 52eb422a8..58b785dbf 100644 --- a/core/filestorage/rpchandler.go +++ b/core/filestorage/rpchandler.go @@ -8,7 +8,7 @@ import ( "github.com/anyproto/any-sync/commonfile/fileproto/fileprotoerr" "github.com/ipfs/go-cid" - "github.com/anyproto/anytype-heart/space/storage" + "github.com/anyproto/anytype-heart/space/spacecore/storage" ) type rpcHandler struct { diff --git a/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go b/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go index 6240c53b0..492224cd7 100644 --- a/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go +++ b/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go @@ -14,11 +14,10 @@ import ( app "github.com/anyproto/any-sync/app" fileproto "github.com/anyproto/any-sync/commonfile/fileproto" + rpcstore "github.com/anyproto/anytype-heart/core/filestorage/rpcstore" blocks "github.com/ipfs/go-block-format" cid "github.com/ipfs/go-cid" gomock "go.uber.org/mock/gomock" - - rpcstore "github.com/anyproto/anytype-heart/core/filestorage/rpcstore" ) // MockService is a mock of Service interface. diff --git a/core/filestorage/rpcstore/service.go b/core/filestorage/rpcstore/service.go index 870513b22..c5076ffc9 100644 --- a/core/filestorage/rpcstore/service.go +++ b/core/filestorage/rpcstore/service.go @@ -9,7 +9,7 @@ import ( "github.com/anyproto/any-sync/net/pool" "github.com/anyproto/any-sync/nodeconf" - "github.com/anyproto/anytype-heart/space/peerstore" + "github.com/anyproto/anytype-heart/space/spacecore/peerstore" ) const CName = "common.commonfile.rpcstore" diff --git a/core/filestorage/rpcstore/store_test.go b/core/filestorage/rpcstore/store_test.go index daa56fdd6..df2758844 100644 --- a/core/filestorage/rpcstore/store_test.go +++ b/core/filestorage/rpcstore/store_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/anyproto/anytype-heart/space/peerstore" + "github.com/anyproto/anytype-heart/space/spacecore/peerstore" ) var ctx = context.Background() diff --git a/core/history.go b/core/history.go index bc6280a86..816247c33 100644 --- a/core/history.go +++ b/core/history.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/anyproto/anytype-heart/core/block" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/history" "github.com/anyproto/anytype-heart/pb" @@ -36,7 +37,8 @@ func (mw *Middleware) HistoryShowVersion(cctx context.Context, req *pb.RpcHistor ) if err = mw.doBlockService(func(bs *block.Service) (err error) { hs := mw.applicationService.GetApp().MustComponent(history.CName).(history.History) - spaceID, err := bs.ResolveSpaceID(req.ObjectId) + res := mw.applicationService.GetApp().MustComponent(idresolver.CName).(idresolver.Resolver) + spaceID, err := res.ResolveSpaceID(req.ObjectId) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -74,7 +76,8 @@ func (mw *Middleware) HistoryGetVersions(cctx context.Context, req *pb.RpcHistor ) if err = mw.doBlockService(func(bs *block.Service) (err error) { hs := mw.applicationService.GetApp().MustComponent(history.CName).(history.History) - spaceID, err := bs.ResolveSpaceID(req.ObjectId) + res := mw.applicationService.GetApp().MustComponent(idresolver.CName).(idresolver.Resolver) + spaceID, err := res.ResolveSpaceID(req.ObjectId) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } @@ -105,7 +108,8 @@ func (mw *Middleware) HistorySetVersion(cctx context.Context, req *pb.RpcHistory } return response(mw.doBlockService(func(bs *block.Service) (err error) { hs := mw.applicationService.GetApp().MustComponent(history.CName).(history.History) - spaceID, err := bs.ResolveSpaceID(req.ObjectId) + res := mw.applicationService.GetApp().MustComponent(idresolver.CName).(idresolver.Resolver) + spaceID, err := res.ResolveSpaceID(req.ObjectId) if err != nil { return fmt.Errorf("resolve spaceID: %w", err) } diff --git a/core/history/history.go b/core/history/history.go index c430f324d..e7e196228 100644 --- a/core/history/history.go +++ b/core/history/history.go @@ -25,7 +25,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" + "github.com/anyproto/anytype-heart/space/spacecore" "github.com/anyproto/anytype-heart/util/pbtypes" "github.com/anyproto/anytype-heart/util/slice" ) @@ -49,18 +49,18 @@ type History interface { type history struct { a core.Service - picker block.Picker + picker block.ObjectGetter objectStore objectstore.ObjectStore systemObjectService system_object.Service - spaceService space.Service + spaceService spacecore.SpaceCoreService } func (h *history) Init(a *app.App) (err error) { h.a = a.MustComponent(core.CName).(core.Service) - h.picker = app.MustComponent[block.Picker](a) + h.picker = app.MustComponent[block.ObjectGetter](a) h.objectStore = a.MustComponent(objectstore.CName).(objectstore.ObjectStore) h.systemObjectService = a.MustComponent(system_object.CName).(system_object.Service) - h.spaceService = a.MustComponent(space.CName).(space.Service) + h.spaceService = a.MustComponent(spacecore.CName).(spacecore.SpaceCoreService) return } @@ -192,7 +192,7 @@ func (h *history) SetVersion(id domain.FullID, versionId string) (err error) { } func (h *history) treeWithId(id domain.FullID, beforeId string, includeBeforeId bool) (ht objecttree.HistoryTree, sbt smartblock.SmartBlockType, err error) { - spc, err := h.spaceService.GetSpace(context.Background(), id.SpaceID) + spc, err := h.spaceService.Get(context.Background(), id.SpaceID) if err != nil { return } diff --git a/core/indexer/full_text.go b/core/indexer/full_text.go index 181eeb120..7a0d9f222 100644 --- a/core/indexer/full_text.go +++ b/core/indexer/full_text.go @@ -75,7 +75,6 @@ func (i *indexer) runFullTextIndexer() { func (i *indexer) prepareSearchDocument(id string) (ftDoc ftsearch.SearchDoc, err error) { // ctx := context.WithValue(context.Background(), ocache.CacheTimeout, cacheTimeout) ctx := context.WithValue(context.Background(), metrics.CtxKeyEntrypoint, "index_fulltext") - err = block.DoContext(i.picker, ctx, id, func(sb smartblock2.SmartBlock) error { sbType, err := i.typeProvider.Type(sb.SpaceID(), id) if err != nil { diff --git a/core/indexer/indexer.go b/core/indexer/indexer.go index 487aef1ff..92741cc63 100644 --- a/core/indexer/indexer.go +++ b/core/indexer/indexer.go @@ -10,25 +10,26 @@ import ( "time" "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/spacestorage" "github.com/gogo/protobuf/types" "go.uber.org/zap" "golang.org/x/exp/slices" "github.com/anyproto/anytype-heart/core/anytype/config" "github.com/anyproto/anytype-heart/core/block" - smartblock2 "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + editorsb "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/source" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/files" "github.com/anyproto/anytype-heart/metrics" - "github.com/anyproto/anytype-heart/pkg/lib/core" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/ftsearch" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/storage" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/slice" ) @@ -46,8 +47,10 @@ func New() Indexer { type Indexer interface { ForceFTIndex() - Index(ctx context.Context, info smartblock2.DocInfo, options ...smartblock2.IndexOption) error - EnsurePreinstalledObjects(spaceID string) error + StartFullTextIndex() error + ReindexCommonObjects() error + ReindexSpace(spaceID string) error + Index(ctx context.Context, info editorsb.DocInfo, options ...editorsb.IndexOption) error app.ComponentRunnable } @@ -64,20 +67,19 @@ type objectCreator interface { ) (ids []string, objects []*types.Struct, err error) } -type syncStarter interface { - StartSync() +type personalIDProvider interface { + PersonalSpaceID() string } type indexer struct { - store objectstore.ObjectStore - fileStore filestore.FileStore - anytype core.Service - source source.Service - picker block.Picker - ftsearch ftsearch.FTSearch - objectCreator objectCreator - syncStarter syncStarter - fileService files.Service + store objectstore.ObjectStore + fileStore filestore.FileStore + source source.Service + picker block.ObjectGetter + ftsearch ftsearch.FTSearch + storageService storage.ClientStorage + objectCreator objectCreator + fileService files.Service quit chan struct{} btHash Hasher @@ -85,25 +87,28 @@ type indexer struct { forceFt chan struct{} typeProvider typeprovider.SmartBlockTypeProvider - spaceService space.Service + spaceCore spacecore.SpaceCoreService + provider personalIDProvider indexedFiles *sync.Map reindexLogFields []zap.Field + + flags reindexFlags } func (i *indexer) Init(a *app.App) (err error) { i.newAccount = a.MustComponent(config.CName).(*config.Config).NewAccount - i.anytype = a.MustComponent(core.CName).(core.Service) i.store = a.MustComponent(objectstore.CName).(objectstore.ObjectStore) + i.storageService = a.MustComponent(spacestorage.CName).(storage.ClientStorage) i.typeProvider = a.MustComponent(typeprovider.CName).(typeprovider.SmartBlockTypeProvider) i.source = a.MustComponent(source.CName).(source.Service) i.btHash = a.MustComponent("builtintemplate").(Hasher) i.fileStore = app.MustComponent[filestore.FileStore](a) i.ftsearch = app.MustComponent[ftsearch.FTSearch](a) i.objectCreator = app.MustComponent[objectCreator](a) - i.syncStarter = app.MustComponent[syncStarter](a) - i.picker = app.MustComponent[block.Picker](a) - i.spaceService = app.MustComponent[space.Service](a) + i.picker = app.MustComponent[block.ObjectGetter](a) + i.spaceCore = app.MustComponent[spacecore.SpaceCoreService](a) + i.provider = app.MustComponent[personalIDProvider](a) i.fileService = app.MustComponent[files.Service](a) i.quit = make(chan struct{}) i.forceFt = make(chan struct{}) @@ -115,13 +120,13 @@ func (i *indexer) Name() (name string) { } func (i *indexer) Run(context.Context) (err error) { + return i.StartFullTextIndex() +} + +func (i *indexer) StartFullTextIndex() (err error) { if ftErr := i.ftInit(); ftErr != nil { log.Errorf("can't init ft: %v", ftErr) } - err = i.reindexIfNeeded() - if err != nil { - return err - } go i.ftLoop() return } @@ -131,18 +136,22 @@ func (i *indexer) Close(ctx context.Context) (err error) { return nil } -func (i *indexer) Index(ctx context.Context, info smartblock2.DocInfo, options ...smartblock2.IndexOption) error { +func (i *indexer) Index(ctx context.Context, info editorsb.DocInfo, options ...editorsb.IndexOption) error { // options are stored in smartblock pkg because of cyclic dependency :( startTime := time.Now() - opts := &smartblock2.IndexOptions{} + opts := &editorsb.IndexOptions{} for _, o := range options { o(opts) } + err := i.storageService.BindSpaceID(info.SpaceID, info.Id) + if err != nil { + log.Error("failed to bind space id", zap.Error(err), zap.String("id", info.Id)) + return err + } sbType, err := i.typeProvider.Type(info.SpaceID, info.Id) if err != nil { sbType = smartblock.SmartBlockTypePage } - headHashToIndex := headsHash(info.Heads) saveIndexedHash := func() { if headHashToIndex == "" { @@ -262,13 +271,13 @@ func (i *indexer) indexLinkedFiles(ctx context.Context, spaceID string, fileHash if ok { return } - storeErr := i.spaceService.StoreSpaceID(id, spaceID) - if storeErr != nil { - log.With("id", id).Errorf("failed to store space id: %v", storeErr) + err := i.storageService.BindSpaceID(spaceID, id) + if err != nil { + log.Error("failed to bind space id", zap.Error(err), zap.String("id", id)) return } // file's hash is id - idxErr := i.reindexDoc(ctx, id) + idxErr := i.reindexDoc(ctx, spaceID, id) if idxErr != nil && !errors.Is(idxErr, domain.ErrFileNotFound) { log.With("id", id).Errorf("failed to reindex file: %s", idxErr) } @@ -280,14 +289,6 @@ func (i *indexer) indexLinkedFiles(ctx context.Context, spaceID string, fileHash } } -func (i *indexer) getObjectInfo(ctx context.Context, id string) (info smartblock2.DocInfo, err error) { - err = block.DoContext(i.picker, ctx, id, func(sb smartblock2.SmartBlock) error { - info = sb.GetDocInfo() - return nil - }) - return -} - func headsHash(heads []string) string { if len(heads) == 0 { return "" diff --git a/core/indexer/mock_indexer/mock_Indexer.go b/core/indexer/mock_indexer/mock_Indexer.go new file mode 100644 index 000000000..a8eafb8cc --- /dev/null +++ b/core/indexer/mock_indexer/mock_Indexer.go @@ -0,0 +1,421 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_indexer + +import ( + context "context" + + app "github.com/anyproto/any-sync/app" + mock "github.com/stretchr/testify/mock" + + smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock" +) + +// MockIndexer is an autogenerated mock type for the Indexer type +type MockIndexer struct { + mock.Mock +} + +type MockIndexer_Expecter struct { + mock *mock.Mock +} + +func (_m *MockIndexer) EXPECT() *MockIndexer_Expecter { + return &MockIndexer_Expecter{mock: &_m.Mock} +} + +// Close provides a mock function with given fields: ctx +func (_m *MockIndexer) Close(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockIndexer_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type MockIndexer_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockIndexer_Expecter) Close(ctx interface{}) *MockIndexer_Close_Call { + return &MockIndexer_Close_Call{Call: _e.mock.On("Close", ctx)} +} + +func (_c *MockIndexer_Close_Call) Run(run func(ctx context.Context)) *MockIndexer_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockIndexer_Close_Call) Return(err error) *MockIndexer_Close_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockIndexer_Close_Call) RunAndReturn(run func(context.Context) error) *MockIndexer_Close_Call { + _c.Call.Return(run) + return _c +} + +// ForceFTIndex provides a mock function with given fields: +func (_m *MockIndexer) ForceFTIndex() { + _m.Called() +} + +// MockIndexer_ForceFTIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceFTIndex' +type MockIndexer_ForceFTIndex_Call struct { + *mock.Call +} + +// ForceFTIndex is a helper method to define mock.On call +func (_e *MockIndexer_Expecter) ForceFTIndex() *MockIndexer_ForceFTIndex_Call { + return &MockIndexer_ForceFTIndex_Call{Call: _e.mock.On("ForceFTIndex")} +} + +func (_c *MockIndexer_ForceFTIndex_Call) Run(run func()) *MockIndexer_ForceFTIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIndexer_ForceFTIndex_Call) Return() *MockIndexer_ForceFTIndex_Call { + _c.Call.Return() + return _c +} + +func (_c *MockIndexer_ForceFTIndex_Call) RunAndReturn(run func()) *MockIndexer_ForceFTIndex_Call { + _c.Call.Return(run) + return _c +} + +// Index provides a mock function with given fields: ctx, info, options +func (_m *MockIndexer) Index(ctx context.Context, info smartblock.DocInfo, options ...smartblock.IndexOption) error { + _va := make([]interface{}, len(options)) + for _i := range options { + _va[_i] = options[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, info) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, smartblock.DocInfo, ...smartblock.IndexOption) error); ok { + r0 = rf(ctx, info, options...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockIndexer_Index_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Index' +type MockIndexer_Index_Call struct { + *mock.Call +} + +// Index is a helper method to define mock.On call +// - ctx context.Context +// - info smartblock.DocInfo +// - options ...smartblock.IndexOption +func (_e *MockIndexer_Expecter) Index(ctx interface{}, info interface{}, options ...interface{}) *MockIndexer_Index_Call { + return &MockIndexer_Index_Call{Call: _e.mock.On("Index", + append([]interface{}{ctx, info}, options...)...)} +} + +func (_c *MockIndexer_Index_Call) Run(run func(ctx context.Context, info smartblock.DocInfo, options ...smartblock.IndexOption)) *MockIndexer_Index_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]smartblock.IndexOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(smartblock.IndexOption) + } + } + run(args[0].(context.Context), args[1].(smartblock.DocInfo), variadicArgs...) + }) + return _c +} + +func (_c *MockIndexer_Index_Call) Return(_a0 error) *MockIndexer_Index_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIndexer_Index_Call) RunAndReturn(run func(context.Context, smartblock.DocInfo, ...smartblock.IndexOption) error) *MockIndexer_Index_Call { + _c.Call.Return(run) + return _c +} + +// Init provides a mock function with given fields: a +func (_m *MockIndexer) Init(a *app.App) error { + ret := _m.Called(a) + + var r0 error + if rf, ok := ret.Get(0).(func(*app.App) error); ok { + r0 = rf(a) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockIndexer_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type MockIndexer_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - a *app.App +func (_e *MockIndexer_Expecter) Init(a interface{}) *MockIndexer_Init_Call { + return &MockIndexer_Init_Call{Call: _e.mock.On("Init", a)} +} + +func (_c *MockIndexer_Init_Call) Run(run func(a *app.App)) *MockIndexer_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*app.App)) + }) + return _c +} + +func (_c *MockIndexer_Init_Call) Return(err error) *MockIndexer_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockIndexer_Init_Call) RunAndReturn(run func(*app.App) error) *MockIndexer_Init_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *MockIndexer) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockIndexer_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockIndexer_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockIndexer_Expecter) Name() *MockIndexer_Name_Call { + return &MockIndexer_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockIndexer_Name_Call) Run(run func()) *MockIndexer_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIndexer_Name_Call) Return(name string) *MockIndexer_Name_Call { + _c.Call.Return(name) + return _c +} + +func (_c *MockIndexer_Name_Call) RunAndReturn(run func() string) *MockIndexer_Name_Call { + _c.Call.Return(run) + return _c +} + +// ReindexCommonObjects provides a mock function with given fields: +func (_m *MockIndexer) ReindexCommonObjects() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockIndexer_ReindexCommonObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReindexCommonObjects' +type MockIndexer_ReindexCommonObjects_Call struct { + *mock.Call +} + +// ReindexCommonObjects is a helper method to define mock.On call +func (_e *MockIndexer_Expecter) ReindexCommonObjects() *MockIndexer_ReindexCommonObjects_Call { + return &MockIndexer_ReindexCommonObjects_Call{Call: _e.mock.On("ReindexCommonObjects")} +} + +func (_c *MockIndexer_ReindexCommonObjects_Call) Run(run func()) *MockIndexer_ReindexCommonObjects_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIndexer_ReindexCommonObjects_Call) Return(_a0 error) *MockIndexer_ReindexCommonObjects_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIndexer_ReindexCommonObjects_Call) RunAndReturn(run func() error) *MockIndexer_ReindexCommonObjects_Call { + _c.Call.Return(run) + return _c +} + +// ReindexSpace provides a mock function with given fields: spaceID +func (_m *MockIndexer) ReindexSpace(spaceID string) error { + ret := _m.Called(spaceID) + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(spaceID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockIndexer_ReindexSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReindexSpace' +type MockIndexer_ReindexSpace_Call struct { + *mock.Call +} + +// ReindexSpace is a helper method to define mock.On call +// - spaceID string +func (_e *MockIndexer_Expecter) ReindexSpace(spaceID interface{}) *MockIndexer_ReindexSpace_Call { + return &MockIndexer_ReindexSpace_Call{Call: _e.mock.On("ReindexSpace", spaceID)} +} + +func (_c *MockIndexer_ReindexSpace_Call) Run(run func(spaceID string)) *MockIndexer_ReindexSpace_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockIndexer_ReindexSpace_Call) Return(_a0 error) *MockIndexer_ReindexSpace_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIndexer_ReindexSpace_Call) RunAndReturn(run func(string) error) *MockIndexer_ReindexSpace_Call { + _c.Call.Return(run) + return _c +} + +// Run provides a mock function with given fields: ctx +func (_m *MockIndexer) Run(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockIndexer_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type MockIndexer_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockIndexer_Expecter) Run(ctx interface{}) *MockIndexer_Run_Call { + return &MockIndexer_Run_Call{Call: _e.mock.On("Run", ctx)} +} + +func (_c *MockIndexer_Run_Call) Run(run func(ctx context.Context)) *MockIndexer_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockIndexer_Run_Call) Return(err error) *MockIndexer_Run_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockIndexer_Run_Call) RunAndReturn(run func(context.Context) error) *MockIndexer_Run_Call { + _c.Call.Return(run) + return _c +} + +// StartFullTextIndex provides a mock function with given fields: +func (_m *MockIndexer) StartFullTextIndex() error { + ret := _m.Called() + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockIndexer_StartFullTextIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartFullTextIndex' +type MockIndexer_StartFullTextIndex_Call struct { + *mock.Call +} + +// StartFullTextIndex is a helper method to define mock.On call +func (_e *MockIndexer_Expecter) StartFullTextIndex() *MockIndexer_StartFullTextIndex_Call { + return &MockIndexer_StartFullTextIndex_Call{Call: _e.mock.On("StartFullTextIndex")} +} + +func (_c *MockIndexer_StartFullTextIndex_Call) Run(run func()) *MockIndexer_StartFullTextIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockIndexer_StartFullTextIndex_Call) Return(_a0 error) *MockIndexer_StartFullTextIndex_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockIndexer_StartFullTextIndex_Call) RunAndReturn(run func() error) *MockIndexer_StartFullTextIndex_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockIndexer interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockIndexer creates a new instance of MockIndexer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockIndexer(t mockConstructorTestingTNewMockIndexer) *MockIndexer { + mock := &MockIndexer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/indexer/reindex.go b/core/indexer/reindex.go index 3e29c2a89..696eea116 100644 --- a/core/indexer/reindex.go +++ b/core/indexer/reindex.go @@ -12,6 +12,7 @@ import ( "github.com/anyproto/anytype-heart/core/block" "github.com/anyproto/anytype-heart/core/block/editor/smartblock" "github.com/anyproto/anytype-heart/core/block/object/objectcache" + "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/metrics" "github.com/anyproto/anytype-heart/pkg/lib/bundle" smartblock2 "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" @@ -21,7 +22,6 @@ import ( ) const ( - // ForceObjectsReindexCounter reindex thread-based objects ForceObjectsReindexCounter int32 = 8 @@ -42,24 +42,38 @@ const ( ForceFilestoreKeysReindexCounter int32 = 2 ) -func (i *indexer) reindexIfNeeded() error { - checksums, err := i.store.GetChecksums() +func (i *indexer) buildFlags(spaceID string) (reindexFlags, error) { + var ( + checksums *model.ObjectStoreChecksums + flags reindexFlags + err error + ) + if spaceID == "" { + checksums, err = i.store.GetGlobalChecksums() + } else { + checksums, err = i.store.GetChecksums(spaceID) + } if err != nil && !errors.Is(err, badger.ErrKeyNotFound) { - return err + return reindexFlags{}, err } if checksums == nil { + // TODO: [MR] split object store checksums for space and common? checksums = &model.ObjectStoreChecksums{ - // do no add bundled relations checksums, because we want to index them for new accounts - ObjectsForceReindexCounter: ForceObjectsReindexCounter, - FilesForceReindexCounter: ForceFilesReindexCounter, - IdxRebuildCounter: ForceIdxRebuildCounter, + // per space + ObjectsForceReindexCounter: ForceObjectsReindexCounter, + // ? + FilesForceReindexCounter: ForceFilesReindexCounter, + // global + IdxRebuildCounter: ForceIdxRebuildCounter, + // per space FilestoreKeysForceReindexCounter: ForceFilestoreKeysReindexCounter, - FulltextRebuild: ForceFulltextIndexCounter, - BundledObjects: ForceBundledObjectsReindexCounter, + // per space + FulltextRebuild: ForceFulltextIndexCounter, + // global + BundledObjects: ForceBundledObjectsReindexCounter, } } - var flags reindexFlags if checksums.BundledRelations != bundle.RelationChecksum { flags.bundledRelations = true } @@ -87,132 +101,38 @@ func (i *indexer) reindexIfNeeded() error { if checksums.IdxRebuildCounter != ForceIdxRebuildCounter { flags.enableAll() } - - return i.reindex(flags) + return flags, nil } -func (i *indexer) reindex(flags reindexFlags) (err error) { - if flags.any() { - log.Infof("start store reindex (%s)", flags.String()) - } - - if flags.objects && flags.fileObjects { - // files will be indexed within object indexing (see indexLinkedFiles) - // because we need to do it in the background. - // otherwise it will lead to the situation when files loading called from the reindex with DisableRemoteFlag - // will be waiting for the linkedFiles background indexing without this flag - flags.fileObjects = false - } - - if flags.fileKeys { - err = i.fileStore.RemoveEmptyFileKeys() - if err != nil { - log.Errorf("reindex failed to RemoveEmptyFileKeys: %v", err.Error()) - } else { - log.Infof("RemoveEmptyFileKeys filekeys succeed") - } - } - - if flags.removeAllIndexedObjects { - ids, err := i.store.ListIds() - if err != nil { - log.Errorf("reindex failed to get all ids(removeAllIndexedObjects): %v", err.Error()) - } - for _, id := range ids { - err = i.store.DeleteDetails(id) - if err != nil { - log.Errorf("reindex failed to delete details(removeAllIndexedObjects): %v", err.Error()) - } - } - } - if flags.eraseIndexes { - err = i.store.EraseIndexes() - if err != nil { - log.Errorf("reindex failed to erase indexes: %v", err.Error()) - } else { - log.Infof("all store indexes successfully erased") - } - } - - err = i.reindexBundledObjects(flags) +func (i *indexer) ReindexSpace(spaceID string) (err error) { + flags, err := i.buildFlags(spaceID) if err != nil { - log.Errorf("failed to reindex bundled objects: %s", err) + return } - - // We derive or init predefined blocks here in order to ensure consistency of object store. - // If we call this method before removing objects from store, we will end up with inconsistent state - // because indexing of predefined objects will not run again - predefinedObjectIDs, err := i.anytype.EnsurePredefinedBlocks(context.Background(), i.spaceService.AccountId()) - if err != nil { - return fmt.Errorf("ensure predefined objects: %w", err) - } - spaceIDs := []string{i.spaceService.AccountId()} - - // spaceID => workspaceID - spacesToInit := map[string]string{} - err = block.Do(i.picker, predefinedObjectIDs.Workspace, func(sb smartblock.SmartBlock) error { - st := sb.NewState() - spaces := st.Store().GetFields()["spaces"] - for k, v := range spaces.GetStructValue().GetFields() { - spacesToInit[k] = v.GetStringValue() - } - return nil - }) - for spaceID, _ := range spacesToInit { - spaceIDs = append(spaceIDs, spaceID) - _, err = i.anytype.EnsurePredefinedBlocks(context.Background(), spaceID) - if err != nil { - return fmt.Errorf("ensure predefined objects for child space %s: %w", spaceID, err) - } - } - - for _, spaceID := range spaceIDs { - err = i.EnsurePreinstalledObjects(spaceID) - if err != nil { - return fmt.Errorf("ensure preinstalled objects: %w", err) - } - } - - // starting sync of all other objects later, because we don't want to have problems with loading of derived objects - // due to parallel load which can overload the stream - i.syncStarter.StartSync() - - for _, spaceID := range spaceIDs { - err = i.reindexSpace(spaceID, flags) - if err != nil { - return fmt.Errorf("reindex space %s: %w", spaceID, err) - } - } - - err = i.saveLatestChecksums() - if err != nil { - return fmt.Errorf("save latest checksums: %w", err) - } - - return nil -} - -func (i *indexer) reindexSpace(spaceID string, flags reindexFlags) (err error) { ctx := objectcache.CacheOptsWithRemoteLoadDisabled(context.Background()) // for all ids except home and archive setting cache timeout for reindexing // ctx = context.WithValue(ctx, ocache.CacheTimeout, cacheTimeout) if flags.objects { - ids, err := i.getIdsForTypes( - spaceID, + types := []smartblock2.SmartBlockType{ smartblock2.SmartBlockTypePage, - smartblock2.SmartBlockTypeProfilePage, smartblock2.SmartBlockTypeTemplate, smartblock2.SmartBlockTypeArchive, smartblock2.SmartBlockTypeHome, smartblock2.SmartBlockTypeWorkspace, smartblock2.SmartBlockTypeObjectType, smartblock2.SmartBlockTypeRelation, + smartblock2.SmartBlockTypeSpaceView, + smartblock2.SmartBlockTypeProfilePage, + } + ids, err := i.getIdsForTypes( + spaceID, + types..., ) if err != nil { return err } start := time.Now() - successfullyReindexed := i.reindexIdsIgnoreErr(ctx, ids...) + successfullyReindexed := i.reindexIdsIgnoreErr(ctx, spaceID, ids...) i.logFinishedReindexStat(metrics.ReindexTypeThreads, len(ids), successfullyReindexed, time.Since(start)) @@ -263,10 +183,15 @@ func (i *indexer) reindexSpace(spaceID string, flags reindexFlags) (err error) { } } - return nil + return i.saveLatestChecksums(spaceID) } -func (i *indexer) reindexBundledObjects(flags reindexFlags) error { +func (i *indexer) ReindexCommonObjects() error { + flags, err := i.buildFlags("") + if err != nil { + return err + } + err = i.removeGlobalIndexes(flags) ctx := context.Background() spaceID := addr.AnytypeMarketplaceWorkspace @@ -286,7 +211,7 @@ func (i *indexer) reindexBundledObjects(flags reindexFlags) error { if flags.bundledObjects { // hardcoded for now ids := []string{addr.AnytypeProfileId, addr.MissingObject} - err := i.reindexIDs(ctx, metrics.ReindexTypeBundledObjects, ids) + err := i.reindexIDs(ctx, addr.AnytypeMarketplaceWorkspace, metrics.ReindexTypeBundledObjects, ids) if err != nil { return fmt.Errorf("reindex profile and missing object: %w", err) } @@ -310,7 +235,51 @@ func (i *indexer) reindexBundledObjects(flags reindexFlags) error { } } - return nil + return i.saveLatestChecksums("") +} + +func (i *indexer) removeGlobalIndexes(flags reindexFlags) (err error) { + if flags.any() { + log.Infof("start store reindex (%s)", flags.String()) + } + if flags.objects && flags.fileObjects { + // files will be indexed within object indexing (see indexLinkedFiles) + // because we need to do it in the background. + // otherwise it will lead to the situation when files loading called from the reindex with DisableRemoteFlag + // will be waiting for the linkedFiles background indexing without this flag + flags.fileObjects = false + } + + if flags.fileKeys { + err = i.fileStore.RemoveEmptyFileKeys() + if err != nil { + log.Errorf("reindex failed to RemoveEmptyFileKeys: %v", err.Error()) + } else { + log.Infof("RemoveEmptyFileKeys filekeys succeed") + } + } + + if flags.removeAllIndexedObjects { + ids, err := i.store.ListIds() + if err != nil { + log.Errorf("reindex failed to get all ids(removeAllIndexedObjects): %v", err.Error()) + } + for _, id := range ids { + err = i.store.DeleteDetails(id) + if err != nil { + log.Errorf("reindex failed to delete details(removeAllIndexedObjects): %v", err.Error()) + } + } + } + if flags.eraseIndexes { + err = i.store.EraseIndexes() + if err != nil { + log.Errorf("reindex failed to erase indexes: %v", err.Error()) + } else { + log.Infof("all store indexes successfully erased") + } + } + return } func (i *indexer) reindexIDsForSmartblockTypes(ctx context.Context, spaceID string, reindexType metrics.ReindexType, sbTypes ...smartblock2.SmartBlockType) error { @@ -318,19 +287,19 @@ func (i *indexer) reindexIDsForSmartblockTypes(ctx context.Context, spaceID stri if err != nil { return err } - return i.reindexIDs(ctx, reindexType, ids) + return i.reindexIDs(ctx, spaceID, reindexType, ids) } -func (i *indexer) reindexIDs(ctx context.Context, reindexType metrics.ReindexType, ids []string) error { +func (i *indexer) reindexIDs(ctx context.Context, spaceID string, reindexType metrics.ReindexType, ids []string) error { start := time.Now() - successfullyReindexed := i.reindexIdsIgnoreErr(ctx, ids...) + successfullyReindexed := i.reindexIdsIgnoreErr(ctx, spaceID, ids...) i.logFinishedReindexStat(reindexType, len(ids), successfullyReindexed, time.Since(start)) return nil } func (i *indexer) reindexOutdatedObjects(ctx context.Context, spaceID string) (toReindex, success int, err error) { // reindex of subobject collection always leads to reindex of the all subobjects reindexing - spc, err := i.spaceService.GetSpace(ctx, spaceID) + spc, err := i.spaceCore.Get(ctx, spaceID) if err != nil { return } @@ -367,20 +336,22 @@ func (i *indexer) reindexOutdatedObjects(ctx context.Context, spaceID string) (t } } - success = i.reindexIdsIgnoreErr(ctx, idsToReindex...) + success = i.reindexIdsIgnoreErr(ctx, spaceID, idsToReindex...) return len(idsToReindex), success, nil } -func (i *indexer) reindexDoc(ctx context.Context, id string) error { - err := block.DoContext(i.picker, ctx, id, func(sb smartblock.SmartBlock) error { +func (i *indexer) reindexDoc(ctx context.Context, spaceID, id string) error { + return block.DoContextFullID(i.picker, ctx, domain.FullID{ + ObjectID: id, + SpaceID: spaceID, + }, func(sb smartblock.SmartBlock) error { return i.Index(ctx, sb.GetDocInfo()) }) - return err } -func (i *indexer) reindexIdsIgnoreErr(ctx context.Context, ids ...string) (successfullyReindexed int) { +func (i *indexer) reindexIdsIgnoreErr(ctx context.Context, spaceID string, ids ...string) (successfullyReindexed int) { for _, id := range ids { - err := i.reindexDoc(ctx, id) + err := i.reindexDoc(ctx, spaceID, id) if err != nil { log.With("objectID", id).Errorf("failed to reindex: %v", err) } else { @@ -390,40 +361,22 @@ func (i *indexer) reindexIdsIgnoreErr(ctx context.Context, ids ...string) (succe return } -func (i *indexer) EnsurePreinstalledObjects(spaceID string) error { - start := time.Now() - ids := make([]string, 0, len(bundle.SystemTypes)+len(bundle.SystemRelations)) - for _, ot := range bundle.SystemTypes { - ids = append(ids, ot.BundledURL()) - } - - for _, rk := range bundle.SystemRelations { - ids = append(ids, rk.BundledURL()) - } - _, _, err := i.objectCreator.InstallBundledObjects(context.Background(), spaceID, ids) - if err != nil { - return err - } - - i.logFinishedReindexStat(metrics.ReindexTypeSystem, len(ids), len(ids), time.Since(start)) - - return nil -} - -func (i *indexer) saveLatestChecksums() error { +func (i *indexer) saveLatestChecksums(spaceID string) error { checksums := model.ObjectStoreChecksums{ - BundledObjectTypes: bundle.TypeChecksum, - BundledRelations: bundle.RelationChecksum, - BundledTemplates: i.btHash.Hash(), - ObjectsForceReindexCounter: ForceObjectsReindexCounter, - FilesForceReindexCounter: ForceFilesReindexCounter, - + BundledObjectTypes: bundle.TypeChecksum, + BundledRelations: bundle.RelationChecksum, + BundledTemplates: i.btHash.Hash(), + ObjectsForceReindexCounter: ForceObjectsReindexCounter, + FilesForceReindexCounter: ForceFilesReindexCounter, IdxRebuildCounter: ForceIdxRebuildCounter, FulltextRebuild: ForceFulltextIndexCounter, BundledObjects: ForceBundledObjectsReindexCounter, FilestoreKeysForceReindexCounter: ForceFilestoreKeysReindexCounter, } - return i.store.SaveChecksums(&checksums) + if spaceID == "" { + return i.store.SaveGlobalChecksums(&checksums) + } + return i.store.SaveChecksums(spaceID, &checksums) } func (i *indexer) getIdsForTypes(spaceID string, sbt ...smartblock2.SmartBlockType) ([]string, error) { diff --git a/core/kanban/service_test.go b/core/kanban/service_test.go index da8bff81c..9b79e7e96 100644 --- a/core/kanban/service_test.go +++ b/core/kanban/service_test.go @@ -22,7 +22,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/ftsearch" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider/mock_typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider/mock_typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/core/navigation.go b/core/navigation.go index 70f0d4bc3..984e41bdb 100644 --- a/core/navigation.go +++ b/core/navigation.go @@ -8,10 +8,10 @@ import ( "github.com/gogo/protobuf/types" "github.com/anyproto/anytype-heart/core/block" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" ) func (mw *Middleware) NavigationListObjects(cctx context.Context, req *pb.RpcNavigationListObjectsRequest) *pb.RpcNavigationListObjectsResponse { @@ -51,9 +51,9 @@ func (mw *Middleware) NavigationGetObjectInfoWithLinks(cctx context.Context, req return filtered } - spaceService := getService[space.Service](mw) + resolver := getService[idresolver.Resolver](mw) store := app.MustComponent[objectstore.ObjectStore](mw.applicationService.GetApp()) - spaceID, err := spaceService.ResolveSpaceID(req.ObjectId) + spaceID, err := resolver.ResolveSpaceID(req.ObjectId) if err != nil { return response(pb.RpcNavigationGetObjectInfoWithLinksResponseError_UNKNOWN_ERROR, nil, fmt.Errorf("resolve spaceID: %w", err)) } diff --git a/core/relations.go b/core/relations.go index 4e740a55d..ab2c56fbc 100644 --- a/core/relations.go +++ b/core/relations.go @@ -10,6 +10,7 @@ import ( "github.com/gogo/protobuf/types" "github.com/anyproto/anytype-heart/core/block" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/system_object" "github.com/anyproto/anytype-heart/pb" @@ -68,7 +69,8 @@ func (mw *Middleware) ObjectTypeRelationAdd(cctx context.Context, req *pb.RpcObj } err := mw.doBlockService(func(bs *block.Service) (err error) { - spaceId, err := bs.ResolveSpaceID(req.ObjectTypeUrl) + res := mw.applicationService.GetApp().MustComponent(idresolver.CName).(idresolver.Resolver) + spaceId, err := res.ResolveSpaceID(req.ObjectTypeUrl) if err != nil { return err } diff --git a/core/subscription/fixture_test.go b/core/subscription/fixture_test.go index 25d43e3a4..9a3f23c73 100644 --- a/core/subscription/fixture_test.go +++ b/core/subscription/fixture_test.go @@ -19,7 +19,7 @@ import ( "github.com/anyproto/anytype-heart/core/system_object/mock_system_object" "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" - "github.com/anyproto/anytype-heart/space/typeprovider/mock_typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider/mock_typeprovider" "github.com/anyproto/anytype-heart/tests/testutil" "github.com/anyproto/anytype-heart/util/testMock" ) @@ -56,7 +56,7 @@ func newFixture(t *testing.T) *fixture { a.Register(sbtProvider) systemObjectService := mock_system_object.NewMockService(t) - a.Register(testutil.PrepareMock(a, systemObjectService)) + a.Register(testutil.PrepareMock(context.Background(), a, systemObjectService)) collectionService := &collectionServiceMock{MockCollectionService: mock_subscription.NewMockCollectionService(t)} a.Register(collectionService) @@ -107,7 +107,7 @@ func newFixtureWithRealObjectStore(t *testing.T) *fixtureRealStore { sbtProvider.EXPECT().Init(mock.Anything).Return(nil) a.Register(sbtProvider) systemObjectService := mock_system_object.NewMockService(t) - a.Register(testutil.PrepareMock(a, systemObjectService)) + a.Register(testutil.PrepareMock(context.Background(), a, systemObjectService)) fx := &fixtureRealStore{ Service: New(), a: a, diff --git a/core/subscription/service.go b/core/subscription/service.go index 0d0131786..cef886dce 100644 --- a/core/subscription/service.go +++ b/core/subscription/service.go @@ -23,7 +23,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" "github.com/anyproto/anytype-heart/util/slice" ) diff --git a/core/syncstatus/file_status_registry.go b/core/syncstatus/file_status_registry.go index ec2e97ad9..cd545b3db 100644 --- a/core/syncstatus/file_status_registry.go +++ b/core/syncstatus/file_status_registry.go @@ -33,7 +33,7 @@ const ( type fileStatusRegistry struct { fileSyncService filesync.FileSync fileStore filestore.FileStore - picker getblock.Picker + picker getblock.ObjectGetter sync.Mutex @@ -44,7 +44,7 @@ type fileStatusRegistry struct { func newFileStatusRegistry( fileSyncService filesync.FileSync, fileStore filestore.FileStore, - picker getblock.Picker, + picker getblock.ObjectGetter, updateInterval time.Duration, ) *fileStatusRegistry { return &fileStatusRegistry{ diff --git a/core/syncstatus/file_watcher.go b/core/syncstatus/file_watcher.go index b776deac1..efce4925d 100644 --- a/core/syncstatus/file_watcher.go +++ b/core/syncstatus/file_watcher.go @@ -15,7 +15,6 @@ import ( "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/pkg/lib/datastore" - "github.com/anyproto/anytype-heart/space" ) type fileWithSpace struct { @@ -28,16 +27,20 @@ type fileStatus struct { updatedAt time.Time } +type personalIDProvider interface { + PersonalSpaceID() string +} + type fileWatcher struct { filesToWatchLock *sync.Mutex filesToWatch map[fileWithSpace]struct{} - dbProvider datastore.Datastore - badger *badger.DB - spaceService space.Service - registry *fileStatusRegistry - updateCh chan fileWithSpace - closeCh chan struct{} + dbProvider datastore.Datastore + badger *badger.DB + provider personalIDProvider + registry *fileStatusRegistry + updateCh chan fileWithSpace + closeCh chan struct{} updateReceiver syncstatus.UpdateReceiver @@ -45,7 +48,7 @@ type fileWatcher struct { } func newFileWatcher( - spaceService space.Service, + provider personalIDProvider, dbProvider datastore.Datastore, registry *fileStatusRegistry, updateReceiver syncstatus.UpdateReceiver, @@ -60,7 +63,7 @@ func newFileWatcher( updateReceiver: updateReceiver, registry: registry, dbProvider: dbProvider, - spaceService: spaceService, + provider: provider, } return watcher } @@ -69,7 +72,7 @@ const filesToWatchPrefix = "/files_to_watch/" func (s *fileWatcher) loadFilesToWatch() error { return s.badger.View(func(txn *badger.Txn) error { - defaultSpaceID := s.spaceService.AccountId() + defaultSpaceID := s.provider.PersonalSpaceID() iter := txn.NewIterator(badger.IteratorOptions{ Prefix: []byte(filesToWatchPrefix), }) diff --git a/core/syncstatus/service.go b/core/syncstatus/service.go index d7f4cecee..c22b977f5 100644 --- a/core/syncstatus/service.go +++ b/core/syncstatus/service.go @@ -21,8 +21,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/datastore" "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" "github.com/anyproto/anytype-heart/pkg/lib/logging" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" ) var log = logging.Logger("anytype-mw-status") @@ -66,18 +65,18 @@ func (s *service) Init(a *app.App) (err error) { s.fileSyncService = app.MustComponent[filesync.FileSync](a) dbProvider := app.MustComponent[datastore.Datastore](a) - spaceService := app.MustComponent[space.Service](a) + personalIDProvider := app.MustComponent[personalIDProvider](a) coreService := app.MustComponent[core.Service](a) nodeConfService := app.MustComponent[nodeconf.Service](a) fileStore := app.MustComponent[filestore.FileStore](a) - picker := app.MustComponent[getblock.Picker](a) + picker := app.MustComponent[getblock.ObjectGetter](a) cfg := app.MustComponent[*config.Config](a) eventSender := app.MustComponent[event.Sender](a) fileStatusRegistry := newFileStatusRegistry(s.fileSyncService, fileStore, picker, s.fileWatcherUpdateInterval) s.linkedFilesWatcher = newLinkedFilesWatcher(fileStatusRegistry) s.updateReceiver = newUpdateReceiver(coreService, s.linkedFilesWatcher, nodeConfService, cfg, eventSender) - s.fileWatcher = newFileWatcher(spaceService, dbProvider, fileStatusRegistry, s.updateReceiver, s.fileWatcherUpdateInterval) + s.fileWatcher = newFileWatcher(personalIDProvider, dbProvider, fileStatusRegistry, s.updateReceiver, s.fileWatcherUpdateInterval) s.fileSyncService.OnUpload(s.OnFileUpload) return s.fileWatcher.init() @@ -105,6 +104,15 @@ func (s *service) RegisterSpace(space commonspace.Space) { s.objectWatchers[space.Id()] = watcher } +func (s *service) UnregisterSpace(space commonspace.Space) { + s.objectWatchersLock.Lock() + defer s.objectWatchersLock.Unlock() + + // TODO: [MR] now we can't set a nil update receiver, but maybe it doesn't matter that much + // and we can just leave as it is, because no events will come through + delete(s.objectWatchers, space.Id()) +} + func (s *service) Watch(spaceID string, id string, filesGetter func() []string) (new bool, err error) { return s.watch(spaceID, id, filesGetter) } diff --git a/core/syncstatus/service_test.go b/core/syncstatus/service_test.go index 7f4fe749b..709145c90 100644 --- a/core/syncstatus/service_test.go +++ b/core/syncstatus/service_test.go @@ -34,18 +34,18 @@ package syncstatus // // } // -// spaceService := mock_space.NewMockService(fx.ctrl) +// provider := mock_space.NewMockService(fx.ctrl) // typeProvider := mock_typeprovider.NewMockSmartBlockTypeProvider(fx.ctrl) // coreService := mock_core.NewMockService(fx.ctrl) // -// statusService := New(typeProvider, &config.Config{}, eventReceiver, spaceService, coreService, fileSync) +// statusService := New(typeProvider, &config.Config{}, eventReceiver, provider, coreService, fileSync) // // ctx := context.Background() // fileSync.EXPECT().NewStatusWatcher(statusService, 5*time.Second).Return(statusWatcher) // // spc := mock_space.NewMockSpace(fx.ctrl) // -// spaceService.EXPECT().AccountSpace(ctx).Return(spc, nil) +// provider.EXPECT().AccountSpace(ctx).Return(spc, nil) // // err := statusService.Run(ctx) // require.NoError(t, err) diff --git a/core/system_object/mock_system_object/mock_Service.go b/core/system_object/mock_system_object/mock_Service.go index 18c5e24f7..ec7529e60 100644 --- a/core/system_object/mock_system_object/mock_Service.go +++ b/core/system_object/mock_system_object/mock_Service.go @@ -369,60 +369,6 @@ func (_c *MockService_GetObjectType_Call) RunAndReturn(run func(string) (*model. return _c } -// GetObjectTypes provides a mock function with given fields: urls -func (_m *MockService) GetObjectTypes(urls []string) ([]*model.ObjectType, error) { - ret := _m.Called(urls) - - var r0 []*model.ObjectType - var r1 error - if rf, ok := ret.Get(0).(func([]string) ([]*model.ObjectType, error)); ok { - return rf(urls) - } - if rf, ok := ret.Get(0).(func([]string) []*model.ObjectType); ok { - r0 = rf(urls) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*model.ObjectType) - } - } - - if rf, ok := ret.Get(1).(func([]string) error); ok { - r1 = rf(urls) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_GetObjectTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObjectTypes' -type MockService_GetObjectTypes_Call struct { - *mock.Call -} - -// GetObjectTypes is a helper method to define mock.On call -// - urls []string -func (_e *MockService_Expecter) GetObjectTypes(urls interface{}) *MockService_GetObjectTypes_Call { - return &MockService_GetObjectTypes_Call{Call: _e.mock.On("GetObjectTypes", urls)} -} - -func (_c *MockService_GetObjectTypes_Call) Run(run func(urls []string)) *MockService_GetObjectTypes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]string)) - }) - return _c -} - -func (_c *MockService_GetObjectTypes_Call) Return(ots []*model.ObjectType, err error) *MockService_GetObjectTypes_Call { - _c.Call.Return(ots, err) - return _c -} - -func (_c *MockService_GetObjectTypes_Call) RunAndReturn(run func([]string) ([]*model.ObjectType, error)) *MockService_GetObjectTypes_Call { - _c.Call.Return(run) - return _c -} - // GetRelationByID provides a mock function with given fields: id func (_m *MockService) GetRelationByID(id string) (*model.Relation, error) { ret := _m.Called(id) diff --git a/core/system_object/mock_system_object/mock_deriver.go b/core/system_object/mock_system_object/mock_deriver.go new file mode 100644 index 000000000..b31fb0e46 --- /dev/null +++ b/core/system_object/mock_system_object/mock_deriver.go @@ -0,0 +1,177 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_system_object + +import ( + context "context" + + app "github.com/anyproto/any-sync/app" + mock "github.com/stretchr/testify/mock" + + domain "github.com/anyproto/anytype-heart/core/domain" +) + +// Mockderiver is an autogenerated mock type for the deriver type +type Mockderiver struct { + mock.Mock +} + +type Mockderiver_Expecter struct { + mock *mock.Mock +} + +func (_m *Mockderiver) EXPECT() *Mockderiver_Expecter { + return &Mockderiver_Expecter{mock: &_m.Mock} +} + +// DeriveObjectID provides a mock function with given fields: ctx, spaceID, uniqueKey +func (_m *Mockderiver) DeriveObjectID(ctx context.Context, spaceID string, uniqueKey domain.UniqueKey) (string, error) { + ret := _m.Called(ctx, spaceID, uniqueKey) + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, domain.UniqueKey) (string, error)); ok { + return rf(ctx, spaceID, uniqueKey) + } + if rf, ok := ret.Get(0).(func(context.Context, string, domain.UniqueKey) string); ok { + r0 = rf(ctx, spaceID, uniqueKey) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, domain.UniqueKey) error); ok { + r1 = rf(ctx, spaceID, uniqueKey) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Mockderiver_DeriveObjectID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveObjectID' +type Mockderiver_DeriveObjectID_Call struct { + *mock.Call +} + +// DeriveObjectID is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - uniqueKey domain.UniqueKey +func (_e *Mockderiver_Expecter) DeriveObjectID(ctx interface{}, spaceID interface{}, uniqueKey interface{}) *Mockderiver_DeriveObjectID_Call { + return &Mockderiver_DeriveObjectID_Call{Call: _e.mock.On("DeriveObjectID", ctx, spaceID, uniqueKey)} +} + +func (_c *Mockderiver_DeriveObjectID_Call) Run(run func(ctx context.Context, spaceID string, uniqueKey domain.UniqueKey)) *Mockderiver_DeriveObjectID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(domain.UniqueKey)) + }) + return _c +} + +func (_c *Mockderiver_DeriveObjectID_Call) Return(id string, err error) *Mockderiver_DeriveObjectID_Call { + _c.Call.Return(id, err) + return _c +} + +func (_c *Mockderiver_DeriveObjectID_Call) RunAndReturn(run func(context.Context, string, domain.UniqueKey) (string, error)) *Mockderiver_DeriveObjectID_Call { + _c.Call.Return(run) + return _c +} + +// Init provides a mock function with given fields: a +func (_m *Mockderiver) Init(a *app.App) error { + ret := _m.Called(a) + + var r0 error + if rf, ok := ret.Get(0).(func(*app.App) error); ok { + r0 = rf(a) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Mockderiver_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type Mockderiver_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - a *app.App +func (_e *Mockderiver_Expecter) Init(a interface{}) *Mockderiver_Init_Call { + return &Mockderiver_Init_Call{Call: _e.mock.On("Init", a)} +} + +func (_c *Mockderiver_Init_Call) Run(run func(a *app.App)) *Mockderiver_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*app.App)) + }) + return _c +} + +func (_c *Mockderiver_Init_Call) Return(err error) *Mockderiver_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *Mockderiver_Init_Call) RunAndReturn(run func(*app.App) error) *Mockderiver_Init_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *Mockderiver) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// Mockderiver_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type Mockderiver_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *Mockderiver_Expecter) Name() *Mockderiver_Name_Call { + return &Mockderiver_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *Mockderiver_Name_Call) Run(run func()) *Mockderiver_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Mockderiver_Name_Call) Return(name string) *Mockderiver_Name_Call { + _c.Call.Return(name) + return _c +} + +func (_c *Mockderiver_Name_Call) RunAndReturn(run func() string) *Mockderiver_Name_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockderiver interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockderiver creates a new instance of Mockderiver. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockderiver(t mockConstructorTestingTNewMockderiver) *Mockderiver { + mock := &Mockderiver{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/system_object/object_types.go b/core/system_object/object_types.go index 9f873076e..059e545cd 100644 --- a/core/system_object/object_types.go +++ b/core/system_object/object_types.go @@ -44,19 +44,6 @@ func (s *service) getRelationLinksForRecommendedRelations(details *types.Struct) return relationLinks } -func (s *service) GetObjectTypes(ids []string) (ots []*model.ObjectType, err error) { - ots = make([]*model.ObjectType, 0, len(ids)) - for _, id := range ids { - ot, e := s.GetObjectType(id) - if e != nil { - err = e - } else { - ots = append(ots, ot) - } - } - return -} - func (s *service) GetObjectType(id string) (*model.ObjectType, error) { if strings.HasPrefix(id, addr.BundledObjectTypeURLPrefix) { return bundle.GetTypeByUrl(id) diff --git a/core/system_object/service.go b/core/system_object/service.go index 4ef0b0178..140d5339e 100644 --- a/core/system_object/service.go +++ b/core/system_object/service.go @@ -10,7 +10,6 @@ import ( "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/system_object/relationutils" "github.com/anyproto/anytype-heart/pkg/lib/bundle" - "github.com/anyproto/anytype-heart/pkg/lib/core" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/database" "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" @@ -42,7 +41,6 @@ type Service interface { GetObjectType(url string) (*model.ObjectType, error) HasObjectType(id string) (bool, error) - GetObjectTypes(urls []string) (ots []*model.ObjectType, err error) GetRelationByID(id string) (relation *model.Relation, err error) GetRelationByKey(key string) (relation *model.Relation, err error) @@ -53,14 +51,19 @@ type Service interface { app.Component } +type deriver interface { + DeriveObjectID(ctx context.Context, spaceID string, uniqueKey domain.UniqueKey) (id string, err error) + app.Component +} + type service struct { objectStore objectstore.ObjectStore - core core.Service + deriver deriver } func (s *service) Init(a *app.App) (err error) { s.objectStore = app.MustComponent[objectstore.ObjectStore](a) - s.core = app.MustComponent[core.Service](a) + s.deriver = app.MustComponent[deriver](a) return } @@ -79,7 +82,7 @@ func (s *service) GetTypeIdByKey(ctx context.Context, spaceId string, key domain return addr.BundledObjectTypeURLPrefix + key.String(), nil } - return s.core.DeriveObjectId(ctx, spaceId, uk) + return s.deriver.DeriveObjectID(ctx, spaceId, uk) } func (s *service) GetRelationIdByKey(ctx context.Context, spaceId string, key domain.RelationKey) (id string, err error) { @@ -93,14 +96,14 @@ func (s *service) GetRelationIdByKey(ctx context.Context, spaceId string, key do return addr.BundledRelationURLPrefix + key.String(), nil } - return s.core.DeriveObjectId(ctx, spaceId, uk) + return s.deriver.DeriveObjectID(ctx, spaceId, uk) } // GetObjectIdByUniqueKey returns object id by uniqueKey and spaceId // context is used in case of space cache miss(shouldn't be a case for a valid spaceId) // cheap to use in terms of performance (about 500ms per 10000 derivations) func (s *service) GetObjectIdByUniqueKey(ctx context.Context, spaceId string, key domain.UniqueKey) (id string, err error) { - return s.core.DeriveObjectId(ctx, spaceId, key) + return s.deriver.DeriveObjectID(ctx, spaceId, key) } func (s *service) FetchRelationByLinks(spaceId string, links pbtypes.RelationLinks) (relations relationutils.Relations, err error) { diff --git a/core/system_object/service_test.go b/core/system_object/service_test.go index 379bc9d06..f6abcc78c 100644 --- a/core/system_object/service_test.go +++ b/core/system_object/service_test.go @@ -1,12 +1,14 @@ package system_object import ( + "github.com/anyproto/anytype-heart/core/system_object/mock_system_object" "testing" "github.com/anyproto/any-sync/app" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "context" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/system_object/relationutils" "github.com/anyproto/anytype-heart/pkg/lib/bundle" @@ -27,10 +29,13 @@ type fixture struct { func newFixture(t *testing.T) *fixture { objectStore := objectstore.NewStoreFixture(t) coreService := mock_core.NewMockService(t) + deriver := mock_system_object.NewMockderiver(t) + ctx := context.Background() a := new(app.App) a.Register(objectStore) - a.Register(testutil.PrepareMock(a, coreService)) + a.Register(testutil.PrepareMock(ctx, a, coreService)) + a.Register(testutil.PrepareMock(ctx, a, deriver)) s := New() err := s.Init(a) diff --git a/core/workspace.go b/core/workspace.go index b9b93f15c..430fd5817 100644 --- a/core/workspace.go +++ b/core/workspace.go @@ -44,7 +44,7 @@ func (mw *Middleware) WorkspaceInfo(cctx context.Context, req *pb.RpcWorkspaceIn } return m } - + // TODO: [MR] this should probably be related only to account info, err := getService[account.Service](mw).GetInfo(cctx, req.SpaceId) if err != nil { return response(info, pb.RpcWorkspaceInfoResponseError_UNKNOWN_ERROR, err) diff --git a/docs/proto.md b/docs/proto.md index 158ee1cd4..0671ec67a 100644 --- a/docs/proto.md +++ b/docs/proto.md @@ -1417,6 +1417,7 @@ - [Restrictions](#anytype-model-Restrictions) - [Restrictions.DataviewRestrictions](#anytype-model-Restrictions-DataviewRestrictions) - [SmartBlockSnapshotBase](#anytype-model-SmartBlockSnapshotBase) + - [SpaceObjectHeader](#anytype-model-SpaceObjectHeader) - [Account.StatusType](#anytype-model-Account-StatusType) - [Block.Align](#anytype-model-Block-Align) @@ -1452,6 +1453,7 @@ - [Restrictions.DataviewRestriction](#anytype-model-Restrictions-DataviewRestriction) - [Restrictions.ObjectRestriction](#anytype-model-Restrictions-ObjectRestriction) - [SmartBlockType](#anytype-model-SmartBlockType) + - [SpaceStatus](#anytype-model-SpaceStatus) - [Scalar Value Types](#scalar-value-types) @@ -8859,6 +8861,11 @@ Get marks list in the selected range in text block. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| spaceId | [string](#string) | | | + + @@ -22056,6 +22063,7 @@ Used to decode block meta only, without the content itself | ----- | ---- | ----- | ----------- | | smartBlockType | [SmartBlockType](#anytype-model-SmartBlockType) | | | | key | [string](#string) | | | +| data | [bytes](#bytes) | | | @@ -22346,6 +22354,21 @@ stored | + + + +### SpaceObjectHeader + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| spaceID | [string](#string) | | | + + + + + @@ -22787,6 +22810,7 @@ Look https://github.com/golang/protobuf/issues/1135 for more information. | audio | 15 | | | video | 16 | | | date | 17 | | +| spaceView | 18 | | | database | 20 | to be released later | @@ -22902,9 +22926,27 @@ RelationFormat describes how the underlying data is stored in the google.protobu | STRelation | 521 | | | STType | 528 | | | STRelationOption | 529 | | +| SpaceView | 530 | | | MissingObject | 519 | | + + + +### SpaceStatus + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| Unknown | 0 | Unknown means the space is not loaded yet | +| Loading | 1 | Loading - the space in progress of loading | +| Ok | 2 | Ok - the space loaded and available | +| Missing | 3 | Missing - the space is missing | +| Error | 4 | Error - the space loading ended with an error | +| RemoteWaitingDeletion | 5 | RemoteWaitingDeletion - network status is "waiting deletion" | +| RemoteDeleted | 6 | RemoteDeleted - the space is deleted in the current network | + + diff --git a/go.mod b/go.mod index 31701005b..220f52aba 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/PuerkitoBio/goquery v1.8.1 github.com/VividCortex/ewma v1.2.0 github.com/adrium/goheif v0.0.0-20230113233934-ca402e77a786 - github.com/anyproto/any-sync v0.3.0-alpha.2 + github.com/anyproto/any-sync v0.3.2-0.20230927204133-ce7bce7e4809 github.com/anyproto/go-naturaldate/v2 v2.0.2-0.20230524105841-9829cfd13438 github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de github.com/blevesearch/bleve/v2 v2.3.10 @@ -41,8 +41,8 @@ require ( github.com/hbagdi/go-unsplash v0.0.0-20230414214043-474fc02c9119 github.com/huandu/skiplist v1.2.0 github.com/improbable-eng/grpc-web v0.15.0 - github.com/ipfs/boxo v0.11.0 - github.com/ipfs/go-block-format v0.1.2 + github.com/ipfs/boxo v0.12.0 + github.com/ipfs/go-block-format v0.2.0 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-datastore v0.6.0 github.com/ipfs/go-ds-flatfs v0.5.1 @@ -52,7 +52,7 @@ require ( github.com/joho/godotenv v1.5.1 github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e github.com/kelseyhightower/envconfig v1.4.0 - github.com/libp2p/go-libp2p v0.30.0 + github.com/libp2p/go-libp2p v0.31.0 github.com/libp2p/zeroconf/v2 v2.2.0 github.com/logrusorgru/aurora v2.0.3+incompatible github.com/magiconair/properties v1.8.7 @@ -178,7 +178,7 @@ require ( github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/ipfs/go-path v0.1.1 // indirect github.com/ipld/go-codec-dagpb v1.6.0 // indirect - github.com/ipld/go-ipld-prime v0.20.0 // indirect + github.com/ipld/go-ipld-prime v0.21.0 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/jinzhu/copier v0.3.5 // indirect @@ -215,8 +215,8 @@ require ( github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.11.1 // indirect github.com/pseudomuto/protokit v0.2.1 // indirect - github.com/quic-go/qtls-go1-20 v0.3.2 // indirect - github.com/quic-go/quic-go v0.38.0 // indirect + github.com/quic-go/qtls-go1-20 v0.3.3 // indirect + github.com/quic-go/quic-go v0.38.1 // indirect github.com/rs/cors v1.7.0 // indirect github.com/rs/zerolog v1.29.0 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect diff --git a/go.sum b/go.sum index b66d10eb0..2876df6b9 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,8 @@ github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5/go.mod h github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxBp0T0eFw1RUQY= github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= -github.com/anyproto/any-sync v0.3.0-alpha.2 h1:eOJuED567lmwiO5NwJQrNwDafpaauTZsVDwXKvT+boM= -github.com/anyproto/any-sync v0.3.0-alpha.2/go.mod h1:NTXTvHr1W8f5dJFbMQNPoyMWeTSjXM10cj4qCUacvJU= +github.com/anyproto/any-sync v0.3.2-0.20230927204133-ce7bce7e4809 h1:aSyqpncSvTgSBhT72qU7eCGEnyvZNFRJpNOnowJwTFA= +github.com/anyproto/any-sync v0.3.2-0.20230927204133-ce7bce7e4809/go.mod h1:v0w3l3FBWjzNgg5t8aWlI+aYkcA8kLaoJFfr/GHsWYk= github.com/anyproto/go-chash v0.1.0 h1:I9meTPjXFRfXZHRJzjOHC/XF7Q5vzysKkiT/grsogXY= github.com/anyproto/go-chash v0.1.0/go.mod h1:0UjNQi3PDazP0fINpFYu6VKhuna+W/V+1vpXHAfNgLY= github.com/anyproto/go-gelf v0.0.0-20210418191311-774bd5b016e7 h1:SyEu5uxZ5nKHEJ6TPKQqjM+T00SYi0MW1VaLzqZtZ9E= @@ -303,7 +303,7 @@ github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJn github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -563,8 +563,8 @@ github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.11.0 h1:urMxhZ3xoF4HssJVD3+0ssGT9pptEfHfbL8DYdoWFlg= -github.com/ipfs/boxo v0.11.0/go.mod h1:8IfDmp+FzFGcF4zjAgHMVPpwYw4AjN9ePEzDfkaYJ1w= +github.com/ipfs/boxo v0.12.0 h1:AXHg/1ONZdRQHQLgG5JHsSC3XoE4DjCAMgK+asZvUcQ= +github.com/ipfs/boxo v0.12.0/go.mod h1:xAnfiU6PtxWCnRqu7dcXQ10bB5/kvI1kXRotuGqGBhg= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0= @@ -574,8 +574,8 @@ github.com/ipfs/go-bitswap v0.3.4/go.mod h1:4T7fvNv/LmOys+21tnLzGKncMeeXUYUd1nUi github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= -github.com/ipfs/go-block-format v0.1.2 h1:GAjkfhVx1f4YTODS6Esrj1wt2HhrtwTnhEr+DyPUaJo= -github.com/ipfs/go-block-format v0.1.2/go.mod h1:mACVcrxarQKstUU3Yf/RdwbC4DzPV6++rO2a3d+a/KE= +github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs= +github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM= github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= github.com/ipfs/go-blockservice v0.1.4/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -638,8 +638,6 @@ github.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms= github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k= github.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs= -github.com/ipfs/go-ipld-format v0.5.0 h1:WyEle9K96MSrvr47zZHKKcDxJ/vlpET6PSiQsAFO+Ds= -github.com/ipfs/go-ipld-format v0.5.0/go.mod h1:ImdZqJQaEouMjCvqCe0ORUS+uoBmf7Hf+EO/jh+nk3M= github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U= github.com/ipfs/go-ipld-format v0.6.0/go.mod h1:g4QVMTn3marU3qXchwjpKPKgJv+zF+OlaKMyhJ4LHPg= github.com/ipfs/go-ipld-legacy v0.2.1 h1:mDFtrBpmU7b//LzLSypVrXsD8QxkEWxu5qVxN99/+tk= @@ -669,8 +667,8 @@ github.com/ipld/go-codec-dagpb v1.3.0/go.mod h1:ga4JTU3abYApDC3pZ00BC2RSvC3qfBb9 github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6rOcc= github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s= github.com/ipld/go-ipld-prime v0.11.0/go.mod h1:+WIAkokurHmZ/KwzDOMUuoeJgaRQktHtEaLglS3ZeV8= -github.com/ipld/go-ipld-prime v0.20.0 h1:Ud3VwE9ClxpO2LkCYP7vWPc0Fo+dYdYzgxUJZ3uRG4g= -github.com/ipld/go-ipld-prime v0.20.0/go.mod h1:PzqZ/ZR981eKbgdr3y2DJYeD/8bgMawdGVlJDE8kK+M= +github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E= +github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= @@ -766,8 +764,8 @@ github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xS github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t2DTVAJxMo= -github.com/libp2p/go-libp2p v0.30.0 h1:9EZwFtJPFBcs/yJTnP90TpN1hgrT/EsFfM+OZuwV87U= -github.com/libp2p/go-libp2p v0.30.0/go.mod h1:nr2g5V7lfftwgiJ78/HrID+pwvayLyqKCEirT2Y3Byg= +github.com/libp2p/go-libp2p v0.31.0 h1:LFShhP8F6xthWiBBq3euxbKjZsoRajVEyBS9snfHxYg= +github.com/libp2p/go-libp2p v0.31.0/go.mod h1:W/FEK1c/t04PbRH3fA9i5oucu5YcgrG0JVoBWT1B7Eg= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE= @@ -1170,10 +1168,10 @@ github.com/pseudomuto/protoc-gen-doc v1.5.1/go.mod h1:XpMKYg6zkcpgfpCfQ8GcWBDRtR github.com/pseudomuto/protokit v0.2.1 h1:kCYpE3thoR6Esm0CUvd5xbrDTOZPvQPTDeyXpZfrJdk= github.com/pseudomuto/protokit v0.2.1/go.mod h1:gt7N5Rz2flBzYafvaxyIxMZC0TTF5jDZfRnw25hAAyo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= -github.com/quic-go/qtls-go1-20 v0.3.2 h1:rRgN3WfnKbyik4dBV8A6girlJVxGand/d+jVKbQq5GI= -github.com/quic-go/qtls-go1-20 v0.3.2/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= -github.com/quic-go/quic-go v0.38.0 h1:T45lASr5q/TrVwt+jrVccmqHhPL2XuSyoCLVCpfOSLc= -github.com/quic-go/quic-go v0.38.0/go.mod h1:MPCuRq7KBK2hNcfKj/1iD1BGuN3eAYMeNxp3T42LRUg= +github.com/quic-go/qtls-go1-20 v0.3.3 h1:17/glZSLI9P9fDAeyCHBFSWSqJcwx1byhLwP5eUIDCM= +github.com/quic-go/qtls-go1-20 v0.3.3/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/quic-go v0.38.1 h1:M36YWA5dEhEeT+slOu/SwMEucbYd0YFidxG3KlGPZaE= +github.com/quic-go/quic-go v0.38.1/go.mod h1:ijnZM7JsFIkp4cRyjxJNIzdSfCLmUMg9wdyhGmg+SN4= github.com/quic-go/webtransport-go v0.5.3 h1:5XMlzemqB4qmOlgIus5zB45AcZ2kCgCy2EptUrfOPWU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -1305,7 +1303,7 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vektra/mockery/v2 v2.34.1 h1:H+wO4wTRlBjdY3yFUjv53GazCaDSEfhRKJugyo2aoNc= github.com/vektra/mockery/v2 v2.34.1/go.mod h1:9lREs4VEeQiUS3rizYQx1saxHu2JiIhThP0q9+fDegM= -github.com/warpfork/go-testmark v0.11.0 h1:J6LnV8KpceDvo7spaNU4+DauH2n1x+6RaO2rJrmpQ9U= +github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= diff --git a/pb/commands.pb.go b/pb/commands.pb.go index 87718b35d..44377baa0 100644 --- a/pb/commands.pb.go +++ b/pb/commands.pb.go @@ -49479,6 +49479,7 @@ func (m *RpcDebugSpaceSummary) XXX_DiscardUnknown() { var xxx_messageInfo_RpcDebugSpaceSummary proto.InternalMessageInfo type RpcDebugSpaceSummaryRequest struct { + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` } func (m *RpcDebugSpaceSummaryRequest) Reset() { *m = RpcDebugSpaceSummaryRequest{} } @@ -49514,6 +49515,13 @@ func (m *RpcDebugSpaceSummaryRequest) XXX_DiscardUnknown() { var xxx_messageInfo_RpcDebugSpaceSummaryRequest proto.InternalMessageInfo +func (m *RpcDebugSpaceSummaryRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + type RpcDebugSpaceSummaryResponse struct { Error *RpcDebugSpaceSummaryResponseError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` SpaceId string `protobuf:"bytes,2,opt,name=spaceId,proto3" json:"spaceId,omitempty"` @@ -52733,347 +52741,347 @@ func init() { func init() { proto.RegisterFile("pb/protos/commands.proto", fileDescriptor_8261c968b2e6f45c) } var fileDescriptor_8261c968b2e6f45c = []byte{ - // 13471 bytes of a gzipped FileDescriptorProto + // 13477 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x7d, 0x7b, 0x98, 0x24, 0x59, 0x55, 0x67, 0x67, 0x44, 0x66, 0x56, 0xd5, 0xad, 0x47, 0xe7, 0x04, 0x3d, 0x3d, 0xc5, 0x9d, 0x99, 0x66, 0xa8, 0x79, 0x3a, 0x33, 0x54, 0xcf, 0xf4, 0x80, 0x30, 0xef, 0xc9, 0xca, 0xcc, 0xaa,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, 0xe7, 0x3b, 0x7b, 0xca, 0x4f, 0x88, - 0x46, 0x7c, 0x49, 0x68, 0x9d, 0x2e, 0x40, 0x30, 0x9e, 0x66, 0x3c, 0x9a, 0x70, 0x7b, 0x0c, 0xc7, - 0x6c, 0x6b, 0xee, 0x55, 0x12, 0x98, 0x68, 0xea, 0xbb, 0xe8, 0xa5, 0xa6, 0x81, 0x6c, 0x65, 0x0c, - 0xc8, 0x4b, 0xab, 0xcd, 0xc2, 0x31, 0xfc, 0xa7, 0x52, 0x6a, 0x16, 0x32, 0xe4, 0x4f, 0x05, 0x17, - 0x80, 0xff, 0x14, 0x9b, 0x05, 0x19, 0xff, 0x59, 0xad, 0x34, 0x0b, 0x59, 0xfc, 0xa7, 0x56, 0x69, - 0x16, 0x72, 0xf8, 0xcf, 0xda, 0x4a, 0xb3, 0x90, 0xc7, 0x7f, 0xaa, 0x8d, 0x66, 0x61, 0x0c, 0xff, - 0x59, 0x68, 0x34, 0x0b, 0xe3, 0xf8, 0xcf, 0xb9, 0x46, 0xb3, 0x30, 0x81, 0xff, 0x94, 0x9a, 0xcd, - 0x02, 0xc0, 0x7f, 0x1e, 0x6e, 0x34, 0x0b, 0x93, 0xf8, 0x4f, 0xb1, 0xd4, 0x2c, 0x4c, 0x91, 0x3f, - 0x95, 0x66, 0x61, 0x1a, 0xff, 0x69, 0x34, 0x9a, 0x85, 0x19, 0x42, 0xb9, 0xd1, 0x2c, 0x1c, 0x27, - 0x65, 0x55, 0x9b, 0x85, 0x02, 0xfe, 0xb3, 0xdc, 0x68, 0x16, 0xae, 0x20, 0x1f, 0x37, 0x9a, 0x05, - 0x85, 0x14, 0xda, 0x68, 0x16, 0x9e, 0x45, 0xbe, 0x69, 0x34, 0x0b, 0x27, 0x48, 0x11, 0x8d, 0x66, - 0xe1, 0x4a, 0xc2, 0x46, 0xa5, 0x59, 0x38, 0x49, 0xbe, 0x51, 0x9b, 0x85, 0xab, 0xc8, 0xab, 0x5a, - 0xb3, 0x30, 0x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, 0x51, 0x48, 0x60, + 0xe1, 0x3d, 0x0c, 0x0a, 0x3f, 0xfa, 0xb3, 0x19, 0x6f, 0x52, 0xf2, 0x58, 0x16, 0x64, 0xeb, 0x5d, + 0x64, 0xc0, 0xf7, 0x66, 0xb8, 0x2e, 0xb8, 0x65, 0x1a, 0x0e, 0xba, 0x14, 0x30, 0x60, 0x78, 0x09, + 0x91, 0x33, 0x85, 0x59, 0x30, 0xe6, 0x58, 0x14, 0x32, 0xe6, 0x91, 0xcb, 0x1e, 0x95, 0x1a, 0x98, + 0xd3, 0x8d, 0x56, 0x67, 0xaf, 0x8d, 0x54, 0xd4, 0xd1, 0x30, 0xef, 0x76, 0xd1, 0x2e, 0xa3, 0x2e, + 0x32, 0xda, 0xc8, 0x70, 0x28, 0x37, 0xae, 0x9b, 0x83, 0xc0, 0x97, 0x78, 0xae, 0xea, 0xc3, 0x7f, + 0x3f, 0x0f, 0xff, 0xcd, 0xfd, 0x56, 0x05, 0xb8, 0x96, 0x21, 0xc8, 0xdf, 0x0d, 0x00, 0xad, 0xc1, + 0x39, 0x1d, 0x5d, 0x64, 0x13, 0xd0, 0x67, 0xf6, 0x4c, 0x40, 0xeb, 0xde, 0x07, 0x6a, 0xe0, 0x63, + 0xf8, 0x1b, 0x1e, 0xe4, 0x0f, 0x71, 0x90, 0xdf, 0x2e, 0xc8, 0x42, 0x3c, 0xb4, 0xff, 0xdd, 0x10, + 0x56, 0x81, 0x69, 0x30, 0x51, 0xab, 0x37, 0x37, 0x16, 0x89, 0x3f, 0xaf, 0xac, 0x3c, 0x13, 0x5c, + 0xe9, 0x6e, 0xd4, 0xd4, 0x2a, 0x95, 0x72, 0x63, 0x63, 0x7d, 0x6d, 0x49, 0x2d, 0x96, 0x2b, 0x05, + 0x00, 0x3f, 0x26, 0x81, 0x1c, 0xf1, 0xc7, 0x81, 0xa5, 0x04, 0x74, 0x21, 0x86, 0x97, 0x2c, 0x13, + 0x0f, 0x29, 0xfb, 0x50, 0x5e, 0x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xae, 0xdc, 0x23, 0xe1, 0xcf, 0x2b, 0x97, 0x74, 0xdb, 0xd1, 0x8d, 0x6d, 0x37, 0x70, 0x0c, 0xed, 0x9f, 0xfa, 0xbf, 0x54, 0xee, 0x65, 0xae, 0xc9, 0x80, 0xb4, 0xf6, 0x9b, 0x45, 0x44, 0xec, 0xbb, 0x27, 0xdf, 0x0b, 0xb2, 0xbb, 0xb8, 0xab, 0x98, 0x14, 0xce, 0xbc, 0x4a, 0xfa, 0x07, 0x9c, 0x09, 0x8f, 0xc1, 0x86, 0xb9, @@ -53081,501 +53089,502 @@ var fileDescriptor_8261c968b2e6f45c = []byte{ 0xdb, 0x96, 0x16, 0x70, 0xc8, 0x0c, 0x26, 0xc1, 0x9b, 0xc0, 0x54, 0xb0, 0x45, 0xe1, 0x3e, 0x5b, 0xeb, 0xea, 0x67, 0x3d, 0x4b, 0x36, 0x7b, 0x82, 0x37, 0x80, 0x19, 0x5e, 0x81, 0x03, 0x43, 0x95, 0xec, 0xf6, 0xa4, 0xf0, 0x7a, 0x70, 0xbc, 0xa7, 0x15, 0xb9, 0xc7, 0x06, 0x33, 0xfe, 0xb1, 0xc1, - 0xeb, 0x00, 0xf0, 0x55, 0xb6, 0x2f, 0x99, 0xe7, 0x80, 0x09, 0x4f, 0x09, 0xfb, 0x7e, 0xb0, 0x00, + 0xeb, 0x00, 0xf0, 0x55, 0xb6, 0x2f, 0x99, 0x67, 0x81, 0x09, 0x4f, 0x09, 0xfb, 0x7e, 0xb0, 0x00, 0xc6, 0x5d, 0xc5, 0xea, 0xf7, 0x1e, 0x8f, 0x4e, 0x46, 0xc0, 0x8e, 0xc7, 0x66, 0xde, 0x5c, 0x1a, - 0x7c, 0x93, 0x04, 0x26, 0x3c, 0x8d, 0xea, 0x4b, 0xa5, 0xc2, 0xa0, 0x19, 0x18, 0x56, 0xf7, 0xa0, - 0x86, 0x06, 0x41, 0x7a, 0x11, 0xb8, 0x6a, 0xcf, 0x46, 0x8b, 0xba, 0x65,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x90, 0x9f, 0x23, 0x8e, 0x96, 0xfc, 0xf2, 0x7c, 0xa0, 0x9b, 0x7c, 0x4c, - 0x06, 0x05, 0xff, 0xd2, 0x35, 0x16, 0x78, 0xbd, 0xce, 0xbb, 0xd4, 0x75, 0xe9, 0x4e, 0x94, 0xef, - 0x52, 0xe7, 0x26, 0x28, 0x37, 0x81, 0x99, 0xd6, 0x0e, 0x6a, 0x5d, 0xa8, 0x1a, 0xee, 0x16, 0x38, - 0x45, 0xb8, 0x27, 0x95, 0x6f, 0x78, 0x67, 0x79, 0x48, 0x79, 0x23, 0x09, 0x27, 0xb7, 0x20, 0x53, - 0x21, 0xed, 0xce, 0x07, 0xa6, 0xc6, 0x01, 0x73, 0xcf, 0x50, 0x54, 0x47, 0x72, 0xd3, 0x70, 0x7d, - 0xad, 0x59, 0xad, 0xd7, 0x36, 0xd6, 0x1b, 0x95, 0xf2, 0xc6, 0x82, 0xdb, 0xf8, 0x1a, 0x05, 0x19, - 0xfe, 0x85, 0x04, 0xc6, 0x28, 0x5b, 0x76, 0xcf, 0xa5, 0x68, 0xc1, 0x00, 0x36, 0x99, 0x03, 0x01, - 0x6c, 0xe0, 0x07, 0x84, 0x4f, 0x27, 0x7b, 0x82, 0x60, 0xe5, 0x84, 0xb4, 0x94, 0x17, 0x81, 0x31, - 0x0a, 0xb2, 0xeb, 0x19, 0x73, 0x2a, 0xa4, 0x9d, 0x30, 0x32, 0xaa, 0xfb, 0xb9, 0xe0, 0x49, 0xe5, - 0x01, 0x6c, 0x8c, 0xe0, 0x62, 0xdd, 0x49, 0x30, 0xb6, 0xac, 0xdb, 0x8e, 0x69, 0x5d, 0x86, 0xef, - 0xc8, 0x80, 0xb1, 0x73, 0xc8, 0xb2, 0x75, 0xd3, 0x38, 0xb0, 0x89, 0x7d, 0x1d, 0x98, 0xec, 0x5a, - 0x68, 0x5f, 0x37, 0xf7, 0x6c, 0xdf, 0xf0, 0x12, 0x4c, 0x52, 0x20, 0x18, 0xd7, 0xf6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xee, 0x3c, 0x64, 0x00, 0x7b, 0xe9, 0x77, 0x27, 0xef, 0xcd, 0x82, 0x59, - 0xcc, 0x08, 0xf5, 0x4e, 0xe7, 0xef, 0x1d, 0x81, 0xbf, 0x91, 0xc8, 0x74, 0xb3, 0xcf, 0x18, 0x21, - 0xf7, 0x1d, 0x23, 0x0e, 0x1c, 0x6c, 0xcb, 0x0e, 0x38, 0xd8, 0x96, 0x8b, 0x67, 0xec, 0xfb, 0x85, - 0xa0, 0xfe, 0xac, 0xf1, 0xfa, 0x73, 0x4f, 0x08, 0x40, 0xfd, 0xe4, 0x92, 0xc8, 0x94, 0xe4, 0x43, - 0x9e, 0xa6, 0x34, 0x38, 0x4d, 0x79, 0x70, 0x78, 0x46, 0xd2, 0xd7, 0x96, 0x9f, 0xcf, 0x82, 0x67, - 0xf9, 0xcc, 0xd4, 0xd0, 0x45, 0xa6, 0x28, 0x5f, 0x48, 0x44, 0x51, 0xee, 0xf4, 0xef, 0x1d, 0x1f, - 0xb0, 0xfc, 0x77, 0xbf, 0x4b, 0x5b, 0x63, 0x7e, 0x53, 0xf8, 0x4c, 0x45, 0x2f, 0x50, 0x9e, 0x6c, - 0x42, 0x94, 0xe5, 0x24, 0xc8, 0xd3, 0x1e, 0xc6, 0x8d, 0x2e, 0x4e, 0x9f, 0x62, 0x76, 0x37, 0x62, - 0x27, 0x31, 0x44, 0x79, 0x1b, 0x81, 0xfe, 0x30, 0x53, 0x44, 0x73, 0xcf, 0x32, 0xaa, 0x86, 0x63, - 0xc2, 0xff, 0x92, 0x88, 0xe2, 0x78, 0x7e, 0x69, 0xf2, 0x30, 0x7e, 0x69, 0x43, 0x19, 0x26, 0xdc, - 0x1a, 0x1c, 0x89, 0x61, 0x22, 0xa4, 0xf0, 0x11, 0x44, 0xd4, 0x90, 0xc1, 0x49, 0xb6, 0x3e, 0x5a, - 0xe0, 0x27, 0x75, 0x3d, 0x57, 0x69, 0x0e, 0x09, 0xe4, 0x09, 0x77, 0x66, 0x43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x9d, 0xe4, 0xa6, 0x87, 0x43, 0xa2, - 0x73, 0x34, 0x53, 0xc4, 0x4f, 0xb2, 0xf0, 0x57, 0x6c, 0xc6, 0x03, 0xff, 0x73, 0x12, 0xe0, 0xdc, - 0x33, 0xcc, 0x36, 0x19, 0xdd, 0x24, 0x8b, 0x71, 0x25, 0xd4, 0x01, 0x09, 0x62, 0x2a, 0x23, 0xbc, - 0x2c, 0x4d, 0xa4, 0xfc, 0xf4, 0x01, 0xfc, 0x01, 0x19, 0xcc, 0x90, 0x7d, 0xae, 0x0e, 0xd2, 0x2c, - 0xda, 0x51, 0x26, 0xe2, 0x9f, 0xf9, 0x61, 0xe1, 0x7b, 0x1e, 0x78, 0x39, 0xf8, 0x7c, 0x24, 0x02, - 0xc5, 0xfb, 0x84, 0xae, 0x76, 0x10, 0x64, 0x61, 0x24, 0xa6, 0xc0, 0x82, 0xc7, 0x02, 0x53, 0xf1, - 0x64, 0xf0, 0x88, 0xe9, 0x08, 0xc6, 0x0b, 0xc3, 0x6d, 0x6c, 0x23, 0x76, 0x04, 0x13, 0x61, 0x62, - 0x04, 0xb7, 0x09, 0xdc, 0xc1, 0x4c, 0x81, 0x4d, 0x72, 0x63, 0xda, 0x13, 0x59, 0xef, 0x20, 0xc5, - 0xef, 0x24, 0xe2, 0xf8, 0x73, 0x88, 0x40, 0xa0, 0x0a, 0xc8, 0x5a, 0xe6, 0x45, 0x6a, 0x96, 0x9a, - 0x56, 0xc9, 0x7f, 0x32, 0xe5, 0xa7, 0x77, 0xfc, 0x93, 0xb9, 0xe3, 0xb4, 0xea, 0x3e, 0x2a, 0x37, - 0x80, 0xe9, 0x8b, 0xba, 0xb3, 0xb3, 0x8c, 0xb4, 0x36, 0xb2, 0x54, 0xf3, 0x22, 0x71, 0xd4, 0x18, - 0x57, 0xf9, 0x44, 0x7e, 0x0f, 0x56, 0x60, 0x7e, 0x49, 0xae, 0x51, 0x1b, 0xc9, 0xa9, 0x8b, 0x38, - 0x33, 0xcf, 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 0x10, 0x1c, 0x7a, 0x32, 0x96, 0xe0, - 0xc9, 0xc5, 0x61, 0x26, 0x63, 0x47, 0x74, 0x7a, 0xf1, 0x55, 0x5e, 0x2b, 0x4a, 0x12, 0x83, 0x43, - 0x34, 0x85, 0x04, 0x61, 0x18, 0xb2, 0x29, 0x1c, 0x11, 0x12, 0x7f, 0x2a, 0x03, 0x40, 0x19, 0x58, - 0x35, 0xf7, 0x11, 0x7c, 0x6b, 0x22, 0x0b, 0xdf, 0x5e, 0xd7, 0x50, 0x79, 0x80, 0x6b, 0x68, 0xcc, - 0xc8, 0x01, 0x71, 0x2d, 0x81, 0x01, 0x29, 0xaf, 0x86, 0x5e, 0x05, 0x9b, 0xa2, 0x25, 0x30, 0xba, - 0xfc, 0xf4, 0x31, 0xfe, 0x22, 0x9d, 0xcd, 0xf9, 0xe7, 0x9a, 0xde, 0x98, 0x08, 0xca, 0x81, 0xd5, - 0xbf, 0xcc, 0xaf, 0xfe, 0x0f, 0x81, 0xed, 0xb0, 0x73, 0xc4, 0x41, 0xe7, 0x95, 0xd2, 0x9f, 0x23, - 0x1e, 0xdd, 0xb9, 0xa4, 0x97, 0x65, 0xc1, 0x71, 0xd6, 0x89, 0xfc, 0x6b, 0x80, 0x38, 0xe6, 0x59, - 0x12, 0xae, 0x93, 0x1c, 0x80, 0x72, 0x52, 0x06, 0xa9, 0x38, 0xa6, 0x4c, 0x01, 0xf6, 0x46, 0x62, - 0xdd, 0xc8, 0x57, 0x2e, 0x75, 0x35, 0xa3, 0x2d, 0x1e, 0x3c, 0x72, 0x00, 0xf0, 0xae, 0xad, 0x51, - 0xe6, 0x6d, 0x8d, 0x7d, 0x2c, 0x93, 0xb1, 0x77, 0xae, 0x89, 0xc8, 0x28, 0xbb, 0x23, 0xdf, 0xb9, - 0x0e, 0x2f, 0x3b, 0x7d, 0x94, 0x9e, 0x92, 0x41, 0xb6, 0x61, 0x5a, 0x0e, 0x7c, 0x75, 0x9c, 0xd6, - 0x49, 0x25, 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, 0x04, 0xc6, 0xd7, - 0x6d, 0x64, 0x95, 0x35, 0x47, 0xc3, 0x0a, 0x92, 0x2d, 0xef, 0xed, 0x76, 0x07, 0xcd, 0xf4, 0xbf, - 0x1e, 0x54, 0x91, 0x07, 0x79, 0x11, 0xf1, 0x7a, 0xef, 0x92, 0x9e, 0xc7, 0x64, 0x43, 0x34, 0xe4, - 0x49, 0x4f, 0x48, 0x0b, 0x9c, 0x90, 0xe6, 0x85, 0x29, 0xa5, 0x2e, 0xa6, 0xb9, 0x31, 0x90, 0xab, - 0xec, 0x76, 0x9d, 0xcb, 0x73, 0x37, 0x82, 0xe9, 0x86, 0x63, 0x21, 0x6d, 0x37, 0x30, 0x72, 0x3b, - 0xe6, 0x05, 0x64, 0x30, 0x01, 0xd1, 0x87, 0x7b, 0xee, 0x06, 0x63, 0x86, 0xb9, 0xa1, 0xed, 0x39, - 0x3b, 0xca, 0x73, 0x0e, 0x04, 0x59, 0x5d, 0xa5, 0x5d, 0x61, 0x9d, 0xcd, 0x03, 0xff, 0xf4, 0x3e, - 0xb2, 0xd6, 0xcf, 0x1b, 0x66, 0x71, 0xcf, 0xd9, 0x59, 0xb8, 0xe6, 0x33, 0x5f, 0x3e, 0x95, 0xf9, - 0xec, 0x97, 0x4f, 0x65, 0xbe, 0xf4, 0xe5, 0x53, 0x99, 0x1f, 0xfa, 0xca, 0xa9, 0x63, 0x9f, 0xfd, - 0xca, 0xa9, 0x63, 0x4f, 0x7f, 0xe5, 0xd4, 0xb1, 0x17, 0x4b, 0xdd, 0xcd, 0xcd, 0x3c, 0xa1, 0x72, - 0xd7, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x60, 0xd5, 0x68, 0x4d, 0x87, 0x73, 0x01, 0x00, + 0xc1, 0x0c, 0xe5, 0xc4, 0x0b, 0x20, 0xf9, 0x4d, 0x89, 0xf6, 0x57, 0x67, 0x45, 0x11, 0x99, 0x03, + 0x53, 0x81, 0x43, 0x84, 0xde, 0x35, 0x43,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xf0, 0x83, 0xa7, + 0xc0, 0xf7, 0xb3, 0xf5, 0x47, 0x83, 0x0b, 0x1b, 0x16, 0xf0, 0xf2, 0xf0, 0xb6, 0x1b, 0xf8, 0x44, + 0xa1, 0x51, 0xe5, 0xf7, 0x63, 0xce, 0x79, 0x99, 0xd7, 0xc6, 0xc0, 0xc1, 0x7d, 0xc8, 0x5e, 0xee, + 0x93, 0x31, 0x26, 0xbf, 0x83, 0x58, 0x89, 0x87, 0xda, 0xca, 0x10, 0x86, 0xa9, 0x59, 0x70, 0x42, + 0xad, 0x14, 0xcb, 0xf5, 0xda, 0xca, 0x23, 0xc1, 0x58, 0xae, 0x05, 0x39, 0xb8, 0x38, 0x49, 0x05, + 0xb6, 0xb7, 0xc4, 0xec, 0x03, 0x79, 0x59, 0x45, 0xad, 0x56, 0xe0, 0xa7, 0x62, 0xf4, 0x6a, 0x02, + 0x64, 0x8f, 0x12, 0x85, 0x2f, 0xc8, 0x20, 0x4b, 0x2c, 0xb2, 0x7b, 0x71, 0x31, 0x28, 0x83, 0x6b, + 0xb5, 0x6e, 0x17, 0x19, 0x6d, 0x6f, 0x73, 0x6a, 0xd1, 0x32, 0x77, 0xeb, 0xce, 0x0e, 0xb2, 0xf0, + 0x27, 0x36, 0xdb, 0x61, 0x8b, 0xfe, 0x08, 0x7e, 0x21, 0xa6, 0xd7, 0x15, 0x2f, 0xce, 0x08, 0x23, + 0xf0, 0xdd, 0x07, 0x5b, 0xd7, 0xd5, 0x21, 0xad, 0x6b, 0x45, 0x37, 0x2e, 0x04, 0x5b, 0xd8, 0x6f, + 0xc4, 0x70, 0xd8, 0x1a, 0xc8, 0xcf, 0x11, 0x47, 0x4b, 0x7e, 0x69, 0x3e, 0xd0, 0x4d, 0x3e, 0x26, + 0x83, 0x82, 0x7f, 0xe9, 0x1a, 0x0b, 0xbc, 0x5e, 0xe7, 0x5d, 0xea, 0xba, 0x74, 0x27, 0xca, 0x77, + 0xa9, 0x73, 0x13, 0x94, 0x9b, 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8d, 0x0c, 0xf2, 0xec, 0x86, 0xc8, 0xf5, 0x54, 0x9c, 0x19, + 0xf8, 0x10, 0x62, 0x02, 0x9b, 0x68, 0xb1, 0xaf, 0x4f, 0x4c, 0x6f, 0xfb, 0xec, 0x68, 0xee, 0x47, + 0x84, 0x8f, 0xcb, 0xcc, 0xd6, 0xb2, 0xa2, 0x39, 0xe8, 0x12, 0xfc, 0x41, 0x19, 0x8c, 0x35, 0x90, + 0x83, 0x7b, 0x26, 0x71, 0x8c, 0xc2, 0xad, 0xe8, 0x4a, 0x60, 0x35, 0x37, 0x41, 0xd7, 0x67, 0x71, + 0xfb, 0x38, 0xc2, 0xd7, 0x3c, 0xe3, 0x69, 0xd4, 0x7d, 0x5c, 0x54, 0xe1, 0x23, 0x38, 0x81, 0x7d, + 0x03, 0x98, 0x20, 0x6c, 0x10, 0x38, 0x3e, 0x15, 0x80, 0xe6, 0xc7, 0x33, 0xa9, 0x60, 0x83, 0x87, + 0x2f, 0x72, 0x9f, 0x1d, 0xbb, 0x91, 0xf1, 0x66, 0xb1, 0x85, 0x9b, 0xad, 0xd2, 0x5c, 0x31, 0x2e, + 0x34, 0xf7, 0xaa, 0x95, 0x28, 0xb2, 0x62, 0x97, 0x92, 0x0e, 0x2a, 0x3b, 0x7d, 0x60, 0x5f, 0x25, + 0x83, 0xf1, 0x06, 0x5e, 0x6e, 0xe0, 0x31, 0xe5, 0xfc, 0xe1, 0xa1, 0xec, 0x3f, 0x58, 0xc5, 0x6c, + 0x68, 0xae, 0x44, 0x92, 0x1b, 0xa2, 0x62, 0x34, 0xb4, 0xa8, 0xc2, 0x47, 0x10, 0x81, 0x99, 0xe2, + 0x41, 0x74, 0x19, 0xbe, 0x5d, 0x06, 0xf2, 0x12, 0x72, 0x12, 0x3a, 0x85, 0x22, 0x7a, 0xa2, 0x81, + 0x1f, 0xba, 0x22, 0xc3, 0x17, 0x70, 0x02, 0x23, 0x3c, 0xcf, 0x2f, 0xa1, 0x64, 0x1a, 0x90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xf9, 0x42, 0x2f, 0xb2, + 0xf8, 0x91, 0x38, 0xcc, 0x4f, 0xa9, 0xe6, 0xc5, 0x06, 0x72, 0x68, 0x8b, 0x10, 0xbf, 0xe1, 0x78, + 0x80, 0x6f, 0x9f, 0x6e, 0x53, 0x82, 0x6c, 0x1d, 0xee, 0x3d, 0xc7, 0xb8, 0x61, 0x97, 0x17, 0x90, + 0xc7, 0xe2, 0x08, 0x6f, 0xd8, 0x15, 0xe3, 0x20, 0x7d, 0x94, 0xbe, 0x5f, 0x06, 0x93, 0xaa, 0x79, + 0x11, 0x0f, 0x0d, 0x8b, 0x7a, 0xa7, 0x93, 0xcc, 0x08, 0x19, 0x77, 0xf2, 0xef, 0x8a, 0xc1, 0xe5, + 0x62, 0xe4, 0x93, 0xff, 0x01, 0x0c, 0xa4, 0x0f, 0xc3, 0x2b, 0x68, 0x63, 0x71, 0x47, 0x68, 0x23, + 0x19, 0x1c, 0x86, 0x6d, 0x10, 0x1e, 0x1b, 0x47, 0xd6, 0x20, 0xc2, 0x38, 0x18, 0xc9, 0xce, 0xc9, + 0x4c, 0x89, 0x0c, 0xf3, 0xc9, 0xb6, 0x89, 0xa7, 0xe2, 0xb9, 0xd7, 0xb0, 0x61, 0x97, 0x63, 0x24, + 0x11, 0x34, 0x62, 0xb8, 0xd1, 0x08, 0xf0, 0x90, 0x3e, 0x1e, 0xbf, 0x22, 0x83, 0x29, 0xca, 0xc2, + 0xd3, 0x64, 0x16, 0x30, 0x54, 0xa3, 0x0a, 0xd6, 0xe0, 0x68, 0x1a, 0x55, 0x04, 0x07, 0xe9, 0x83, + 0xf8, 0xaf, 0x12, 0x99, 0xc7, 0x0d, 0x71, 0x6a, 0x31, 0x0c, 0xc1, 0xa1, 0x27, 0x63, 0x09, 0x9e, + 0x5c, 0x1c, 0x66, 0x32, 0x76, 0x44, 0xa7, 0x17, 0x5f, 0xe1, 0xb5, 0xa2, 0x24, 0x31, 0x38, 0x44, + 0x53, 0x48, 0x10, 0x86, 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, 0x01, + 0x57, 0xff, 0x33, 0xbe, 0xfe, 0xc3, 0x6f, 0x65, 0x44, 0x47, 0x0a, 0x56, 0x3f, 0x9e, 0x7c, 0x48, + 0xf4, 0x2b, 0xb1, 0xbe, 0x5f, 0x84, 0xe2, 0x48, 0x8e, 0x01, 0x14, 0x2a, 0x97, 0xba, 0xa6, 0xe5, + 0xac, 0x98, 0x2d, 0xad, 0x63, 0x3b, 0xa6, 0x85, 0x60, 0x3d, 0x52, 0x6a, 0xb8, 0x87, 0x69, 0x9b, + 0x2d, 0x7f, 0x00, 0x60, 0x4f, 0x41, 0xb5, 0x93, 0x79, 0x1d, 0xff, 0x84, 0xf0, 0x36, 0x1a, 0x95, + 0x4a, 0x2f, 0x47, 0x21, 0x7a, 0xde, 0xaf, 0x4b, 0x8b, 0x77, 0x72, 0x43, 0x6c, 0x6b, 0x4d, 0x88, + 0xa9, 0x11, 0x98, 0x83, 0x25, 0x30, 0xdd, 0xd8, 0xdb, 0xf4, 0x88, 0xd8, 0x70, 0xc2, 0x03, 0x8a, + 0x0f, 0xa6, 0x1c, 0x19, 0x61, 0x83, 0x29, 0x5e, 0x90, 0x50, 0x88, 0x7c, 0x6f, 0x00, 0xd3, 0x76, + 0xf0, 0x33, 0x86, 0x37, 0x9f, 0x28, 0x18, 0x59, 0x63, 0x70, 0xa9, 0xe9, 0x0b, 0xf0, 0x43, 0x12, + 0x98, 0xae, 0x77, 0x91, 0x81, 0xda, 0xd4, 0xcd, 0x8f, 0x13, 0xe0, 0xe3, 0x31, 0x05, 0xc8, 0x11, + 0x0a, 0x11, 0xa0, 0xef, 0x92, 0x5b, 0x76, 0x85, 0xe7, 0x27, 0xc4, 0x12, 0x5c, 0x54, 0x69, 0x23, + 0xb8, 0xc6, 0x41, 0x02, 0xd9, 0x35, 0xdd, 0xd8, 0x0e, 0x06, 0x87, 0x39, 0x81, 0x87, 0x92, 0x36, + 0xba, 0x44, 0x98, 0xce, 0xa9, 0xf4, 0x41, 0x39, 0x03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, 0x7f, 0x2d, 0xa8, 0x22, 0x0f, 0xf2, 0x22, 0xe2, 0xf5, 0xde, 0x25, + 0x3d, 0x8f, 0xc9, 0x86, 0x68, 0xc8, 0x93, 0x9e, 0x90, 0x16, 0x38, 0x21, 0xcd, 0x0b, 0x53, 0x4a, + 0x5d, 0x4c, 0x73, 0x63, 0x20, 0x57, 0xd9, 0xed, 0x3a, 0x97, 0xe7, 0x6e, 0x04, 0xd3, 0x0d, 0xc7, + 0x42, 0xda, 0x6e, 0x60, 0xe4, 0x76, 0xcc, 0x0b, 0xc8, 0x60, 0x02, 0xa2, 0x0f, 0xf7, 0xdc, 0x0d, + 0xc6, 0x0c, 0x73, 0x43, 0xdb, 0x73, 0x76, 0x94, 0x67, 0x1d, 0x08, 0xbf, 0xba, 0x4a, 0xbb, 0xc2, + 0x3a, 0x9b, 0x07, 0xfe, 0xf9, 0x7d, 0xc4, 0x0a, 0x90, 0x37, 0xcc, 0xe2, 0x9e, 0xb3, 0xb3, 0x70, + 0xcd, 0xa7, 0xbe, 0x74, 0x2a, 0xf3, 0xe9, 0x2f, 0x9d, 0xca, 0x7c, 0xf1, 0x4b, 0xa7, 0x32, 0x3f, + 0xf2, 0xe5, 0x53, 0xc7, 0x3e, 0xfd, 0xe5, 0x53, 0xc7, 0x3e, 0xff, 0xe5, 0x53, 0xc7, 0x5e, 0x28, + 0x75, 0x37, 0x37, 0xf3, 0x84, 0xca, 0x5d, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x94, 0x35, + 0x08, 0xa1, 0x73, 0x01, 0x00, } func (m *Rpc) Marshal() (dAtA []byte, err error) { @@ -85515,6 +85524,13 @@ func (m *RpcDebugSpaceSummaryRequest) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintCommands(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -100576,6 +100592,10 @@ func (m *RpcDebugSpaceSummaryRequest) Size() (n int) { } var l int _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovCommands(uint64(l)) + } return n } @@ -187996,6 +188016,38 @@ func (m *RpcDebugSpaceSummaryRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommands + } + 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 ErrInvalidLengthCommands + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommands + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCommands(dAtA[iNdEx:]) diff --git a/pb/protos/commands.proto b/pb/protos/commands.proto index 20dd1278c..bedb8c227 100644 --- a/pb/protos/commands.proto +++ b/pb/protos/commands.proto @@ -5376,6 +5376,7 @@ message Rpc { message SpaceSummary { message Request { + string spaceId = 1; } message Response { diff --git a/pkg/lib/bundle/init.go b/pkg/lib/bundle/init.go index 068c46047..f908d33a5 100644 --- a/pkg/lib/bundle/init.go +++ b/pkg/lib/bundle/init.go @@ -34,6 +34,7 @@ var DefaultObjectTypePerSmartblockType = map[coresb.SmartBlockType]domain.TypeKe coresb.SmartBlockTypeWidget: TypeKeyDashboard, coresb.SmartBlockTypeObjectType: TypeKeyObjectType, coresb.SmartBlockTypeRelation: TypeKeyRelation, + coresb.SmartBlockTypeSpaceView: TypeKeySpace, } // filled in init diff --git a/pkg/lib/bundle/internalTypes.gen.go b/pkg/lib/bundle/internalTypes.gen.go index 5e56175d3..958c7debf 100644 --- a/pkg/lib/bundle/internalTypes.gen.go +++ b/pkg/lib/bundle/internalTypes.gen.go @@ -6,7 +6,7 @@ package bundle import domain "github.com/anyproto/anytype-heart/core/domain" -const InternalTypesChecksum = "d80636e9d0d0b6e96ecd0bd7e1dd8279298778ed077fe748c4c129de6a9128f1" +const InternalTypesChecksum = "b0fbeea13d9302f7eab0e488b6d9baa75dbd331fa7e42b0521687fe969ef0788" // InternalTypes contains the list of types that are not possible to create directly via ObjectCreate // to create as a general object because they have specific logic @@ -16,6 +16,7 @@ var InternalTypes = []domain.TypeKey{ TypeKeyVideo, TypeKeyAudio, TypeKeySpace, + TypeKeySpaceView, TypeKeyDashboard, TypeKeyObjectType, TypeKeyRelation, diff --git a/pkg/lib/bundle/internalTypes.json b/pkg/lib/bundle/internalTypes.json index 36d22b184..d39bf496d 100644 --- a/pkg/lib/bundle/internalTypes.json +++ b/pkg/lib/bundle/internalTypes.json @@ -4,6 +4,7 @@ "video", "audio", "space", + "spaceView", "dashboard", "objectType", "relation", diff --git a/pkg/lib/bundle/layout.gen.go b/pkg/lib/bundle/layout.gen.go index e1b1850d6..c22ddfe67 100644 --- a/pkg/lib/bundle/layout.gen.go +++ b/pkg/lib/bundle/layout.gen.go @@ -6,7 +6,7 @@ package bundle import "github.com/anyproto/anytype-heart/pkg/lib/pb/model" -const LayoutChecksum = "b68551da17a246d49e1ec23433d7879a5cdeacad7ca3dba0a7eccda3e13ef4eb" +const LayoutChecksum = "d0f1feb0705e9d74789a25e3c41b0c4682a79ecac2145a48606e8a26b8c688fc" var ( Layouts = map[model.ObjectTypeLayout]model.Layout{ @@ -87,6 +87,11 @@ var ( Id: model.ObjectType_space, Name: "Space", }, + model.ObjectType_spaceView: { + + Id: model.ObjectType_spaceView, + Name: "Space View", + }, model.ObjectType_todo: { Id: model.ObjectType_todo, diff --git a/pkg/lib/bundle/layouts.json b/pkg/lib/bundle/layouts.json index 3b024dba9..a6a614b9d 100644 --- a/pkg/lib/bundle/layouts.json +++ b/pkg/lib/bundle/layouts.json @@ -50,6 +50,10 @@ "id": "space", "name": "Space" }, + { + "id": "spaceView", + "name": "Space View" + }, { "id": "image", "name": "Image", diff --git a/pkg/lib/bundle/relation.gen.go b/pkg/lib/bundle/relation.gen.go index 16eeb1d98..4e997deaf 100644 --- a/pkg/lib/bundle/relation.gen.go +++ b/pkg/lib/bundle/relation.gen.go @@ -9,7 +9,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/pb/model" ) -const RelationChecksum = "64b5e02c065cf350c881ecfa4f21c79594cf8e57eab960fda66b535d074f9d52" +const RelationChecksum = "b392af31cb9650cb80628467d57f6f993059adfb2e6119a51cad18c68af79ca0" const ( RelationKeyTag domain.RelationKey = "tag" RelationKeyCamera domain.RelationKey = "camera" @@ -156,6 +156,8 @@ const ( RelationKeyUniqueKey domain.RelationKey = "uniqueKey" RelationKeyBacklinks domain.RelationKey = "backlinks" RelationKeyIsUninstalled domain.RelationKey = "isUninstalled" + RelationKeySpaceLocalStatus domain.RelationKey = "spaceLocalStatus" + RelationKeySpaceRemoteStatus domain.RelationKey = "spaceRemoteStatus" ) var ( @@ -1811,6 +1813,34 @@ var ( ReadOnlyRelation: true, Scope: model.Relation_type, }, + RelationKeySpaceLocalStatus: { + + DataSource: model.Relation_derived, + Description: "Relation that indicates the local status of space. Possible values: models.SpaceStatus", + Format: model.RelationFormat_number, + Hidden: true, + Id: "_brspaceLocalStatus", + Key: "spaceLocalStatus", + MaxCount: 1, + Name: "Space local status", + ReadOnly: true, + ReadOnlyRelation: true, + Scope: model.Relation_type, + }, + RelationKeySpaceRemoteStatus: { + + DataSource: model.Relation_derived, + Description: "Relation that indicates the remote status of space. Possible values: models.SpaceStatus", + Format: model.RelationFormat_number, + Hidden: true, + Id: "_brspaceRemoteStatus", + Key: "spaceRemoteStatus", + MaxCount: 1, + Name: "Space remote status", + ReadOnly: true, + ReadOnlyRelation: true, + Scope: model.Relation_type, + }, RelationKeyStakeholders: { DataSource: model.Relation_details, diff --git a/pkg/lib/bundle/relations.json b/pkg/lib/bundle/relations.json index 730a0a8f0..431fdcdc5 100644 --- a/pkg/lib/bundle/relations.json +++ b/pkg/lib/bundle/relations.json @@ -1442,5 +1442,25 @@ "name": "Is uninstalled", "readonly": true, "source": "details" + }, + { + "description": "Relation that indicates the local status of space. Possible values: models.SpaceStatus", + "format": "number", + "hidden": true, + "key": "spaceLocalStatus", + "maxCount": 1, + "name": "Space local status", + "readonly": true, + "source": "derived" + }, + { + "description": "Relation that indicates the remote status of space. Possible values: models.SpaceStatus", + "format": "number", + "hidden": true, + "key": "spaceRemoteStatus", + "maxCount": 1, + "name": "Space remote status", + "readonly": true, + "source": "derived" } ] diff --git a/pkg/lib/bundle/systemTypes.gen.go b/pkg/lib/bundle/systemTypes.gen.go index 6698f8fa9..b12cd8109 100644 --- a/pkg/lib/bundle/systemTypes.gen.go +++ b/pkg/lib/bundle/systemTypes.gen.go @@ -6,7 +6,7 @@ package bundle import domain "github.com/anyproto/anytype-heart/core/domain" -const SystemTypesChecksum = "1db8347b19281b4f7831f6d7ffe89dab23f37b09ad143208b7e0e34eb4402ac1" +const SystemTypesChecksum = "4855568ff0cdde0fbd2e8cc227a2a0ec4b87f97472f51f6676237740d56b3cf9" // SystemTypes contains types that have some special biz logic depends on them in some objects // they shouldn't be removed or edited in any way diff --git a/pkg/lib/bundle/systemTypes.json b/pkg/lib/bundle/systemTypes.json index e3ec7563a..4751bf8f1 100644 --- a/pkg/lib/bundle/systemTypes.json +++ b/pkg/lib/bundle/systemTypes.json @@ -4,6 +4,7 @@ "video", "audio", "space", + "spaceView", "dashboard", "objectType", "relation", @@ -15,6 +16,7 @@ "task", "collection", "set", + "space", "profile", "bookmark" ] \ No newline at end of file diff --git a/pkg/lib/bundle/types.gen.go b/pkg/lib/bundle/types.gen.go index 6df3fad89..99b24485c 100644 --- a/pkg/lib/bundle/types.gen.go +++ b/pkg/lib/bundle/types.gen.go @@ -9,7 +9,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/pb/model" ) -const TypeChecksum = "8028c5cd83c93e95f8c9797c0c46a3a71e0f57e3540e0b5f156eb62bbc155e64" +const TypeChecksum = "0b6ddb10a9e90cac620ea5490051c69dd77330c18f4067adf38dded3214692a9" const ( TypePrefix = "_ot" ) @@ -31,6 +31,7 @@ const ( TypeKeyObjectType domain.TypeKey = "objectType" TypeKeyRelationOption domain.TypeKey = "relationOption" TypeKeySpace domain.TypeKey = "space" + TypeKeySpaceView domain.TypeKey = "spaceView" TypeKeyTemplate domain.TypeKey = "template" TypeKeySet domain.TypeKey = "set" TypeKeyCollection domain.TypeKey = "collection" @@ -350,7 +351,7 @@ var ( }, TypeKeySpace: { - Description: "Space for sharing", + Description: "Workspace", Hidden: true, IconEmoji: "🌎", Layout: model.ObjectType_space, @@ -360,6 +361,18 @@ var ( Types: []model.SmartBlockType{model.SmartBlockType_Workspace}, Url: TypePrefix + "space", }, + TypeKeySpaceView: { + + Description: "Space", + Hidden: true, + IconEmoji: "🌎", + Layout: model.ObjectType_spaceView, + Name: "Space", + Readonly: true, + RelationLinks: []*model.RelationLink{MustGetRelationLink(RelationKeyTag)}, + Types: []model.SmartBlockType{model.SmartBlockType_SpaceView}, + Url: TypePrefix + "spaceView", + }, TypeKeyTask: { Description: "A piece of work to be done or undertaken", diff --git a/pkg/lib/bundle/types.json b/pkg/lib/bundle/types.json index cf3594fd1..f3f5b8ceb 100644 --- a/pkg/lib/bundle/types.json +++ b/pkg/lib/bundle/types.json @@ -295,7 +295,21 @@ "relations": [ "tag" ], - "description": "Space for sharing" + "description": "Workspace" + }, + { + "id": "spaceView", + "name": "Space", + "types": [ + "SpaceView" + ], + "emoji": "🌎", + "hidden": true, + "layout": "spaceView", + "relations": [ + "tag" + ], + "description": "Space" }, { "id": "template", diff --git a/pkg/lib/core/core.go b/pkg/lib/core/core.go index ef87e4a73..dd79933eb 100644 --- a/pkg/lib/core/core.go +++ b/pkg/lib/core/core.go @@ -7,25 +7,21 @@ import ( "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/commonfile/fileservice" - "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" "github.com/libp2p/go-libp2p/core/peer" + "go.uber.org/zap" "github.com/anyproto/anytype-heart/core/anytype/config" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/wallet" "github.com/anyproto/anytype-heart/metrics" - "github.com/anyproto/anytype-heart/pkg/lib/bundle" - coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" + "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/threads" - "github.com/anyproto/anytype-heart/space" ) var log = logging.Logger("anytype-core") -var ErrObjectDoesNotBelongToWorkspace = fmt.Errorf("object does not belong to workspace") - const ( CName = "anytype" ) @@ -33,12 +29,6 @@ const ( type Service interface { Stop() error IsStarted() bool - - DerivePredefinedObjects(ctx context.Context, spaceID string, createTrees bool) (predefinedObjectIDs threads.DerivedSmartblockIds, err error) - - DeriveObjectId(ctx context.Context, spaceID string, key domain.UniqueKey) (string, error) - - EnsurePredefinedBlocks(ctx context.Context, spaceID string) (predefinedObjectIDs threads.DerivedSmartblockIds, err error) AccountObjects() threads.DerivedSmartblockIds PredefinedObjects(spaceID string) threads.DerivedSmartblockIds GetSystemTypeID(spaceID string, typeKey domain.TypeKey) string @@ -53,17 +43,18 @@ var _ app.Component = (*Anytype)(nil) var _ Service = (*Anytype)(nil) -type ObjectsDeriver interface { - DeriveTreeCreatePayload(ctx context.Context, spaceID string, key domain.UniqueKey) (treestorage.TreeStorageCreatePayload, error) - DeriveObject(ctx context.Context, spaceID string, payload treestorage.TreeStorageCreatePayload, newAccount bool) (err error) +type personalSpaceIDGetter interface { + PersonalSpaceID() string +} + +type derivedIDsGetter interface { + DerivedIDs(ctx context.Context, spaceID string) (ids threads.DerivedSmartblockIds, err error) } type Anytype struct { - space space.Service - objectStore objectstore.ObjectStore - deriver ObjectsDeriver - - predefinedObjectsPerSpace map[string]threads.DerivedSmartblockIds + derivedIDs derivedIDsGetter + personalGetter personalSpaceIDGetter + objectStore objectstore.ObjectStore migrationOnce sync.Once lock sync.RWMutex @@ -80,8 +71,7 @@ type Anytype struct { func New() *Anytype { return &Anytype{ - shutdownStartsCh: make(chan struct{}), - predefinedObjectsPerSpace: make(map[string]threads.DerivedSmartblockIds), + shutdownStartsCh: make(chan struct{}), } } @@ -90,8 +80,8 @@ func (a *Anytype) Init(ap *app.App) (err error) { a.config = ap.MustComponent(config.CName).(*config.Config) a.objectStore = ap.MustComponent(objectstore.CName).(objectstore.ObjectStore) a.commonFiles = ap.MustComponent(fileservice.CName).(fileservice.FileService) - a.deriver = app.MustComponent[ObjectsDeriver](ap) - a.space = app.MustComponent[space.Service](ap) + a.derivedIDs = app.MustComponent[derivedIDsGetter](ap) + a.personalGetter = app.MustComponent[personalSpaceIDGetter](ap) return } @@ -104,6 +94,7 @@ func (a *Anytype) Run(ctx context.Context) (err error) { return nil } +// TODO: refactor to call tech space func (a *Anytype) IsStarted() bool { a.lock.Lock() defer a.lock.Unlock() @@ -115,27 +106,27 @@ func (a *Anytype) IsStarted() bool { // ⚠️ Will return empty struct in case it runs before Anytype.Start() // TODO Its deprecated func (a *Anytype) AccountObjects() threads.DerivedSmartblockIds { - a.lock.RLock() - defer a.lock.RUnlock() - return a.predefinedObjectsPerSpace[a.space.AccountId()] + return a.PredefinedObjects(a.personalGetter.PersonalSpaceID()) } func (a *Anytype) PredefinedObjects(spaceID string) threads.DerivedSmartblockIds { - a.lock.RLock() - defer a.lock.RUnlock() - return a.predefinedObjectsPerSpace[spaceID] + if spaceID == addr.AnytypeMarketplaceWorkspace { + return threads.DerivedSmartblockIds{} + } + ids, err := a.derivedIDs.DerivedIDs(context.Background(), spaceID) + if err != nil { + log.Error("failed to get account objects", zap.Error(err)) + return threads.DerivedSmartblockIds{} + } + return ids } func (a *Anytype) GetSystemTypeID(spaceID string, typeKey domain.TypeKey) string { - a.lock.RLock() - defer a.lock.RUnlock() - return a.predefinedObjectsPerSpace[spaceID].SystemTypes[typeKey] + return a.PredefinedObjects(spaceID).SystemTypes[typeKey] } func (a *Anytype) GetSystemRelationID(spaceID string, relationKey domain.RelationKey) string { - a.lock.RLock() - defer a.lock.RUnlock() - return a.predefinedObjectsPerSpace[spaceID].SystemRelations[relationKey] + return a.PredefinedObjects(spaceID).SystemRelations[relationKey] } func (a *Anytype) HandlePeerFound(p peer.AddrInfo) { @@ -153,107 +144,6 @@ func (a *Anytype) start() { a.isStarted = true } -func (a *Anytype) DeriveObjectId(ctx context.Context, spaceID string, key domain.UniqueKey) (string, error) { - // todo: cache it or use the objectstore - payload, err := a.deriver.DeriveTreeCreatePayload(ctx, spaceID, key) - if err != nil { - return "", fmt.Errorf("failed to derive tree create payload for space %s and key %s: %w", spaceID, key, err) - } - return payload.RootRawChange.Id, nil -} - -func (a *Anytype) DerivePredefinedObjects(ctx context.Context, spaceID string, createTrees bool) (predefinedObjectIDs threads.DerivedSmartblockIds, err error) { - a.lock.RLock() - // TODO Weak condition - ids, ok := a.predefinedObjectsPerSpace[spaceID] - a.lock.RUnlock() - if ok && ids.IsFilled() { - return ids, nil - } - ids, err = a.derivePredefinedObjects(ctx, spaceID, createTrees) - if err != nil { - return threads.DerivedSmartblockIds{}, err - } - return ids, nil -} - -func (a *Anytype) derivePredefinedObjects(ctx context.Context, spaceID string, createTrees bool) (predefinedObjectIDs threads.DerivedSmartblockIds, err error) { - sbTypes := []coresb.SmartBlockType{ - coresb.SmartBlockTypeWorkspace, - coresb.SmartBlockTypeProfilePage, - coresb.SmartBlockTypeArchive, - coresb.SmartBlockTypeWidget, - coresb.SmartBlockTypeHome, - } - payloads := make([]treestorage.TreeStorageCreatePayload, len(sbTypes)) - predefinedObjectIDs.SystemRelations = make(map[domain.RelationKey]string) - predefinedObjectIDs.SystemTypes = make(map[domain.TypeKey]string) - - for i, sbt := range sbTypes { - a.lock.RLock() - exists := a.predefinedObjectsPerSpace[spaceID].HasID(sbt) - a.lock.RUnlock() - - if exists { - continue - } - // we have only 1 object per sbtype so key is empty (also for the backward compatibility, because before we didn't have a key) - uk, err := domain.NewUniqueKey(sbt, "") - if err != nil { - return predefinedObjectIDs, err - } - payloads[i], err = a.deriver.DeriveTreeCreatePayload(ctx, spaceID, uk) - if err != nil { - log.With("uniqueKey", uk).Errorf("create payload for derived object: %s", err) - return predefinedObjectIDs, fmt.Errorf("derive tree create payload: %w", err) - } - predefinedObjectIDs.InsertId(sbt, payloads[i].RootRawChange.Id) - } - - for _, ot := range bundle.SystemTypes { - uk, err := domain.NewUniqueKey(coresb.SmartBlockTypeObjectType, ot.String()) - if err != nil { - return predefinedObjectIDs, err - } - id, err := a.DeriveObjectId(ctx, spaceID, uk) - if err != nil { - return predefinedObjectIDs, err - } - predefinedObjectIDs.SystemTypes[ot] = id - } - - for _, rk := range bundle.SystemRelations { - uk, err := domain.NewUniqueKey(coresb.SmartBlockTypeRelation, rk.String()) - if err != nil { - return predefinedObjectIDs, err - } - id, err := a.DeriveObjectId(ctx, spaceID, uk) - if err != nil { - return predefinedObjectIDs, err - } - predefinedObjectIDs.SystemRelations[rk] = id - } - - a.lock.Lock() - a.predefinedObjectsPerSpace[spaceID] = predefinedObjectIDs - a.lock.Unlock() - - for _, payload := range payloads { - // todo: move types/relations derivation here - err = a.deriver.DeriveObject(ctx, spaceID, payload, createTrees) - if err != nil { - log.With("id", payload.RootRawChange).Errorf("derive object: %s", err) - return predefinedObjectIDs, fmt.Errorf("derive object: %w", err) - } - } - - return -} - -func (a *Anytype) EnsurePredefinedBlocks(ctx context.Context, spaceID string) (threads.DerivedSmartblockIds, error) { - return a.DerivePredefinedObjects(ctx, spaceID, a.config.NewAccount) -} - func (a *Anytype) Close(ctx context.Context) (err error) { metrics.SharedClient.Close() return a.Stop() diff --git a/pkg/lib/core/mock_core/mock_Service.go b/pkg/lib/core/mock_core/mock_Service.go index c1d4654b8..b2f8891ef 100644 --- a/pkg/lib/core/mock_core/mock_Service.go +++ b/pkg/lib/core/mock_core/mock_Service.go @@ -109,167 +109,6 @@ func (_c *MockService_Close_Call) RunAndReturn(run func(context.Context) error) return _c } -// DeriveObjectId provides a mock function with given fields: ctx, spaceID, key -func (_m *MockService) DeriveObjectId(ctx context.Context, spaceID string, key domain.UniqueKey) (string, error) { - ret := _m.Called(ctx, spaceID, key) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, domain.UniqueKey) (string, error)); ok { - return rf(ctx, spaceID, key) - } - if rf, ok := ret.Get(0).(func(context.Context, string, domain.UniqueKey) string); ok { - r0 = rf(ctx, spaceID, key) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, domain.UniqueKey) error); ok { - r1 = rf(ctx, spaceID, key) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_DeriveObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveObjectId' -type MockService_DeriveObjectId_Call struct { - *mock.Call -} - -// DeriveObjectId is a helper method to define mock.On call -// - ctx context.Context -// - spaceID string -// - key domain.UniqueKey -func (_e *MockService_Expecter) DeriveObjectId(ctx interface{}, spaceID interface{}, key interface{}) *MockService_DeriveObjectId_Call { - return &MockService_DeriveObjectId_Call{Call: _e.mock.On("DeriveObjectId", ctx, spaceID, key)} -} - -func (_c *MockService_DeriveObjectId_Call) Run(run func(ctx context.Context, spaceID string, key domain.UniqueKey)) *MockService_DeriveObjectId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(domain.UniqueKey)) - }) - return _c -} - -func (_c *MockService_DeriveObjectId_Call) Return(_a0 string, _a1 error) *MockService_DeriveObjectId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockService_DeriveObjectId_Call) RunAndReturn(run func(context.Context, string, domain.UniqueKey) (string, error)) *MockService_DeriveObjectId_Call { - _c.Call.Return(run) - return _c -} - -// DerivePredefinedObjects provides a mock function with given fields: ctx, spaceID, createTrees -func (_m *MockService) DerivePredefinedObjects(ctx context.Context, spaceID string, createTrees bool) (threads.DerivedSmartblockIds, error) { - ret := _m.Called(ctx, spaceID, createTrees) - - var r0 threads.DerivedSmartblockIds - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bool) (threads.DerivedSmartblockIds, error)); ok { - return rf(ctx, spaceID, createTrees) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bool) threads.DerivedSmartblockIds); ok { - r0 = rf(ctx, spaceID, createTrees) - } else { - r0 = ret.Get(0).(threads.DerivedSmartblockIds) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { - r1 = rf(ctx, spaceID, createTrees) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_DerivePredefinedObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DerivePredefinedObjects' -type MockService_DerivePredefinedObjects_Call struct { - *mock.Call -} - -// DerivePredefinedObjects is a helper method to define mock.On call -// - ctx context.Context -// - spaceID string -// - createTrees bool -func (_e *MockService_Expecter) DerivePredefinedObjects(ctx interface{}, spaceID interface{}, createTrees interface{}) *MockService_DerivePredefinedObjects_Call { - return &MockService_DerivePredefinedObjects_Call{Call: _e.mock.On("DerivePredefinedObjects", ctx, spaceID, createTrees)} -} - -func (_c *MockService_DerivePredefinedObjects_Call) Run(run func(ctx context.Context, spaceID string, createTrees bool)) *MockService_DerivePredefinedObjects_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bool)) - }) - return _c -} - -func (_c *MockService_DerivePredefinedObjects_Call) Return(predefinedObjectIDs threads.DerivedSmartblockIds, err error) *MockService_DerivePredefinedObjects_Call { - _c.Call.Return(predefinedObjectIDs, err) - return _c -} - -func (_c *MockService_DerivePredefinedObjects_Call) RunAndReturn(run func(context.Context, string, bool) (threads.DerivedSmartblockIds, error)) *MockService_DerivePredefinedObjects_Call { - _c.Call.Return(run) - return _c -} - -// EnsurePredefinedBlocks provides a mock function with given fields: ctx, spaceID -func (_m *MockService) EnsurePredefinedBlocks(ctx context.Context, spaceID string) (threads.DerivedSmartblockIds, error) { - ret := _m.Called(ctx, spaceID) - - var r0 threads.DerivedSmartblockIds - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (threads.DerivedSmartblockIds, error)); ok { - return rf(ctx, spaceID) - } - if rf, ok := ret.Get(0).(func(context.Context, string) threads.DerivedSmartblockIds); ok { - r0 = rf(ctx, spaceID) - } else { - r0 = ret.Get(0).(threads.DerivedSmartblockIds) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, spaceID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_EnsurePredefinedBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsurePredefinedBlocks' -type MockService_EnsurePredefinedBlocks_Call struct { - *mock.Call -} - -// EnsurePredefinedBlocks is a helper method to define mock.On call -// - ctx context.Context -// - spaceID string -func (_e *MockService_Expecter) EnsurePredefinedBlocks(ctx interface{}, spaceID interface{}) *MockService_EnsurePredefinedBlocks_Call { - return &MockService_EnsurePredefinedBlocks_Call{Call: _e.mock.On("EnsurePredefinedBlocks", ctx, spaceID)} -} - -func (_c *MockService_EnsurePredefinedBlocks_Call) Run(run func(ctx context.Context, spaceID string)) *MockService_EnsurePredefinedBlocks_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockService_EnsurePredefinedBlocks_Call) Return(predefinedObjectIDs threads.DerivedSmartblockIds, err error) *MockService_EnsurePredefinedBlocks_Call { - _c.Call.Return(predefinedObjectIDs, err) - return _c -} - -func (_c *MockService_EnsurePredefinedBlocks_Call) RunAndReturn(run func(context.Context, string) (threads.DerivedSmartblockIds, error)) *MockService_EnsurePredefinedBlocks_Call { - _c.Call.Return(run) - return _c -} - // GetSystemRelationID provides a mock function with given fields: spaceID, relationKey func (_m *MockService) GetSystemRelationID(spaceID string, relationKey domain.RelationKey) string { ret := _m.Called(spaceID, relationKey) diff --git a/pkg/lib/core/smartblock/smartblock.go b/pkg/lib/core/smartblock/smartblock.go index 33e0cebcc..edc4d3e97 100644 --- a/pkg/lib/core/smartblock/smartblock.go +++ b/pkg/lib/core/smartblock/smartblock.go @@ -28,6 +28,7 @@ const ( SmartBlockTypeWidget = SmartBlockType(model.SmartBlockType_Widget) SmartBlockTypeRelation = SmartBlockType(model.SmartBlockType_STRelation) SmartBlockTypeObjectType = SmartBlockType(model.SmartBlockType_STType) + SmartBlockTypeSpaceView = SmartBlockType(model.SmartBlockType_SpaceView) SmartBlockTypeRelationOption = SmartBlockType(model.SmartBlockType_STRelationOption) SmartBlockTypeMissingObject = SmartBlockType(model.SmartBlockType_MissingObject) diff --git a/pkg/lib/gateway/gateway.go b/pkg/lib/gateway/gateway.go index 0dce7866d..e4d892414 100644 --- a/pkg/lib/gateway/gateway.go +++ b/pkg/lib/gateway/gateway.go @@ -15,12 +15,12 @@ import ( "github.com/anyproto/any-sync/app" + "github.com/anyproto/anytype-heart/core/block/object/idresolver" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/files" "github.com/anyproto/anytype-heart/pb" "github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore" "github.com/anyproto/anytype-heart/pkg/lib/logging" - "github.com/anyproto/anytype-heart/space" "github.com/anyproto/anytype-heart/util/netutil" ) @@ -45,9 +45,13 @@ type Gateway interface { app.ComponentStatable } +type spaceIDResolver interface { + ResolveSpaceID(objectID string) (spaceID string, err error) +} + type gateway struct { fileService files.Service - spaceService space.Service + resolver idresolver.Resolver objectStore objectstore.ObjectStore server *http.Server listener net.Listener @@ -89,7 +93,7 @@ func GatewayAddr() string { func (g *gateway) Init(a *app.App) (err error) { g.fileService = app.MustComponent[files.Service](a) - g.spaceService = app.MustComponent[space.Service](a) + g.resolver = a.MustComponent(idresolver.CName).(idresolver.Resolver) g.objectStore = app.MustComponent[objectstore.ObjectStore](a) g.addr = GatewayAddr() log.Debugf("gateway.Init: %s", g.addr) @@ -252,7 +256,7 @@ func (g *gateway) getFile(ctx context.Context, r *http.Request) (files.File, io. parts := strings.Split(fileHashAndPath, "/") fileHash := parts[0] - spaceID, err := g.spaceService.ResolveSpaceID(fileHash) + spaceID, err := g.resolver.ResolveSpaceID(fileHash) if err != nil { return nil, nil, fmt.Errorf("resolve spaceID: %w", err) } @@ -308,7 +312,7 @@ func (g *gateway) getImage(ctx context.Context, r *http.Request) (files.File, io imageHash := urlParts[2] query := r.URL.Query() - spaceID, err := g.spaceService.ResolveSpaceID(imageHash) + spaceID, err := g.resolver.ResolveSpaceID(imageHash) if err != nil { return nil, nil, fmt.Errorf("resolve spaceID: %w", err) } diff --git a/pkg/lib/localstore/objectstore/filters.go b/pkg/lib/localstore/objectstore/filters.go index 6a36b2c77..6de357f83 100644 --- a/pkg/lib/localstore/objectstore/filters.go +++ b/pkg/lib/localstore/objectstore/filters.go @@ -6,7 +6,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/database" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" ) func newIdsFilter(ids []string) idsFilter { diff --git a/pkg/lib/localstore/objectstore/fixture.go b/pkg/lib/localstore/objectstore/fixture.go index 73405c237..833e9c546 100644 --- a/pkg/lib/localstore/objectstore/fixture.go +++ b/pkg/lib/localstore/objectstore/fixture.go @@ -19,7 +19,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/localstore/ftsearch" - "github.com/anyproto/anytype-heart/space/typeprovider/mock_typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider/mock_typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/pkg/lib/localstore/objectstore/indexer_store.go b/pkg/lib/localstore/objectstore/indexer_store.go index c94de88b8..8b811c55a 100644 --- a/pkg/lib/localstore/objectstore/indexer_store.go +++ b/pkg/lib/localstore/objectstore/indexer_store.go @@ -33,14 +33,25 @@ func (s *dsObjectStore) RemoveIDsFromFullTextQueue(ids []string) { } } -func (s *dsObjectStore) GetChecksums() (checksums *model.ObjectStoreChecksums, err error) { +func (s *dsObjectStore) GetChecksums(spaceID string) (checksums *model.ObjectStoreChecksums, err error) { + return badgerhelper.GetValue(s.db, bundledChecksums.ChildString(spaceID).Bytes(), func(raw []byte) (*model.ObjectStoreChecksums, error) { + checksums := &model.ObjectStoreChecksums{} + return checksums, proto.Unmarshal(raw, checksums) + }) +} + +func (s *dsObjectStore) SaveChecksums(spaceID string, checksums *model.ObjectStoreChecksums) (err error) { + return badgerhelper.SetValue(s.db, bundledChecksums.ChildString(spaceID).Bytes(), checksums) +} + +func (s *dsObjectStore) GetGlobalChecksums() (checksums *model.ObjectStoreChecksums, err error) { return badgerhelper.GetValue(s.db, bundledChecksums.Bytes(), func(raw []byte) (*model.ObjectStoreChecksums, error) { checksums := &model.ObjectStoreChecksums{} return checksums, proto.Unmarshal(raw, checksums) }) } -func (s *dsObjectStore) SaveChecksums(checksums *model.ObjectStoreChecksums) (err error) { +func (s *dsObjectStore) SaveGlobalChecksums(checksums *model.ObjectStoreChecksums) (err error) { return badgerhelper.SetValue(s.db, bundledChecksums.Bytes(), checksums) } diff --git a/pkg/lib/localstore/objectstore/indexer_store_test.go b/pkg/lib/localstore/objectstore/indexer_store_test.go index 832613ad3..0793dad7b 100644 --- a/pkg/lib/localstore/objectstore/indexer_store_test.go +++ b/pkg/lib/localstore/objectstore/indexer_store_test.go @@ -36,7 +36,7 @@ func TestIndexerChecksums(t *testing.T) { t.Run("previous checksums are not found", func(t *testing.T) { s := NewStoreFixture(t) - _, err := s.GetChecksums() + _, err := s.GetGlobalChecksums() require.Error(t, err) }) @@ -56,9 +56,9 @@ func TestIndexerChecksums(t *testing.T) { FilestoreKeysForceReindexCounter: 6, } - require.NoError(t, s.SaveChecksums(want)) + require.NoError(t, s.SaveGlobalChecksums(want)) - got, err := s.GetChecksums() + got, err := s.GetGlobalChecksums() require.NoError(t, err) assert.Equal(t, want, got) }) diff --git a/pkg/lib/localstore/objectstore/mock_objectstore/mock_ObjectStore.go b/pkg/lib/localstore/objectstore/mock_objectstore/mock_ObjectStore.go index 3d42e6e8d..f4d344060 100644 --- a/pkg/lib/localstore/objectstore/mock_objectstore/mock_ObjectStore.go +++ b/pkg/lib/localstore/objectstore/mock_objectstore/mock_ObjectStore.go @@ -389,25 +389,25 @@ func (_c *MockObjectStore_GetByIDs_Call) RunAndReturn(run func(string, []string) return _c } -// GetChecksums provides a mock function with given fields: -func (_m *MockObjectStore) GetChecksums() (*model.ObjectStoreChecksums, error) { - ret := _m.Called() +// GetChecksums provides a mock function with given fields: spaceID +func (_m *MockObjectStore) GetChecksums(spaceID string) (*model.ObjectStoreChecksums, error) { + ret := _m.Called(spaceID) var r0 *model.ObjectStoreChecksums var r1 error - if rf, ok := ret.Get(0).(func() (*model.ObjectStoreChecksums, error)); ok { - return rf() + if rf, ok := ret.Get(0).(func(string) (*model.ObjectStoreChecksums, error)); ok { + return rf(spaceID) } - if rf, ok := ret.Get(0).(func() *model.ObjectStoreChecksums); ok { - r0 = rf() + if rf, ok := ret.Get(0).(func(string) *model.ObjectStoreChecksums); ok { + r0 = rf(spaceID) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*model.ObjectStoreChecksums) } } - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(spaceID) } else { r1 = ret.Error(1) } @@ -421,13 +421,14 @@ type MockObjectStore_GetChecksums_Call struct { } // GetChecksums is a helper method to define mock.On call -func (_e *MockObjectStore_Expecter) GetChecksums() *MockObjectStore_GetChecksums_Call { - return &MockObjectStore_GetChecksums_Call{Call: _e.mock.On("GetChecksums")} +// - spaceID string +func (_e *MockObjectStore_Expecter) GetChecksums(spaceID interface{}) *MockObjectStore_GetChecksums_Call { + return &MockObjectStore_GetChecksums_Call{Call: _e.mock.On("GetChecksums", spaceID)} } -func (_c *MockObjectStore_GetChecksums_Call) Run(run func()) *MockObjectStore_GetChecksums_Call { +func (_c *MockObjectStore_GetChecksums_Call) Run(run func(spaceID string)) *MockObjectStore_GetChecksums_Call { _c.Call.Run(func(args mock.Arguments) { - run() + run(args[0].(string)) }) return _c } @@ -437,7 +438,7 @@ func (_c *MockObjectStore_GetChecksums_Call) Return(checksums *model.ObjectStore return _c } -func (_c *MockObjectStore_GetChecksums_Call) RunAndReturn(run func() (*model.ObjectStoreChecksums, error)) *MockObjectStore_GetChecksums_Call { +func (_c *MockObjectStore_GetChecksums_Call) RunAndReturn(run func(string) (*model.ObjectStoreChecksums, error)) *MockObjectStore_GetChecksums_Call { _c.Call.Return(run) return _c } @@ -496,6 +497,59 @@ func (_c *MockObjectStore_GetDetails_Call) RunAndReturn(run func(string) (*model return _c } +// GetGlobalChecksums provides a mock function with given fields: +func (_m *MockObjectStore) GetGlobalChecksums() (*model.ObjectStoreChecksums, error) { + ret := _m.Called() + + var r0 *model.ObjectStoreChecksums + var r1 error + if rf, ok := ret.Get(0).(func() (*model.ObjectStoreChecksums, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *model.ObjectStoreChecksums); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*model.ObjectStoreChecksums) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockObjectStore_GetGlobalChecksums_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGlobalChecksums' +type MockObjectStore_GetGlobalChecksums_Call struct { + *mock.Call +} + +// GetGlobalChecksums is a helper method to define mock.On call +func (_e *MockObjectStore_Expecter) GetGlobalChecksums() *MockObjectStore_GetGlobalChecksums_Call { + return &MockObjectStore_GetGlobalChecksums_Call{Call: _e.mock.On("GetGlobalChecksums")} +} + +func (_c *MockObjectStore_GetGlobalChecksums_Call) Run(run func()) *MockObjectStore_GetGlobalChecksums_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockObjectStore_GetGlobalChecksums_Call) Return(checksums *model.ObjectStoreChecksums, err error) *MockObjectStore_GetGlobalChecksums_Call { + _c.Call.Return(checksums, err) + return _c +} + +func (_c *MockObjectStore_GetGlobalChecksums_Call) RunAndReturn(run func() (*model.ObjectStoreChecksums, error)) *MockObjectStore_GetGlobalChecksums_Call { + _c.Call.Return(run) + return _c +} + // GetInboundLinksByID provides a mock function with given fields: id func (_m *MockObjectStore) GetInboundLinksByID(id string) ([]string, error) { ret := _m.Called(id) @@ -1435,13 +1489,13 @@ func (_c *MockObjectStore_SaveAccountStatus_Call) RunAndReturn(run func(*coordin return _c } -// SaveChecksums provides a mock function with given fields: checksums -func (_m *MockObjectStore) SaveChecksums(checksums *model.ObjectStoreChecksums) error { - ret := _m.Called(checksums) +// SaveChecksums provides a mock function with given fields: spaceID, checksums +func (_m *MockObjectStore) SaveChecksums(spaceID string, checksums *model.ObjectStoreChecksums) error { + ret := _m.Called(spaceID, checksums) var r0 error - if rf, ok := ret.Get(0).(func(*model.ObjectStoreChecksums) error); ok { - r0 = rf(checksums) + if rf, ok := ret.Get(0).(func(string, *model.ObjectStoreChecksums) error); ok { + r0 = rf(spaceID, checksums) } else { r0 = ret.Error(0) } @@ -1455,14 +1509,15 @@ type MockObjectStore_SaveChecksums_Call struct { } // SaveChecksums is a helper method to define mock.On call +// - spaceID string // - checksums *model.ObjectStoreChecksums -func (_e *MockObjectStore_Expecter) SaveChecksums(checksums interface{}) *MockObjectStore_SaveChecksums_Call { - return &MockObjectStore_SaveChecksums_Call{Call: _e.mock.On("SaveChecksums", checksums)} +func (_e *MockObjectStore_Expecter) SaveChecksums(spaceID interface{}, checksums interface{}) *MockObjectStore_SaveChecksums_Call { + return &MockObjectStore_SaveChecksums_Call{Call: _e.mock.On("SaveChecksums", spaceID, checksums)} } -func (_c *MockObjectStore_SaveChecksums_Call) Run(run func(checksums *model.ObjectStoreChecksums)) *MockObjectStore_SaveChecksums_Call { +func (_c *MockObjectStore_SaveChecksums_Call) Run(run func(spaceID string, checksums *model.ObjectStoreChecksums)) *MockObjectStore_SaveChecksums_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*model.ObjectStoreChecksums)) + run(args[0].(string), args[1].(*model.ObjectStoreChecksums)) }) return _c } @@ -1472,7 +1527,49 @@ func (_c *MockObjectStore_SaveChecksums_Call) Return(err error) *MockObjectStore return _c } -func (_c *MockObjectStore_SaveChecksums_Call) RunAndReturn(run func(*model.ObjectStoreChecksums) error) *MockObjectStore_SaveChecksums_Call { +func (_c *MockObjectStore_SaveChecksums_Call) RunAndReturn(run func(string, *model.ObjectStoreChecksums) error) *MockObjectStore_SaveChecksums_Call { + _c.Call.Return(run) + return _c +} + +// SaveGlobalChecksums provides a mock function with given fields: checksums +func (_m *MockObjectStore) SaveGlobalChecksums(checksums *model.ObjectStoreChecksums) error { + ret := _m.Called(checksums) + + var r0 error + if rf, ok := ret.Get(0).(func(*model.ObjectStoreChecksums) error); ok { + r0 = rf(checksums) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockObjectStore_SaveGlobalChecksums_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveGlobalChecksums' +type MockObjectStore_SaveGlobalChecksums_Call struct { + *mock.Call +} + +// SaveGlobalChecksums is a helper method to define mock.On call +// - checksums *model.ObjectStoreChecksums +func (_e *MockObjectStore_Expecter) SaveGlobalChecksums(checksums interface{}) *MockObjectStore_SaveGlobalChecksums_Call { + return &MockObjectStore_SaveGlobalChecksums_Call{Call: _e.mock.On("SaveGlobalChecksums", checksums)} +} + +func (_c *MockObjectStore_SaveGlobalChecksums_Call) Run(run func(checksums *model.ObjectStoreChecksums)) *MockObjectStore_SaveGlobalChecksums_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*model.ObjectStoreChecksums)) + }) + return _c +} + +func (_c *MockObjectStore_SaveGlobalChecksums_Call) Return(err error) *MockObjectStore_SaveGlobalChecksums_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockObjectStore_SaveGlobalChecksums_Call) RunAndReturn(run func(*model.ObjectStoreChecksums) error) *MockObjectStore_SaveGlobalChecksums_Call { _c.Call.Return(run) return _c } diff --git a/pkg/lib/localstore/objectstore/objects.go b/pkg/lib/localstore/objectstore/objects.go index fd55c3fed..f3168bfcd 100644 --- a/pkg/lib/localstore/objectstore/objects.go +++ b/pkg/lib/localstore/objectstore/objects.go @@ -23,7 +23,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/ftsearch" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/badgerhelper" "github.com/anyproto/anytype-heart/util/pbtypes" ) @@ -145,9 +145,11 @@ type IndexerStore interface { FTSearch() ftsearch.FTSearch // GetChecksums Used to get information about localstore state and decide do we need to reindex some objects - GetChecksums() (checksums *model.ObjectStoreChecksums, err error) + GetChecksums(spaceID string) (checksums *model.ObjectStoreChecksums, err error) // SaveChecksums Used to save checksums and force reindex counter - SaveChecksums(checksums *model.ObjectStoreChecksums) (err error) + SaveChecksums(spaceID string, checksums *model.ObjectStoreChecksums) (err error) + GetGlobalChecksums() (checksums *model.ObjectStoreChecksums, err error) + SaveGlobalChecksums(checksums *model.ObjectStoreChecksums) (err error) GetLastIndexedHeadsHash(id string) (headsHash string, err error) SaveLastIndexedHeadsHash(id string, headsHash string) (err error) diff --git a/pkg/lib/localstore/objectstore/objects_test.go b/pkg/lib/localstore/objectstore/objects_test.go index 099c765c2..875996aca 100644 --- a/pkg/lib/localstore/objectstore/objects_test.go +++ b/pkg/lib/localstore/objectstore/objects_test.go @@ -15,7 +15,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/database" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider/mock_typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider/mock_typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/pkg/lib/localstore/objectstore/queries.go b/pkg/lib/localstore/objectstore/queries.go index 2be604bf3..a6074d5ba 100644 --- a/pkg/lib/localstore/objectstore/queries.go +++ b/pkg/lib/localstore/objectstore/queries.go @@ -9,7 +9,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/database" - "github.com/anyproto/anytype-heart/space/typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/pkg/lib/localstore/objectstore/queries_test.go b/pkg/lib/localstore/objectstore/queries_test.go index bd6fe23eb..a26783787 100644 --- a/pkg/lib/localstore/objectstore/queries_test.go +++ b/pkg/lib/localstore/objectstore/queries_test.go @@ -18,7 +18,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" "github.com/anyproto/anytype-heart/pkg/lib/localstore/ftsearch" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space/typeprovider/mock_typeprovider" + "github.com/anyproto/anytype-heart/space/spacecore/typeprovider/mock_typeprovider" "github.com/anyproto/anytype-heart/util/pbtypes" ) diff --git a/pkg/lib/pb/model/models.pb.go b/pkg/lib/pb/model/models.pb.go index 5eed96987..5673a4721 100644 --- a/pkg/lib/pb/model/models.pb.go +++ b/pkg/lib/pb/model/models.pb.go @@ -45,6 +45,7 @@ const ( SmartBlockType_STRelation SmartBlockType = 521 SmartBlockType_STType SmartBlockType = 528 SmartBlockType_STRelationOption SmartBlockType = 529 + SmartBlockType_SpaceView SmartBlockType = 530 SmartBlockType_MissingObject SmartBlockType = 519 ) @@ -67,6 +68,7 @@ var SmartBlockType_name = map[int32]string{ 521: "STRelation", 528: "STType", 529: "STRelationOption", + 530: "SpaceView", 519: "MissingObject", } @@ -89,6 +91,7 @@ var SmartBlockType_value = map[string]int32{ "STRelation": 521, "STType": 528, "STRelationOption": 529, + "SpaceView": 530, "MissingObject": 519, } @@ -162,6 +165,53 @@ func (RelationFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor_98a910b73321e591, []int{1} } +type SpaceStatus int32 + +const ( + // Unknown means the space is not loaded yet + SpaceStatus_Unknown SpaceStatus = 0 + // Loading - the space in progress of loading + SpaceStatus_Loading SpaceStatus = 1 + // Ok - the space loaded and available + SpaceStatus_Ok SpaceStatus = 2 + // Missing - the space is missing + SpaceStatus_Missing SpaceStatus = 3 + // Error - the space loading ended with an error + SpaceStatus_Error SpaceStatus = 4 + // RemoteWaitingDeletion - network status is "waiting deletion" + SpaceStatus_RemoteWaitingDeletion SpaceStatus = 5 + // RemoteDeleted - the space is deleted in the current network + SpaceStatus_RemoteDeleted SpaceStatus = 6 +) + +var SpaceStatus_name = map[int32]string{ + 0: "Unknown", + 1: "Loading", + 2: "Ok", + 3: "Missing", + 4: "Error", + 5: "RemoteWaitingDeletion", + 6: "RemoteDeleted", +} + +var SpaceStatus_value = map[string]int32{ + "Unknown": 0, + "Loading": 1, + "Ok": 2, + "Missing": 3, + "Error": 4, + "RemoteWaitingDeletion": 5, + "RemoteDeleted": 6, +} + +func (x SpaceStatus) String() string { + return proto.EnumName(SpaceStatus_name, int32(x)) +} + +func (SpaceStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_98a910b73321e591, []int{2} +} + type BlockPosition int32 const ( @@ -1183,6 +1233,7 @@ const ( ObjectType_audio ObjectTypeLayout = 15 ObjectType_video ObjectTypeLayout = 16 ObjectType_date ObjectTypeLayout = 17 + ObjectType_spaceView ObjectTypeLayout = 18 ObjectType_database ObjectTypeLayout = 20 ) @@ -1205,6 +1256,7 @@ var ObjectTypeLayout_name = map[int32]string{ 15: "audio", 16: "video", 17: "date", + 18: "spaceView", 20: "database", } @@ -1227,6 +1279,7 @@ var ObjectTypeLayout_value = map[string]int32{ "audio": 15, "video": 16, "date": 17, + "spaceView": 18, "database": 20, } @@ -1235,7 +1288,7 @@ func (x ObjectTypeLayout) String() string { } func (ObjectTypeLayout) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{8, 0} + return fileDescriptor_98a910b73321e591, []int{9, 0} } type RelationScope int32 @@ -1269,7 +1322,7 @@ func (x RelationScope) String() string { } func (RelationScope) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{11, 0} + return fileDescriptor_98a910b73321e591, []int{12, 0} } type RelationDataSource int32 @@ -1300,7 +1353,7 @@ func (x RelationDataSource) String() string { } func (RelationDataSource) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{11, 1} + return fileDescriptor_98a910b73321e591, []int{12, 1} } // Use such a weird construction due to the issue with imported repeated enum type @@ -1333,7 +1386,7 @@ func (x InternalFlagValue) String() string { } func (InternalFlagValue) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{15, 0} + return fileDescriptor_98a910b73321e591, []int{16, 0} } type SmartBlockSnapshotBase struct { @@ -4679,6 +4732,7 @@ var xxx_messageInfo_Object proto.InternalMessageInfo type ObjectChangePayload struct { SmartBlockType SmartBlockType `protobuf:"varint,1,opt,name=smartBlockType,proto3,enum=anytype.model.SmartBlockType" json:"smartBlockType,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` } func (m *ObjectChangePayload) Reset() { *m = ObjectChangePayload{} } @@ -4728,6 +4782,57 @@ func (m *ObjectChangePayload) GetKey() string { return "" } +func (m *ObjectChangePayload) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type SpaceObjectHeader struct { + SpaceID string `protobuf:"bytes,1,opt,name=spaceID,proto3" json:"spaceID,omitempty"` +} + +func (m *SpaceObjectHeader) Reset() { *m = SpaceObjectHeader{} } +func (m *SpaceObjectHeader) String() string { return proto.CompactTextString(m) } +func (*SpaceObjectHeader) ProtoMessage() {} +func (*SpaceObjectHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_98a910b73321e591, []int{8} +} +func (m *SpaceObjectHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpaceObjectHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpaceObjectHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SpaceObjectHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpaceObjectHeader.Merge(m, src) +} +func (m *SpaceObjectHeader) XXX_Size() int { + return m.Size() +} +func (m *SpaceObjectHeader) XXX_DiscardUnknown() { + xxx_messageInfo_SpaceObjectHeader.DiscardUnknown(m) +} + +var xxx_messageInfo_SpaceObjectHeader proto.InternalMessageInfo + +func (m *SpaceObjectHeader) GetSpaceID() string { + if m != nil { + return m.SpaceID + } + return "" +} + type ObjectType struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -4747,7 +4852,7 @@ func (m *ObjectType) Reset() { *m = ObjectType{} } func (m *ObjectType) String() string { return proto.CompactTextString(m) } func (*ObjectType) ProtoMessage() {} func (*ObjectType) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{8} + return fileDescriptor_98a910b73321e591, []int{9} } func (m *ObjectType) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4870,7 +4975,7 @@ func (m *Layout) Reset() { *m = Layout{} } func (m *Layout) String() string { return proto.CompactTextString(m) } func (*Layout) ProtoMessage() {} func (*Layout) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{9} + return fileDescriptor_98a910b73321e591, []int{10} } func (m *Layout) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4929,7 +5034,7 @@ func (m *RelationWithValue) Reset() { *m = RelationWithValue{} } func (m *RelationWithValue) String() string { return proto.CompactTextString(m) } func (*RelationWithValue) ProtoMessage() {} func (*RelationWithValue) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{10} + return fileDescriptor_98a910b73321e591, []int{11} } func (m *RelationWithValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5000,7 +5105,7 @@ func (m *Relation) Reset() { *m = Relation{} } func (m *Relation) String() string { return proto.CompactTextString(m) } func (*Relation) ProtoMessage() {} func (*Relation) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{11} + return fileDescriptor_98a910b73321e591, []int{12} } func (m *Relation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5153,7 +5258,7 @@ func (m *RelationOption) Reset() { *m = RelationOption{} } func (m *RelationOption) String() string { return proto.CompactTextString(m) } func (*RelationOption) ProtoMessage() {} func (*RelationOption) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{11, 0} + return fileDescriptor_98a910b73321e591, []int{12, 0} } func (m *RelationOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5219,7 +5324,7 @@ func (m *RelationLink) Reset() { *m = RelationLink{} } func (m *RelationLink) String() string { return proto.CompactTextString(m) } func (*RelationLink) ProtoMessage() {} func (*RelationLink) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{12} + return fileDescriptor_98a910b73321e591, []int{13} } func (m *RelationLink) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5270,7 +5375,7 @@ func (m *Relations) Reset() { *m = Relations{} } func (m *Relations) String() string { return proto.CompactTextString(m) } func (*Relations) ProtoMessage() {} func (*Relations) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{13} + return fileDescriptor_98a910b73321e591, []int{14} } func (m *Relations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5314,7 +5419,7 @@ func (m *RelationOptions) Reset() { *m = RelationOptions{} } func (m *RelationOptions) String() string { return proto.CompactTextString(m) } func (*RelationOptions) ProtoMessage() {} func (*RelationOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{14} + return fileDescriptor_98a910b73321e591, []int{15} } func (m *RelationOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5358,7 +5463,7 @@ func (m *InternalFlag) Reset() { *m = InternalFlag{} } func (m *InternalFlag) String() string { return proto.CompactTextString(m) } func (*InternalFlag) ProtoMessage() {} func (*InternalFlag) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{15} + return fileDescriptor_98a910b73321e591, []int{16} } func (m *InternalFlag) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5411,7 +5516,7 @@ func (m *ObjectView) Reset() { *m = ObjectView{} } func (m *ObjectView) String() string { return proto.CompactTextString(m) } func (*ObjectView) ProtoMessage() {} func (*ObjectView) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{16} + return fileDescriptor_98a910b73321e591, []int{17} } func (m *ObjectView) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5506,7 +5611,7 @@ func (m *ObjectViewDetailsSet) Reset() { *m = ObjectViewDetailsSet{} } func (m *ObjectViewDetailsSet) String() string { return proto.CompactTextString(m) } func (*ObjectViewDetailsSet) ProtoMessage() {} func (*ObjectViewDetailsSet) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{16, 0} + return fileDescriptor_98a910b73321e591, []int{17, 0} } func (m *ObjectViewDetailsSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5565,7 +5670,7 @@ func (m *ObjectViewRelationWithValuePerObject) Reset() { *m = ObjectView func (m *ObjectViewRelationWithValuePerObject) String() string { return proto.CompactTextString(m) } func (*ObjectViewRelationWithValuePerObject) ProtoMessage() {} func (*ObjectViewRelationWithValuePerObject) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{16, 1} + return fileDescriptor_98a910b73321e591, []int{17, 1} } func (m *ObjectViewRelationWithValuePerObject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5617,7 +5722,7 @@ func (m *ObjectViewHistorySize) Reset() { *m = ObjectViewHistorySize{} } func (m *ObjectViewHistorySize) String() string { return proto.CompactTextString(m) } func (*ObjectViewHistorySize) ProtoMessage() {} func (*ObjectViewHistorySize) Descriptor() ([]byte, []int) { - return fileDescriptor_98a910b73321e591, []int{16, 2} + return fileDescriptor_98a910b73321e591, []int{17, 2} } func (m *ObjectViewHistorySize) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5663,6 +5768,7 @@ func (m *ObjectViewHistorySize) GetRedo() int32 { func init() { proto.RegisterEnum("anytype.model.SmartBlockType", SmartBlockType_name, SmartBlockType_value) proto.RegisterEnum("anytype.model.RelationFormat", RelationFormat_name, RelationFormat_value) + proto.RegisterEnum("anytype.model.SpaceStatus", SpaceStatus_name, SpaceStatus_value) proto.RegisterEnum("anytype.model.BlockPosition", BlockPosition_name, BlockPosition_value) proto.RegisterEnum("anytype.model.BlockAlign", BlockAlign_name, BlockAlign_value) proto.RegisterEnum("anytype.model.BlockVerticalAlign", BlockVerticalAlign_name, BlockVerticalAlign_value) @@ -5742,6 +5848,7 @@ func init() { proto.RegisterType((*RestrictionsDataviewRestrictions)(nil), "anytype.model.Restrictions.DataviewRestrictions") proto.RegisterType((*Object)(nil), "anytype.model.Object") proto.RegisterType((*ObjectChangePayload)(nil), "anytype.model.Object.ChangePayload") + proto.RegisterType((*SpaceObjectHeader)(nil), "anytype.model.SpaceObjectHeader") proto.RegisterType((*ObjectType)(nil), "anytype.model.ObjectType") proto.RegisterType((*Layout)(nil), "anytype.model.Layout") proto.RegisterType((*RelationWithValue)(nil), "anytype.model.RelationWithValue") @@ -5762,337 +5869,343 @@ func init() { } var fileDescriptor_98a910b73321e591 = []byte{ - // 5277 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x7b, 0x4d, 0x8c, 0x24, 0xc9, - 0x55, 0x70, 0xd7, 0x7f, 0xd5, 0xab, 0xfe, 0x89, 0x8e, 0xe9, 0x9d, 0xad, 0x2f, 0x67, 0x3c, 0x5f, - 0xbb, 0x58, 0x8f, 0xc7, 0xe3, 0x71, 0xcf, 0xee, 0xfc, 0x78, 0xd7, 0x86, 0xdd, 0x75, 0xff, 0xcc, - 0xb8, 0x5b, 0x33, 0xb3, 0xdd, 0xce, 0xea, 0x99, 0xc1, 0x2b, 0x40, 0x44, 0x55, 0x46, 0x57, 0xe5, - 0x76, 0x56, 0x46, 0x39, 0x33, 0xaa, 0xa7, 0xdb, 0x12, 0x92, 0xc1, 0xfc, 0x88, 0x9b, 0x41, 0xe2, - 0x88, 0x64, 0xee, 0xdc, 0x90, 0x85, 0x91, 0x7c, 0xe0, 0x82, 0x84, 0xc4, 0x01, 0xdf, 0x40, 0x42, - 0x02, 0xe4, 0x3d, 0x20, 0x81, 0x04, 0x12, 0x67, 0x24, 0xd0, 0x7b, 0x11, 0x99, 0x95, 0xf5, 0xd3, - 0x3d, 0xd5, 0x6b, 0x9f, 0x2a, 0xe3, 0xc5, 0x7b, 0x2f, 0x5e, 0x44, 0xbc, 0x78, 0x7f, 0x11, 0x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f, 0x23, 0x02, 0x82, 0x37, - 0x2a, 0x44, 0xd9, 0x9c, 0x49, 0xf9, 0x22, 0x8b, 0xe9, 0x8e, 0x13, 0xf2, 0x3d, 0x80, 0x18, 0x8f, - 0x0c, 0x69, 0x7e, 0xa3, 0x4e, 0x8b, 0xf1, 0xc5, 0x99, 0x6c, 0xb6, 0x55, 0xa8, 0x65, 0xa8, 0x37, - 0x5a, 0x29, 0xfa, 0xee, 0x82, 0x9b, 0x21, 0xe6, 0xef, 0x42, 0x51, 0xcb, 0x53, 0xdd, 0x58, 0xbe, - 0x60, 0x45, 0x13, 0x26, 0x87, 0xf2, 0x54, 0xef, 0x2e, 0xb8, 0x44, 0x80, 0x84, 0x78, 0x24, 0x1a, - 0x2b, 0x73, 0x10, 0x3e, 0xf6, 0x03, 0x89, 0x84, 0x48, 0xc0, 0xdf, 0x87, 0x72, 0x20, 0xce, 0xd4, - 0x50, 0x37, 0x18, 0x91, 0xfe, 0xd2, 0x85, 0xa4, 0x4f, 0x09, 0x75, 0x77, 0xc1, 0xb5, 0x44, 0xfc, - 0x01, 0x14, 0x3c, 0xff, 0xa4, 0xb1, 0x4a, 0xb4, 0xeb, 0x17, 0xd2, 0xee, 0xf8, 0x27, 0xbb, 0x0b, - 0x2e, 0xa2, 0xf3, 0x6d, 0xa8, 0xb6, 0x95, 0x3a, 0xee, 0x8b, 0xe8, 0xb8, 0xc1, 0x89, 0xf4, 0x0b, - 0x17, 0x92, 0x6e, 0x59, 0xe4, 0xdd, 0x05, 0x37, 0x25, 0xc4, 0x29, 0xfb, 0x1d, 0x15, 0x36, 0xae, - 0xcc, 0x31, 0xe5, 0xbd, 0x8e, 0x0a, 0x71, 0xca, 0x48, 0x80, 0x84, 0x81, 0x1f, 0x1e, 0x37, 0xd6, - 0xe6, 0x20, 0xc4, 0xd3, 0x84, 0x84, 0x48, 0x80, 0x62, 0x7b, 0x42, 0x8b, 0x13, 0x5f, 0xbe, 0x6a, - 0xbc, 0x31, 0x87, 0xd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ce, 0x41, 0x8e, 0x9f, 0x86, 0x6b, 0x99, 0xf9, 0x3d, 0xf5, 0x49, 0xb8, - 0x2a, 0x14, 0x77, 0x94, 0x8e, 0x59, 0xce, 0xf9, 0x8f, 0x3c, 0x54, 0x13, 0xbf, 0x88, 0xe1, 0xde, - 0x30, 0x0a, 0xac, 0x42, 0xe3, 0x27, 0x5f, 0x83, 0x92, 0xf6, 0xb5, 0x55, 0xe3, 0x9a, 0x6b, 0x1a, - 0x18, 0x72, 0x65, 0x77, 0xb6, 0x40, 0x7d, 0x93, 0x5b, 0xe5, 0xf7, 0x45, 0x57, 0xee, 0x8a, 0xb8, - 0x47, 0xfa, 0x58, 0x73, 0x47, 0x00, 0xa4, 0x3f, 0x12, 0x27, 0xa8, 0x73, 0xd4, 0x6f, 0x82, 0xb1, - 0x2c, 0x88, 0xdf, 0x87, 0x22, 0x4e, 0xd0, 0x2a, 0xcd, 0xff, 0x9f, 0x98, 0x30, 0xaa, 0xc9, 0x41, - 0x24, 0x71, 0x7b, 0x36, 0x30, 0xb8, 0x76, 0x09, 0x99, 0xdf, 0x84, 0x65, 0x73, 0x08, 0xf7, 0x29, - 0xec, 0xde, 0xf3, 0x28, 0x18, 0xab, 0xb9, 0x13, 0x50, 0xbe, 0x89, 0xcb, 0x29, 0xb4, 0x6c, 0x54, - 0xe7, 0xd0, 0xef, 0x64, 0x71, 0x36, 0x5a, 0x48, 0xe2, 0x1a, 0xca, 0xe6, 0x43, 0x5c, 0x53, 0xa1, - 0x25, 0x6e, 0xf3, 0xa3, 0xfe, 0x40, 0x9f, 0x19, 0xa5, 0x79, 0x2c, 0x75, 0xa7, 0xe7, 0x87, 0x5d, - 0x96, 0x33, 0x4b, 0x8c, 0x9b, 0x48, 0x28, 0x51, 0xa4, 0x22, 0x56, 0x70, 0x1c, 0x28, 0xa2, 0x8e, - 0xa2, 0x91, 0x0c, 0x45, 0x5f, 0xda, 0x95, 0xa6, 0x6f, 0xe7, 0x0a, 0xac, 0x4e, 0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, 0x5c, 0xf3, 0xbf, 0x72, 0x50, - 0x4b, 0x17, 0x66, 0xbc, 0x68, 0xf3, 0xe8, 0x3b, 0x43, 0x11, 0xb0, 0x1c, 0x65, 0x1d, 0x4a, 0x9b, - 0x16, 0x1d, 0xde, 0x6f, 0x46, 0x52, 0x68, 0xaa, 0x15, 0xa2, 0x45, 0x96, 0x71, 0xcc, 0x8a, 0x9c, - 0xc3, 0xb2, 0x05, 0xef, 0x47, 0x06, 0xb5, 0x84, 0x49, 0x09, 0xf6, 0x26, 0x80, 0xb2, 0x31, 0xe0, - 0xc7, 0xd2, 0x24, 0x5d, 0x1f, 0x29, 0x4d, 0x8d, 0x2a, 0xca, 0xb2, 0x17, 0xb2, 0x1a, 0x8e, 0xf9, - 0x91, 0xd2, 0x7b, 0x21, 0x83, 0x51, 0x34, 0x5c, 0x4f, 0x86, 0xa7, 0xd6, 0x22, 0xc5, 0xda, 0x41, - 0xb0, 0x17, 0xb2, 0x25, 0xdb, 0x61, 0x5a, 0xcb, 0xc8, 0xf1, 0xd1, 0xa9, 0xe8, 0x20, 0xf9, 0x0a, - 0x5f, 0x06, 0x40, 0x1a, 0xdb, 0x66, 0x78, 0x06, 0x1e, 0x9d, 0xfa, 0xb1, 0x8e, 0xd9, 0x6a, 0xf3, - 0xef, 0x72, 0x50, 0xcf, 0x6c, 0x02, 0x46, 0xdb, 0x84, 0x88, 0xa6, 0xcd, 0x04, 0xdf, 0xdf, 0x96, - 0xb1, 0x96, 0x91, 0x97, 0x98, 0xad, 0x43, 0x85, 0x9f, 0x79, 0x1c, 0xef, 0x50, 0xf5, 0x55, 0x14, - 0xa9, 0x57, 0xac, 0x80, 0xad, 0xa7, 0x22, 0xd6, 0x2f, 0xa5, 0x3c, 0x66, 0x45, 0x9c, 0xea, 0xf6, - 0x30, 0x8a, 0x64, 0x68, 0x00, 0x25, 0x12, 0x4e, 0x9e, 0x9a, 0x56, 0x19, 0x99, 0x22, 0x32, 0xd9, - 0x45, 0x56, 0xe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1, 0x81, 0xe5, 0xb5, 0xb1, 0x49, 0x48, 0xae, 0x45, 0x46, 0xb2, - 0x8e, 0x0a, 0x8f, 0xfc, 0xae, 0x35, 0x13, 0xe7, 0x91, 0x6d, 0x13, 0x92, 0x6b, 0x91, 0x91, 0xcc, - 0x9a, 0xb9, 0xd2, 0x85, 0x64, 0xe6, 0xac, 0xa7, 0x56, 0xed, 0x2e, 0x14, 0xfd, 0xf0, 0x48, 0xd9, - 0x17, 0x3d, 0xd7, 0xce, 0x21, 0xda, 0x0b, 0x8f, 0x94, 0x4b, 0x88, 0x8e, 0x84, 0xb2, 0x11, 0x98, - 0x7f, 0x0d, 0x4a, 0x74, 0x2b, 0x62, 0xeb, 0xd0, 0x73, 0x3d, 0xb8, 0x30, 0x14, 0xfc, 0x6a, 0x52, - 0x64, 0xa7, 0xf5, 0x42, 0x38, 0x35, 0xb7, 0xaa, 0xc9, 0x92, 0x39, 0xff, 0x92, 0x83, 0xb2, 0x99, - 0x21, 0xbf, 0x09, 0xcb, 0x32, 0xc4, 0xa3, 0x9d, 0x18, 0x32, 0x7b, 0xa6, 0x27, 0xa0, 0x18, 0x56, - 0x59, 0x88, 0x6c, 0x0f, 0xbb, 0x36, 0x03, 0xcc, 0x82, 0xf8, 0x7b, 0xf0, 0xa6, 0x69, 0x1e, 0x44, - 0x32, 0x92, 0x81, 0x14, 0xb1, 0xdc, 0xee, 0x89, 0x30, 0x94, 0x81, 0x75, 0x6b, 0xe7, 0x75, 0xf3, - 0x26, 0x2c, 0x9a, 0xae, 0xd6, 0x40, 0x74, 0x64, 0x6c, 0x2f, 0x0d, 0xc6, 0x60, 0xfc, 0x2b, 0x50, - 0xa2, 0x77, 0x55, 0x0d, 0xef, 0x62, 0xe5, 0x33, 0x58, 0x8e, 0x4a, 0xed, 0xee, 0x26, 0x80, 0xd9, - 0x0d, 0xcc, 0x07, 0xac, 0x2d, 0xfa, 0xfc, 0x85, 0xdb, 0x47, 0x99, 0x4d, 0x86, 0x08, 0xe5, 0xf3, - 0x64, 0x20, 0xd1, 0x3e, 0xa0, 0xcd, 0xa5, 0xc9, 0x17, 0xdc, 0x31, 0x98, 0xf3, 0x9f, 0x05, 0x28, - 0xe2, 0x46, 0x22, 0x72, 0x4f, 0xf5, 0x65, 0x5a, 0xcc, 0x32, 0x4a, 0x3b, 0x06, 0x43, 0xc7, 0x2e, - 0xcc, 0x3d, 0x61, 0x8a, 0x66, 0x4c, 0xd9, 0x24, 0x18, 0x31, 0x07, 0x91, 0x3a, 0xf2, 0x83, 0x11, - 0xa6, 0x0d, 0x01, 0x26, 0xc0, 0xfc, 0xab, 0x70, 0xb5, 0x2f, 0xa2, 0x63, 0xa9, 0xc9, 0xfa, 0xbc, - 0x54, 0xd1, 0x71, 0x8c, 0x2b, 0xb7, 0xe7, 0xd9, 0x2a, 0xc8, 0x39, 0xbd, 0x68, 0xce, 0x3d, 0x79, - 0xe2, 0x13, 0x66, 0x95, 0x30, 0xd3, 0x36, 0x2a, 0x87, 0x30, 0x4b, 0xd3, 0xb2, 0xbc, 0x4c, 0x7e, - 0x34, 0x01, 0xe5, 0x77, 0x60, 0xf5, 0x55, 0xc2, 0x32, 0x95, 0x73, 0xd1, 0xd4, 0x3e, 0xa6, 0x3a, - 0x30, 0xd6, 0x30, 0x2f, 0x0c, 0xe2, 0x3d, 0x8f, 0xca, 0x38, 0x35, 0x77, 0x04, 0xe0, 0x37, 0x00, - 0xba, 0x42, 0xcb, 0x57, 0xe2, 0xec, 0x79, 0x14, 0x34, 0xa4, 0x29, 0x8e, 0x8e, 0x20, 0x98, 0x22, - 0x05, 0xaa, 0x23, 0x82, 0x96, 0x56, 0x91, 0xe8, 0xca, 0x03, 0xa1, 0x7b, 0x8d, 0xae, 0x49, 0x91, - 0x26, 0xe1, 0x38, 0x37, 0xed, 0xf7, 0xe5, 0xc7, 0x2a, 0x94, 0x8d, 0x9e, 0x99, 0x5b, 0xd2, 0x46, - 0x85, 0x16, 0xa1, 0x08, 0xce, 0xb4, 0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f, 0xfe, 0xec, 0x46, 0xee, 0x07, 0x9f, 0xde, 0x58, 0xf8, 0xe9, 0xa7, 0x37, 0x16, 0xfe, - 0xf1, 0xd3, 0x1b, 0x0b, 0x1f, 0xb3, 0xc9, 0xbf, 0xb0, 0xb6, 0xcb, 0x74, 0x1c, 0xee, 0xff, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xd0, 0xdd, 0x27, 0xdd, 0x3a, 0x00, 0x00, + // 5372 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x3b, 0x5d, 0x8f, 0x24, 0xc9, + 0x51, 0xd3, 0xdf, 0xdd, 0xd1, 0xf3, 0x91, 0x93, 0x3b, 0xbb, 0xd7, 0xee, 0x3b, 0x2f, 0xeb, 0xe2, + 0xbc, 0x5e, 0xaf, 0xcf, 0xb3, 0x77, 0xfb, 0xe1, 0x3b, 0x1b, 0xee, 0xce, 0xf3, 0xb1, 0xeb, 0x19, + 0xdd, 0xee, 0xcd, 0xb8, 0x7a, 0x76, 0x17, 0x9f, 0x00, 0x91, 0xd3, 0x95, 0xd3, 0x5d, 0x37, 0xd5, + 0x95, 0xed, 0xaa, 0xec, 0xd9, 0x19, 0x0b, 0x24, 0xf3, 0x65, 0xc4, 0x9b, 0xb1, 0xc4, 0x23, 0x92, + 0x79, 0xe7, 0x0d, 0x59, 0x18, 0xc9, 0x3f, 0x00, 0x89, 0x07, 0xfb, 0x05, 0x81, 0x84, 0x04, 0xc8, + 0xf7, 0x80, 0x04, 0x12, 0x48, 0x3c, 0x23, 0x81, 0x22, 0x32, 0xeb, 0xa3, 0x3f, 0x66, 0xb6, 0xe7, + 0xec, 0xa7, 0xae, 0x88, 0x8c, 0x88, 0x8c, 0xcc, 0x8c, 0x8c, 0x8c, 0x88, 0xcc, 0x86, 0xd7, 0x87, + 0xc7, 0xbd, 0x3b, 0x81, 0x7f, 0x78, 0x67,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, 0x42, 0x92, 0xad, 0xda, 0xba, 0x36, + 0x87, 0x90, 0x64, 0x97, 0xa3, 0x90, 0x84, 0x91, 0xff, 0x36, 0xac, 0x1e, 0x49, 0xa1, 0x47, 0x91, + 0xf4, 0x32, 0xc7, 0xf7, 0x0a, 0x49, 0x5b, 0xbf, 0x78, 0xed, 0x27, 0xb9, 0x76, 0x16, 0xdc, 0x69, + 0x51, 0xfc, 0x6b, 0x50, 0x09, 0x84, 0x96, 0xa7, 0xad, 0x16, 0xc9, 0x74, 0x5e, 0x62, 0x14, 0x5a, + 0x9e, 0xee, 0x2c, 0xb8, 0x86, 0x85, 0xff, 0x06, 0xac, 0x68, 0x71, 0x18, 0xc8, 0xbd, 0x23, 0x4b, + 0x10, 0xb7, 0x3e, 0x43, 0x52, 0xde, 0xb8, 0xd8, 0x9c, 0xc7, 0x79, 0x76, 0x16, 0xdc, 0x49, 0x31, + 0xa8, 0x15, 0xa1, 0x5a, 0xed, 0x39, 0xb4, 0x22, 0x79, 0xa8, 0x15, 0xb1, 0xf0, 0xc7, 0xd0, 0xa4, + 0x8f, 0x2d, 0x15, 0x8c, 0x06, 0x61, 0xeb, 0x55, 0x92, 0x70, 0xeb, 0xe5, 0x12, 0x0c, 0xfd, 0xce, + 0x82, 0x9b, 0x67, 0xc7, 0x45, 0x24, 0xd0, 0x55, 0x2f, 0x5a, 0xaf, 0xcd, 0xb1, 0x88, 0x07, 0x96, + 0x18, 0x17, 0x31, 0x61, 0xc4, 0xad, 0xf7, 0xc2, 0xf7, 0x7a, 0x52, 0xb7, 0x3e, 0x3b, 0xc7, 0xd6, + 0x7b, 0x4e, 0xa4, 0xb8, 0xf5, 0x0c, 0x53, 0xfb, 0x3b, 0xb0, 0x98, 0x77, 0xae, 0x9c, 0x43, 0x39, + 0x92, 0xc2, 0x38, 0xf6, 0xba, 0x4b, 0xdf, 0x88, 0x93, 0x9e, 0xaf, 0xc9, 0xb1, 0xd7, 0x5d, 0xfa, + 0xe6, 0xd7, 0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85, 0x74, 0x96, 0x83, 0xa2, 0xb5, 0x4b, 0xf9, 0x18, 0x94, + 0x32, 0xee, 0x63, 0xde, 0x85, 0x0a, 0x0e, 0x2c, 0x71, 0x31, 0x73, 0xb0, 0x3f, 0x41, 0x72, 0xd7, + 0x70, 0xf1, 0x16, 0xd4, 0xba, 0x7d, 0xd9, 0x3d, 0x96, 0x9e, 0xf5, 0xf5, 0x09, 0x88, 0x46, 0xd3, + 0xcd, 0x45, 0xd9, 0x06, 0x20, 0x93, 0xe8, 0xaa, 0xf0, 0xe1, 0x40, 0x7d, 0xec, 0xd3, 0xba, 0xa2, + 0x49, 0x24, 0x88, 0xa4, 0x75, 0x17, 0x6d, 0xc4, 0x2e, 0x5b, 0x86, 0x68, 0x3f, 0x84, 0x0a, 0xf5, + 0x8d, 0x3b, 0xc1, 0xe8, 0x6c, 0x92, 0xc7, 0x9b, 0xf3, 0xe9, 0x6c, 0x55, 0x6e, 0xff, 0x55, 0x11, + 0xca, 0x08, 0xf3, 0xdb, 0x50, 0x89, 0x44, 0xd8, 0x33, 0x0b, 0x30, 0x9d, 0x83, 0xba, 0xd8, 0xe6, + 0x1a, 0x12, 0xfe, 0xbe, 0x35, 0xc5, 0xe2, 0x1c, 0xc6, 0x92, 0xf6, 0x98, 0x37, 0xcb, 0x35, 0xa8, + 0x0c, 0x45, 0x24, 0x06, 0x76, 0x9f, 0x18, 0xc0, 0xf9, 0x61, 0x01, 0xca, 0x48, 0xc4, 0x57, 0x61, + 0xa9, 0xa3, 0x23, 0xff, 0x58, 0xea, 0x7e, 0xa4, 0x46, 0xbd, 0xbe, 0xb1, 0xa4, 0x0f, 0xe4, 0x99, + 0xf1, 0x37, 0xc6, 0x21, 0x68, 0x11, 0xf8, 0x5d, 0x56, 0x44, 0xab, 0xda, 0x54, 0x81, 0xc7, 0x4a, + 0x7c, 0x05, 0x9a, 0x4f, 0x43, 0x4f, 0x46, 0x71, 0x57, 0x45, 0xd2, 0x63, 0x65, 0xbb, 0xbb, 0x8f, + 0x59, 0x85, 0xce, 0x32, 0x79, 0xaa, 0x29, 0xa5, 0x61, 0x55, 0x7e, 0x05, 0x56, 0x36, 0xc7, 0xf3, + 0x1c, 0x56, 0x43, 0x9f, 0xf4, 0x44, 0x86, 0x68, 0x64, 0xac, 0x6e, 0x8c, 0x58, 0x7d, 0xec, 0xb3, + 0x06, 0x76, 0x66, 0xf6, 0x09, 0x03, 0xe7, 0x27, 0x85, 0xc4, 0x73, 0x2c, 0x41, 0x63, 0x5f, 0x44, + 0xa2, 0x17, 0x89, 0x21, 0xea, 0xd7, 0x84, 0x9a, 0x39, 0x38, 0xdf, 0x32, 0xde, 0xcd, 0x00, 0x77, + 0x8d, 0x6f, 0x34, 0xc0, 0x3d, 0x56, 0xca, 0x80, 0xfb, 0xac, 0x8c, 0x7d, 0x7c, 0x73, 0xa4, 0xb4, + 0x64, 0x15, 0xf2, 0x75, 0xca, 0x93, 0xac, 0x8a, 0xc8, 0x03, 0xf4, 0x28, 0xac, 0x86, 0x63, 0xde, + 0x42, 0xfb, 0x39, 0x54, 0xa7, 0xac, 0x8e, 0x6a, 0xe0, 0x34, 0x4a, 0x8f, 0x35, 0xb0, 0xe5, 0xc3, + 0xd1, 0xe0, 0x50, 0xe2, 0x30, 0x01, 0x5b, 0x0e, 0x54, 0xaf, 0x17, 0x48, 0xd6, 0xc4, 0x39, 0xc8, + 0x39, 0x5f, 0xb6, 0x48, 0x9e, 0x56, 0x04, 0x81, 0x1a, 0x69, 0xb6, 0xd4, 0xfe, 0x59, 0x09, 0xca, + 0x98, 0xa4, 0xe0, 0xde, 0xe9, 0xa3, 0x9f, 0xb1, 0x7b, 0x07, 0xbf, 0xd3, 0x1d, 0x58, 0xcc, 0x76, + 0x20, 0xff, 0x9a, 0x5d, 0xe9, 0xd2, 0x1c, 0x5e, 0x16, 0x05, 0xe7, 0x17, 0x99, 0x43, 0x79, 0xe0, + 0x0f, 0xa4, 0xf5, 0x75, 0xf4, 0x8d, 0xb8, 0x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0e, 0x37, 0xec, 0x06, 0x23, 0x4f, + 0x1e, 0xe0, 0x21, 0x68, 0xb2, 0xfc, 0x49, 0x34, 0xff, 0x16, 0x80, 0xf6, 0x07, 0xf2, 0x91, 0x8a, + 0x06, 0x42, 0xdb, 0xd0, 0xfe, 0xab, 0x97, 0x33, 0xde, 0xf5, 0x83, 0x54, 0x80, 0x9b, 0x13, 0x86, + 0xa2, 0xb1, 0x37, 0x2b, 0xba, 0xf6, 0xa9, 0x44, 0x6f, 0xa7, 0x02, 0xdc, 0x9c, 0x30, 0xe7, 0x37, + 0x01, 0xb2, 0x16, 0x7e, 0x0d, 0xf8, 0x13, 0x15, 0xea, 0xfe, 0xc6, 0xe1, 0x61, 0xb4, 0x29, 0x8f, + 0x54, 0x24, 0xb7, 0x05, 0x9e, 0x5e, 0x57, 0x61, 0x35, 0xc5, 0x6f, 0x1c, 0x69, 0x19, 0x21, 0x9a, + 0xa6, 0xbe, 0xd3, 0x57, 0x91, 0x36, 0xa1, 0x11, 0x7d, 0x3e, 0xed, 0xb0, 0x12, 0x9e, 0x98, 0xbb, + 0x9d, 0x3d, 0x56, 0x76, 0x6e, 0x01, 0x64, 0x43, 0xa2, 0x14, 0x82, 0xbe, 0xde, 0xba, 0x6b, 0x13, + 0x0a, 0x82, 0xee, 0xde, 0x67, 0x85, 0xf6, 0xdf, 0x14, 0xa1, 0x8c, 0x1e, 0xc5, 0x7a, 0xbd, 0x6a, + 0xea, 0xf5, 0x6e, 0x40, 0x33, 0xbf, 0x1d, 0xcc, 0x72, 0xe6, 0x51, 0x9f, 0xce, 0x2f, 0x62, 0x5f, + 0x79, 0xbf, 0xf8, 0x0e, 0x34, 0xbb, 0xa3, 0x58, 0xab, 0x01, 0x1d, 0x0a, 0xad, 0x12, 0xf9, 0x9e, + 0x6b, 0x53, 0x75, 0x89, 0x67, 0x22, 0x18, 0x49, 0x37, 0x4f, 0xca, 0x1f, 0x40, 0xf5, 0xc8, 0x2c, + 0x8c, 0xa9, 0x4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 0xc7, 0x70, 0xed, 0xff, 0x2a, 0x41, + 0x19, 0x17, 0x12, 0x89, 0xfb, 0x6a, 0x20, 0xd3, 0x62, 0x96, 0x31, 0xda, 0x31, 0x1c, 0x1e, 0xec, + 0xc2, 0xdc, 0x13, 0xa6, 0x64, 0xc6, 0x95, 0x4d, 0xa2, 0x91, 0x72, 0x18, 0xa9, 0x23, 0x3f, 0xc8, + 0x28, 0x6d, 0x08, 0x30, 0x81, 0xe6, 0x5f, 0x81, 0x6b, 0x03, 0x11, 0x1d, 0x4b, 0x4d, 0xde, 0xe7, + 0xb9, 0x8a, 0x8e, 0x63, 0x9c, 0xb9, 0x5d, 0xcf, 0x56, 0x41, 0xce, 0x69, 0x45, 0x77, 0xee, 0xc9, + 0x13, 0x9f, 0x28, 0xeb, 0x44, 0x99, 0xc2, 0x68, 0x1c, 0xc2, 0x4c, 0x4d, 0xc7, 0xca, 0x32, 0xf9, + 0xd1, 0x04, 0x96, 0xbf, 0x01, 0xab, 0x2f, 0x12, 0x91, 0xa9, 0x9e, 0x8b, 0xa6, 0xf6, 0x31, 0xd5, + 0x80, 0xb1, 0x86, 0x79, 0x61, 0x10, 0xef, 0x7a, 0x54, 0xc6, 0x69, 0xb8, 0x19, 0x82, 0x5f, 0x07, + 0xe8, 0x09, 0x2d, 0x5f, 0x88, 0xb3, 0xa7, 0x51, 0xd0, 0x92, 0xa6, 0x38, 0x9a, 0x61, 0x30, 0x45, + 0x0a, 0x54, 0x57, 0x04, 0x1d, 0xad, 0x22, 0xd1, 0x93, 0xfb, 0x42, 0xf7, 0x5b, 0x3d, 0x93, 0x22, + 0x4d, 0xe2, 0x71, 0x6c, 0xda, 0x1f, 0xc8, 0x8f, 0x54, 0x28, 0x5b, 0x7d, 0x33, 0xb6, 0x04, 0x46, + 0x83, 0x16, 0xa1, 0x08, 0xce, 0xb4, 0xdf, 0x45, 0x3d, 0x7c, 0x93, 0x8c, 0xe5, 0x50, 0xa8, 0x67, + 0x28, 0x35, 0xea, 0xbf, 0xeb, 0xb5, 0x3e, 0x36, 0x7a, 0xa6, 0x08, 0x67, 0x0f, 0x20, 0x33, 0x17, + 0x3c, 0x23, 0x36, 0xa8, 0x80, 0xcb, 0x16, 0x30, 0x2e, 0xdd, 0x97, 0xa1, 0xe7, 0x87, 0xbd, 0x6d, + 0x6b, 0x21, 0xac, 0x80, 0xc8, 0x8e, 0x16, 0x91, 0x96, 0x5e, 0x8a, 0xa4, 0xdc, 0x81, 0x20, 0xe9, + 0xb1, 0x92, 0xf3, 0xbf, 0x05, 0x68, 0xe6, 0xae, 0x2f, 0x7f, 0x89, 0x57, 0xae, 0x78, 0x62, 0xa3, + 0x67, 0xc0, 0x09, 0x35, 0xd6, 0x93, 0xc2, 0x38, 0xdd, 0xf6, 0x76, 0x15, 0x5b, 0x4d, 0xae, 0x99, + 0xc3, 0x7c, 0xaa, 0xeb, 0x56, 0xe7, 0xae, 0xcd, 0xbe, 0x9b, 0x50, 0x7b, 0x1a, 0x1e, 0x87, 0xea, + 0x45, 0x68, 0x8e, 0x62, 0xba, 0x43, 0x1f, 0xbb, 0x35, 0x48, 0xae, 0xb9, 0x4b, 0xce, 0x0f, 0xca, + 0x13, 0xcf, 0x4d, 0x1e, 0x42, 0xd5, 0x44, 0xa0, 0x14, 0x1c, 0x4d, 0xbf, 0x0f, 0xc8, 0x13, 0xdb, + 0x0a, 0x75, 0x0e, 0xe5, 0x5a, 0x66, 0x0c, 0x0d, 0xd3, 0x37, 0x55, 0xc5, 0x99, 0x95, 0xf4, 0x31, + 0x41, 0x89, 0xc3, 0x1b, 0x7b, 0x56, 0x98, 0x4a, 0x68, 0xff, 0x71, 0x01, 0xd6, 0x66, 0x91, 0x60, + 0xa4, 0x76, 0x38, 0xf6, 0xea, 0x23, 0x01, 0x79, 0x67, 0xe2, 0x31, 0x63, 0x91, 0x46, 0x73, 0xe7, + 0x92, 0x4a, 0x8c, 0x3f, 0x6d, 0x74, 0xbe, 0x5f, 0x80, 0xd5, 0xa9, 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f, 0x7d, 0xf3, 0x84, 0xd4, 0x9e, 0x83, 0x1e, 0xea, 0x91, 0x1a, 0x11, 0x93, 0xb7, 0x47, + 0xd0, 0xa4, 0xb1, 0xd9, 0xb2, 0xe2, 0x58, 0x69, 0xa3, 0x09, 0xb5, 0xc7, 0xe9, 0xf3, 0xc4, 0x2a, + 0x14, 0xf7, 0x8e, 0x4d, 0x22, 0x6b, 0x07, 0x6f, 0x6e, 0x0b, 0xcc, 0x4b, 0xc5, 0x32, 0xff, 0x0c, + 0x5c, 0x75, 0xe5, 0x40, 0x69, 0xf9, 0x5c, 0xf8, 0x3a, 0x5f, 0x24, 0xaa, 0xf0, 0x55, 0x58, 0x32, + 0x4d, 0x49, 0x55, 0xa8, 0xba, 0x79, 0xfb, 0xef, 0x7e, 0x7e, 0xbd, 0xf0, 0xb3, 0x9f, 0x5f, 0x2f, + 0xfc, 0xdb, 0xcf, 0xaf, 0x17, 0xbe, 0xff, 0xc9, 0xf5, 0x85, 0x9f, 0x7d, 0x72, 0x7d, 0xe1, 0x9f, + 0x3e, 0xb9, 0xbe, 0xf0, 0x11, 0x9b, 0xfc, 0x73, 0xee, 0x61, 0x95, 0x76, 0xe5, 0xbd, 0xff, 0x0f, + 0x00, 0x00, 0xff, 0xff, 0xfd, 0x1a, 0xd5, 0x38, 0xb7, 0x3b, 0x00, 0x00, } func (m *SmartBlockSnapshotBase) Marshal() (dAtA []byte, err error) { @@ -9055,6 +9168,13 @@ func (m *ObjectChangePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintModels(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x1a + } if len(m.Key) > 0 { i -= len(m.Key) copy(dAtA[i:], m.Key) @@ -9070,6 +9190,36 @@ func (m *ObjectChangePayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SpaceObjectHeader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SpaceObjectHeader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpaceObjectHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpaceID) > 0 { + i -= len(m.SpaceID) + copy(dAtA[i:], m.SpaceID) + i = encodeVarintModels(dAtA, i, uint64(len(m.SpaceID))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ObjectType) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -11252,6 +11402,23 @@ func (m *ObjectChangePayload) Size() (n int) { if l > 0 { n += 1 + l + sovModels(uint64(l)) } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *SpaceObjectHeader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceID) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } return n } @@ -19411,6 +19578,122 @@ func (m *ObjectChangePayload) Unmarshal(dAtA []byte) error { } m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceObjectHeader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SpaceObjectHeader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceObjectHeader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + 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 ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipModels(dAtA[iNdEx:]) diff --git a/pkg/lib/pb/model/protos/models.proto b/pkg/lib/pb/model/protos/models.proto index 7e4fdc32a..fb9af10af 100644 --- a/pkg/lib/pb/model/protos/models.proto +++ b/pkg/lib/pb/model/protos/models.proto @@ -40,7 +40,7 @@ enum SmartBlockType { STRelation = 0x209; STType = 0x210; STRelationOption = 0x211; - + SpaceView = 0x212; MissingObject = 0x207; } @@ -324,12 +324,12 @@ message Block { repeated Sort sorts = 4; repeated Filter filters = 5; repeated Relation relations = 6; // relations fields/columns options, also used to provide the order - string coverRelationKey = 7; // Relation used for cover in gallery + string coverRelationKey = 7; // Relation used for cover in gallery bool hideIcon = 8; // Hide icon near name Size cardSize = 9; // Gallery card size bool coverFit = 10; // Image fits container string groupRelationKey = 11; // Group view by this relationKey - bool groupBackgroundColors = 12; // Enable backgrounds in groups + bool groupBackgroundColors = 12; // Enable backgrounds in groups int32 pageLimit = 13; // Limit of objects shown in widget string defaultTemplateId = 14; // Default template that is chosen for new object created within the view string defaultObjectTypeId = 15; // Default object type that is chosen for new object created within the view @@ -449,7 +449,7 @@ message Block { string groupId = 1; int32 index = 2; bool hidden = 3; - string backgroundColor = 4; + string backgroundColor = 4; } message ObjectOrder { @@ -496,8 +496,8 @@ message Block { } message Table {} - message TableColumn {} - message TableRow { + message TableColumn {} + message TableRow { bool isHeader = 1; } @@ -651,9 +651,14 @@ message Object { message ChangePayload { SmartBlockType smartBlockType = 1; string key = 2; + bytes data = 3; } } +message SpaceObjectHeader { + string spaceID = 1; +} + message ObjectType { string url = 1; // leave empty in case you want to create the new one string name = 2; // name of objectType (can be localized for bundled types) @@ -687,7 +692,7 @@ message ObjectType { audio = 15; video = 16; date = 17; - + spaceView = 18; database = 20; // to be released later } @@ -836,3 +841,22 @@ message ObjectView { int32 redo = 2; } } + + +enum SpaceStatus { + // Unknown means the space is not loaded yet + Unknown = 0; + // Loading - the space in progress of loading + Loading = 1; + // Ok - the space loaded and available + Ok = 2; + // Missing - the space is missing + Missing = 3; + // Error - the space loading ended with an error + Error = 4; + + // RemoteWaitingDeletion - network status is "waiting deletion" + RemoteWaitingDeletion = 5; + // RemoteDeleted - the space is deleted in the current network + RemoteDeleted = 6; +} \ No newline at end of file diff --git a/pkg/lib/threads/derived.go b/pkg/lib/threads/derived.go index d4ffd773f..9861058d8 100644 --- a/pkg/lib/threads/derived.go +++ b/pkg/lib/threads/derived.go @@ -7,8 +7,23 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" ) +var ( + PersonalSpaceTypes = []smartblock.SmartBlockType{ + smartblock.SmartBlockTypeHome, + smartblock.SmartBlockTypeArchive, + smartblock.SmartBlockTypeWidget, + smartblock.SmartBlockTypeWorkspace, + smartblock.SmartBlockTypeProfilePage, + } + SpaceTypes = []smartblock.SmartBlockType{ + smartblock.SmartBlockTypeHome, + smartblock.SmartBlockTypeArchive, + smartblock.SmartBlockTypeWidget, + smartblock.SmartBlockTypeWorkspace, + } +) + type DerivedSmartblockIds struct { - AccountOld string Workspace string Profile string Home string @@ -18,12 +33,26 @@ type DerivedSmartblockIds struct { SystemRelations map[domain.RelationKey]string } -func (d DerivedSmartblockIds) IsFilled() bool { - return d.Workspace != "" && d.Profile != "" && d.Home != "" && d.Archive != "" && d.Widgets != "" +func (d DerivedSmartblockIds) IDs() []string { + allIds := []string{ + d.Workspace, + d.Home, + d.Archive, + d.Widgets, + } + if d.Profile != "" { + allIds = append(allIds, d.Profile) + } + return allIds } -func (d DerivedSmartblockIds) IsAccount(id string) bool { - return id == d.Workspace || id == d.AccountOld +func (d DerivedSmartblockIds) IsFilled() bool { + for _, id := range d.IDs() { + if id == "" { + return false + } + } + return true } func (d DerivedSmartblockIds) HasID(sbt smartblock.SmartBlockType) bool { diff --git a/space/create.go b/space/create.go new file mode 100644 index 000000000..aa67e6020 --- /dev/null +++ b/space/create.go @@ -0,0 +1,39 @@ +package space + +import ( + "context" + + coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" + "github.com/anyproto/anytype-heart/pkg/lib/threads" + "github.com/anyproto/anytype-heart/space/spacecore" +) + +func (s *service) create(ctx context.Context, coreSpace *spacecore.AnySpace) (Space, error) { + var sbTypes []coresb.SmartBlockType + if s.IsPersonal(coreSpace.Id()) { + sbTypes = threads.PersonalSpaceTypes + } else { + sbTypes = threads.SpaceTypes + } + + // create mandatory objects + _, err := s.provider.DeriveObjectIDs(ctx, coreSpace.Id(), sbTypes) + if err != nil { + return nil, err + } + err = s.provider.CreateMandatoryObjects(ctx, coreSpace.Id(), sbTypes) + if err != nil { + return nil, err + } + + // create space view + if _, err = s.techSpace.CreateSpaceView(ctx, coreSpace.Id()); err != nil { + return nil, err + } + + // load + if err = s.startLoad(ctx, coreSpace.Id()); err != nil { + return nil, err + } + return s.waitLoad(ctx, coreSpace.Id()) +} diff --git a/space/debug/clientdebugrpc/clientdebugrpc.go b/space/debug/clientdebugrpc/clientdebugrpc.go deleted file mode 100644 index 17ce64f84..000000000 --- a/space/debug/clientdebugrpc/clientdebugrpc.go +++ /dev/null @@ -1,80 +0,0 @@ -package clientdebugrpc - -import ( - "context" - - "github.com/anyproto/any-sync/accountservice" - "github.com/anyproto/any-sync/app" - "github.com/anyproto/any-sync/app/logger" - "github.com/anyproto/any-sync/commonfile/fileservice" - "github.com/anyproto/any-sync/commonspace/object/treemanager" - //nolint:misspell - "github.com/anyproto/any-sync/commonspace/spacestorage" - "github.com/anyproto/any-sync/net/rpc/debugserver" - "github.com/anyproto/any-sync/net/secureservice" - - "github.com/anyproto/anytype-heart/core/anytype/config" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/debug/clientdebugrpc/clientdebugrpcproto" - "github.com/anyproto/anytype-heart/space/storage" -) - -const CName = "common.debug.clientdebugrpc" - -var log = logger.NewNamed(CName) - -func New() ClientDebugRpc { - return &service{} -} - -type configGetter interface { - GetDebugAPIConfig() config.DebugAPIConfig -} - -type ClientDebugRpc interface { - app.ComponentRunnable -} - -type service struct { - transport secureservice.SecureService - cfg config.DebugAPIConfig - spaceService space.Service - treeManager treemanager.TreeManager - storage storage.ClientStorage - file fileservice.FileService - server debugserver.DebugServer - account accountservice.Service -} - -func (s *service) Init(a *app.App) (err error) { - s.spaceService = a.MustComponent(space.CName).(space.Service) - s.storage = a.MustComponent(spacestorage.CName).(storage.ClientStorage) - s.cfg = a.MustComponent("config").(configGetter).GetDebugAPIConfig() - s.transport = a.MustComponent(secureservice.CName).(secureservice.SecureService) - s.file = a.MustComponent(fileservice.CName).(fileservice.FileService) - s.treeManager = app.MustComponent[treemanager.TreeManager](a) - s.account = a.MustComponent(accountservice.CName).(accountservice.Service) - s.server = a.MustComponent(debugserver.CName).(debugserver.DebugServer) - return nil -} - -func (s *service) Name() (name string) { - return CName -} - -func (s *service) Run(ctx context.Context) (err error) { - return clientdebugrpcproto.DRPCRegisterClientApi(s.server, &rpcHandler{ - spaceService: s.spaceService, - storageService: s.storage, - treeManager: s.treeManager, - account: s.account, - file: s.file, - }) -} - -func (s *service) Close(ctx context.Context) (err error) { - if !s.cfg.IsEnabled { - return - } - return nil -} diff --git a/space/debug/clientdebugrpc/clientdebugrpcproto/clientdebugrpc.pb.go b/space/debug/clientdebugrpc/clientdebugrpcproto/clientdebugrpc.pb.go deleted file mode 100644 index e3dd15dd7..000000000 --- a/space/debug/clientdebugrpc/clientdebugrpcproto/clientdebugrpc.pb.go +++ /dev/null @@ -1,5778 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: debug/clientdebugrpc/clientdebugrpcproto/protos/clientdebugrpc.proto - -package clientdebugrpcproto - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type CreateSpaceRequest struct { -} - -func (m *CreateSpaceRequest) Reset() { *m = CreateSpaceRequest{} } -func (m *CreateSpaceRequest) String() string { return proto.CompactTextString(m) } -func (*CreateSpaceRequest) ProtoMessage() {} -func (*CreateSpaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{0} -} -func (m *CreateSpaceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateSpaceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreateSpaceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateSpaceRequest.Merge(m, src) -} -func (m *CreateSpaceRequest) XXX_Size() int { - return m.Size() -} -func (m *CreateSpaceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateSpaceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateSpaceRequest proto.InternalMessageInfo - -type CreateSpaceResponse struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *CreateSpaceResponse) Reset() { *m = CreateSpaceResponse{} } -func (m *CreateSpaceResponse) String() string { return proto.CompactTextString(m) } -func (*CreateSpaceResponse) ProtoMessage() {} -func (*CreateSpaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{1} -} -func (m *CreateSpaceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateSpaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateSpaceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreateSpaceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateSpaceResponse.Merge(m, src) -} -func (m *CreateSpaceResponse) XXX_Size() int { - return m.Size() -} -func (m *CreateSpaceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateSpaceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateSpaceResponse proto.InternalMessageInfo - -func (m *CreateSpaceResponse) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type DeriveSpaceRequest struct { -} - -func (m *DeriveSpaceRequest) Reset() { *m = DeriveSpaceRequest{} } -func (m *DeriveSpaceRequest) String() string { return proto.CompactTextString(m) } -func (*DeriveSpaceRequest) ProtoMessage() {} -func (*DeriveSpaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{2} -} -func (m *DeriveSpaceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeriveSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeriveSpaceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeriveSpaceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeriveSpaceRequest.Merge(m, src) -} -func (m *DeriveSpaceRequest) XXX_Size() int { - return m.Size() -} -func (m *DeriveSpaceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeriveSpaceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeriveSpaceRequest proto.InternalMessageInfo - -type DeriveSpaceResponse struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *DeriveSpaceResponse) Reset() { *m = DeriveSpaceResponse{} } -func (m *DeriveSpaceResponse) String() string { return proto.CompactTextString(m) } -func (*DeriveSpaceResponse) ProtoMessage() {} -func (*DeriveSpaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{3} -} -func (m *DeriveSpaceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeriveSpaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeriveSpaceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeriveSpaceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeriveSpaceResponse.Merge(m, src) -} -func (m *DeriveSpaceResponse) XXX_Size() int { - return m.Size() -} -func (m *DeriveSpaceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeriveSpaceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeriveSpaceResponse proto.InternalMessageInfo - -func (m *DeriveSpaceResponse) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type CreateDocumentRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` -} - -func (m *CreateDocumentRequest) Reset() { *m = CreateDocumentRequest{} } -func (m *CreateDocumentRequest) String() string { return proto.CompactTextString(m) } -func (*CreateDocumentRequest) ProtoMessage() {} -func (*CreateDocumentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{4} -} -func (m *CreateDocumentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateDocumentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreateDocumentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateDocumentRequest.Merge(m, src) -} -func (m *CreateDocumentRequest) XXX_Size() int { - return m.Size() -} -func (m *CreateDocumentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateDocumentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateDocumentRequest proto.InternalMessageInfo - -func (m *CreateDocumentRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -type CreateDocumentResponse struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *CreateDocumentResponse) Reset() { *m = CreateDocumentResponse{} } -func (m *CreateDocumentResponse) String() string { return proto.CompactTextString(m) } -func (*CreateDocumentResponse) ProtoMessage() {} -func (*CreateDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{5} -} -func (m *CreateDocumentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CreateDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CreateDocumentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CreateDocumentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateDocumentResponse.Merge(m, src) -} -func (m *CreateDocumentResponse) XXX_Size() int { - return m.Size() -} -func (m *CreateDocumentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateDocumentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateDocumentResponse proto.InternalMessageInfo - -func (m *CreateDocumentResponse) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type DeleteDocumentRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=documentId,proto3" json:"documentId,omitempty"` -} - -func (m *DeleteDocumentRequest) Reset() { *m = DeleteDocumentRequest{} } -func (m *DeleteDocumentRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteDocumentRequest) ProtoMessage() {} -func (*DeleteDocumentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{6} -} -func (m *DeleteDocumentRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteDocumentRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeleteDocumentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteDocumentRequest.Merge(m, src) -} -func (m *DeleteDocumentRequest) XXX_Size() int { - return m.Size() -} -func (m *DeleteDocumentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteDocumentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteDocumentRequest proto.InternalMessageInfo - -func (m *DeleteDocumentRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -func (m *DeleteDocumentRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId - } - return "" -} - -type DeleteDocumentResponse struct { -} - -func (m *DeleteDocumentResponse) Reset() { *m = DeleteDocumentResponse{} } -func (m *DeleteDocumentResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteDocumentResponse) ProtoMessage() {} -func (*DeleteDocumentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{7} -} -func (m *DeleteDocumentResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteDocumentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteDocumentResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeleteDocumentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteDocumentResponse.Merge(m, src) -} -func (m *DeleteDocumentResponse) XXX_Size() int { - return m.Size() -} -func (m *DeleteDocumentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteDocumentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteDocumentResponse proto.InternalMessageInfo - -type AddTextRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=documentId,proto3" json:"documentId,omitempty"` - Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` - IsSnapshot bool `protobuf:"varint,4,opt,name=isSnapshot,proto3" json:"isSnapshot,omitempty"` -} - -func (m *AddTextRequest) Reset() { *m = AddTextRequest{} } -func (m *AddTextRequest) String() string { return proto.CompactTextString(m) } -func (*AddTextRequest) ProtoMessage() {} -func (*AddTextRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{8} -} -func (m *AddTextRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddTextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddTextRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AddTextRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddTextRequest.Merge(m, src) -} -func (m *AddTextRequest) XXX_Size() int { - return m.Size() -} -func (m *AddTextRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddTextRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddTextRequest proto.InternalMessageInfo - -func (m *AddTextRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -func (m *AddTextRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId - } - return "" -} - -func (m *AddTextRequest) GetText() string { - if m != nil { - return m.Text - } - return "" -} - -func (m *AddTextRequest) GetIsSnapshot() bool { - if m != nil { - return m.IsSnapshot - } - return false -} - -type AddTextResponse struct { - DocumentId string `protobuf:"bytes,1,opt,name=documentId,proto3" json:"documentId,omitempty"` - HeadId string `protobuf:"bytes,2,opt,name=headId,proto3" json:"headId,omitempty"` - RootId string `protobuf:"bytes,3,opt,name=rootId,proto3" json:"rootId,omitempty"` -} - -func (m *AddTextResponse) Reset() { *m = AddTextResponse{} } -func (m *AddTextResponse) String() string { return proto.CompactTextString(m) } -func (*AddTextResponse) ProtoMessage() {} -func (*AddTextResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{9} -} -func (m *AddTextResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddTextResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddTextResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AddTextResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddTextResponse.Merge(m, src) -} -func (m *AddTextResponse) XXX_Size() int { - return m.Size() -} -func (m *AddTextResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddTextResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddTextResponse proto.InternalMessageInfo - -func (m *AddTextResponse) GetDocumentId() string { - if m != nil { - return m.DocumentId - } - return "" -} - -func (m *AddTextResponse) GetHeadId() string { - if m != nil { - return m.HeadId - } - return "" -} - -func (m *AddTextResponse) GetRootId() string { - if m != nil { - return m.RootId - } - return "" -} - -type DumpTreeRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=documentId,proto3" json:"documentId,omitempty"` -} - -func (m *DumpTreeRequest) Reset() { *m = DumpTreeRequest{} } -func (m *DumpTreeRequest) String() string { return proto.CompactTextString(m) } -func (*DumpTreeRequest) ProtoMessage() {} -func (*DumpTreeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{10} -} -func (m *DumpTreeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DumpTreeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DumpTreeRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DumpTreeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DumpTreeRequest.Merge(m, src) -} -func (m *DumpTreeRequest) XXX_Size() int { - return m.Size() -} -func (m *DumpTreeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DumpTreeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DumpTreeRequest proto.InternalMessageInfo - -func (m *DumpTreeRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -func (m *DumpTreeRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId - } - return "" -} - -type DumpTreeResponse struct { - Dump string `protobuf:"bytes,1,opt,name=dump,proto3" json:"dump,omitempty"` -} - -func (m *DumpTreeResponse) Reset() { *m = DumpTreeResponse{} } -func (m *DumpTreeResponse) String() string { return proto.CompactTextString(m) } -func (*DumpTreeResponse) ProtoMessage() {} -func (*DumpTreeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{11} -} -func (m *DumpTreeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DumpTreeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DumpTreeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DumpTreeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DumpTreeResponse.Merge(m, src) -} -func (m *DumpTreeResponse) XXX_Size() int { - return m.Size() -} -func (m *DumpTreeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DumpTreeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DumpTreeResponse proto.InternalMessageInfo - -func (m *DumpTreeResponse) GetDump() string { - if m != nil { - return m.Dump - } - return "" -} - -type AllTreesRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` -} - -func (m *AllTreesRequest) Reset() { *m = AllTreesRequest{} } -func (m *AllTreesRequest) String() string { return proto.CompactTextString(m) } -func (*AllTreesRequest) ProtoMessage() {} -func (*AllTreesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{12} -} -func (m *AllTreesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllTreesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllTreesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AllTreesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTreesRequest.Merge(m, src) -} -func (m *AllTreesRequest) XXX_Size() int { - return m.Size() -} -func (m *AllTreesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllTreesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AllTreesRequest proto.InternalMessageInfo - -func (m *AllTreesRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -type Tree struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Heads []string `protobuf:"bytes,2,rep,name=heads,proto3" json:"heads,omitempty"` -} - -func (m *Tree) Reset() { *m = Tree{} } -func (m *Tree) String() string { return proto.CompactTextString(m) } -func (*Tree) ProtoMessage() {} -func (*Tree) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{13} -} -func (m *Tree) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Tree.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Tree) XXX_Merge(src proto.Message) { - xxx_messageInfo_Tree.Merge(m, src) -} -func (m *Tree) XXX_Size() int { - return m.Size() -} -func (m *Tree) XXX_DiscardUnknown() { - xxx_messageInfo_Tree.DiscardUnknown(m) -} - -var xxx_messageInfo_Tree proto.InternalMessageInfo - -func (m *Tree) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Tree) GetHeads() []string { - if m != nil { - return m.Heads - } - return nil -} - -type AllTreesResponse struct { - Trees []*Tree `protobuf:"bytes,1,rep,name=trees,proto3" json:"trees,omitempty"` -} - -func (m *AllTreesResponse) Reset() { *m = AllTreesResponse{} } -func (m *AllTreesResponse) String() string { return proto.CompactTextString(m) } -func (*AllTreesResponse) ProtoMessage() {} -func (*AllTreesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{14} -} -func (m *AllTreesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllTreesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllTreesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AllTreesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTreesResponse.Merge(m, src) -} -func (m *AllTreesResponse) XXX_Size() int { - return m.Size() -} -func (m *AllTreesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllTreesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AllTreesResponse proto.InternalMessageInfo - -func (m *AllTreesResponse) GetTrees() []*Tree { - if m != nil { - return m.Trees - } - return nil -} - -type AllSpacesRequest struct { -} - -func (m *AllSpacesRequest) Reset() { *m = AllSpacesRequest{} } -func (m *AllSpacesRequest) String() string { return proto.CompactTextString(m) } -func (*AllSpacesRequest) ProtoMessage() {} -func (*AllSpacesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{15} -} -func (m *AllSpacesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllSpacesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllSpacesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AllSpacesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllSpacesRequest.Merge(m, src) -} -func (m *AllSpacesRequest) XXX_Size() int { - return m.Size() -} -func (m *AllSpacesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllSpacesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AllSpacesRequest proto.InternalMessageInfo - -type AllSpacesResponse struct { - SpaceIds []string `protobuf:"bytes,1,rep,name=spaceIds,proto3" json:"spaceIds,omitempty"` -} - -func (m *AllSpacesResponse) Reset() { *m = AllSpacesResponse{} } -func (m *AllSpacesResponse) String() string { return proto.CompactTextString(m) } -func (*AllSpacesResponse) ProtoMessage() {} -func (*AllSpacesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{16} -} -func (m *AllSpacesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllSpacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllSpacesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AllSpacesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllSpacesResponse.Merge(m, src) -} -func (m *AllSpacesResponse) XXX_Size() int { - return m.Size() -} -func (m *AllSpacesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllSpacesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AllSpacesResponse proto.InternalMessageInfo - -func (m *AllSpacesResponse) GetSpaceIds() []string { - if m != nil { - return m.SpaceIds - } - return nil -} - -type LoadSpaceRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` -} - -func (m *LoadSpaceRequest) Reset() { *m = LoadSpaceRequest{} } -func (m *LoadSpaceRequest) String() string { return proto.CompactTextString(m) } -func (*LoadSpaceRequest) ProtoMessage() {} -func (*LoadSpaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{17} -} -func (m *LoadSpaceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LoadSpaceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LoadSpaceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadSpaceRequest.Merge(m, src) -} -func (m *LoadSpaceRequest) XXX_Size() int { - return m.Size() -} -func (m *LoadSpaceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LoadSpaceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadSpaceRequest proto.InternalMessageInfo - -func (m *LoadSpaceRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -type LoadSpaceResponse struct { -} - -func (m *LoadSpaceResponse) Reset() { *m = LoadSpaceResponse{} } -func (m *LoadSpaceResponse) String() string { return proto.CompactTextString(m) } -func (*LoadSpaceResponse) ProtoMessage() {} -func (*LoadSpaceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{18} -} -func (m *LoadSpaceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LoadSpaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LoadSpaceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LoadSpaceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LoadSpaceResponse.Merge(m, src) -} -func (m *LoadSpaceResponse) XXX_Size() int { - return m.Size() -} -func (m *LoadSpaceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LoadSpaceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LoadSpaceResponse proto.InternalMessageInfo - -type TreeParamsRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - DocumentId string `protobuf:"bytes,2,opt,name=documentId,proto3" json:"documentId,omitempty"` -} - -func (m *TreeParamsRequest) Reset() { *m = TreeParamsRequest{} } -func (m *TreeParamsRequest) String() string { return proto.CompactTextString(m) } -func (*TreeParamsRequest) ProtoMessage() {} -func (*TreeParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{19} -} -func (m *TreeParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeParamsRequest.Merge(m, src) -} -func (m *TreeParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *TreeParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TreeParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TreeParamsRequest proto.InternalMessageInfo - -func (m *TreeParamsRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -func (m *TreeParamsRequest) GetDocumentId() string { - if m != nil { - return m.DocumentId - } - return "" -} - -type TreeParamsResponse struct { - RootId string `protobuf:"bytes,1,opt,name=rootId,proto3" json:"rootId,omitempty"` - HeadIds []string `protobuf:"bytes,2,rep,name=headIds,proto3" json:"headIds,omitempty"` -} - -func (m *TreeParamsResponse) Reset() { *m = TreeParamsResponse{} } -func (m *TreeParamsResponse) String() string { return proto.CompactTextString(m) } -func (*TreeParamsResponse) ProtoMessage() {} -func (*TreeParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{20} -} -func (m *TreeParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TreeParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TreeParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TreeParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TreeParamsResponse.Merge(m, src) -} -func (m *TreeParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *TreeParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TreeParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TreeParamsResponse proto.InternalMessageInfo - -func (m *TreeParamsResponse) GetRootId() string { - if m != nil { - return m.RootId - } - return "" -} - -func (m *TreeParamsResponse) GetHeadIds() []string { - if m != nil { - return m.HeadIds - } - return nil -} - -type WatchRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - TreeId string `protobuf:"bytes,2,opt,name=treeId,proto3" json:"treeId,omitempty"` -} - -func (m *WatchRequest) Reset() { *m = WatchRequest{} } -func (m *WatchRequest) String() string { return proto.CompactTextString(m) } -func (*WatchRequest) ProtoMessage() {} -func (*WatchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{21} -} -func (m *WatchRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchRequest.Merge(m, src) -} -func (m *WatchRequest) XXX_Size() int { - return m.Size() -} -func (m *WatchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WatchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchRequest proto.InternalMessageInfo - -func (m *WatchRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -func (m *WatchRequest) GetTreeId() string { - if m != nil { - return m.TreeId - } - return "" -} - -type WatchResponse struct { -} - -func (m *WatchResponse) Reset() { *m = WatchResponse{} } -func (m *WatchResponse) String() string { return proto.CompactTextString(m) } -func (*WatchResponse) ProtoMessage() {} -func (*WatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{22} -} -func (m *WatchResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_WatchResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *WatchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WatchResponse.Merge(m, src) -} -func (m *WatchResponse) XXX_Size() int { - return m.Size() -} -func (m *WatchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WatchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WatchResponse proto.InternalMessageInfo - -type UnwatchRequest struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - TreeId string `protobuf:"bytes,2,opt,name=treeId,proto3" json:"treeId,omitempty"` -} - -func (m *UnwatchRequest) Reset() { *m = UnwatchRequest{} } -func (m *UnwatchRequest) String() string { return proto.CompactTextString(m) } -func (*UnwatchRequest) ProtoMessage() {} -func (*UnwatchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{23} -} -func (m *UnwatchRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnwatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnwatchRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UnwatchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnwatchRequest.Merge(m, src) -} -func (m *UnwatchRequest) XXX_Size() int { - return m.Size() -} -func (m *UnwatchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnwatchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnwatchRequest proto.InternalMessageInfo - -func (m *UnwatchRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -func (m *UnwatchRequest) GetTreeId() string { - if m != nil { - return m.TreeId - } - return "" -} - -type UnwatchResponse struct { -} - -func (m *UnwatchResponse) Reset() { *m = UnwatchResponse{} } -func (m *UnwatchResponse) String() string { return proto.CompactTextString(m) } -func (*UnwatchResponse) ProtoMessage() {} -func (*UnwatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{24} -} -func (m *UnwatchResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnwatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UnwatchResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UnwatchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnwatchResponse.Merge(m, src) -} -func (m *UnwatchResponse) XXX_Size() int { - return m.Size() -} -func (m *UnwatchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnwatchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnwatchResponse proto.InternalMessageInfo - -type PutFileRequest struct { - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - SpaceId string `protobuf:"bytes,2,opt,name=spaceId,proto3" json:"spaceId,omitempty"` -} - -func (m *PutFileRequest) Reset() { *m = PutFileRequest{} } -func (m *PutFileRequest) String() string { return proto.CompactTextString(m) } -func (*PutFileRequest) ProtoMessage() {} -func (*PutFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{25} -} -func (m *PutFileRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PutFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PutFileRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PutFileRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutFileRequest.Merge(m, src) -} -func (m *PutFileRequest) XXX_Size() int { - return m.Size() -} -func (m *PutFileRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PutFileRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PutFileRequest proto.InternalMessageInfo - -func (m *PutFileRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *PutFileRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -type PutFileResponse struct { - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *PutFileResponse) Reset() { *m = PutFileResponse{} } -func (m *PutFileResponse) String() string { return proto.CompactTextString(m) } -func (*PutFileResponse) ProtoMessage() {} -func (*PutFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{26} -} -func (m *PutFileResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PutFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PutFileResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PutFileResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PutFileResponse.Merge(m, src) -} -func (m *PutFileResponse) XXX_Size() int { - return m.Size() -} -func (m *PutFileResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PutFileResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PutFileResponse proto.InternalMessageInfo - -func (m *PutFileResponse) GetHash() string { - if m != nil { - return m.Hash - } - return "" -} - -type GetFileRequest struct { - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` -} - -func (m *GetFileRequest) Reset() { *m = GetFileRequest{} } -func (m *GetFileRequest) String() string { return proto.CompactTextString(m) } -func (*GetFileRequest) ProtoMessage() {} -func (*GetFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{27} -} -func (m *GetFileRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetFileRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetFileRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFileRequest.Merge(m, src) -} -func (m *GetFileRequest) XXX_Size() int { - return m.Size() -} -func (m *GetFileRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetFileRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetFileRequest proto.InternalMessageInfo - -func (m *GetFileRequest) GetHash() string { - if m != nil { - return m.Hash - } - return "" -} - -func (m *GetFileRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -type GetFileResponse struct { - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` -} - -func (m *GetFileResponse) Reset() { *m = GetFileResponse{} } -func (m *GetFileResponse) String() string { return proto.CompactTextString(m) } -func (*GetFileResponse) ProtoMessage() {} -func (*GetFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{28} -} -func (m *GetFileResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetFileResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetFileResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFileResponse.Merge(m, src) -} -func (m *GetFileResponse) XXX_Size() int { - return m.Size() -} -func (m *GetFileResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetFileResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetFileResponse proto.InternalMessageInfo - -func (m *GetFileResponse) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -type DeleteFileRequest struct { - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *DeleteFileRequest) Reset() { *m = DeleteFileRequest{} } -func (m *DeleteFileRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteFileRequest) ProtoMessage() {} -func (*DeleteFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{29} -} -func (m *DeleteFileRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteFileRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeleteFileRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteFileRequest.Merge(m, src) -} -func (m *DeleteFileRequest) XXX_Size() int { - return m.Size() -} -func (m *DeleteFileRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteFileRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteFileRequest proto.InternalMessageInfo - -func (m *DeleteFileRequest) GetHash() string { - if m != nil { - return m.Hash - } - return "" -} - -type DeleteFileResponse struct { -} - -func (m *DeleteFileResponse) Reset() { *m = DeleteFileResponse{} } -func (m *DeleteFileResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteFileResponse) ProtoMessage() {} -func (*DeleteFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b1497d7bbf3441cb, []int{30} -} -func (m *DeleteFileResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeleteFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DeleteFileResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DeleteFileResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteFileResponse.Merge(m, src) -} -func (m *DeleteFileResponse) XXX_Size() int { - return m.Size() -} -func (m *DeleteFileResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteFileResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteFileResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*CreateSpaceRequest)(nil), "clientdebugrpc.CreateSpaceRequest") - proto.RegisterType((*CreateSpaceResponse)(nil), "clientdebugrpc.CreateSpaceResponse") - proto.RegisterType((*DeriveSpaceRequest)(nil), "clientdebugrpc.DeriveSpaceRequest") - proto.RegisterType((*DeriveSpaceResponse)(nil), "clientdebugrpc.DeriveSpaceResponse") - proto.RegisterType((*CreateDocumentRequest)(nil), "clientdebugrpc.CreateDocumentRequest") - proto.RegisterType((*CreateDocumentResponse)(nil), "clientdebugrpc.CreateDocumentResponse") - proto.RegisterType((*DeleteDocumentRequest)(nil), "clientdebugrpc.DeleteDocumentRequest") - proto.RegisterType((*DeleteDocumentResponse)(nil), "clientdebugrpc.DeleteDocumentResponse") - proto.RegisterType((*AddTextRequest)(nil), "clientdebugrpc.AddTextRequest") - proto.RegisterType((*AddTextResponse)(nil), "clientdebugrpc.AddTextResponse") - proto.RegisterType((*DumpTreeRequest)(nil), "clientdebugrpc.DumpTreeRequest") - proto.RegisterType((*DumpTreeResponse)(nil), "clientdebugrpc.DumpTreeResponse") - proto.RegisterType((*AllTreesRequest)(nil), "clientdebugrpc.AllTreesRequest") - proto.RegisterType((*Tree)(nil), "clientdebugrpc.Tree") - proto.RegisterType((*AllTreesResponse)(nil), "clientdebugrpc.AllTreesResponse") - proto.RegisterType((*AllSpacesRequest)(nil), "clientdebugrpc.AllSpacesRequest") - proto.RegisterType((*AllSpacesResponse)(nil), "clientdebugrpc.AllSpacesResponse") - proto.RegisterType((*LoadSpaceRequest)(nil), "clientdebugrpc.LoadSpaceRequest") - proto.RegisterType((*LoadSpaceResponse)(nil), "clientdebugrpc.LoadSpaceResponse") - proto.RegisterType((*TreeParamsRequest)(nil), "clientdebugrpc.TreeParamsRequest") - proto.RegisterType((*TreeParamsResponse)(nil), "clientdebugrpc.TreeParamsResponse") - proto.RegisterType((*WatchRequest)(nil), "clientdebugrpc.WatchRequest") - proto.RegisterType((*WatchResponse)(nil), "clientdebugrpc.WatchResponse") - proto.RegisterType((*UnwatchRequest)(nil), "clientdebugrpc.UnwatchRequest") - proto.RegisterType((*UnwatchResponse)(nil), "clientdebugrpc.UnwatchResponse") - proto.RegisterType((*PutFileRequest)(nil), "clientdebugrpc.PutFileRequest") - proto.RegisterType((*PutFileResponse)(nil), "clientdebugrpc.PutFileResponse") - proto.RegisterType((*GetFileRequest)(nil), "clientdebugrpc.GetFileRequest") - proto.RegisterType((*GetFileResponse)(nil), "clientdebugrpc.GetFileResponse") - proto.RegisterType((*DeleteFileRequest)(nil), "clientdebugrpc.DeleteFileRequest") - proto.RegisterType((*DeleteFileResponse)(nil), "clientdebugrpc.DeleteFileResponse") -} - -func init() { - proto.RegisterFile("debug/clientdebugrpc/clientdebugrpcproto/protos/clientdebugrpc.proto", fileDescriptor_b1497d7bbf3441cb) -} - -var fileDescriptor_b1497d7bbf3441cb = []byte{ - // 819 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xad, 0xd3, 0xf4, 0x23, 0x53, 0x70, 0x9a, 0x6d, 0x1b, 0x59, 0x16, 0x98, 0x74, 0x51, 0x4b, - 0x04, 0x55, 0x2b, 0xca, 0x85, 0x53, 0x45, 0xdb, 0xa8, 0xa8, 0x85, 0x4a, 0x25, 0x29, 0x45, 0xe2, - 0x82, 0xdc, 0x78, 0x45, 0x2c, 0x25, 0xb1, 0xb1, 0x1d, 0xe8, 0x89, 0xdf, 0xc0, 0xcf, 0xe2, 0xd8, - 0x23, 0x37, 0x50, 0xf3, 0x47, 0xd0, 0xda, 0x6b, 0xaf, 0x77, 0x37, 0x1f, 0xa0, 0x5c, 0xda, 0xdd, - 0xd9, 0x37, 0xef, 0x8d, 0xd7, 0xe3, 0x37, 0x81, 0x86, 0x43, 0xae, 0x07, 0x9f, 0xf7, 0xda, 0x5d, - 0x97, 0xf4, 0xa3, 0x78, 0x1d, 0xf8, 0x6d, 0x69, 0xeb, 0x07, 0x5e, 0xe4, 0xed, 0xc5, 0x7f, 0x43, - 0xe9, 0x68, 0x37, 0x8e, 0x22, 0x5d, 0x8c, 0xe2, 0x75, 0x40, 0xc7, 0x01, 0xb1, 0x23, 0xd2, 0xf2, - 0xed, 0x36, 0x69, 0x92, 0x2f, 0x03, 0x12, 0x46, 0x78, 0x0b, 0xd6, 0x84, 0x68, 0xe8, 0x7b, 0xfd, - 0x90, 0x20, 0x1d, 0x0a, 0xae, 0x63, 0x68, 0x35, 0xad, 0x5e, 0x6a, 0x16, 0x5c, 0x87, 0x26, 0x37, - 0x48, 0xe0, 0x7e, 0x55, 0x92, 0x85, 0xe8, 0x98, 0xe4, 0xe7, 0xb0, 0x91, 0x68, 0x34, 0xbc, 0xf6, - 0xa0, 0x47, 0xfa, 0x11, 0xcb, 0x47, 0x06, 0x2c, 0x85, 0x34, 0xf3, 0x34, 0x45, 0xa7, 0x5b, 0x5c, - 0x87, 0xaa, 0x9c, 0x32, 0x86, 0xfc, 0x1d, 0x6c, 0x34, 0x48, 0x97, 0xfc, 0x07, 0x39, 0xb2, 0x00, - 0x1c, 0x06, 0x3e, 0x75, 0x8c, 0x42, 0x7c, 0x98, 0x8b, 0x60, 0x03, 0xaa, 0x32, 0x65, 0x22, 0x8e, - 0xbf, 0x83, 0x7e, 0xe8, 0x38, 0x97, 0xe4, 0x66, 0x76, 0x15, 0x84, 0xa0, 0x18, 0x91, 0x9b, 0xc8, - 0x98, 0x8f, 0x4f, 0xe2, 0x35, 0xcd, 0x71, 0xc3, 0x56, 0xdf, 0xf6, 0xc3, 0x8e, 0x17, 0x19, 0xc5, - 0x9a, 0x56, 0x5f, 0x6e, 0xe6, 0x22, 0xd8, 0x86, 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- 0xee, 0x7d, 0xb0, 0xa3, 0x76, 0x67, 0x7a, 0x45, 0x55, 0x58, 0xa4, 0x37, 0xca, 0x1b, 0x31, 0xd9, - 0xe1, 0x32, 0xdc, 0x67, 0x0c, 0xec, 0x49, 0x8f, 0x40, 0x7f, 0xdf, 0xff, 0x36, 0x1b, 0x69, 0x05, - 0xca, 0x19, 0x07, 0xa3, 0x3d, 0x00, 0xfd, 0x62, 0x10, 0x9d, 0xb8, 0xdd, 0xec, 0x0d, 0x20, 0x28, - 0xfa, 0x76, 0xd4, 0x49, 0x3b, 0x91, 0xae, 0xf3, 0x52, 0x05, 0xf1, 0xad, 0x6c, 0x41, 0x39, 0xcb, - 0xe7, 0xad, 0xdc, 0xb1, 0xc3, 0x8c, 0x80, 0xae, 0xf1, 0x4b, 0xd0, 0x5f, 0x13, 0x59, 0x46, 0x46, - 0x65, 0xd2, 0x05, 0x2e, 0x4d, 0x05, 0xb2, 0x4c, 0x2e, 0x20, 0x57, 0x88, 0x9f, 0x40, 0x25, 0x71, - 0xa7, 0x29, 0x1a, 0x89, 0x67, 0x73, 0x60, 0x42, 0xb9, 0xff, 0xbb, 0x04, 0xa5, 0xe3, 0xb8, 0xdd, - 0x0f, 0x7d, 0x17, 0x5d, 0xc1, 0x4a, 0xce, 0xfe, 0x11, 0x96, 0xbf, 0x04, 0x75, 0x62, 0x98, 0x8f, - 0x27, 0x62, 0x58, 0xe1, 0x57, 0xb0, 0x92, 0x9b, 0x0c, 0x2a, 0xaf, 0x3a, 0x4c, 0x54, 0xde, 0x51, - 0xa3, 0xe5, 0x13, 0xe8, 0xe2, 0x5c, 0x40, 0x5b, 0xa3, 0xcb, 0x91, 0xa6, 0x81, 0xb9, 0x3d, 0x0d, - 0xc6, 0x05, 0x44, 0xef, 0x57, 0x05, 0x46, 0x8e, 0x1b, 0x55, 0x60, 0xf4, 0x08, 0x41, 0x67, 0xb0, - 0xc4, 0x2c, 0x1c, 0x59, 0x72, 0x8a, 0x38, 0x5b, 0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x8b, - 0x0b, 0x00, 0x00, -} - -func (m *CreateSpaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateSpaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *CreateSpaceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateSpaceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateSpaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeriveSpaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeriveSpaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeriveSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *DeriveSpaceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeriveSpaceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeriveSpaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CreateDocumentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateDocumentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CreateDocumentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CreateDocumentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CreateDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeleteDocumentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteDocumentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteDocumentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeleteDocumentResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteDocumentResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteDocumentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AddTextRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AddTextRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddTextRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsSnapshot { - i-- - if m.IsSnapshot { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Text) > 0 { - i -= len(m.Text) - copy(dAtA[i:], m.Text) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Text))) - i-- - dAtA[i] = 0x1a - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AddTextResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AddTextResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddTextResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RootId) > 0 { - i -= len(m.RootId) - copy(dAtA[i:], m.RootId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.RootId))) - i-- - dAtA[i] = 0x1a - } - if len(m.HeadId) > 0 { - i -= len(m.HeadId) - copy(dAtA[i:], m.HeadId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.HeadId))) - i-- - dAtA[i] = 0x12 - } - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DumpTreeRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DumpTreeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DumpTreeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DumpTreeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DumpTreeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DumpTreeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Dump) > 0 { - i -= len(m.Dump) - copy(dAtA[i:], m.Dump) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Dump))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AllTreesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllTreesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllTreesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Tree) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tree) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Tree) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Heads) > 0 { - for iNdEx := len(m.Heads) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Heads[iNdEx]) - copy(dAtA[i:], m.Heads[iNdEx]) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Heads[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AllTreesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllTreesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllTreesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Trees) > 0 { - for iNdEx := len(m.Trees) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Trees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintClientdebugrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AllSpacesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllSpacesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllSpacesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AllSpacesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllSpacesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllSpacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceIds) > 0 { - for iNdEx := len(m.SpaceIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SpaceIds[iNdEx]) - copy(dAtA[i:], m.SpaceIds[iNdEx]) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceIds[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *LoadSpaceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoadSpaceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LoadSpaceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LoadSpaceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LoadSpaceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *TreeParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DocumentId) > 0 { - i -= len(m.DocumentId) - copy(dAtA[i:], m.DocumentId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.DocumentId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TreeParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TreeParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TreeParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HeadIds) > 0 { - for iNdEx := len(m.HeadIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.HeadIds[iNdEx]) - copy(dAtA[i:], m.HeadIds[iNdEx]) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.HeadIds[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.RootId) > 0 { - i -= len(m.RootId) - copy(dAtA[i:], m.RootId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.RootId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TreeId) > 0 { - i -= len(m.TreeId) - copy(dAtA[i:], m.TreeId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.TreeId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WatchResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WatchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *UnwatchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UnwatchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnwatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TreeId) > 0 { - i -= len(m.TreeId) - copy(dAtA[i:], m.TreeId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.TreeId))) - i-- - dAtA[i] = 0x12 - } - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnwatchResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UnwatchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnwatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *PutFileRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PutFileRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PutFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PutFileResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PutFileResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PutFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetFileRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetFileRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x12 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetFileResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetFileResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeleteFileRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteFileRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteFileRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintClientdebugrpc(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DeleteFileResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeleteFileResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeleteFileResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintClientdebugrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovClientdebugrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CreateSpaceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *CreateSpaceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *DeriveSpaceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *DeriveSpaceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *CreateDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *CreateDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *DeleteDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *DeleteDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AddTextRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.Text) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - if m.IsSnapshot { - n += 2 - } - return n -} - -func (m *AddTextResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.HeadId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.RootId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *DumpTreeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *DumpTreeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Dump) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *AllTreesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *Tree) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - if len(m.Heads) > 0 { - for _, s := range m.Heads { - l = len(s) - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - } - return n -} - -func (m *AllTreesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Trees) > 0 { - for _, e := range m.Trees { - l = e.Size() - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - } - return n -} - -func (m *AllSpacesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AllSpacesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SpaceIds) > 0 { - for _, s := range m.SpaceIds { - l = len(s) - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - } - return n -} - -func (m *LoadSpaceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *LoadSpaceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *TreeParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.DocumentId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *TreeParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RootId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - if len(m.HeadIds) > 0 { - for _, s := range m.HeadIds { - l = len(s) - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - } - return n -} - -func (m *WatchRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.TreeId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *WatchResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *UnwatchRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.TreeId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *UnwatchResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *PutFileRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *PutFileResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *GetFileRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *GetFileResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *DeleteFileRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovClientdebugrpc(uint64(l)) - } - return n -} - -func (m *DeleteFileResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovClientdebugrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozClientdebugrpc(x uint64) (n int) { - return sovClientdebugrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CreateSpaceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateSpaceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateSpaceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateSpaceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateSpaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeriveSpaceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeriveSpaceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeriveSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeriveSpaceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeriveSpaceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeriveSpaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CreateDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CreateDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CreateDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddTextRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddTextRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddTextRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Text = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsSnapshot", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsSnapshot = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AddTextResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddTextResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddTextResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeadId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DumpTreeRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DumpTreeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DumpTreeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DumpTreeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DumpTreeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DumpTreeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dump", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Dump = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTreesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTreesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTreesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Tree) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Tree: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Heads", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Heads = append(m.Heads, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTreesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTreesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTreesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Trees", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Trees = append(m.Trees, &Tree{}) - if err := m.Trees[len(m.Trees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllSpacesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllSpacesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllSpacesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllSpacesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllSpacesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllSpacesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceIds = append(m.SpaceIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadSpaceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LoadSpaceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LoadSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LoadSpaceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LoadSpaceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LoadSpaceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DocumentId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TreeParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TreeParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TreeParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeadIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeadIds = append(m.HeadIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TreeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WatchResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WatchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnwatchRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnwatchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnwatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TreeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TreeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UnwatchResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UnwatchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UnwatchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PutFileRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PutFileRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PutFileRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PutFileResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PutFileResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PutFileResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetFileRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetFileRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetFileRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetFileResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetFileResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetFileResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteFileRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteFileRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteFileRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - 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 ErrInvalidLengthClientdebugrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthClientdebugrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteFileResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteFileResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteFileResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipClientdebugrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthClientdebugrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipClientdebugrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowClientdebugrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthClientdebugrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupClientdebugrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthClientdebugrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthClientdebugrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowClientdebugrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupClientdebugrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/space/debug/clientdebugrpc/clientdebugrpcproto/clientdebugrpc_drpc.pb.go b/space/debug/clientdebugrpc/clientdebugrpcproto/clientdebugrpc_drpc.pb.go deleted file mode 100644 index 6bc594307..000000000 --- a/space/debug/clientdebugrpc/clientdebugrpcproto/clientdebugrpc_drpc.pb.go +++ /dev/null @@ -1,674 +0,0 @@ -// Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.32 -// source: debug/clientdebugrpc/clientdebugrpcproto/protos/clientdebugrpc.proto - -package clientdebugrpcproto - -import ( - bytes "bytes" - context "context" - errors "errors" - - jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - drpc "storj.io/drpc" - drpcerr "storj.io/drpc/drpcerr" -) - -type drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto struct{} - -func (drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto) Marshal(msg drpc.Message) ([]byte, error) { - return proto.Marshal(msg.(proto.Message)) -} - -func (drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto) Unmarshal(buf []byte, msg drpc.Message) error { - return proto.Unmarshal(buf, msg.(proto.Message)) -} - -func (drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { - var buf bytes.Buffer - err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) - if err != nil { - return nil, err - } - return buf.Bytes(), nil -} - -func (drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { - return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) -} - -type DRPCClientApiClient interface { - DRPCConn() drpc.Conn - - CreateSpace(ctx context.Context, in *CreateSpaceRequest) (*CreateSpaceResponse, error) - DeriveSpace(ctx context.Context, in *DeriveSpaceRequest) (*DeriveSpaceResponse, error) - CreateDocument(ctx context.Context, in *CreateDocumentRequest) (*CreateDocumentResponse, error) - DeleteDocument(ctx context.Context, in *DeleteDocumentRequest) (*DeleteDocumentResponse, error) - AddText(ctx context.Context, in *AddTextRequest) (*AddTextResponse, error) - DumpTree(ctx context.Context, in *DumpTreeRequest) (*DumpTreeResponse, error) - TreeParams(ctx context.Context, in *TreeParamsRequest) (*TreeParamsResponse, error) - AllTrees(ctx context.Context, in *AllTreesRequest) (*AllTreesResponse, error) - AllSpaces(ctx context.Context, in *AllSpacesRequest) (*AllSpacesResponse, error) - LoadSpace(ctx context.Context, in *LoadSpaceRequest) (*LoadSpaceResponse, error) - Watch(ctx context.Context, in *WatchRequest) (*WatchResponse, error) - Unwatch(ctx context.Context, in *UnwatchRequest) (*UnwatchResponse, error) - PutFile(ctx context.Context, in *PutFileRequest) (*PutFileResponse, error) - GetFile(ctx context.Context, in *GetFileRequest) (*GetFileResponse, error) - DeleteFile(ctx context.Context, in *DeleteFileRequest) (*DeleteFileResponse, error) -} - -type drpcClientApiClient struct { - cc drpc.Conn -} - -func NewDRPCClientApiClient(cc drpc.Conn) DRPCClientApiClient { - return &drpcClientApiClient{cc} -} - -func (c *drpcClientApiClient) DRPCConn() drpc.Conn { return c.cc } - -func (c *drpcClientApiClient) CreateSpace(ctx context.Context, in *CreateSpaceRequest) (*CreateSpaceResponse, error) { - out := new(CreateSpaceResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/CreateSpace", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) DeriveSpace(ctx context.Context, in *DeriveSpaceRequest) (*DeriveSpaceResponse, error) { - out := new(DeriveSpaceResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/DeriveSpace", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) CreateDocument(ctx context.Context, in *CreateDocumentRequest) (*CreateDocumentResponse, error) { - out := new(CreateDocumentResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/CreateDocument", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) DeleteDocument(ctx context.Context, in *DeleteDocumentRequest) (*DeleteDocumentResponse, error) { - out := new(DeleteDocumentResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/DeleteDocument", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) AddText(ctx context.Context, in *AddTextRequest) (*AddTextResponse, error) { - out := new(AddTextResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/AddText", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) DumpTree(ctx context.Context, in *DumpTreeRequest) (*DumpTreeResponse, error) { - out := new(DumpTreeResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/DumpTree", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) TreeParams(ctx context.Context, in *TreeParamsRequest) (*TreeParamsResponse, error) { - out := new(TreeParamsResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/TreeParams", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) AllTrees(ctx context.Context, in *AllTreesRequest) (*AllTreesResponse, error) { - out := new(AllTreesResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/AllTrees", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) AllSpaces(ctx context.Context, in *AllSpacesRequest) (*AllSpacesResponse, error) { - out := new(AllSpacesResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/AllSpaces", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) LoadSpace(ctx context.Context, in *LoadSpaceRequest) (*LoadSpaceResponse, error) { - out := new(LoadSpaceResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/LoadSpace", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) Watch(ctx context.Context, in *WatchRequest) (*WatchResponse, error) { - out := new(WatchResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/Watch", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) Unwatch(ctx context.Context, in *UnwatchRequest) (*UnwatchResponse, error) { - out := new(UnwatchResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/Unwatch", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) PutFile(ctx context.Context, in *PutFileRequest) (*PutFileResponse, error) { - out := new(PutFileResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/PutFile", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) GetFile(ctx context.Context, in *GetFileRequest) (*GetFileResponse, error) { - out := new(GetFileResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/GetFile", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *drpcClientApiClient) DeleteFile(ctx context.Context, in *DeleteFileRequest) (*DeleteFileResponse, error) { - out := new(DeleteFileResponse) - err := c.cc.Invoke(ctx, "/clientdebugrpc.ClientApi/DeleteFile", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - -type DRPCClientApiServer interface { - CreateSpace(context.Context, *CreateSpaceRequest) (*CreateSpaceResponse, error) - DeriveSpace(context.Context, *DeriveSpaceRequest) (*DeriveSpaceResponse, error) - CreateDocument(context.Context, *CreateDocumentRequest) (*CreateDocumentResponse, error) - DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error) - AddText(context.Context, *AddTextRequest) (*AddTextResponse, error) - DumpTree(context.Context, *DumpTreeRequest) (*DumpTreeResponse, error) - TreeParams(context.Context, *TreeParamsRequest) (*TreeParamsResponse, error) - AllTrees(context.Context, *AllTreesRequest) (*AllTreesResponse, error) - AllSpaces(context.Context, *AllSpacesRequest) (*AllSpacesResponse, error) - LoadSpace(context.Context, *LoadSpaceRequest) (*LoadSpaceResponse, error) - Watch(context.Context, *WatchRequest) (*WatchResponse, error) - Unwatch(context.Context, *UnwatchRequest) (*UnwatchResponse, error) - PutFile(context.Context, *PutFileRequest) (*PutFileResponse, error) - GetFile(context.Context, *GetFileRequest) (*GetFileResponse, error) - DeleteFile(context.Context, *DeleteFileRequest) (*DeleteFileResponse, error) -} - -type DRPCClientApiUnimplementedServer struct{} - -func (s *DRPCClientApiUnimplementedServer) CreateSpace(context.Context, *CreateSpaceRequest) (*CreateSpaceResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) DeriveSpace(context.Context, *DeriveSpaceRequest) (*DeriveSpaceResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) CreateDocument(context.Context, *CreateDocumentRequest) (*CreateDocumentResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) AddText(context.Context, *AddTextRequest) (*AddTextResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) DumpTree(context.Context, *DumpTreeRequest) (*DumpTreeResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) TreeParams(context.Context, *TreeParamsRequest) (*TreeParamsResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) AllTrees(context.Context, *AllTreesRequest) (*AllTreesResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) AllSpaces(context.Context, *AllSpacesRequest) (*AllSpacesResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) LoadSpace(context.Context, *LoadSpaceRequest) (*LoadSpaceResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) Watch(context.Context, *WatchRequest) (*WatchResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) Unwatch(context.Context, *UnwatchRequest) (*UnwatchResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) PutFile(context.Context, *PutFileRequest) (*PutFileResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) GetFile(context.Context, *GetFileRequest) (*GetFileResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -func (s *DRPCClientApiUnimplementedServer) DeleteFile(context.Context, *DeleteFileRequest) (*DeleteFileResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - -type DRPCClientApiDescription struct{} - -func (DRPCClientApiDescription) NumMethods() int { return 15 } - -func (DRPCClientApiDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { - switch n { - case 0: - return "/clientdebugrpc.ClientApi/CreateSpace", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - CreateSpace( - ctx, - in1.(*CreateSpaceRequest), - ) - }, DRPCClientApiServer.CreateSpace, true - case 1: - return "/clientdebugrpc.ClientApi/DeriveSpace", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - DeriveSpace( - ctx, - in1.(*DeriveSpaceRequest), - ) - }, DRPCClientApiServer.DeriveSpace, true - case 2: - return "/clientdebugrpc.ClientApi/CreateDocument", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - CreateDocument( - ctx, - in1.(*CreateDocumentRequest), - ) - }, DRPCClientApiServer.CreateDocument, true - case 3: - return "/clientdebugrpc.ClientApi/DeleteDocument", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - DeleteDocument( - ctx, - in1.(*DeleteDocumentRequest), - ) - }, DRPCClientApiServer.DeleteDocument, true - case 4: - return "/clientdebugrpc.ClientApi/AddText", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - AddText( - ctx, - in1.(*AddTextRequest), - ) - }, DRPCClientApiServer.AddText, true - case 5: - return "/clientdebugrpc.ClientApi/DumpTree", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - DumpTree( - ctx, - in1.(*DumpTreeRequest), - ) - }, DRPCClientApiServer.DumpTree, true - case 6: - return "/clientdebugrpc.ClientApi/TreeParams", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - TreeParams( - ctx, - in1.(*TreeParamsRequest), - ) - }, DRPCClientApiServer.TreeParams, true - case 7: - return "/clientdebugrpc.ClientApi/AllTrees", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - AllTrees( - ctx, - in1.(*AllTreesRequest), - ) - }, DRPCClientApiServer.AllTrees, true - case 8: - return "/clientdebugrpc.ClientApi/AllSpaces", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - AllSpaces( - ctx, - in1.(*AllSpacesRequest), - ) - }, DRPCClientApiServer.AllSpaces, true - case 9: - return "/clientdebugrpc.ClientApi/LoadSpace", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - LoadSpace( - ctx, - in1.(*LoadSpaceRequest), - ) - }, DRPCClientApiServer.LoadSpace, true - case 10: - return "/clientdebugrpc.ClientApi/Watch", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - Watch( - ctx, - in1.(*WatchRequest), - ) - }, DRPCClientApiServer.Watch, true - case 11: - return "/clientdebugrpc.ClientApi/Unwatch", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - Unwatch( - ctx, - in1.(*UnwatchRequest), - ) - }, DRPCClientApiServer.Unwatch, true - case 12: - return "/clientdebugrpc.ClientApi/PutFile", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - PutFile( - ctx, - in1.(*PutFileRequest), - ) - }, DRPCClientApiServer.PutFile, true - case 13: - return "/clientdebugrpc.ClientApi/GetFile", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - GetFile( - ctx, - in1.(*GetFileRequest), - ) - }, DRPCClientApiServer.GetFile, true - case 14: - return "/clientdebugrpc.ClientApi/DeleteFile", drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCClientApiServer). - DeleteFile( - ctx, - in1.(*DeleteFileRequest), - ) - }, DRPCClientApiServer.DeleteFile, true - default: - return "", nil, nil, nil, false - } -} - -func DRPCRegisterClientApi(mux drpc.Mux, impl DRPCClientApiServer) error { - return mux.Register(impl, DRPCClientApiDescription{}) -} - -type DRPCClientApi_CreateSpaceStream interface { - drpc.Stream - SendAndClose(*CreateSpaceResponse) error -} - -type drpcClientApi_CreateSpaceStream struct { - drpc.Stream -} - -func (x *drpcClientApi_CreateSpaceStream) SendAndClose(m *CreateSpaceResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_DeriveSpaceStream interface { - drpc.Stream - SendAndClose(*DeriveSpaceResponse) error -} - -type drpcClientApi_DeriveSpaceStream struct { - drpc.Stream -} - -func (x *drpcClientApi_DeriveSpaceStream) SendAndClose(m *DeriveSpaceResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_CreateDocumentStream interface { - drpc.Stream - SendAndClose(*CreateDocumentResponse) error -} - -type drpcClientApi_CreateDocumentStream struct { - drpc.Stream -} - -func (x *drpcClientApi_CreateDocumentStream) SendAndClose(m *CreateDocumentResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_DeleteDocumentStream interface { - drpc.Stream - SendAndClose(*DeleteDocumentResponse) error -} - -type drpcClientApi_DeleteDocumentStream struct { - drpc.Stream -} - -func (x *drpcClientApi_DeleteDocumentStream) SendAndClose(m *DeleteDocumentResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_AddTextStream interface { - drpc.Stream - SendAndClose(*AddTextResponse) error -} - -type drpcClientApi_AddTextStream struct { - drpc.Stream -} - -func (x *drpcClientApi_AddTextStream) SendAndClose(m *AddTextResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_DumpTreeStream interface { - drpc.Stream - SendAndClose(*DumpTreeResponse) error -} - -type drpcClientApi_DumpTreeStream struct { - drpc.Stream -} - -func (x *drpcClientApi_DumpTreeStream) SendAndClose(m *DumpTreeResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_TreeParamsStream interface { - drpc.Stream - SendAndClose(*TreeParamsResponse) error -} - -type drpcClientApi_TreeParamsStream struct { - drpc.Stream -} - -func (x *drpcClientApi_TreeParamsStream) SendAndClose(m *TreeParamsResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_AllTreesStream interface { - drpc.Stream - SendAndClose(*AllTreesResponse) error -} - -type drpcClientApi_AllTreesStream struct { - drpc.Stream -} - -func (x *drpcClientApi_AllTreesStream) SendAndClose(m *AllTreesResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_AllSpacesStream interface { - drpc.Stream - SendAndClose(*AllSpacesResponse) error -} - -type drpcClientApi_AllSpacesStream struct { - drpc.Stream -} - -func (x *drpcClientApi_AllSpacesStream) SendAndClose(m *AllSpacesResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_LoadSpaceStream interface { - drpc.Stream - SendAndClose(*LoadSpaceResponse) error -} - -type drpcClientApi_LoadSpaceStream struct { - drpc.Stream -} - -func (x *drpcClientApi_LoadSpaceStream) SendAndClose(m *LoadSpaceResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_WatchStream interface { - drpc.Stream - SendAndClose(*WatchResponse) error -} - -type drpcClientApi_WatchStream struct { - drpc.Stream -} - -func (x *drpcClientApi_WatchStream) SendAndClose(m *WatchResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_UnwatchStream interface { - drpc.Stream - SendAndClose(*UnwatchResponse) error -} - -type drpcClientApi_UnwatchStream struct { - drpc.Stream -} - -func (x *drpcClientApi_UnwatchStream) SendAndClose(m *UnwatchResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_PutFileStream interface { - drpc.Stream - SendAndClose(*PutFileResponse) error -} - -type drpcClientApi_PutFileStream struct { - drpc.Stream -} - -func (x *drpcClientApi_PutFileStream) SendAndClose(m *PutFileResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_GetFileStream interface { - drpc.Stream - SendAndClose(*GetFileResponse) error -} - -type drpcClientApi_GetFileStream struct { - drpc.Stream -} - -func (x *drpcClientApi_GetFileStream) SendAndClose(m *GetFileResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} - -type DRPCClientApi_DeleteFileStream interface { - drpc.Stream - SendAndClose(*DeleteFileResponse) error -} - -type drpcClientApi_DeleteFileStream struct { - drpc.Stream -} - -func (x *drpcClientApi_DeleteFileStream) SendAndClose(m *DeleteFileResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_debug_clientdebugrpc_clientdebugrpcproto_protos_clientdebugrpc_proto{}); err != nil { - return err - } - return x.CloseSend() -} diff --git a/space/debug/clientdebugrpc/clientdebugrpcproto/protos/clientdebugrpc.proto b/space/debug/clientdebugrpc/clientdebugrpcproto/protos/clientdebugrpc.proto deleted file mode 100644 index 8e12a9428..000000000 --- a/space/debug/clientdebugrpc/clientdebugrpcproto/protos/clientdebugrpc.proto +++ /dev/null @@ -1,151 +0,0 @@ -syntax = "proto3"; -package clientdebugrpc; - -option go_package = "debug/clientdebugrpc/clientdebugrpcproto"; - -service ClientApi { - rpc CreateSpace(CreateSpaceRequest) returns(CreateSpaceResponse); - rpc DeriveSpace(DeriveSpaceRequest) returns(DeriveSpaceResponse); - rpc CreateDocument(CreateDocumentRequest) returns(CreateDocumentResponse); - rpc DeleteDocument(DeleteDocumentRequest) returns(DeleteDocumentResponse); - rpc AddText(AddTextRequest) returns(AddTextResponse); - rpc DumpTree(DumpTreeRequest) returns(DumpTreeResponse); - rpc TreeParams(TreeParamsRequest) returns(TreeParamsResponse); - rpc AllTrees(AllTreesRequest) returns(AllTreesResponse); - rpc AllSpaces(AllSpacesRequest) returns(AllSpacesResponse); - rpc LoadSpace(LoadSpaceRequest) returns(LoadSpaceResponse); - rpc Watch(WatchRequest) returns(WatchResponse); - rpc Unwatch(UnwatchRequest) returns(UnwatchResponse); - rpc PutFile(PutFileRequest) returns(PutFileResponse); - rpc GetFile(GetFileRequest) returns(GetFileResponse); - rpc DeleteFile(DeleteFileRequest) returns(DeleteFileResponse); -} - -message CreateSpaceRequest { -} - -message CreateSpaceResponse { - string id = 1; -} - -message DeriveSpaceRequest { -} - -message DeriveSpaceResponse { - string id = 1; -} - -message CreateDocumentRequest { - string spaceId = 1; -} - -message CreateDocumentResponse { - string id = 1; -} - -message DeleteDocumentRequest { - string spaceId = 1; - string documentId = 2; -} - -message DeleteDocumentResponse { -} - -message AddTextRequest { - string spaceId = 1; - string documentId = 2; - string text = 3; - bool isSnapshot = 4; -} - -message AddTextResponse { - string documentId = 1; - string headId = 2; - string rootId = 3; -} - -message DumpTreeRequest { - string spaceId = 1; - string documentId = 2; -} - -message DumpTreeResponse { - string dump = 1; -} - -message AllTreesRequest { - string spaceId = 1; -} - -message Tree { - string id = 1; - repeated string heads = 2; -} - -message AllTreesResponse { - repeated Tree trees = 1; -} - -message AllSpacesRequest { -} - -message AllSpacesResponse { - repeated string spaceIds = 1; -} - -message LoadSpaceRequest { - string spaceId = 1; -} - -message LoadSpaceResponse { -} - -message TreeParamsRequest { - string spaceId = 1; - string documentId = 2; -} - -message TreeParamsResponse { - string rootId = 1; - repeated string headIds = 2; -} - -message WatchRequest { - string spaceId = 1; - string treeId = 2; -} - -message WatchResponse { -} - -message UnwatchRequest { - string spaceId = 1; - string treeId = 2; -} - -message UnwatchResponse { -} - -message PutFileRequest { - string path = 1; - string spaceId = 2; -} - -message PutFileResponse { - string hash = 1; -} - -message GetFileRequest { - string hash = 1; - string path = 2; -} - -message GetFileResponse { - string path = 1; -} - -message DeleteFileRequest { - string hash = 1; -} - -message DeleteFileResponse {} \ No newline at end of file diff --git a/space/debug/clientdebugrpc/rpchandler.go b/space/debug/clientdebugrpc/rpchandler.go deleted file mode 100644 index 06cbb64cb..000000000 --- a/space/debug/clientdebugrpc/rpchandler.go +++ /dev/null @@ -1,183 +0,0 @@ -package clientdebugrpc - -import ( - "context" - "io" - "os" - - "github.com/anyproto/any-sync/accountservice" - "github.com/anyproto/any-sync/commonfile/fileservice" - "github.com/anyproto/any-sync/commonspace/object/treemanager" - "github.com/anyproto/any-sync/commonspace/syncstatus" - "github.com/ipfs/go-cid" - "go.uber.org/zap" - - "github.com/anyproto/anytype-heart/core/block/editor/state" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/debug/clientdebugrpc/clientdebugrpcproto" - "github.com/anyproto/anytype-heart/space/storage" -) - -type rpcHandler struct { - spaceService space.Service - storageService storage.ClientStorage - treeManager treemanager.TreeManager - account accountservice.Service - file fileservice.FileService -} - -func (r *rpcHandler) Watch(ctx context.Context, request *clientdebugrpcproto.WatchRequest) (resp *clientdebugrpcproto.WatchResponse, err error) { - space, err := r.spaceService.GetSpace(context.Background(), request.SpaceId) - if err != nil { - return - } - watcher := space.SyncStatus().(syncstatus.StatusWatcher) - watcher.Watch(request.TreeId) - resp = &clientdebugrpcproto.WatchResponse{} - return -} - -func (r *rpcHandler) Unwatch(ctx context.Context, request *clientdebugrpcproto.UnwatchRequest) (resp *clientdebugrpcproto.UnwatchResponse, err error) { - space, err := r.spaceService.GetSpace(context.Background(), request.SpaceId) - if err != nil { - return - } - watcher := space.SyncStatus().(syncstatus.StatusWatcher) - watcher.Unwatch(request.TreeId) - resp = &clientdebugrpcproto.UnwatchResponse{} - return -} - -func (r *rpcHandler) LoadSpace(ctx context.Context, request *clientdebugrpcproto.LoadSpaceRequest) (resp *clientdebugrpcproto.LoadSpaceResponse, err error) { - _, err = r.spaceService.GetSpace(context.Background(), request.SpaceId) - if err != nil { - return - } - resp = &clientdebugrpcproto.LoadSpaceResponse{} - return -} - -func (r *rpcHandler) CreateSpace(ctx context.Context, request *clientdebugrpcproto.CreateSpaceRequest) (resp *clientdebugrpcproto.CreateSpaceResponse, err error) { - panic("not implemented") - return -} - -func (r *rpcHandler) DeriveSpace(ctx context.Context, request *clientdebugrpcproto.DeriveSpaceRequest) (resp *clientdebugrpcproto.DeriveSpaceResponse, err error) { - panic("not implemented") - return -} - -func (r *rpcHandler) CreateDocument(ctx context.Context, request *clientdebugrpcproto.CreateDocumentRequest) (resp *clientdebugrpcproto.CreateDocumentResponse, err error) { - panic("not implemented") - return -} - -func (r *rpcHandler) DeleteDocument(ctx context.Context, request *clientdebugrpcproto.DeleteDocumentRequest) (resp *clientdebugrpcproto.DeleteDocumentResponse, err error) { - panic("not implemented") - return -} - -func (r *rpcHandler) AddText(ctx context.Context, request *clientdebugrpcproto.AddTextRequest) (resp *clientdebugrpcproto.AddTextResponse, err error) { - panic("not implemented") - return -} - -func (r *rpcHandler) DumpTree(ctx context.Context, request *clientdebugrpcproto.DumpTreeRequest) (resp *clientdebugrpcproto.DumpTreeResponse, err error) { - tr, err := r.treeManager.GetTree(ctx, request.SpaceId, request.DocumentId) - if err != nil { - return - } - di, err := tr.Debug(state.ChangeParser{}) - if err != nil { - return - } - resp = &clientdebugrpcproto.DumpTreeResponse{ - Dump: di.Graphviz, - } - return -} - -func (r *rpcHandler) AllTrees(ctx context.Context, request *clientdebugrpcproto.AllTreesRequest) (resp *clientdebugrpcproto.AllTreesResponse, err error) { - sp, err := r.spaceService.GetSpace(ctx, request.SpaceId) - if err != nil { - return - } - heads := sp.DebugAllHeads() - var trees []*clientdebugrpcproto.Tree - for _, head := range heads { - trees = append(trees, &clientdebugrpcproto.Tree{ - Id: head.Id, - Heads: head.Heads, - }) - } - resp = &clientdebugrpcproto.AllTreesResponse{Trees: trees} - return -} - -func (r *rpcHandler) AllSpaces(ctx context.Context, request *clientdebugrpcproto.AllSpacesRequest) (resp *clientdebugrpcproto.AllSpacesResponse, err error) { - ids, err := r.storageService.AllSpaceIds() - if err != nil { - return - } - resp = &clientdebugrpcproto.AllSpacesResponse{SpaceIds: ids} - return -} - -func (r *rpcHandler) TreeParams(ctx context.Context, request *clientdebugrpcproto.TreeParamsRequest) (resp *clientdebugrpcproto.TreeParamsResponse, err error) { - tr, err := r.treeManager.GetTree(ctx, request.SpaceId, request.DocumentId) - if err != nil { - return - } - resp = &clientdebugrpcproto.TreeParamsResponse{ - RootId: tr.Root().Id, - HeadIds: tr.Heads(), - } - return -} - -func (r *rpcHandler) PutFile(ctx context.Context, request *clientdebugrpcproto.PutFileRequest) (*clientdebugrpcproto.PutFileResponse, error) { - f, err := os.Open(request.Path) - if err != nil { - return nil, err - } - defer f.Close() - n, err := r.file.AddFile(ctx, f) - if err != nil { - return nil, err - } - return &clientdebugrpcproto.PutFileResponse{ - Hash: n.Cid().String(), - }, nil -} - -func (r *rpcHandler) GetFile(ctx context.Context, request *clientdebugrpcproto.GetFileRequest) (*clientdebugrpcproto.GetFileResponse, error) { - c, err := cid.Parse(request.Hash) - if err != nil { - return nil, err - } - - f, err := os.Create(request.Path) - if err != nil { - return nil, err - } - defer f.Close() - - rd, err := r.file.GetFile(ctx, c) - if err != nil { - return nil, err - } - defer rd.Close() - wr, err := io.Copy(f, rd) - if err != nil && err != io.EOF { - return nil, err - } - log.Info("copied bytes", zap.Int64("size", wr)) - return &clientdebugrpcproto.GetFileResponse{ - Path: request.Path, - }, nil -} - -func (r *rpcHandler) DeleteFile(ctx context.Context, request *clientdebugrpcproto.DeleteFileRequest) (*clientdebugrpcproto.DeleteFileResponse, error) { - // TODO implement me - panic("implement me") -} diff --git a/space/derive.go b/space/derive.go new file mode 100644 index 000000000..f1d20345d --- /dev/null +++ b/space/derive.go @@ -0,0 +1,45 @@ +package space + +import ( + "context" + "time" + + "github.com/anyproto/any-sync/app/ocache" + + coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" + "github.com/anyproto/anytype-heart/pkg/lib/threads" +) + +func (s *service) DerivedIDs(ctx context.Context, spaceID string) (ids threads.DerivedSmartblockIds, err error) { + res, err := s.derivedIDsCache.Get(ctx, spaceID) + if err != nil { + return + } + return res.(deriveIDsObject).DerivedSmartblockIds, nil +} + +func (s *service) loadDerivedIDs(ctx context.Context, spaceID string) (ocache.Object, error) { + var sbTypes []coresb.SmartBlockType + if s.IsPersonal(spaceID) { + sbTypes = threads.PersonalSpaceTypes + } else { + sbTypes = threads.SpaceTypes + } + ids, err := s.provider.DeriveObjectIDs(ctx, spaceID, sbTypes) + if err != nil { + return nil, err + } + return deriveIDsObject{ids}, nil +} + +type deriveIDsObject struct { + threads.DerivedSmartblockIds +} + +func (d deriveIDsObject) Close() (err error) { + return nil +} + +func (d deriveIDsObject) TryClose(objectTTL time.Duration) (res bool, err error) { + return false, nil +} diff --git a/space/id_resolver.go b/space/id_resolver.go deleted file mode 100644 index 3ca4a77f0..000000000 --- a/space/id_resolver.go +++ /dev/null @@ -1,161 +0,0 @@ -package space - -import ( - "bytes" - "fmt" - "strconv" - - "github.com/anyproto/any-sync/commonspace" - "github.com/dgraph-io/badger/v3" - - "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" - "github.com/anyproto/anytype-heart/util/badgerhelper" -) - -var ( - shortSpaceToLongPrefix = []byte("/space/short_to_long/") - longSpaceToShortPrefix = []byte("/space/long_to_short/") - spaceMappingPrefix = []byte("/space/id/") -) - -func spaceMappingKey(objectID string) []byte { - return append(spaceMappingPrefix, []byte(objectID)...) -} - -func shortSpaceToLongKey(shortSpaceID string) []byte { - return append(shortSpaceToLongPrefix, []byte(shortSpaceID)...) -} - -func longSpaceToShortKey(longSpaceID string) []byte { - return append(longSpaceToShortPrefix, []byte(longSpaceID)...) -} - -func (s *service) ResolveSpaceID(objectID string) (string, error) { - var spaceID string - if addr.IsBundledId(objectID) { - return addr.AnytypeMarketplaceWorkspace, nil - } - err := s.db.View(func(txn *badger.Txn) error { - shortSpaceID, err := s.getObjectShortSpaceID(txn, objectID) - if err != nil { - return fmt.Errorf("get short space ID: %w", err) - } - spaceID, err = s.getLongSpaceID(txn, shortSpaceID) - if err != nil { - return fmt.Errorf("get long space ID: %w", err) - } - return nil - }) - if badgerhelper.IsNotFound(err) { - return "", err - } - return spaceID, err -} - -func (s *service) storeMappingForSpace(spc commonspace.Space) error { - for _, id := range spc.StoredIds() { - if err := s.StoreSpaceID(id, spc.Id()); err != nil { - return err - } - } - return nil -} - -func (s *service) updateTxn(proc func(txn *badger.Txn) error) error { - return badgerhelper.RetryOnConflict(func() error { - return s.db.Update(proc) - }) -} - -func (s *service) StoreSpaceID(objectID, spaceID string) error { - return s.updateTxn(func(txn *badger.Txn) error { - _, err := txn.Get(spaceMappingKey(objectID)) - if badgerhelper.IsNotFound(err) { - shortSpaceID, err := s.getSpaceShortID(txn, spaceID) - if badgerhelper.IsNotFound(err) { - shortSpaceID, err = s.createAndStoreSpaceMapping(txn, spaceID) - if err != nil { - return fmt.Errorf("store short space ID: %w", err) - } - } else if err != nil { - return fmt.Errorf("get short space ID: %w", err) - } - return badgerhelper.SetValueTxn(txn, spaceMappingKey(objectID), shortSpaceID) - } else if err != nil { - return fmt.Errorf("get space mapping: %w", err) - } - return nil - }) -} - -func (s *service) getObjectShortSpaceID(txn *badger.Txn, objectID string) (string, error) { - return s.getStringForSpaceResolver(txn, spaceMappingKey(objectID)) -} - -func (s *service) getLongSpaceID(txn *badger.Txn, shortSpaceID string) (string, error) { - return s.getStringForSpaceResolver(txn, shortSpaceToLongKey(shortSpaceID)) -} - -func (s *service) getSpaceShortID(txn *badger.Txn, spaceID string) (string, error) { - return s.getStringForSpaceResolver(txn, longSpaceToShortKey(spaceID)) -} - -func (s *service) createAndStoreSpaceMapping(txn *badger.Txn, spaceID string) (string, error) { - opts := badger.DefaultIteratorOptions - opts.Prefix = shortSpaceToLongPrefix - iter := txn.NewIterator(opts) - defer iter.Close() - - last := -1 - for iter.Rewind(); iter.Valid(); iter.Next() { - key := iter.Item().Key() - rawShortSpaceID := bytes.TrimPrefix(key, shortSpaceToLongPrefix) - integer, err := strconv.Atoi(string(rawShortSpaceID)) - if err != nil { - return "", fmt.Errorf("convert short space ID %s to integer: %w", rawShortSpaceID, err) - } - if integer > last { - last = integer - } - } - - shortSpaceID := strconv.Itoa(last + 1) - err := s.storeSpaceMapping(txn, shortSpaceID, spaceID) - if err != nil { - return "", fmt.Errorf("store spaceID mapping: %w", err) - } - return shortSpaceID, nil -} - -func (s *service) storeSpaceMapping(txn *badger.Txn, shortSpaceID, spaceID string) error { - err := s.storeStringForSpaceResolver(txn, shortSpaceToLongKey(shortSpaceID), spaceID) - if err != nil { - return fmt.Errorf("store short->long space ID: %w", err) - } - err = s.storeStringForSpaceResolver(txn, longSpaceToShortKey(spaceID), shortSpaceID) - if err != nil { - return fmt.Errorf("store long->short space ID: %w", err) - } - return nil -} - -func (s *service) getStringForSpaceResolver(txn *badger.Txn, key []byte) (string, error) { - if val, ok := s.spaceResolverCache.Get(key); ok { - return val.(string), nil - } - val, err := badgerhelper.GetValueTxn(txn, key, badgerhelper.UnmarshalString) - if err != nil { - return "", err - } - s.spaceResolverCache.Set(key, val, int64(len(val))) - return val, nil -} - -func (s *service) storeStringForSpaceResolver(txn *badger.Txn, key []byte, value string) error { - err := badgerhelper.SetValueTxn(txn, key, value) - if err != nil { - return fmt.Errorf("store string for space resolver: %w", err) - } - s.spaceResolverCache.Set(key, value, int64(len(value))) - return nil -} diff --git a/space/id_resolver_test.go b/space/id_resolver_test.go deleted file mode 100644 index 9d15f365b..000000000 --- a/space/id_resolver_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package space - -import ( - "path/filepath" - "testing" - - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/ristretto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type fixture struct { - Service -} - -func newFixture(t *testing.T) *fixture { - db, err := badger.Open(badger.DefaultOptions(filepath.Join(t.TempDir(), "badger"))) - require.NoError(t, err) - - spaceResolverCache, err := ristretto.NewCache(&ristretto.Config{ - NumCounters: 10_000_000, - MaxCost: 100_000_000, - BufferItems: 64, - }) - require.NoError(t, err) - - s := &service{ - db: db, - spaceResolverCache: spaceResolverCache, - } - return &fixture{ - Service: s, - } -} - -func TestResolveSpaceID(t *testing.T) { - s := newFixture(t) - - err := s.StoreSpaceID("object1", "space1") - require.NoError(t, err) - - err = s.StoreSpaceID("object2", "space2") - require.NoError(t, err) - - got, err := s.ResolveSpaceID("object1") - require.NoError(t, err) - assert.Equal(t, "space1", got) - - got, err = s.ResolveSpaceID("object2") - require.NoError(t, err) - assert.Equal(t, "space2", got) - - _, err = s.ResolveSpaceID("object3") - require.Error(t, err) -} diff --git a/space/load.go b/space/load.go new file mode 100644 index 000000000..4ccd3a04e --- /dev/null +++ b/space/load.go @@ -0,0 +1,94 @@ +package space + +import ( + "context" + + spaceservice "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spaceinfo" +) + +func (s *service) startLoad(ctx context.Context, spaceID string) (err error) { + s.mu.Lock() + defer s.mu.Unlock() + info, loaderCreated, err := s.createLoaderOrReturnInfo(ctx, spaceID) + if err != nil { + return + } + if loaderCreated { + err = s.techSpace.SetInfo(ctx, info) + if err != nil { + return + } + } + return +} + +func (s *service) createLoaderOrReturnInfo(ctx context.Context, spaceID string) (info spaceinfo.SpaceInfo, loaderCreated bool, err error) { + currentInfo := s.techSpace.GetInfo(spaceID) + + if currentInfo.LocalStatus != spaceinfo.LocalStatusUnknown { + // loading already started + return currentInfo, false, nil + } + + viewID, err := s.techSpace.DeriveSpaceViewID(ctx, spaceID) + if err != nil { + return + } + + info = spaceinfo.SpaceInfo{ + SpaceID: spaceID, + ViewID: viewID, + LocalStatus: spaceinfo.LocalStatusLoading, + } + s.loading[spaceID] = newLoadingSpace(s.ctx, s.open, spaceID, s.onLoad) + loaderCreated = true + return +} + +func (s *service) onLoad(spaceID string, sp Space, loadErr error) (err error) { + s.mu.Lock() + defer s.mu.Unlock() + switch loadErr { + case nil: + case spaceservice.ErrSpaceDeletionPending: + return s.techSpace.SetStatuses(s.ctx, spaceID, spaceinfo.LocalStatusMissing, spaceinfo.RemoteStatusWaitingDeletion) + case spaceservice.ErrSpaceIsDeleted: + return s.techSpace.SetStatuses(s.ctx, spaceID, spaceinfo.LocalStatusMissing, spaceinfo.RemoteStatusDeleted) + default: + return s.techSpace.SetStatuses(s.ctx, spaceID, spaceinfo.LocalStatusMissing, spaceinfo.RemoteStatusError) + } + s.loaded[spaceID] = sp + + // TODO: check remote status + return s.techSpace.SetStatuses(s.ctx, spaceID, spaceinfo.LocalStatusOk, spaceinfo.RemoteStatusUnknown) +} + +func (s *service) waitLoad(ctx context.Context, spaceID string) (sp Space, err error) { + s.mu.Lock() + localStatus := s.techSpace.GetInfo(spaceID).LocalStatus + + if localStatus == spaceinfo.LocalStatusLoading { + // loading in progress, wait channel and retry + waitCh := s.loading[spaceID].loadCh + s.mu.Unlock() + select { + case <-ctx.Done(): + return nil, ctx.Err() + case <-waitCh: + } + return s.waitLoad(ctx, spaceID) + } + + if localStatus == spaceinfo.LocalStatusOk { + // space is loaded just return it + sp = s.loaded[spaceID] + s.mu.Unlock() + return + } + + // return loading error + err = s.loading[spaceID].loadErr + s.mu.Unlock() + return +} diff --git a/space/loadingspace.go b/space/loadingspace.go new file mode 100644 index 000000000..6af2f97b8 --- /dev/null +++ b/space/loadingspace.go @@ -0,0 +1,79 @@ +package space + +import ( + "context" + "time" + + "github.com/anyproto/any-sync/commonspace/spacesyncproto" + "go.uber.org/zap" +) + +var loadingRetryTimeout = time.Second * 20 + +type spaceOpener func(ctx context.Context, spaceID string) (Space, error) +type spaceOnLoad func(spaceID string, s Space, loadErr error) error + +func newLoadingSpace(ctx context.Context, spaceOpener spaceOpener, spaceID string, onLoad spaceOnLoad) *loadingSpace { + ls := &loadingSpace{ + ID: spaceID, + retryTimeout: loadingRetryTimeout, + spaceOpener: spaceOpener, + onLoad: onLoad, + loadCh: make(chan struct{}), + } + go ls.loadRetry(ctx) + return ls +} + +type loadingSpace struct { + ID string + retryTimeout time.Duration + + spaceOpener spaceOpener + onLoad spaceOnLoad + + // results + space Space + loadErr error + loadCh chan struct{} +} + +func (ls *loadingSpace) loadRetry(ctx context.Context) { + defer func() { + if err := ls.onLoad(ls.ID, ls.space, ls.loadErr); err != nil { + log.WarnCtx(ctx, "space onLoad error", zap.Error(err)) + } + close(ls.loadCh) + }() + if ls.load(ctx) { + return + } + ticker := time.NewTicker(ls.retryTimeout) + for { + select { + case <-ctx.Done(): + ls.loadErr = ctx.Err() + return + case <-ticker.C: + if ls.load(ctx) { + return + } + } + } +} + +func (ls *loadingSpace) load(ctx context.Context) (ok bool) { + sp, err := ls.spaceOpener(ctx, ls.ID) + if err == spacesyncproto.ErrSpaceMissing { + return false + } + if err == nil { + err = sp.WaitMandatoryObjects(ctx) + } + if err != nil { + ls.loadErr = err + } else { + ls.space = sp + } + return true +} diff --git a/space/mock_space/commonspace_space_mock.go b/space/mock_space/commonspace_space_mock.go deleted file mode 100644 index 14d956c2a..000000000 --- a/space/mock_space/commonspace_space_mock.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: github.com/anyproto/any-sync/commonspace (interfaces: Space) -// -// Generated by this command: -// -// mockgen -package mock_space -destination ./mock_space/commonspace_space_mock.go github.com/anyproto/any-sync/commonspace Space -// -// Package mock_space is a generated GoMock package. -package mock_space - -import ( - context "context" - reflect "reflect" - time "time" - - commonspace "github.com/anyproto/any-sync/commonspace" - headsync "github.com/anyproto/any-sync/commonspace/headsync" - syncacl "github.com/anyproto/any-sync/commonspace/object/acl/syncacl" - objectsync "github.com/anyproto/any-sync/commonspace/objectsync" - objecttreebuilder "github.com/anyproto/any-sync/commonspace/objecttreebuilder" - spacestorage "github.com/anyproto/any-sync/commonspace/spacestorage" - spacesyncproto "github.com/anyproto/any-sync/commonspace/spacesyncproto" - syncstatus "github.com/anyproto/any-sync/commonspace/syncstatus" - peer "github.com/anyproto/any-sync/net/peer" - gomock "go.uber.org/mock/gomock" -) - -// MockSpace is a mock of Space interface. -type MockSpace struct { - ctrl *gomock.Controller - recorder *MockSpaceMockRecorder -} - -// MockSpaceMockRecorder is the mock recorder for MockSpace. -type MockSpaceMockRecorder struct { - mock *MockSpace -} - -// NewMockSpace creates a new mock instance. -func NewMockSpace(ctrl *gomock.Controller) *MockSpace { - mock := &MockSpace{ctrl: ctrl} - mock.recorder = &MockSpaceMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockSpace) EXPECT() *MockSpaceMockRecorder { - return m.recorder -} - -// Acl mocks base method. -func (m *MockSpace) Acl() syncacl.SyncAcl { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Acl") - ret0, _ := ret[0].(syncacl.SyncAcl) - return ret0 -} - -// Acl indicates an expected call of Acl. -func (mr *MockSpaceMockRecorder) Acl() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Acl", reflect.TypeOf((*MockSpace)(nil).Acl)) -} - -// Close mocks base method. -func (m *MockSpace) Close() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close") - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockSpaceMockRecorder) Close() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSpace)(nil).Close)) -} - -// DebugAllHeads mocks base method. -func (m *MockSpace) DebugAllHeads() []headsync.TreeHeads { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DebugAllHeads") - ret0, _ := ret[0].([]headsync.TreeHeads) - return ret0 -} - -// DebugAllHeads indicates an expected call of DebugAllHeads. -func (mr *MockSpaceMockRecorder) DebugAllHeads() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DebugAllHeads", reflect.TypeOf((*MockSpace)(nil).DebugAllHeads)) -} - -// DeleteTree mocks base method. -func (m *MockSpace) DeleteTree(arg0 context.Context, arg1 string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteTree", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// DeleteTree indicates an expected call of DeleteTree. -func (mr *MockSpaceMockRecorder) DeleteTree(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTree", reflect.TypeOf((*MockSpace)(nil).DeleteTree), arg0, arg1) -} - -// Description mocks base method. -func (m *MockSpace) Description() (commonspace.SpaceDescription, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Description") - ret0, _ := ret[0].(commonspace.SpaceDescription) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Description indicates an expected call of Description. -func (mr *MockSpaceMockRecorder) Description() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Description", reflect.TypeOf((*MockSpace)(nil).Description)) -} - -// GetNodePeers mocks base method. -func (m *MockSpace) GetNodePeers(arg0 context.Context) ([]peer.Peer, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNodePeers", arg0) - ret0, _ := ret[0].([]peer.Peer) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetNodePeers indicates an expected call of GetNodePeers. -func (mr *MockSpaceMockRecorder) GetNodePeers(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodePeers", reflect.TypeOf((*MockSpace)(nil).GetNodePeers), arg0) -} - -// HandleMessage mocks base method. -func (m *MockSpace) HandleMessage(arg0 context.Context, arg1 objectsync.HandleMessage) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleMessage", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// HandleMessage indicates an expected call of HandleMessage. -func (mr *MockSpaceMockRecorder) HandleMessage(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMessage", reflect.TypeOf((*MockSpace)(nil).HandleMessage), arg0, arg1) -} - -// HandleRangeRequest mocks base method. -func (m *MockSpace) HandleRangeRequest(arg0 context.Context, arg1 *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleRangeRequest", arg0, arg1) - ret0, _ := ret[0].(*spacesyncproto.HeadSyncResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// HandleRangeRequest indicates an expected call of HandleRangeRequest. -func (mr *MockSpaceMockRecorder) HandleRangeRequest(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleRangeRequest", reflect.TypeOf((*MockSpace)(nil).HandleRangeRequest), arg0, arg1) -} - -// HandleSyncRequest mocks base method. -func (m *MockSpace) HandleSyncRequest(arg0 context.Context, arg1 *spacesyncproto.ObjectSyncMessage) (*spacesyncproto.ObjectSyncMessage, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HandleSyncRequest", arg0, arg1) - ret0, _ := ret[0].(*spacesyncproto.ObjectSyncMessage) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// HandleSyncRequest indicates an expected call of HandleSyncRequest. -func (mr *MockSpaceMockRecorder) HandleSyncRequest(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleSyncRequest", reflect.TypeOf((*MockSpace)(nil).HandleSyncRequest), arg0, arg1) -} - -// Id mocks base method. -func (m *MockSpace) Id() string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Id") - ret0, _ := ret[0].(string) - return ret0 -} - -// Id indicates an expected call of Id. -func (mr *MockSpaceMockRecorder) Id() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Id", reflect.TypeOf((*MockSpace)(nil).Id)) -} - -// Init mocks base method. -func (m *MockSpace) Init(arg0 context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Init", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// Init indicates an expected call of Init. -func (mr *MockSpaceMockRecorder) Init(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSpace)(nil).Init), arg0) -} - -// Storage mocks base method. -func (m *MockSpace) Storage() spacestorage.SpaceStorage { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Storage") - ret0, _ := ret[0].(spacestorage.SpaceStorage) - return ret0 -} - -// Storage indicates an expected call of Storage. -func (mr *MockSpaceMockRecorder) Storage() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Storage", reflect.TypeOf((*MockSpace)(nil).Storage)) -} - -// StoredIds mocks base method. -func (m *MockSpace) StoredIds() []string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StoredIds") - ret0, _ := ret[0].([]string) - return ret0 -} - -// StoredIds indicates an expected call of StoredIds. -func (mr *MockSpaceMockRecorder) StoredIds() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoredIds", reflect.TypeOf((*MockSpace)(nil).StoredIds)) -} - -// SyncStatus mocks base method. -func (m *MockSpace) SyncStatus() syncstatus.StatusUpdater { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncStatus") - ret0, _ := ret[0].(syncstatus.StatusUpdater) - return ret0 -} - -// SyncStatus indicates an expected call of SyncStatus. -func (mr *MockSpaceMockRecorder) SyncStatus() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncStatus", reflect.TypeOf((*MockSpace)(nil).SyncStatus)) -} - -// TreeBuilder mocks base method. -func (m *MockSpace) TreeBuilder() objecttreebuilder.TreeBuilder { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TreeBuilder") - ret0, _ := ret[0].(objecttreebuilder.TreeBuilder) - return ret0 -} - -// TreeBuilder indicates an expected call of TreeBuilder. -func (mr *MockSpaceMockRecorder) TreeBuilder() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TreeBuilder", reflect.TypeOf((*MockSpace)(nil).TreeBuilder)) -} - -// TryClose mocks base method. -func (m *MockSpace) TryClose(arg0 time.Duration) (bool, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TryClose", arg0) - ret0, _ := ret[0].(bool) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// TryClose indicates an expected call of TryClose. -func (mr *MockSpaceMockRecorder) TryClose(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryClose", reflect.TypeOf((*MockSpace)(nil).TryClose), arg0) -} diff --git a/space/mock_space/mock_Service.go b/space/mock_space/mock_Service.go deleted file mode 100644 index eeee83be5..000000000 --- a/space/mock_space/mock_Service.go +++ /dev/null @@ -1,713 +0,0 @@ -// Code generated by mockery v2.26.1. DO NOT EDIT. - -package mock_space - -import ( - context "context" - - app "github.com/anyproto/any-sync/app" - commonspace "github.com/anyproto/any-sync/commonspace" - streampool "github.com/anyproto/any-sync/net/streampool" - mock "github.com/stretchr/testify/mock" - - space "github.com/anyproto/anytype-heart/space" -) - -// MockService is an autogenerated mock type for the Service type -type MockService struct { - mock.Mock -} - -type MockService_Expecter struct { - mock *mock.Mock -} - -func (_m *MockService) EXPECT() *MockService_Expecter { - return &MockService_Expecter{mock: &_m.Mock} -} - -// AccountId provides a mock function with given fields: -func (_m *MockService) AccountId() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockService_AccountId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AccountId' -type MockService_AccountId_Call struct { - *mock.Call -} - -// AccountId is a helper method to define mock.On call -func (_e *MockService_Expecter) AccountId() *MockService_AccountId_Call { - return &MockService_AccountId_Call{Call: _e.mock.On("AccountId")} -} - -func (_c *MockService_AccountId_Call) Run(run func()) *MockService_AccountId_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockService_AccountId_Call) Return(_a0 string) *MockService_AccountId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockService_AccountId_Call) RunAndReturn(run func() string) *MockService_AccountId_Call { - _c.Call.Return(run) - return _c -} - -// AccountSpace provides a mock function with given fields: ctx -func (_m *MockService) AccountSpace(ctx context.Context) (commonspace.Space, error) { - ret := _m.Called(ctx) - - var r0 commonspace.Space - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (commonspace.Space, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) commonspace.Space); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(commonspace.Space) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_AccountSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AccountSpace' -type MockService_AccountSpace_Call struct { - *mock.Call -} - -// AccountSpace is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockService_Expecter) AccountSpace(ctx interface{}) *MockService_AccountSpace_Call { - return &MockService_AccountSpace_Call{Call: _e.mock.On("AccountSpace", ctx)} -} - -func (_c *MockService_AccountSpace_Call) Run(run func(ctx context.Context)) *MockService_AccountSpace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockService_AccountSpace_Call) Return(_a0 commonspace.Space, _a1 error) *MockService_AccountSpace_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockService_AccountSpace_Call) RunAndReturn(run func(context.Context) (commonspace.Space, error)) *MockService_AccountSpace_Call { - _c.Call.Return(run) - return _c -} - -// Close provides a mock function with given fields: ctx -func (_m *MockService) Close(ctx context.Context) error { - ret := _m.Called(ctx) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' -type MockService_Close_Call struct { - *mock.Call -} - -// Close is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockService_Expecter) Close(ctx interface{}) *MockService_Close_Call { - return &MockService_Close_Call{Call: _e.mock.On("Close", ctx)} -} - -func (_c *MockService_Close_Call) Run(run func(ctx context.Context)) *MockService_Close_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockService_Close_Call) Return(err error) *MockService_Close_Call { - _c.Call.Return(err) - return _c -} - -func (_c *MockService_Close_Call) RunAndReturn(run func(context.Context) error) *MockService_Close_Call { - _c.Call.Return(run) - return _c -} - -// CreateSpace provides a mock function with given fields: ctx -func (_m *MockService) CreateSpace(ctx context.Context) (commonspace.Space, error) { - ret := _m.Called(ctx) - - var r0 commonspace.Space - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (commonspace.Space, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) commonspace.Space); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(commonspace.Space) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_CreateSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSpace' -type MockService_CreateSpace_Call struct { - *mock.Call -} - -// CreateSpace is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockService_Expecter) CreateSpace(ctx interface{}) *MockService_CreateSpace_Call { - return &MockService_CreateSpace_Call{Call: _e.mock.On("CreateSpace", ctx)} -} - -func (_c *MockService_CreateSpace_Call) Run(run func(ctx context.Context)) *MockService_CreateSpace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockService_CreateSpace_Call) Return(container commonspace.Space, err error) *MockService_CreateSpace_Call { - _c.Call.Return(container, err) - return _c -} - -func (_c *MockService_CreateSpace_Call) RunAndReturn(run func(context.Context) (commonspace.Space, error)) *MockService_CreateSpace_Call { - _c.Call.Return(run) - return _c -} - -// DeleteAccount provides a mock function with given fields: ctx, revert -func (_m *MockService) DeleteAccount(ctx context.Context, revert bool) (space.StatusPayload, error) { - ret := _m.Called(ctx, revert) - - var r0 space.StatusPayload - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, bool) (space.StatusPayload, error)); ok { - return rf(ctx, revert) - } - if rf, ok := ret.Get(0).(func(context.Context, bool) space.StatusPayload); ok { - r0 = rf(ctx, revert) - } else { - r0 = ret.Get(0).(space.StatusPayload) - } - - if rf, ok := ret.Get(1).(func(context.Context, bool) error); ok { - r1 = rf(ctx, revert) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_DeleteAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAccount' -type MockService_DeleteAccount_Call struct { - *mock.Call -} - -// DeleteAccount is a helper method to define mock.On call -// - ctx context.Context -// - revert bool -func (_e *MockService_Expecter) DeleteAccount(ctx interface{}, revert interface{}) *MockService_DeleteAccount_Call { - return &MockService_DeleteAccount_Call{Call: _e.mock.On("DeleteAccount", ctx, revert)} -} - -func (_c *MockService_DeleteAccount_Call) Run(run func(ctx context.Context, revert bool)) *MockService_DeleteAccount_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(bool)) - }) - return _c -} - -func (_c *MockService_DeleteAccount_Call) Return(payload space.StatusPayload, err error) *MockService_DeleteAccount_Call { - _c.Call.Return(payload, err) - return _c -} - -func (_c *MockService_DeleteAccount_Call) RunAndReturn(run func(context.Context, bool) (space.StatusPayload, error)) *MockService_DeleteAccount_Call { - _c.Call.Return(run) - return _c -} - -// DeleteSpace provides a mock function with given fields: ctx, spaceID, revert -func (_m *MockService) DeleteSpace(ctx context.Context, spaceID string, revert bool) (space.StatusPayload, error) { - ret := _m.Called(ctx, spaceID, revert) - - var r0 space.StatusPayload - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bool) (space.StatusPayload, error)); ok { - return rf(ctx, spaceID, revert) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bool) space.StatusPayload); ok { - r0 = rf(ctx, spaceID, revert) - } else { - r0 = ret.Get(0).(space.StatusPayload) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { - r1 = rf(ctx, spaceID, revert) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_DeleteSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSpace' -type MockService_DeleteSpace_Call struct { - *mock.Call -} - -// DeleteSpace is a helper method to define mock.On call -// - ctx context.Context -// - spaceID string -// - revert bool -func (_e *MockService_Expecter) DeleteSpace(ctx interface{}, spaceID interface{}, revert interface{}) *MockService_DeleteSpace_Call { - return &MockService_DeleteSpace_Call{Call: _e.mock.On("DeleteSpace", ctx, spaceID, revert)} -} - -func (_c *MockService_DeleteSpace_Call) Run(run func(ctx context.Context, spaceID string, revert bool)) *MockService_DeleteSpace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(bool)) - }) - return _c -} - -func (_c *MockService_DeleteSpace_Call) Return(payload space.StatusPayload, err error) *MockService_DeleteSpace_Call { - _c.Call.Return(payload, err) - return _c -} - -func (_c *MockService_DeleteSpace_Call) RunAndReturn(run func(context.Context, string, bool) (space.StatusPayload, error)) *MockService_DeleteSpace_Call { - _c.Call.Return(run) - return _c -} - -// DeriveSpace provides a mock function with given fields: ctx, payload -func (_m *MockService) DeriveSpace(ctx context.Context, payload commonspace.SpaceDerivePayload) (commonspace.Space, error) { - ret := _m.Called(ctx, payload) - - var r0 commonspace.Space - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, commonspace.SpaceDerivePayload) (commonspace.Space, error)); ok { - return rf(ctx, payload) - } - if rf, ok := ret.Get(0).(func(context.Context, commonspace.SpaceDerivePayload) commonspace.Space); ok { - r0 = rf(ctx, payload) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(commonspace.Space) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, commonspace.SpaceDerivePayload) error); ok { - r1 = rf(ctx, payload) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_DeriveSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveSpace' -type MockService_DeriveSpace_Call struct { - *mock.Call -} - -// DeriveSpace is a helper method to define mock.On call -// - ctx context.Context -// - payload commonspace.SpaceDerivePayload -func (_e *MockService_Expecter) DeriveSpace(ctx interface{}, payload interface{}) *MockService_DeriveSpace_Call { - return &MockService_DeriveSpace_Call{Call: _e.mock.On("DeriveSpace", ctx, payload)} -} - -func (_c *MockService_DeriveSpace_Call) Run(run func(ctx context.Context, payload commonspace.SpaceDerivePayload)) *MockService_DeriveSpace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(commonspace.SpaceDerivePayload)) - }) - return _c -} - -func (_c *MockService_DeriveSpace_Call) Return(_a0 commonspace.Space, _a1 error) *MockService_DeriveSpace_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockService_DeriveSpace_Call) RunAndReturn(run func(context.Context, commonspace.SpaceDerivePayload) (commonspace.Space, error)) *MockService_DeriveSpace_Call { - _c.Call.Return(run) - return _c -} - -// GetSpace provides a mock function with given fields: ctx, id -func (_m *MockService) GetSpace(ctx context.Context, id string) (commonspace.Space, error) { - ret := _m.Called(ctx, id) - - var r0 commonspace.Space - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (commonspace.Space, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) commonspace.Space); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(commonspace.Space) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_GetSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSpace' -type MockService_GetSpace_Call struct { - *mock.Call -} - -// GetSpace is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockService_Expecter) GetSpace(ctx interface{}, id interface{}) *MockService_GetSpace_Call { - return &MockService_GetSpace_Call{Call: _e.mock.On("GetSpace", ctx, id)} -} - -func (_c *MockService_GetSpace_Call) Run(run func(ctx context.Context, id string)) *MockService_GetSpace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockService_GetSpace_Call) Return(_a0 commonspace.Space, _a1 error) *MockService_GetSpace_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockService_GetSpace_Call) RunAndReturn(run func(context.Context, string) (commonspace.Space, error)) *MockService_GetSpace_Call { - _c.Call.Return(run) - return _c -} - -// Init provides a mock function with given fields: a -func (_m *MockService) Init(a *app.App) error { - ret := _m.Called(a) - - var r0 error - if rf, ok := ret.Get(0).(func(*app.App) error); ok { - r0 = rf(a) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockService_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' -type MockService_Init_Call struct { - *mock.Call -} - -// Init is a helper method to define mock.On call -// - a *app.App -func (_e *MockService_Expecter) Init(a interface{}) *MockService_Init_Call { - return &MockService_Init_Call{Call: _e.mock.On("Init", a)} -} - -func (_c *MockService_Init_Call) Run(run func(a *app.App)) *MockService_Init_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*app.App)) - }) - return _c -} - -func (_c *MockService_Init_Call) Return(err error) *MockService_Init_Call { - _c.Call.Return(err) - return _c -} - -func (_c *MockService_Init_Call) RunAndReturn(run func(*app.App) error) *MockService_Init_Call { - _c.Call.Return(run) - return _c -} - -// Name provides a mock function with given fields: -func (_m *MockService) Name() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// MockService_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' -type MockService_Name_Call struct { - *mock.Call -} - -// Name is a helper method to define mock.On call -func (_e *MockService_Expecter) Name() *MockService_Name_Call { - return &MockService_Name_Call{Call: _e.mock.On("Name")} -} - -func (_c *MockService_Name_Call) Run(run func()) *MockService_Name_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockService_Name_Call) Return(name string) *MockService_Name_Call { - _c.Call.Return(name) - return _c -} - -func (_c *MockService_Name_Call) RunAndReturn(run func() string) *MockService_Name_Call { - _c.Call.Return(run) - return _c -} - -// ResolveSpaceID provides a mock function with given fields: objectID -func (_m *MockService) ResolveSpaceID(objectID string) (string, error) { - ret := _m.Called(objectID) - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(objectID) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(objectID) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(objectID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockService_ResolveSpaceID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveSpaceID' -type MockService_ResolveSpaceID_Call struct { - *mock.Call -} - -// ResolveSpaceID is a helper method to define mock.On call -// - objectID string -func (_e *MockService_Expecter) ResolveSpaceID(objectID interface{}) *MockService_ResolveSpaceID_Call { - return &MockService_ResolveSpaceID_Call{Call: _e.mock.On("ResolveSpaceID", objectID)} -} - -func (_c *MockService_ResolveSpaceID_Call) Run(run func(objectID string)) *MockService_ResolveSpaceID_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *MockService_ResolveSpaceID_Call) Return(_a0 string, _a1 error) *MockService_ResolveSpaceID_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockService_ResolveSpaceID_Call) RunAndReturn(run func(string) (string, error)) *MockService_ResolveSpaceID_Call { - _c.Call.Return(run) - return _c -} - -// Run provides a mock function with given fields: ctx -func (_m *MockService) Run(ctx context.Context) error { - ret := _m.Called(ctx) - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockService_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' -type MockService_Run_Call struct { - *mock.Call -} - -// Run is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockService_Expecter) Run(ctx interface{}) *MockService_Run_Call { - return &MockService_Run_Call{Call: _e.mock.On("Run", ctx)} -} - -func (_c *MockService_Run_Call) Run(run func(ctx context.Context)) *MockService_Run_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockService_Run_Call) Return(err error) *MockService_Run_Call { - _c.Call.Return(err) - return _c -} - -func (_c *MockService_Run_Call) RunAndReturn(run func(context.Context) error) *MockService_Run_Call { - _c.Call.Return(run) - return _c -} - -// StoreSpaceID provides a mock function with given fields: objectID, spaceID -func (_m *MockService) StoreSpaceID(objectID string, spaceID string) error { - ret := _m.Called(objectID, spaceID) - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(objectID, spaceID) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockService_StoreSpaceID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreSpaceID' -type MockService_StoreSpaceID_Call struct { - *mock.Call -} - -// StoreSpaceID is a helper method to define mock.On call -// - objectID string -// - spaceID string -func (_e *MockService_Expecter) StoreSpaceID(objectID interface{}, spaceID interface{}) *MockService_StoreSpaceID_Call { - return &MockService_StoreSpaceID_Call{Call: _e.mock.On("StoreSpaceID", objectID, spaceID)} -} - -func (_c *MockService_StoreSpaceID_Call) Run(run func(objectID string, spaceID string)) *MockService_StoreSpaceID_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *MockService_StoreSpaceID_Call) Return(_a0 error) *MockService_StoreSpaceID_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockService_StoreSpaceID_Call) RunAndReturn(run func(string, string) error) *MockService_StoreSpaceID_Call { - _c.Call.Return(run) - return _c -} - -// StreamPool provides a mock function with given fields: -func (_m *MockService) StreamPool() streampool.StreamPool { - ret := _m.Called() - - var r0 streampool.StreamPool - if rf, ok := ret.Get(0).(func() streampool.StreamPool); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(streampool.StreamPool) - } - } - - return r0 -} - -// MockService_StreamPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamPool' -type MockService_StreamPool_Call struct { - *mock.Call -} - -// StreamPool is a helper method to define mock.On call -func (_e *MockService_Expecter) StreamPool() *MockService_StreamPool_Call { - return &MockService_StreamPool_Call{Call: _e.mock.On("StreamPool")} -} - -func (_c *MockService_StreamPool_Call) Run(run func()) *MockService_StreamPool_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockService_StreamPool_Call) Return(_a0 streampool.StreamPool) *MockService_StreamPool_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockService_StreamPool_Call) RunAndReturn(run func() streampool.StreamPool) *MockService_StreamPool_Call { - _c.Call.Return(run) - return _c -} - -type mockConstructorTestingTNewMockService interface { - mock.TestingT - Cleanup(func()) -} - -// NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewMockService(t mockConstructorTestingTNewMockService) *MockService { - mock := &MockService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/space/mock_space/mock_bundledObjectsInstaller.go b/space/mock_space/mock_bundledObjectsInstaller.go new file mode 100644 index 000000000..7a07a88c5 --- /dev/null +++ b/space/mock_space/mock_bundledObjectsInstaller.go @@ -0,0 +1,187 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_space + +import ( + context "context" + + app "github.com/anyproto/any-sync/app" + types "github.com/gogo/protobuf/types" + mock "github.com/stretchr/testify/mock" +) + +// MockbundledObjectsInstaller is an autogenerated mock type for the bundledObjectsInstaller type +type MockbundledObjectsInstaller struct { + mock.Mock +} + +type MockbundledObjectsInstaller_Expecter struct { + mock *mock.Mock +} + +func (_m *MockbundledObjectsInstaller) EXPECT() *MockbundledObjectsInstaller_Expecter { + return &MockbundledObjectsInstaller_Expecter{mock: &_m.Mock} +} + +// Init provides a mock function with given fields: a +func (_m *MockbundledObjectsInstaller) Init(a *app.App) error { + ret := _m.Called(a) + + var r0 error + if rf, ok := ret.Get(0).(func(*app.App) error); ok { + r0 = rf(a) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockbundledObjectsInstaller_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type MockbundledObjectsInstaller_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - a *app.App +func (_e *MockbundledObjectsInstaller_Expecter) Init(a interface{}) *MockbundledObjectsInstaller_Init_Call { + return &MockbundledObjectsInstaller_Init_Call{Call: _e.mock.On("Init", a)} +} + +func (_c *MockbundledObjectsInstaller_Init_Call) Run(run func(a *app.App)) *MockbundledObjectsInstaller_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*app.App)) + }) + return _c +} + +func (_c *MockbundledObjectsInstaller_Init_Call) Return(err error) *MockbundledObjectsInstaller_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockbundledObjectsInstaller_Init_Call) RunAndReturn(run func(*app.App) error) *MockbundledObjectsInstaller_Init_Call { + _c.Call.Return(run) + return _c +} + +// InstallBundledObjects provides a mock function with given fields: ctx, spaceID, ids +func (_m *MockbundledObjectsInstaller) InstallBundledObjects(ctx context.Context, spaceID string, ids []string) ([]string, []*types.Struct, error) { + ret := _m.Called(ctx, spaceID, ids) + + var r0 []string + var r1 []*types.Struct + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, []string) ([]string, []*types.Struct, error)); ok { + return rf(ctx, spaceID, ids) + } + if rf, ok := ret.Get(0).(func(context.Context, string, []string) []string); ok { + r0 = rf(ctx, spaceID, ids) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, []string) []*types.Struct); ok { + r1 = rf(ctx, spaceID, ids) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).([]*types.Struct) + } + } + + if rf, ok := ret.Get(2).(func(context.Context, string, []string) error); ok { + r2 = rf(ctx, spaceID, ids) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// MockbundledObjectsInstaller_InstallBundledObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstallBundledObjects' +type MockbundledObjectsInstaller_InstallBundledObjects_Call struct { + *mock.Call +} + +// InstallBundledObjects is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - ids []string +func (_e *MockbundledObjectsInstaller_Expecter) InstallBundledObjects(ctx interface{}, spaceID interface{}, ids interface{}) *MockbundledObjectsInstaller_InstallBundledObjects_Call { + return &MockbundledObjectsInstaller_InstallBundledObjects_Call{Call: _e.mock.On("InstallBundledObjects", ctx, spaceID, ids)} +} + +func (_c *MockbundledObjectsInstaller_InstallBundledObjects_Call) Run(run func(ctx context.Context, spaceID string, ids []string)) *MockbundledObjectsInstaller_InstallBundledObjects_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]string)) + }) + return _c +} + +func (_c *MockbundledObjectsInstaller_InstallBundledObjects_Call) Return(_a0 []string, _a1 []*types.Struct, _a2 error) *MockbundledObjectsInstaller_InstallBundledObjects_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *MockbundledObjectsInstaller_InstallBundledObjects_Call) RunAndReturn(run func(context.Context, string, []string) ([]string, []*types.Struct, error)) *MockbundledObjectsInstaller_InstallBundledObjects_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *MockbundledObjectsInstaller) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockbundledObjectsInstaller_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockbundledObjectsInstaller_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockbundledObjectsInstaller_Expecter) Name() *MockbundledObjectsInstaller_Name_Call { + return &MockbundledObjectsInstaller_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockbundledObjectsInstaller_Name_Call) Run(run func()) *MockbundledObjectsInstaller_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockbundledObjectsInstaller_Name_Call) Return(name string) *MockbundledObjectsInstaller_Name_Call { + _c.Call.Return(name) + return _c +} + +func (_c *MockbundledObjectsInstaller_Name_Call) RunAndReturn(run func() string) *MockbundledObjectsInstaller_Name_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockbundledObjectsInstaller interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockbundledObjectsInstaller creates a new instance of MockbundledObjectsInstaller. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockbundledObjectsInstaller(t mockConstructorTestingTNewMockbundledObjectsInstaller) *MockbundledObjectsInstaller { + mock := &MockbundledObjectsInstaller{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/space/mock_space/mock_isNewAccount.go b/space/mock_space/mock_isNewAccount.go new file mode 100644 index 000000000..25201a1c3 --- /dev/null +++ b/space/mock_space/mock_isNewAccount.go @@ -0,0 +1,160 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_space + +import ( + app "github.com/anyproto/any-sync/app" + mock "github.com/stretchr/testify/mock" +) + +// MockisNewAccount is an autogenerated mock type for the isNewAccount type +type MockisNewAccount struct { + mock.Mock +} + +type MockisNewAccount_Expecter struct { + mock *mock.Mock +} + +func (_m *MockisNewAccount) EXPECT() *MockisNewAccount_Expecter { + return &MockisNewAccount_Expecter{mock: &_m.Mock} +} + +// Init provides a mock function with given fields: a +func (_m *MockisNewAccount) Init(a *app.App) error { + ret := _m.Called(a) + + var r0 error + if rf, ok := ret.Get(0).(func(*app.App) error); ok { + r0 = rf(a) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockisNewAccount_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type MockisNewAccount_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - a *app.App +func (_e *MockisNewAccount_Expecter) Init(a interface{}) *MockisNewAccount_Init_Call { + return &MockisNewAccount_Init_Call{Call: _e.mock.On("Init", a)} +} + +func (_c *MockisNewAccount_Init_Call) Run(run func(a *app.App)) *MockisNewAccount_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*app.App)) + }) + return _c +} + +func (_c *MockisNewAccount_Init_Call) Return(err error) *MockisNewAccount_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockisNewAccount_Init_Call) RunAndReturn(run func(*app.App) error) *MockisNewAccount_Init_Call { + _c.Call.Return(run) + return _c +} + +// IsNewAccount provides a mock function with given fields: +func (_m *MockisNewAccount) IsNewAccount() bool { + ret := _m.Called() + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockisNewAccount_IsNewAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNewAccount' +type MockisNewAccount_IsNewAccount_Call struct { + *mock.Call +} + +// IsNewAccount is a helper method to define mock.On call +func (_e *MockisNewAccount_Expecter) IsNewAccount() *MockisNewAccount_IsNewAccount_Call { + return &MockisNewAccount_IsNewAccount_Call{Call: _e.mock.On("IsNewAccount")} +} + +func (_c *MockisNewAccount_IsNewAccount_Call) Run(run func()) *MockisNewAccount_IsNewAccount_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockisNewAccount_IsNewAccount_Call) Return(_a0 bool) *MockisNewAccount_IsNewAccount_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockisNewAccount_IsNewAccount_Call) RunAndReturn(run func() bool) *MockisNewAccount_IsNewAccount_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *MockisNewAccount) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockisNewAccount_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockisNewAccount_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockisNewAccount_Expecter) Name() *MockisNewAccount_Name_Call { + return &MockisNewAccount_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockisNewAccount_Name_Call) Run(run func()) *MockisNewAccount_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockisNewAccount_Name_Call) Return(name string) *MockisNewAccount_Name_Call { + _c.Call.Return(name) + return _c +} + +func (_c *MockisNewAccount_Name_Call) RunAndReturn(run func() string) *MockisNewAccount_Name_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockisNewAccount interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockisNewAccount creates a new instance of MockisNewAccount. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockisNewAccount(t mockConstructorTestingTNewMockisNewAccount) *MockisNewAccount { + mock := &MockisNewAccount{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/space/objectprovider/objectprovider.go b/space/objectprovider/objectprovider.go new file mode 100644 index 000000000..0bd9b05a9 --- /dev/null +++ b/space/objectprovider/objectprovider.go @@ -0,0 +1,133 @@ +package objectprovider + +import ( + "context" + "fmt" + + "github.com/anyproto/any-sync/app/logger" + "github.com/gogo/protobuf/types" + "go.uber.org/zap" + + editorsb "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + "github.com/anyproto/anytype-heart/core/block/editor/state" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" + "github.com/anyproto/anytype-heart/core/domain" + "github.com/anyproto/anytype-heart/pkg/lib/bundle" + "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" + "github.com/anyproto/anytype-heart/pkg/lib/threads" +) + +var log = logger.NewNamed("client.spaceobject.objectprovider") + +type bundledObjectsInstaller interface { + InstallBundledObjects(ctx context.Context, spaceID string, ids []string) ([]string, []*types.Struct, error) +} + +type ObjectProvider interface { + DeriveObjectIDs(ctx context.Context, spaceID string, sbTypes []smartblock.SmartBlockType) (objIDs threads.DerivedSmartblockIds, err error) + LoadObjects(ctx context.Context, spaceID string, ids []string) (err error) + CreateMandatoryObjects(ctx context.Context, spaceID string, sbTypes []smartblock.SmartBlockType) (err error) + InstallBundledObjects(ctx context.Context, spaceID string) error +} + +func NewObjectProvider(cache objectcache.Cache, installer bundledObjectsInstaller) ObjectProvider { + return &objectProvider{ + cache: cache, + installer: installer, + } +} + +type objectProvider struct { + cache objectcache.Cache + installer bundledObjectsInstaller +} + +func (o *objectProvider) DeriveObjectIDs(ctx context.Context, spaceID string, sbTypes []smartblock.SmartBlockType) (objIDs threads.DerivedSmartblockIds, err error) { + objIDs.SystemRelations = make(map[domain.RelationKey]string) + objIDs.SystemTypes = make(map[domain.TypeKey]string) + // deriving system objects like archive etc + for _, sbt := range sbTypes { + uk, err := domain.NewUniqueKey(sbt, "") + if err != nil { + return objIDs, err + } + id, err := o.cache.DeriveObjectID(ctx, spaceID, uk) + if err != nil { + return objIDs, fmt.Errorf("derive object id: %w", err) + } + objIDs.InsertId(sbt, id) + } + // deriving system types + for _, ot := range bundle.SystemTypes { + uk, err := domain.NewUniqueKey(smartblock.SmartBlockTypeObjectType, ot.String()) + if err != nil { + return objIDs, err + } + id, err := o.cache.DeriveObjectID(ctx, spaceID, uk) + if err != nil { + return objIDs, err + } + objIDs.SystemTypes[ot] = id + } + // deriving system relations + for _, rk := range bundle.SystemRelations { + uk, err := domain.NewUniqueKey(smartblock.SmartBlockTypeRelation, rk.String()) + if err != nil { + return objIDs, err + } + id, err := o.cache.DeriveObjectID(ctx, spaceID, uk) + if err != nil { + return objIDs, err + } + objIDs.SystemRelations[rk] = id + } + return +} + +func (o *objectProvider) LoadObjects(ctx context.Context, spaceID string, objIDs []string) (err error) { + for _, id := range objIDs { + _, err = o.cache.GetObject(ctx, domain.FullID{ + ObjectID: id, + SpaceID: spaceID, + }) + if err != nil { + return err + } + } + return +} + +func (o *objectProvider) CreateMandatoryObjects(ctx context.Context, spaceID string, sbTypes []smartblock.SmartBlockType) (err error) { + for _, sbt := range sbTypes { + uk, err := domain.NewUniqueKey(sbt, "") + if err != nil { + return err + } + _, err = o.cache.DeriveTreeObject(ctx, spaceID, objectcache.TreeDerivationParams{ + Key: uk, + InitFunc: func(id string) *editorsb.InitContext { + return &editorsb.InitContext{Ctx: ctx, SpaceID: spaceID, State: state.NewDoc(id, nil).(*state.State)} + }, + }) + if err != nil { + log.Error("create payload for derived object", zap.Error(err), zap.String("uniqueKey", uk.Marshal())) + return fmt.Errorf("derive tree object: %w", err) + } + } + return +} + +func (o *objectProvider) InstallBundledObjects(ctx context.Context, spaceID string) error { + ids := make([]string, 0, len(bundle.SystemTypes)+len(bundle.SystemRelations)) + for _, ot := range bundle.SystemTypes { + ids = append(ids, ot.BundledURL()) + } + for _, rk := range bundle.SystemRelations { + ids = append(ids, rk.BundledURL()) + } + _, _, err := o.installer.InstallBundledObjects(ctx, spaceID, ids) + if err != nil { + return err + } + return nil +} diff --git a/space/service.go b/space/service.go index 2ff3c5f6b..1ed197bf5 100644 --- a/space/service.go +++ b/space/service.go @@ -3,383 +3,188 @@ package space import ( "context" "errors" - "fmt" "strconv" "strings" - "time" + "sync" - "github.com/anyproto/any-sync/accountservice" "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/app/ocache" - "github.com/anyproto/any-sync/commonspace" - // nolint: misspell - commonconfig "github.com/anyproto/any-sync/commonspace/config" - "github.com/anyproto/any-sync/commonspace/object/accountdata" - "github.com/anyproto/any-sync/commonspace/peermanager" - "github.com/anyproto/any-sync/commonspace/spacestorage" - "github.com/anyproto/any-sync/commonspace/spacesyncproto" - "github.com/anyproto/any-sync/coordinator/coordinatorclient" - "github.com/anyproto/any-sync/coordinator/coordinatorproto" - "github.com/anyproto/any-sync/net/peerservice" - "github.com/anyproto/any-sync/net/pool" - "github.com/anyproto/any-sync/net/rpc/rpcerr" - "github.com/anyproto/any-sync/net/rpc/server" - "github.com/anyproto/any-sync/net/streampool" - "github.com/anyproto/any-sync/nodeconf" - "github.com/anyproto/any-sync/util/crypto" - "github.com/dgraph-io/badger/v3" - "github.com/dgraph-io/ristretto" - "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/types" "go.uber.org/zap" - "storj.io/drpc" - "github.com/anyproto/anytype-heart/core/anytype/config" - "github.com/anyproto/anytype-heart/core/wallet" - "github.com/anyproto/anytype-heart/pkg/lib/datastore" - "github.com/anyproto/anytype-heart/space/clientserver" - "github.com/anyproto/anytype-heart/space/clientspaceproto" - "github.com/anyproto/anytype-heart/space/localdiscovery" - "github.com/anyproto/anytype-heart/space/peerstore" - "github.com/anyproto/anytype-heart/space/storage" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" + "github.com/anyproto/anytype-heart/pkg/lib/threads" + "github.com/anyproto/anytype-heart/space/objectprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/techspace" ) -const ( - CName = "client.clientspace" - SpaceType = "anytype.space" - ChangeType = "anytype.object" -) - -var ErrUsingOldStorage = errors.New("using old storage") +const CName = "client.space" var log = logger.NewNamed(CName) -func New() Service { +var ErrIncorrectSpaceID = errors.New("incorrect space id") + +func New() SpaceService { return &service{} } -type PoolManager interface { - UnaryPeerPool() pool.Pool - StreamPeerPool() pool.Pool +type spaceIndexer interface { + ReindexCommonObjects() error + ReindexSpace(spaceID string) error } -//go:generate mockgen -package mock_space -destination ./mock_space/commonspace_space_mock.go github.com/anyproto/any-sync/commonspace Space -type Service interface { - AccountSpace(ctx context.Context) (commonspace.Space, error) - AccountId() string - CreateSpace(ctx context.Context) (container commonspace.Space, err error) - GetSpace(ctx context.Context, id string) (commonspace.Space, error) - DeriveSpace(ctx context.Context, payload commonspace.SpaceDerivePayload) (commonspace.Space, error) - DeleteSpace(ctx context.Context, spaceID string, revert bool) (payload StatusPayload, err error) - DeleteAccount(ctx context.Context, revert bool) (payload StatusPayload, err error) - StreamPool() streampool.StreamPool +type bundledObjectsInstaller interface { + InstallBundledObjects(ctx context.Context, spaceID string, ids []string) ([]string, []*types.Struct, error) + app.Component +} + +type isNewAccount interface { + IsNewAccount() bool + app.Component +} + +type SpaceService interface { + Create(ctx context.Context) (space Space, err error) + Get(ctx context.Context, id string) (space Space, err error) + + DerivedIDs(ctx context.Context, spaceID string) (ids threads.DerivedSmartblockIds, err error) - ResolveSpaceID(objectID string) (string, error) - StoreSpaceID(objectID, spaceID string) error app.ComponentRunnable } type service struct { - conf commonconfig.Config - spaceCache ocache.OCache - accountKeys *accountdata.AccountKeys - nodeConf nodeconf.Service - commonSpace commonspace.SpaceService - client coordinatorclient.CoordinatorClient - wallet wallet.Wallet - spaceStorageProvider storage.ClientStorage - streamPool streampool.StreamPool - peerStore peerstore.PeerStore - peerService peerservice.PeerService - poolManager PoolManager - streamHandler *streamHandler - syncStatusService syncStatusService + indexer spaceIndexer + spaceCore spacecore.SpaceCoreService + provider objectprovider.ObjectProvider + objectCache objectcache.Cache + techSpace techspace.TechSpace + + personalSpaceID string - accountId string newAccount bool - db *badger.DB - spaceResolverCache *ristretto.Cache -} + loading map[string]*loadingSpace + loaded map[string]Space + mu sync.Mutex -type syncStatusService interface { - RegisterSpace(space commonspace.Space) + ctx context.Context + ctxCancel context.CancelFunc + + repKey uint64 + + derivedIDsCache ocache.OCache } func (s *service) Init(a *app.App) (err error) { - conf := a.MustComponent(config.CName).(*config.Config) - s.conf = conf.GetSpace() - s.newAccount = conf.NewAccount - s.accountKeys = a.MustComponent(accountservice.CName).(accountservice.Service).Account() - s.nodeConf = a.MustComponent(nodeconf.CName).(nodeconf.Service) - s.commonSpace = a.MustComponent(commonspace.CName).(commonspace.SpaceService) - s.wallet = a.MustComponent(wallet.CName).(wallet.Wallet) - s.client = a.MustComponent(coordinatorclient.CName).(coordinatorclient.CoordinatorClient) - s.poolManager = a.MustComponent(peermanager.CName).(PoolManager) - s.spaceStorageProvider = a.MustComponent(spacestorage.CName).(storage.ClientStorage) - s.peerStore = a.MustComponent(peerstore.CName).(peerstore.PeerStore) - s.peerService = a.MustComponent(peerservice.CName).(peerservice.PeerService) - s.syncStatusService = app.MustComponent[syncStatusService](a) - localDiscovery := a.MustComponent(localdiscovery.CName).(localdiscovery.LocalDiscovery) - localDiscovery.SetNotifier(s) - s.streamHandler = &streamHandler{s: s} - - s.streamPool = a.MustComponent(streampool.CName).(streampool.Service).NewStreamPool(s.streamHandler, streampool.StreamConfig{ - SendQueueSize: 300, - DialQueueWorkers: 4, - DialQueueSize: 300, - }) - s.spaceCache = ocache.New( - s.loadSpace, - ocache.WithLogger(log.Sugar()), - ocache.WithGCPeriod(time.Minute), - ocache.WithTTL(time.Duration(s.conf.GCTTL)*time.Second), - ) - - datastoreService := app.MustComponent[datastore.Datastore](a) - s.db, err = datastoreService.SpaceStorage() - if err != nil { - return fmt.Errorf("get badger storage: %w", err) - } - spaceResolverCache, err := ristretto.NewCache(&ristretto.Config{ - NumCounters: 10_000_000, - MaxCost: 100_000_000, - BufferItems: 64, - }) - if err != nil { - return fmt.Errorf("init cache: %w", err) - } - s.spaceResolverCache = spaceResolverCache - - err = spacesyncproto.DRPCRegisterSpaceSync(a.MustComponent(server.CName).(server.DRPCServer), &rpcHandler{s}) - if err != nil { - return - } - return clientspaceproto.DRPCRegisterClientSpace(a.MustComponent(server.CName).(server.DRPCServer), &rpcHandler{s}) + s.indexer = app.MustComponent[spaceIndexer](a) + s.spaceCore = app.MustComponent[spacecore.SpaceCoreService](a) + s.objectCache = app.MustComponent[objectcache.Cache](a) + installer := app.MustComponent[bundledObjectsInstaller](a) + s.provider = objectprovider.NewObjectProvider(s.objectCache, installer) + s.newAccount = app.MustComponent[isNewAccount](a).IsNewAccount() + s.techSpace = app.MustComponent[techspace.TechSpace](a) + s.loading = map[string]*loadingSpace{} + s.loaded = map[string]Space{} + s.derivedIDsCache = ocache.New(s.loadDerivedIDs) + return nil } func (s *service) Name() (name string) { return CName } -func (s *service) Run(ctx context.Context) (err error) { - payload := commonspace.SpaceDerivePayload{ - SigningKey: s.wallet.GetAccountPrivkey(), - MasterKey: s.wallet.GetMasterKey(), - SpaceType: SpaceType, +func (s *service) Run(_ context.Context) (err error) { + s.ctx, s.ctxCancel = context.WithCancel(context.Background()) + + s.personalSpaceID, err = s.spaceCore.DeriveID(s.ctx, spacecore.SpaceType) + if err != nil { + return } + + // TODO: move this logic to any-sync + s.repKey, err = getRepKey(s.personalSpaceID) + if err != nil { + return + } + + err = s.indexer.ReindexCommonObjects() + if err != nil { + return + } + if s.newAccount { - // creating storage - s.accountId, err = s.commonSpace.DeriveSpace(ctx, payload) - if err != nil { - return - } - } else { - s.accountId, err = s.commonSpace.DeriveId(ctx, payload) - if err != nil { - return - } - // pulling space from remote - _, err = s.GetSpace(ctx, s.accountId) - if err != nil { - return rpcerr.Unwrap(err) - } + return s.createPersonalSpace(s.ctx) } + return s.loadPersonalSpace(s.ctx) +} + +func (s *service) Create(ctx context.Context) (Space, error) { + coreSpace, err := s.spaceCore.Create(ctx, s.repKey) + if err != nil { + return nil, err + } + return s.create(ctx, coreSpace) +} + +func (s *service) Get(ctx context.Context, spaceID string) (sp Space, err error) { + return s.waitLoad(ctx, spaceID) +} + +func (s *service) open(ctx context.Context, spaceID string) (sp Space, err error) { + coreSpace, err := s.spaceCore.Get(ctx, spaceID) + if err != nil { + return nil, err + } + derivedIDs, err := s.DerivedIDs(ctx, spaceID) + if err != nil { + return nil, err + } + sp = newSpace(s, coreSpace, derivedIDs) return } -func (s *service) DeriveSpace(ctx context.Context, payload commonspace.SpaceDerivePayload) (container commonspace.Space, err error) { - id, err := s.commonSpace.DeriveSpace(ctx, payload) +func (s *service) createPersonalSpace(ctx context.Context) (err error) { + coreSpace, err := s.spaceCore.Derive(ctx, spacecore.SpaceType) if err != nil { return } + _, err = s.create(ctx, coreSpace) + return +} - obj, err := s.spaceCache.Get(ctx, id) - if err != nil { +func (s *service) loadPersonalSpace(ctx context.Context) (err error) { + if err = s.startLoad(ctx, s.personalSpaceID); err != nil { return } - return obj.(commonspace.Space), nil + _, err = s.waitLoad(ctx, s.personalSpaceID) + return err } -func (s *service) AccountSpace(ctx context.Context) (container commonspace.Space, err error) { - return s.GetSpace(ctx, s.accountId) +func (s *service) IsPersonal(id string) bool { + return s.personalSpaceID == id } -func (s *service) AccountId() string { - return s.accountId -} - -func parseReplicationKey(spaceID string) (uint64, error) { - parts := strings.Split(spaceID, ".") - raw := parts[len(parts)-1] - return strconv.ParseUint(raw, 36, 64) -} - -func (s *service) CreateSpace(ctx context.Context) (container commonspace.Space, err error) { - replicationKey, err := parseReplicationKey(s.accountId) - if err != nil { - return nil, fmt.Errorf("parse account's replication key: %w", err) - } - metadataPrivKey, _, err := crypto.GenerateRandomEd25519KeyPair() - if err != nil { - return nil, fmt.Errorf("generate metadata key: %w", err) - } - payload := commonspace.SpaceCreatePayload{ - SigningKey: s.wallet.GetAccountPrivkey(), - MasterKey: s.wallet.GetMasterKey(), - ReadKey: crypto.NewAES(), - MetadataKey: metadataPrivKey, - SpaceType: SpaceType, - ReplicationKey: replicationKey, - } - id, err := s.commonSpace.CreateSpace(ctx, payload) - if err != nil { - return - } - obj, err := s.spaceCache.Get(ctx, id) - if err != nil { - return - } - return obj.(commonspace.Space), nil -} - -func (s *service) GetSpace(ctx context.Context, id string) (space commonspace.Space, err error) { - v, err := s.spaceCache.Get(ctx, id) - if err != nil { - return - } - return v.(commonspace.Space), nil -} - -func (s *service) HandleMessage(ctx context.Context, senderId string, req *spacesyncproto.ObjectSyncMessage) (err error) { - var msg = &spacesyncproto.SpaceSubscription{} - if err = msg.Unmarshal(req.Payload); err != nil { - return - } - log.InfoCtx(ctx, "got subscription message", zap.Strings("spaceIds", msg.SpaceIds)) - if msg.Action == spacesyncproto.SpaceSubscriptionAction_Subscribe { - return s.streamPool.AddTagsCtx(ctx, msg.SpaceIds...) - } else { - return s.streamPool.RemoveTagsCtx(ctx, msg.SpaceIds...) - } -} - -func (s *service) StreamPool() streampool.StreamPool { - return s.streamPool -} - -func (s *service) DeleteAccount(ctx context.Context, revert bool) (payload StatusPayload, err error) { - return s.DeleteSpace(ctx, s.accountId, revert) -} - -func (s *service) DeleteSpace(ctx context.Context, spaceID string, revert bool) (payload StatusPayload, err error) { - var ( - delConf *coordinatorproto.DeletionConfirmPayloadWithSignature - status *coordinatorproto.SpaceStatusPayload - ) - if !revert { - networkID := s.nodeConf.Configuration().NetworkId - delConf, err = coordinatorproto.PrepareDeleteConfirmation(s.accountKeys.SignKey, spaceID, s.accountKeys.PeerId, networkID) - if err != nil { - return +func (s *service) OnViewCreated(spaceID string) { + go func() { + if err := s.startLoad(s.ctx, spaceID); err != nil { + log.Warn("OnViewCreated.startLoad error", zap.Error(err)) } - } - status, err = s.client.ChangeStatus(ctx, spaceID, delConf) - if err != nil { - err = coordError(err) - return - } - payload = newSpaceStatus(status) - return -} - -func (s *service) loadSpace(ctx context.Context, id string) (value ocache.Object, err error) { - cc, err := s.commonSpace.NewSpace(ctx, id) - if err != nil { - return - } - ns, err := newClientSpace(cc) - if err != nil { - return - } - if err = ns.Init(ctx); err != nil { - return - } - err = s.storeMappingForSpace(cc) - if err != nil { - return nil, fmt.Errorf("store mapping for space: %w", err) - } - s.syncStatusService.RegisterSpace(ns) - return ns, nil -} - -func (s *service) getOpenedSpaceIds() (ids []string) { - s.spaceCache.ForEach(func(v ocache.Object) (isContinue bool) { - ids = append(ids, v.(commonspace.Space).Id()) - return true - }) - return + }() } func (s *service) Close(ctx context.Context) (err error) { - return s.spaceCache.Close() + if s.ctxCancel != nil { + s.ctxCancel() + } + return s.derivedIDsCache.Close() } -func (s *service) PeerDiscovered(peer localdiscovery.DiscoveredPeer, own localdiscovery.OwnAddresses) { - s.peerService.SetPeerAddrs(peer.PeerId, s.addSchema(peer.Addrs)) - ctx := context.Background() - unaryPeer, err := s.poolManager.UnaryPeerPool().Get(ctx, peer.PeerId) - if err != nil { - return - } - allIds, err := s.spaceStorageProvider.AllSpaceIds() - if err != nil { - return - } - log.Debug("sending info about spaces to peer", zap.String("peer", peer.PeerId), zap.Strings("spaces", allIds)) - var resp *clientspaceproto.SpaceExchangeResponse - err = unaryPeer.DoDrpc(ctx, func(conn drpc.Conn) error { - resp, err = clientspaceproto.NewDRPCClientSpaceClient(conn).SpaceExchange(ctx, &clientspaceproto.SpaceExchangeRequest{ - SpaceIds: allIds, - LocalServer: &clientspaceproto.LocalServer{ - Ips: own.Addrs, - Port: int32(own.Port), - }, - }) - return err - }) - if err != nil { - return - } - log.Debug("got peer ids from peer", zap.String("peer", peer.PeerId), zap.Strings("spaces", resp.SpaceIds)) - s.peerStore.UpdateLocalPeer(peer.PeerId, resp.SpaceIds) -} - -func (s *service) addSchema(addrs []string) (res []string) { - res = make([]string, 0, len(addrs)) - for _, addr := range addrs { - res = append(res, clientserver.PreferredSchema+"://"+addr) - } - return res -} - -func (s *service) getSpaceType(header *spacesyncproto.RawSpaceHeaderWithId) (tp string, err error) { - raw := &spacesyncproto.RawSpaceHeader{} - err = proto.Unmarshal(header.RawHeader, raw) - if err != nil { - return - } - payload := &spacesyncproto.SpaceHeader{} - err = proto.Unmarshal(raw.SpaceHeader, payload) - if err != nil { - return - } - tp = payload.SpaceType - return -} - -func (s *service) GetLogFields() []zap.Field { - return []zap.Field{ - zap.Bool("newAccount", s.newAccount), +func getRepKey(spaceID string) (uint64, error) { + sepIdx := strings.Index(spaceID, ".") + if sepIdx == -1 { + return 0, ErrIncorrectSpaceID } + return strconv.ParseUint(spaceID[sepIdx+1:], 36, 64) } diff --git a/space/service_test.go b/space/service_test.go new file mode 100644 index 000000000..b4cf0df79 --- /dev/null +++ b/space/service_test.go @@ -0,0 +1,121 @@ +package space + +import ( + "context" + "testing" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/mock_commonspace" + "github.com/anyproto/any-sync/commonspace/object/treesyncer/mock_treesyncer" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/anyproto/anytype-heart/core/block/object/objectcache/mock_objectcache" + "github.com/anyproto/anytype-heart/core/domain" + "github.com/anyproto/anytype-heart/core/indexer/mock_indexer" + "github.com/anyproto/anytype-heart/space/mock_space" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/mock_spacecore" + "github.com/anyproto/anytype-heart/space/spaceinfo" + "github.com/anyproto/anytype-heart/space/techspace/mock_techspace" + "github.com/anyproto/anytype-heart/tests/testutil" +) + +var ctx = context.Background() + +const ( + testPersonalSpaceID = "personal.id" +) + +func TestService_Init(t *testing.T) { + t.Run("existing account", func(t *testing.T) { + fx := newFixture(t, false) + defer fx.finish(t) + }) + t.Run("new account", func(t *testing.T) { + fx := newFixture(t, true) + defer fx.finish(t) + }) + +} + +func newFixture(t *testing.T, newAccount bool) *fixture { + ctrl := gomock.NewController(t) + fx := &fixture{ + service: New().(*service), + a: new(app.App), + ctrl: ctrl, + objectCache: mock_objectcache.NewMockCache(t), + indexer: mock_indexer.NewMockIndexer(t), + spaceCore: mock_spacecore.NewMockSpaceCoreService(t), + installer: mock_space.NewMockbundledObjectsInstaller(t), + isNewAccount: mock_space.NewMockisNewAccount(t), + techSpace: mock_techspace.NewMockTechSpace(t), + personalSpace: mock_commonspace.NewMockSpace(ctrl), + } + + fx.a.Register(testutil.PrepareMock(ctx, fx.a, fx.objectCache)). + Register(testutil.PrepareMock(ctx, fx.a, fx.indexer)). + Register(testutil.PrepareMock(ctx, fx.a, fx.spaceCore)). + Register(testutil.PrepareMock(ctx, fx.a, fx.installer)). + Register(testutil.PrepareMock(ctx, fx.a, fx.isNewAccount)). + Register(testutil.PrepareMock(ctx, fx.a, fx.techSpace)). + Register(fx.service) + + fx.isNewAccount.EXPECT().IsNewAccount().Return(newAccount) + fx.personalSpace.EXPECT().Id().AnyTimes().Return(testPersonalSpaceID) + + fx.expectRun(newAccount) + + require.NoError(t, fx.a.Start(ctx)) + + return fx +} + +type fixture struct { + *service + a *app.App + objectCache *mock_objectcache.MockCache + indexer *mock_indexer.MockIndexer + spaceCore *mock_spacecore.MockSpaceCoreService + installer *mock_space.MockbundledObjectsInstaller + ctrl *gomock.Controller + isNewAccount *mock_space.MockisNewAccount + techSpace *mock_techspace.MockTechSpace + personalSpace *mock_commonspace.MockSpace +} + +func (fx *fixture) expectRun(newAccount bool) { + fx.spaceCore.EXPECT().DeriveID(mock.Anything, spacecore.SpaceType).Return(testPersonalSpaceID, nil) + fx.indexer.EXPECT().ReindexCommonObjects().Return(nil) + + if newAccount { + fx.spaceCore.EXPECT().Derive(mock.Anything, spacecore.SpaceType).Return(&spacecore.AnySpace{Space: fx.personalSpace}, nil) + fx.objectCache.EXPECT().DeriveTreeObject(mock.Anything, testPersonalSpaceID, mock.Anything).Return(nil, nil) + fx.techSpace.EXPECT().CreateSpaceView(mock.Anything, testPersonalSpaceID).Return(nil, nil) + } + // startLoad + fx.techSpace.EXPECT().GetInfo(testPersonalSpaceID).Return(spaceinfo.SpaceInfo{SpaceID: testPersonalSpaceID}).Times(1) + fx.techSpace.EXPECT().DeriveSpaceViewID(mock.Anything, testPersonalSpaceID).Return("personalViewID", nil) + fx.techSpace.EXPECT().SetInfo(mock.Anything, mock.Anything).Return(nil) + // wait load + fx.techSpace.EXPECT().GetInfo(testPersonalSpaceID).Return(spaceinfo.SpaceInfo{SpaceID: testPersonalSpaceID, LocalStatus: spaceinfo.LocalStatusLoading}).Times(1) + fx.techSpace.EXPECT().GetInfo(testPersonalSpaceID).Return(spaceinfo.SpaceInfo{SpaceID: testPersonalSpaceID, LocalStatus: spaceinfo.LocalStatusOk}).Times(1) + fx.spaceCore.EXPECT().Get(mock.Anything, testPersonalSpaceID).Return(&spacecore.AnySpace{Space: fx.personalSpace}, nil) + fx.techSpace.EXPECT().SetStatuses(mock.Anything, testPersonalSpaceID, spaceinfo.LocalStatusOk, spaceinfo.RemoteStatusUnknown).Return(nil) + + // space init + fx.objectCache.EXPECT().DeriveObjectID(mock.Anything, testPersonalSpaceID, mock.Anything).Return("derived", nil) + fx.objectCache.EXPECT().GetObject(mock.Anything, domain.FullID{ObjectID: "derived", SpaceID: testPersonalSpaceID}).Return(nil, nil) + fx.installer.EXPECT().InstallBundledObjects(mock.Anything, testPersonalSpaceID, mock.Anything).Return(nil, nil, nil) + fx.indexer.EXPECT().ReindexSpace(testPersonalSpaceID).Return(nil) + ts := mock_treesyncer.NewMockTreeSyncer(fx.ctrl) + ts.EXPECT().StartSync() + fx.personalSpace.EXPECT().TreeSyncer().Return(ts) +} + +func (fx *fixture) finish(t *testing.T) { + require.NoError(t, fx.a.Close(ctx)) + fx.ctrl.Finish() +} diff --git a/space/space.go b/space/space.go index 5b5e424c5..043ffc739 100644 --- a/space/space.go +++ b/space/space.go @@ -4,20 +4,79 @@ import ( "context" "github.com/anyproto/any-sync/commonspace" + + "github.com/anyproto/anytype-heart/pkg/lib/threads" + "github.com/anyproto/anytype-heart/space/objectprovider" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spaceinfo" ) -func newClientSpace(cc commonspace.Space) (commonspace.Space, error) { - return &clientSpace{cc}, nil -} - -type clientSpace struct { +type Space interface { commonspace.Space + ViewID() string + DerivedIDs() threads.DerivedSmartblockIds + + WaitMandatoryObjects(ctx context.Context) (err error) } -func (s *clientSpace) Init(ctx context.Context) (err error) { - return s.Space.Init(ctx) +func newSpace(s *service, coreSpace *spacecore.AnySpace, derivedIDs threads.DerivedSmartblockIds) *space { + sp := &space{ + service: s, + objectProvider: s.provider, + AnySpace: coreSpace, + derivedIDs: derivedIDs, + loadMandatoryObjectsCh: make(chan struct{}), + } + go sp.mandatoryObjectsLoad(s.ctx) + return sp } -func (s *clientSpace) Close() (err error) { - return s.Space.Close() +type space struct { + service *service + status spaceinfo.SpaceInfo + derivedIDs threads.DerivedSmartblockIds + objectProvider objectprovider.ObjectProvider + + *spacecore.AnySpace + + loadMandatoryObjectsCh chan struct{} + loadMandatoryObjectsErr error +} + +func (s *space) mandatoryObjectsLoad(ctx context.Context) { + defer close(s.loadMandatoryObjectsCh) + + s.loadMandatoryObjectsErr = s.objectProvider.LoadObjects(ctx, s.Id(), s.derivedIDs.IDs()) + if s.loadMandatoryObjectsErr != nil { + return + } + s.loadMandatoryObjectsErr = s.objectProvider.InstallBundledObjects(ctx, s.Id()) + if s.loadMandatoryObjectsErr != nil { + return + } + + // TODO: move to service + s.loadMandatoryObjectsErr = s.service.indexer.ReindexSpace(s.Id()) + if s.loadMandatoryObjectsErr != nil { + return + } + s.TreeSyncer().StartSync() +} + +func (s *space) DerivedIDs() threads.DerivedSmartblockIds { + <-s.loadMandatoryObjectsCh + return s.derivedIDs +} + +func (s *space) ViewID() string { + return s.status.ViewID +} + +func (s *space) WaitMandatoryObjects(ctx context.Context) (err error) { + select { + case <-s.loadMandatoryObjectsCh: + return s.loadMandatoryObjectsErr + case <-ctx.Done(): + return ctx.Err() + } } diff --git a/space/clientserver/clientserver.go b/space/spacecore/clientserver/clientserver.go similarity index 100% rename from space/clientserver/clientserver.go rename to space/spacecore/clientserver/clientserver.go diff --git a/space/clientserver/portstorage.go b/space/spacecore/clientserver/portstorage.go similarity index 100% rename from space/clientserver/portstorage.go rename to space/spacecore/clientserver/portstorage.go diff --git a/space/clientspaceproto/clientspace.pb.go b/space/spacecore/clientspaceproto/clientspace.pb.go similarity index 100% rename from space/clientspaceproto/clientspace.pb.go rename to space/spacecore/clientspaceproto/clientspace.pb.go diff --git a/space/clientspaceproto/clientspace_drpc.pb.go b/space/spacecore/clientspaceproto/clientspace_drpc.pb.go similarity index 100% rename from space/clientspaceproto/clientspace_drpc.pb.go rename to space/spacecore/clientspaceproto/clientspace_drpc.pb.go diff --git a/space/clientspaceproto/protos/clientspace.proto b/space/spacecore/clientspaceproto/protos/clientspace.proto similarity index 100% rename from space/clientspaceproto/protos/clientspace.proto rename to space/spacecore/clientspaceproto/protos/clientspace.proto diff --git a/space/credentialprovider/credentialprovider.go b/space/spacecore/credentialprovider/credentialprovider.go similarity index 100% rename from space/credentialprovider/credentialprovider.go rename to space/spacecore/credentialprovider/credentialprovider.go diff --git a/space/localdiscovery/common.go b/space/spacecore/localdiscovery/common.go similarity index 100% rename from space/localdiscovery/common.go rename to space/spacecore/localdiscovery/common.go diff --git a/space/localdiscovery/localdiscovery.go b/space/spacecore/localdiscovery/localdiscovery.go similarity index 98% rename from space/localdiscovery/localdiscovery.go rename to space/spacecore/localdiscovery/localdiscovery.go index b2ff1c538..32e9ac9f0 100644 --- a/space/localdiscovery/localdiscovery.go +++ b/space/spacecore/localdiscovery/localdiscovery.go @@ -19,7 +19,7 @@ import ( "github.com/anyproto/anytype-heart/core/anytype/config" "github.com/anyproto/anytype-heart/net/addrs" - "github.com/anyproto/anytype-heart/space/clientserver" + "github.com/anyproto/anytype-heart/space/spacecore/clientserver" ) var interfacesSortPriority = []string{"en", "wlan", "wl", "eth", "lo"} diff --git a/space/localdiscovery/localdiscovery_android.go b/space/spacecore/localdiscovery/localdiscovery_android.go similarity index 97% rename from space/localdiscovery/localdiscovery_android.go rename to space/spacecore/localdiscovery/localdiscovery_android.go index ce3594370..e665ca654 100644 --- a/space/localdiscovery/localdiscovery_android.go +++ b/space/spacecore/localdiscovery/localdiscovery_android.go @@ -12,7 +12,7 @@ import ( "github.com/anyproto/anytype-heart/core/anytype/config" "github.com/anyproto/anytype-heart/net/addrs" - "github.com/anyproto/anytype-heart/space/clientserver" + "github.com/anyproto/anytype-heart/space/spacecore/clientserver" ) var notifierProvider NotifierProvider diff --git a/space/spacecore/mock_spacecore/mock_SpaceCoreService.go b/space/spacecore/mock_spacecore/mock_SpaceCoreService.go new file mode 100644 index 000000000..5bd02870a --- /dev/null +++ b/space/spacecore/mock_spacecore/mock_SpaceCoreService.go @@ -0,0 +1,565 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_spacecore + +import ( + context "context" + + app "github.com/anyproto/any-sync/app" + streampool "github.com/anyproto/any-sync/net/streampool" + mock "github.com/stretchr/testify/mock" + + spacecore "github.com/anyproto/anytype-heart/space/spacecore" +) + +// MockSpaceCoreService is an autogenerated mock type for the SpaceCoreService type +type MockSpaceCoreService struct { + mock.Mock +} + +type MockSpaceCoreService_Expecter struct { + mock *mock.Mock +} + +func (_m *MockSpaceCoreService) EXPECT() *MockSpaceCoreService_Expecter { + return &MockSpaceCoreService_Expecter{mock: &_m.Mock} +} + +// Close provides a mock function with given fields: ctx +func (_m *MockSpaceCoreService) Close(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockSpaceCoreService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type MockSpaceCoreService_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockSpaceCoreService_Expecter) Close(ctx interface{}) *MockSpaceCoreService_Close_Call { + return &MockSpaceCoreService_Close_Call{Call: _e.mock.On("Close", ctx)} +} + +func (_c *MockSpaceCoreService_Close_Call) Run(run func(ctx context.Context)) *MockSpaceCoreService_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockSpaceCoreService_Close_Call) Return(err error) *MockSpaceCoreService_Close_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockSpaceCoreService_Close_Call) RunAndReturn(run func(context.Context) error) *MockSpaceCoreService_Close_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function with given fields: ctx, replicationKey +func (_m *MockSpaceCoreService) Create(ctx context.Context, replicationKey uint64) (*spacecore.AnySpace, error) { + ret := _m.Called(ctx, replicationKey) + + var r0 *spacecore.AnySpace + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint64) (*spacecore.AnySpace, error)); ok { + return rf(ctx, replicationKey) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64) *spacecore.AnySpace); ok { + r0 = rf(ctx, replicationKey) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*spacecore.AnySpace) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { + r1 = rf(ctx, replicationKey) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockSpaceCoreService_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockSpaceCoreService_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - replicationKey uint64 +func (_e *MockSpaceCoreService_Expecter) Create(ctx interface{}, replicationKey interface{}) *MockSpaceCoreService_Create_Call { + return &MockSpaceCoreService_Create_Call{Call: _e.mock.On("Create", ctx, replicationKey)} +} + +func (_c *MockSpaceCoreService_Create_Call) Run(run func(ctx context.Context, replicationKey uint64)) *MockSpaceCoreService_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *MockSpaceCoreService_Create_Call) Return(_a0 *spacecore.AnySpace, _a1 error) *MockSpaceCoreService_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockSpaceCoreService_Create_Call) RunAndReturn(run func(context.Context, uint64) (*spacecore.AnySpace, error)) *MockSpaceCoreService_Create_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, spaceID +func (_m *MockSpaceCoreService) Delete(ctx context.Context, spaceID string) (spacecore.NetworkStatus, error) { + ret := _m.Called(ctx, spaceID) + + var r0 spacecore.NetworkStatus + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (spacecore.NetworkStatus, error)); ok { + return rf(ctx, spaceID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) spacecore.NetworkStatus); ok { + r0 = rf(ctx, spaceID) + } else { + r0 = ret.Get(0).(spacecore.NetworkStatus) + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, spaceID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockSpaceCoreService_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type MockSpaceCoreService_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +func (_e *MockSpaceCoreService_Expecter) Delete(ctx interface{}, spaceID interface{}) *MockSpaceCoreService_Delete_Call { + return &MockSpaceCoreService_Delete_Call{Call: _e.mock.On("Delete", ctx, spaceID)} +} + +func (_c *MockSpaceCoreService_Delete_Call) Run(run func(ctx context.Context, spaceID string)) *MockSpaceCoreService_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockSpaceCoreService_Delete_Call) Return(payload spacecore.NetworkStatus, err error) *MockSpaceCoreService_Delete_Call { + _c.Call.Return(payload, err) + return _c +} + +func (_c *MockSpaceCoreService_Delete_Call) RunAndReturn(run func(context.Context, string) (spacecore.NetworkStatus, error)) *MockSpaceCoreService_Delete_Call { + _c.Call.Return(run) + return _c +} + +// Derive provides a mock function with given fields: ctx, spaceType +func (_m *MockSpaceCoreService) Derive(ctx context.Context, spaceType string) (*spacecore.AnySpace, error) { + ret := _m.Called(ctx, spaceType) + + var r0 *spacecore.AnySpace + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*spacecore.AnySpace, error)); ok { + return rf(ctx, spaceType) + } + if rf, ok := ret.Get(0).(func(context.Context, string) *spacecore.AnySpace); ok { + r0 = rf(ctx, spaceType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*spacecore.AnySpace) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, spaceType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockSpaceCoreService_Derive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Derive' +type MockSpaceCoreService_Derive_Call struct { + *mock.Call +} + +// Derive is a helper method to define mock.On call +// - ctx context.Context +// - spaceType string +func (_e *MockSpaceCoreService_Expecter) Derive(ctx interface{}, spaceType interface{}) *MockSpaceCoreService_Derive_Call { + return &MockSpaceCoreService_Derive_Call{Call: _e.mock.On("Derive", ctx, spaceType)} +} + +func (_c *MockSpaceCoreService_Derive_Call) Run(run func(ctx context.Context, spaceType string)) *MockSpaceCoreService_Derive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockSpaceCoreService_Derive_Call) Return(space *spacecore.AnySpace, err error) *MockSpaceCoreService_Derive_Call { + _c.Call.Return(space, err) + return _c +} + +func (_c *MockSpaceCoreService_Derive_Call) RunAndReturn(run func(context.Context, string) (*spacecore.AnySpace, error)) *MockSpaceCoreService_Derive_Call { + _c.Call.Return(run) + return _c +} + +// DeriveID provides a mock function with given fields: ctx, spaceType +func (_m *MockSpaceCoreService) DeriveID(ctx context.Context, spaceType string) (string, error) { + ret := _m.Called(ctx, spaceType) + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { + return rf(ctx, spaceType) + } + if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { + r0 = rf(ctx, spaceType) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, spaceType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockSpaceCoreService_DeriveID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveID' +type MockSpaceCoreService_DeriveID_Call struct { + *mock.Call +} + +// DeriveID is a helper method to define mock.On call +// - ctx context.Context +// - spaceType string +func (_e *MockSpaceCoreService_Expecter) DeriveID(ctx interface{}, spaceType interface{}) *MockSpaceCoreService_DeriveID_Call { + return &MockSpaceCoreService_DeriveID_Call{Call: _e.mock.On("DeriveID", ctx, spaceType)} +} + +func (_c *MockSpaceCoreService_DeriveID_Call) Run(run func(ctx context.Context, spaceType string)) *MockSpaceCoreService_DeriveID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockSpaceCoreService_DeriveID_Call) Return(id string, err error) *MockSpaceCoreService_DeriveID_Call { + _c.Call.Return(id, err) + return _c +} + +func (_c *MockSpaceCoreService_DeriveID_Call) RunAndReturn(run func(context.Context, string) (string, error)) *MockSpaceCoreService_DeriveID_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, id +func (_m *MockSpaceCoreService) Get(ctx context.Context, id string) (*spacecore.AnySpace, error) { + ret := _m.Called(ctx, id) + + var r0 *spacecore.AnySpace + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*spacecore.AnySpace, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string) *spacecore.AnySpace); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*spacecore.AnySpace) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockSpaceCoreService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockSpaceCoreService_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *MockSpaceCoreService_Expecter) Get(ctx interface{}, id interface{}) *MockSpaceCoreService_Get_Call { + return &MockSpaceCoreService_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *MockSpaceCoreService_Get_Call) Run(run func(ctx context.Context, id string)) *MockSpaceCoreService_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockSpaceCoreService_Get_Call) Return(_a0 *spacecore.AnySpace, _a1 error) *MockSpaceCoreService_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockSpaceCoreService_Get_Call) RunAndReturn(run func(context.Context, string) (*spacecore.AnySpace, error)) *MockSpaceCoreService_Get_Call { + _c.Call.Return(run) + return _c +} + +// Init provides a mock function with given fields: a +func (_m *MockSpaceCoreService) Init(a *app.App) error { + ret := _m.Called(a) + + var r0 error + if rf, ok := ret.Get(0).(func(*app.App) error); ok { + r0 = rf(a) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockSpaceCoreService_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type MockSpaceCoreService_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - a *app.App +func (_e *MockSpaceCoreService_Expecter) Init(a interface{}) *MockSpaceCoreService_Init_Call { + return &MockSpaceCoreService_Init_Call{Call: _e.mock.On("Init", a)} +} + +func (_c *MockSpaceCoreService_Init_Call) Run(run func(a *app.App)) *MockSpaceCoreService_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*app.App)) + }) + return _c +} + +func (_c *MockSpaceCoreService_Init_Call) Return(err error) *MockSpaceCoreService_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockSpaceCoreService_Init_Call) RunAndReturn(run func(*app.App) error) *MockSpaceCoreService_Init_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *MockSpaceCoreService) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockSpaceCoreService_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockSpaceCoreService_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockSpaceCoreService_Expecter) Name() *MockSpaceCoreService_Name_Call { + return &MockSpaceCoreService_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockSpaceCoreService_Name_Call) Run(run func()) *MockSpaceCoreService_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockSpaceCoreService_Name_Call) Return(name string) *MockSpaceCoreService_Name_Call { + _c.Call.Return(name) + return _c +} + +func (_c *MockSpaceCoreService_Name_Call) RunAndReturn(run func() string) *MockSpaceCoreService_Name_Call { + _c.Call.Return(run) + return _c +} + +// RevertDeletion provides a mock function with given fields: ctx, spaceID +func (_m *MockSpaceCoreService) RevertDeletion(ctx context.Context, spaceID string) error { + ret := _m.Called(ctx, spaceID) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = rf(ctx, spaceID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockSpaceCoreService_RevertDeletion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevertDeletion' +type MockSpaceCoreService_RevertDeletion_Call struct { + *mock.Call +} + +// RevertDeletion is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +func (_e *MockSpaceCoreService_Expecter) RevertDeletion(ctx interface{}, spaceID interface{}) *MockSpaceCoreService_RevertDeletion_Call { + return &MockSpaceCoreService_RevertDeletion_Call{Call: _e.mock.On("RevertDeletion", ctx, spaceID)} +} + +func (_c *MockSpaceCoreService_RevertDeletion_Call) Run(run func(ctx context.Context, spaceID string)) *MockSpaceCoreService_RevertDeletion_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockSpaceCoreService_RevertDeletion_Call) Return(err error) *MockSpaceCoreService_RevertDeletion_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockSpaceCoreService_RevertDeletion_Call) RunAndReturn(run func(context.Context, string) error) *MockSpaceCoreService_RevertDeletion_Call { + _c.Call.Return(run) + return _c +} + +// Run provides a mock function with given fields: ctx +func (_m *MockSpaceCoreService) Run(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockSpaceCoreService_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type MockSpaceCoreService_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockSpaceCoreService_Expecter) Run(ctx interface{}) *MockSpaceCoreService_Run_Call { + return &MockSpaceCoreService_Run_Call{Call: _e.mock.On("Run", ctx)} +} + +func (_c *MockSpaceCoreService_Run_Call) Run(run func(ctx context.Context)) *MockSpaceCoreService_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockSpaceCoreService_Run_Call) Return(err error) *MockSpaceCoreService_Run_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockSpaceCoreService_Run_Call) RunAndReturn(run func(context.Context) error) *MockSpaceCoreService_Run_Call { + _c.Call.Return(run) + return _c +} + +// StreamPool provides a mock function with given fields: +func (_m *MockSpaceCoreService) StreamPool() streampool.StreamPool { + ret := _m.Called() + + var r0 streampool.StreamPool + if rf, ok := ret.Get(0).(func() streampool.StreamPool); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(streampool.StreamPool) + } + } + + return r0 +} + +// MockSpaceCoreService_StreamPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StreamPool' +type MockSpaceCoreService_StreamPool_Call struct { + *mock.Call +} + +// StreamPool is a helper method to define mock.On call +func (_e *MockSpaceCoreService_Expecter) StreamPool() *MockSpaceCoreService_StreamPool_Call { + return &MockSpaceCoreService_StreamPool_Call{Call: _e.mock.On("StreamPool")} +} + +func (_c *MockSpaceCoreService_StreamPool_Call) Run(run func()) *MockSpaceCoreService_StreamPool_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockSpaceCoreService_StreamPool_Call) Return(_a0 streampool.StreamPool) *MockSpaceCoreService_StreamPool_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockSpaceCoreService_StreamPool_Call) RunAndReturn(run func() streampool.StreamPool) *MockSpaceCoreService_StreamPool_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockSpaceCoreService interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockSpaceCoreService creates a new instance of MockSpaceCoreService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockSpaceCoreService(t mockConstructorTestingTNewMockSpaceCoreService) *MockSpaceCoreService { + mock := &MockSpaceCoreService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/space/spacecore/peer.go b/space/spacecore/peer.go new file mode 100644 index 000000000..24ca8c043 --- /dev/null +++ b/space/spacecore/peer.go @@ -0,0 +1,50 @@ +package spacecore + +import ( + "context" + + "go.uber.org/zap" + "storj.io/drpc" + + "github.com/anyproto/anytype-heart/space/spacecore/clientserver" + "github.com/anyproto/anytype-heart/space/spacecore/clientspaceproto" + "github.com/anyproto/anytype-heart/space/spacecore/localdiscovery" +) + +func (s *service) PeerDiscovered(peer localdiscovery.DiscoveredPeer, own localdiscovery.OwnAddresses) { + s.peerService.SetPeerAddrs(peer.PeerId, s.addSchema(peer.Addrs)) + ctx := context.Background() + unaryPeer, err := s.poolManager.UnaryPeerPool().Get(ctx, peer.PeerId) + if err != nil { + return + } + allIds, err := s.spaceStorageProvider.AllSpaceIds() + if err != nil { + return + } + log.Debug("sending info about spaces to peer", zap.String("peer", peer.PeerId), zap.Strings("spaces", allIds)) + var resp *clientspaceproto.SpaceExchangeResponse + err = unaryPeer.DoDrpc(ctx, func(conn drpc.Conn) error { + resp, err = clientspaceproto.NewDRPCClientSpaceClient(conn).SpaceExchange(ctx, &clientspaceproto.SpaceExchangeRequest{ + SpaceIds: allIds, + LocalServer: &clientspaceproto.LocalServer{ + Ips: own.Addrs, + Port: int32(own.Port), + }, + }) + return err + }) + if err != nil { + return + } + log.Debug("got peer ids from peer", zap.String("peer", peer.PeerId), zap.Strings("spaces", resp.SpaceIds)) + s.peerStore.UpdateLocalPeer(peer.PeerId, resp.SpaceIds) +} + +func (s *service) addSchema(addrs []string) (res []string) { + res = make([]string, 0, len(addrs)) + for _, addr := range addrs { + res = append(res, clientserver.PreferredSchema+"://"+addr) + } + return res +} diff --git a/space/peermanager/manager.go b/space/spacecore/peermanager/manager.go similarity index 98% rename from space/peermanager/manager.go rename to space/spacecore/peermanager/manager.go index 666b0dab9..9dffd4f86 100644 --- a/space/peermanager/manager.go +++ b/space/spacecore/peermanager/manager.go @@ -14,7 +14,7 @@ import ( "go.uber.org/zap" "golang.org/x/exp/slices" - "github.com/anyproto/anytype-heart/space/peerstore" + "github.com/anyproto/anytype-heart/space/spacecore/peerstore" ) type clientPeerManager struct { diff --git a/space/peermanager/provider.go b/space/spacecore/peermanager/provider.go similarity index 84% rename from space/peermanager/provider.go rename to space/spacecore/peermanager/provider.go index e3df69f5a..15cc5f465 100644 --- a/space/peermanager/provider.go +++ b/space/spacecore/peermanager/provider.go @@ -9,8 +9,8 @@ import ( "github.com/anyproto/any-sync/net/pool" "github.com/anyproto/any-sync/net/streampool" - "github.com/anyproto/anytype-heart/space" - "github.com/anyproto/anytype-heart/space/peerstore" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/peerstore" ) func New() peermanager.PeerManagerProvider { @@ -31,7 +31,7 @@ func (p *provider) Init(a *app.App) (err error) { p.peerStore = a.MustComponent(peerstore.CName).(peerstore.PeerStore) poolService := a.MustComponent(pool.CName).(pool.Service) p.pool = poolService - p.streamPool = a.MustComponent(space.CName).(space.Service).StreamPool() + p.streamPool = a.MustComponent(spacecore.CName).(spacecore.SpaceCoreService).StreamPool() return nil } diff --git a/space/peerstore/peerstore.go b/space/spacecore/peerstore/peerstore.go similarity index 100% rename from space/peerstore/peerstore.go rename to space/spacecore/peerstore/peerstore.go diff --git a/space/rpchandler.go b/space/spacecore/rpchandler.go similarity index 90% rename from space/rpchandler.go rename to space/spacecore/rpchandler.go index 8a6ed9cb2..a263e97ba 100644 --- a/space/rpchandler.go +++ b/space/spacecore/rpchandler.go @@ -1,4 +1,4 @@ -package space +package spacecore import ( "context" @@ -9,7 +9,7 @@ import ( "github.com/anyproto/any-sync/net/peer" "go.uber.org/zap" - "github.com/anyproto/anytype-heart/space/clientspaceproto" + "github.com/anyproto/anytype-heart/space/spacecore/clientspaceproto" ) type rpcHandler struct { @@ -27,7 +27,7 @@ func (r *rpcHandler) AclGetRecords(ctx context.Context, request *spacesyncproto. } func (r *rpcHandler) ObjectSync(ctx context.Context, req *spacesyncproto.ObjectSyncMessage) (resp *spacesyncproto.ObjectSyncMessage, err error) { - sp, err := r.s.GetSpace(ctx, req.SpaceId) + sp, err := r.s.Get(ctx, req.SpaceId) if err != nil { if err != spacesyncproto.ErrSpaceMissing { err = spacesyncproto.ErrUnexpected @@ -50,7 +50,7 @@ func (r *rpcHandler) SpaceExchange(ctx context.Context, request *clientspaceprot } var portAddrs []string for _, ip := range request.LocalServer.Ips { - portAddrs = append(portAddrs, fmt.Sprintf("%s:%d", ip, request.LocalServer.Port)) + portAddrs = append(portAddrs, fmt.Sprintf("%spaceCore:%d", ip, request.LocalServer.Port)) } r.s.peerService.SetPeerAddrs(peerId, portAddrs) r.s.peerStore.UpdateLocalPeer(peerId, request.SpaceIds) @@ -62,7 +62,7 @@ func (r *rpcHandler) SpaceExchange(ctx context.Context, request *clientspaceprot } func (r *rpcHandler) SpacePull(ctx context.Context, request *spacesyncproto.SpacePullRequest) (resp *spacesyncproto.SpacePullResponse, err error) { - sp, err := r.s.GetSpace(ctx, request.Id) + sp, err := r.s.Get(ctx, request.Id) if err != nil { if err != spacesyncproto.ErrSpaceMissing { err = spacesyncproto.ErrUnexpected @@ -97,7 +97,7 @@ func (r *rpcHandler) SpacePush(ctx context.Context, req *spacesyncproto.SpacePus SpaceSettingsId: req.Payload.SpaceSettingsPayloadId, } ctx = context.WithValue(ctx, commonspace.AddSpaceCtxKey, description) - _, err = r.s.GetSpace(ctx, description.SpaceHeader.GetId()) + _, err = r.s.Get(ctx, description.SpaceHeader.GetId()) if err != nil { return } @@ -106,7 +106,7 @@ func (r *rpcHandler) SpacePush(ctx context.Context, req *spacesyncproto.SpacePus } func (r *rpcHandler) HeadSync(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error) { - sp, err := r.s.GetSpace(ctx, req.SpaceId) + sp, err := r.s.Get(ctx, req.SpaceId) if err != nil { return nil, spacesyncproto.ErrSpaceMissing } diff --git a/space/spacecore/service.go b/space/spacecore/service.go new file mode 100644 index 000000000..b40ec2880 --- /dev/null +++ b/space/spacecore/service.go @@ -0,0 +1,269 @@ +package spacecore + +import ( + "context" + "fmt" + "strconv" + "strings" + "time" + + "github.com/anyproto/any-sync/accountservice" + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/app/logger" + "github.com/anyproto/any-sync/app/ocache" + "github.com/anyproto/any-sync/commonspace" + // nolint: misspell + commonconfig "github.com/anyproto/any-sync/commonspace/config" + "github.com/anyproto/any-sync/commonspace/object/accountdata" + "github.com/anyproto/any-sync/commonspace/peermanager" + "github.com/anyproto/any-sync/commonspace/spacestorage" + "github.com/anyproto/any-sync/commonspace/spacesyncproto" + "github.com/anyproto/any-sync/coordinator/coordinatorclient" + "github.com/anyproto/any-sync/coordinator/coordinatorproto" + "github.com/anyproto/any-sync/net/peerservice" + "github.com/anyproto/any-sync/net/pool" + "github.com/anyproto/any-sync/net/rpc/server" + "github.com/anyproto/any-sync/net/streampool" + "github.com/anyproto/any-sync/nodeconf" + "github.com/anyproto/any-sync/util/crypto" + "go.uber.org/zap" + + "github.com/anyproto/anytype-heart/core/anytype/config" + "github.com/anyproto/anytype-heart/core/block/object/treesyncer" + "github.com/anyproto/anytype-heart/core/wallet" + "github.com/anyproto/anytype-heart/space/spacecore/clientspaceproto" + "github.com/anyproto/anytype-heart/space/spacecore/localdiscovery" + "github.com/anyproto/anytype-heart/space/spacecore/peerstore" + "github.com/anyproto/anytype-heart/space/spacecore/storage" +) + +const ( + CName = "client.space.spacecore" + SpaceType = "anytype.space" + TechSpaceType = "anytype.techspace" + ChangeType = "anytype.object" +) + +var log = logger.NewNamed(CName) + +func New() SpaceCoreService { + return &service{} +} + +type PoolManager interface { + UnaryPeerPool() pool.Pool + StreamPeerPool() pool.Pool +} + +type SpaceCoreService interface { + Create(ctx context.Context, replicationKey uint64) (*AnySpace, error) + Derive(ctx context.Context, spaceType string) (space *AnySpace, err error) + DeriveID(ctx context.Context, spaceType string) (id string, err error) + Delete(ctx context.Context, spaceID string) (payload NetworkStatus, err error) + RevertDeletion(ctx context.Context, spaceID string) (err error) + Get(ctx context.Context, id string) (*AnySpace, error) + + StreamPool() streampool.StreamPool + app.ComponentRunnable +} + +type service struct { + conf commonconfig.Config + spaceCache ocache.OCache + accountKeys *accountdata.AccountKeys + nodeConf nodeconf.Service + commonSpace commonspace.SpaceService + coordinator coordinatorclient.CoordinatorClient + wallet wallet.Wallet + spaceStorageProvider storage.ClientStorage + streamPool streampool.StreamPool + peerStore peerstore.PeerStore + peerService peerservice.PeerService + poolManager PoolManager + streamHandler *streamHandler + syncStatusService syncStatusService +} + +type syncStatusService interface { + RegisterSpace(space commonspace.Space) + UnregisterSpace(space commonspace.Space) +} + +func (s *service) Init(a *app.App) (err error) { + conf := a.MustComponent(config.CName).(*config.Config) + s.conf = conf.GetSpace() + s.accountKeys = a.MustComponent(accountservice.CName).(accountservice.Service).Account() + s.nodeConf = a.MustComponent(nodeconf.CName).(nodeconf.Service) + s.commonSpace = a.MustComponent(commonspace.CName).(commonspace.SpaceService) + s.wallet = a.MustComponent(wallet.CName).(wallet.Wallet) + s.coordinator = a.MustComponent(coordinatorclient.CName).(coordinatorclient.CoordinatorClient) + s.poolManager = a.MustComponent(peermanager.CName).(PoolManager) + s.spaceStorageProvider = a.MustComponent(spacestorage.CName).(storage.ClientStorage) + s.peerStore = a.MustComponent(peerstore.CName).(peerstore.PeerStore) + s.peerService = a.MustComponent(peerservice.CName).(peerservice.PeerService) + s.syncStatusService = app.MustComponent[syncStatusService](a) + localDiscovery := a.MustComponent(localdiscovery.CName).(localdiscovery.LocalDiscovery) + localDiscovery.SetNotifier(s) + s.streamHandler = &streamHandler{spaceCore: s} + + s.streamPool = a.MustComponent(streampool.CName).(streampool.Service).NewStreamPool(s.streamHandler, streampool.StreamConfig{ + SendQueueSize: 300, + DialQueueWorkers: 4, + DialQueueSize: 300, + }) + s.spaceCache = ocache.New( + s.loadSpace, + ocache.WithLogger(log.Sugar()), + ocache.WithGCPeriod(time.Minute), + ocache.WithTTL(time.Duration(s.conf.GCTTL)*time.Second), + ) + + err = spacesyncproto.DRPCRegisterSpaceSync(a.MustComponent(server.CName).(server.DRPCServer), &rpcHandler{s}) + if err != nil { + return + } + return clientspaceproto.DRPCRegisterClientSpace(a.MustComponent(server.CName).(server.DRPCServer), &rpcHandler{s}) +} + +func (s *service) Name() (name string) { + return CName +} + +func (s *service) Run(ctx context.Context) (err error) { + return +} + +func parseReplicationKey(spaceID string) (uint64, error) { + parts := strings.Split(spaceID, ".") + raw := parts[len(parts)-1] + return strconv.ParseUint(raw, 36, 64) +} + +func (s *service) Derive(ctx context.Context, spaceType string) (space *AnySpace, err error) { + payload := commonspace.SpaceDerivePayload{ + SigningKey: s.wallet.GetAccountPrivkey(), + MasterKey: s.wallet.GetMasterKey(), + SpaceType: spaceType, + } + id, err := s.commonSpace.DeriveSpace(ctx, payload) + if err != nil { + return + } + obj, err := s.spaceCache.Get(ctx, id) + if err != nil { + return + } + return obj.(*AnySpace), nil +} + +func (s *service) DeriveID(ctx context.Context, spaceType string) (id string, err error) { + payload := commonspace.SpaceDerivePayload{ + SigningKey: s.wallet.GetAccountPrivkey(), + MasterKey: s.wallet.GetMasterKey(), + SpaceType: spaceType, + } + return s.commonSpace.DeriveId(ctx, payload) +} + +func (s *service) Create(ctx context.Context, replicationKey uint64) (container *AnySpace, err error) { + metadataPrivKey, _, err := crypto.GenerateRandomEd25519KeyPair() + if err != nil { + return nil, fmt.Errorf("generate metadata key: %w", err) + } + payload := commonspace.SpaceCreatePayload{ + SigningKey: s.wallet.GetAccountPrivkey(), + MasterKey: s.wallet.GetMasterKey(), + ReadKey: crypto.NewAES(), + MetadataKey: metadataPrivKey, + SpaceType: SpaceType, + ReplicationKey: replicationKey, + } + id, err := s.commonSpace.CreateSpace(ctx, payload) + if err != nil { + return + } + obj, err := s.spaceCache.Get(ctx, id) + if err != nil { + return + } + return obj.(*AnySpace), nil +} + +func (s *service) Get(ctx context.Context, id string) (space *AnySpace, err error) { + v, err := s.spaceCache.Get(ctx, id) + if err != nil { + return + } + return v.(*AnySpace), nil +} + +func (s *service) HandleMessage(ctx context.Context, senderId string, req *spacesyncproto.ObjectSyncMessage) (err error) { + var msg = &spacesyncproto.SpaceSubscription{} + if err = msg.Unmarshal(req.Payload); err != nil { + return + } + log.InfoCtx(ctx, "got subscription message", zap.Strings("spaceIds", msg.SpaceIds)) + if msg.Action == spacesyncproto.SpaceSubscriptionAction_Subscribe { + return s.streamPool.AddTagsCtx(ctx, msg.SpaceIds...) + } else { + return s.streamPool.RemoveTagsCtx(ctx, msg.SpaceIds...) + } +} + +func (s *service) StreamPool() streampool.StreamPool { + return s.streamPool +} + +func (s *service) Delete(ctx context.Context, spaceID string) (payload NetworkStatus, err error) { + networkID := s.nodeConf.Configuration().NetworkId + delConf, err := coordinatorproto.PrepareDeleteConfirmation(s.accountKeys.SignKey, spaceID, s.accountKeys.PeerId, networkID) + if err != nil { + return + } + status, err := s.coordinator.ChangeStatus(ctx, spaceID, delConf) + if err != nil { + err = convertCoordError(err) + return + } + payload = NewSpaceStatus(status) + return +} + +func (s *service) RevertDeletion(ctx context.Context, spaceID string) (err error) { + _, err = s.coordinator.ChangeStatus(ctx, spaceID, nil) + if err != nil { + err = convertCoordError(err) + return + } + return +} + +func (s *service) loadSpace(ctx context.Context, id string) (value ocache.Object, err error) { + cc, err := s.commonSpace.NewSpace(ctx, id, commonspace.Deps{TreeSyncer: treesyncer.NewTreeSyncer(id)}) + if err != nil { + return + } + ns, err := newAnySpace(cc, s.syncStatusService) + if err != nil { + return + } + if err = ns.Init(ctx); err != nil { + return + } + if err != nil { + return nil, fmt.Errorf("store mapping for space: %w", err) + } + return ns, nil +} + +func (s *service) getOpenedSpaceIds() (ids []string) { + s.spaceCache.ForEach(func(v ocache.Object) (isContinue bool) { + ids = append(ids, v.(commonspace.Space).Id()) + return true + }) + return +} + +func (s *service) Close(ctx context.Context) (err error) { + return s.spaceCache.Close() +} diff --git a/space/spacecore/space.go b/space/spacecore/space.go new file mode 100644 index 000000000..8bb2b1194 --- /dev/null +++ b/space/spacecore/space.go @@ -0,0 +1,38 @@ +package spacecore + +import ( + "context" + "time" + + "github.com/anyproto/any-sync/commonspace" +) + +func newAnySpace(cc commonspace.Space, status syncStatusService) (*AnySpace, error) { + return &AnySpace{ + Space: cc, + status: status, + }, nil +} + +type AnySpace struct { + commonspace.Space + status syncStatusService +} + +func (s *AnySpace) Init(ctx context.Context) (err error) { + err = s.Space.Init(ctx) + if err != nil { + return + } + s.status.RegisterSpace(s) + return +} + +func (s *AnySpace) TryClose(objectTTL time.Duration) (close bool, err error) { + return false, nil +} + +func (s *AnySpace) Close() (err error) { + s.status.UnregisterSpace(s) + return s.Space.Close() +} diff --git a/space/spacestatus.go b/space/spacecore/spacestatus.go similarity index 82% rename from space/spacestatus.go rename to space/spacecore/spacestatus.go index a4e35b982..5930b5b9f 100644 --- a/space/spacestatus.go +++ b/space/spacecore/spacestatus.go @@ -1,4 +1,4 @@ -package space +package spacecore import ( "errors" @@ -23,19 +23,19 @@ const ( SpaceStatusDeleted ) -type StatusPayload struct { +type NetworkStatus struct { Status Status DeletionDate time.Time } -func newSpaceStatus(payload *coordinatorproto.SpaceStatusPayload) StatusPayload { - return StatusPayload{ +func NewSpaceStatus(payload *coordinatorproto.SpaceStatusPayload) NetworkStatus { + return NetworkStatus{ Status: Status(payload.Status), DeletionDate: time.Unix(payload.DeletionTimestamp, 0), } } -func coordError(err error) error { +func convertCoordError(err error) error { switch err { case coordinatorproto.ErrSpaceDeletionPending: return ErrSpaceDeletionPending diff --git a/space/storage/helpers.go b/space/spacecore/storage/helpers.go similarity index 100% rename from space/storage/helpers.go rename to space/spacecore/storage/helpers.go diff --git a/space/storage/keys.go b/space/spacecore/storage/keys.go similarity index 95% rename from space/storage/keys.go rename to space/spacecore/storage/keys.go index 59b89b22a..fdd675fdc 100644 --- a/space/storage/keys.go +++ b/space/spacecore/storage/keys.go @@ -119,3 +119,7 @@ func newStorageServiceKeys() storageServiceKeys { func (s storageServiceKeys) SpacePrefix() []byte { return s.spacePrefix } + +func (s storageServiceKeys) BindObjectIDKey(objectID string) []byte { + return treestorage.JoinStringsToBytes("bind", objectID) +} diff --git a/space/storage/liststorage.go b/space/spacecore/storage/liststorage.go similarity index 100% rename from space/storage/liststorage.go rename to space/spacecore/storage/liststorage.go diff --git a/space/storage/liststorage_test.go b/space/spacecore/storage/liststorage_test.go similarity index 100% rename from space/storage/liststorage_test.go rename to space/spacecore/storage/liststorage_test.go diff --git a/space/storage/spacestorage.go b/space/spacecore/storage/spacestorage.go similarity index 100% rename from space/storage/spacestorage.go rename to space/spacecore/storage/spacestorage.go diff --git a/space/storage/spacestorage_test.go b/space/spacecore/storage/spacestorage_test.go similarity index 100% rename from space/storage/spacestorage_test.go rename to space/spacecore/storage/spacestorage_test.go diff --git a/space/storage/storageservice.go b/space/spacecore/storage/storageservice.go similarity index 79% rename from space/storage/storageservice.go rename to space/spacecore/storage/storageservice.go index da6bbc3db..5ed5989a6 100644 --- a/space/storage/storageservice.go +++ b/space/spacecore/storage/storageservice.go @@ -8,6 +8,7 @@ import ( "github.com/dgraph-io/badger/v3" "github.com/anyproto/anytype-heart/pkg/lib/datastore" + "github.com/anyproto/anytype-heart/util/badgerhelper" ) type storageService struct { @@ -20,6 +21,8 @@ type ClientStorage interface { spacestorage.SpaceStorageProvider app.ComponentRunnable AllSpaceIds() (ids []string, err error) + GetSpaceID(objectID string) (spaceID string, err error) + BindSpaceID(spaceID, objectID string) (err error) } func New() ClientStorage { @@ -58,6 +61,16 @@ func (s *storageService) CreateSpaceStorage(payload spacestorage.SpaceStorageCre return createSpaceStorage(s.db, payload) } +func (s *storageService) GetSpaceID(objectID string) (spaceID string, err error) { + return badgerhelper.GetValue(s.db, s.keys.BindObjectIDKey(objectID), func(bytes []byte) (string, error) { + return string(bytes), nil + }) +} + +func (s *storageService) BindSpaceID(spaceID, objectID string) (err error) { + return badgerhelper.SetValue(s.db, s.keys.BindObjectIDKey(objectID), []byte(spaceID)) +} + func (s *storageService) AllSpaceIds() (ids []string, err error) { err = s.db.View(func(txn *badger.Txn) error { opts := badger.DefaultIteratorOptions diff --git a/space/storage/treestorage.go b/space/spacecore/storage/treestorage.go similarity index 100% rename from space/storage/treestorage.go rename to space/spacecore/storage/treestorage.go diff --git a/space/storage/treestorage_test.go b/space/spacecore/storage/treestorage_test.go similarity index 100% rename from space/storage/treestorage_test.go rename to space/spacecore/storage/treestorage_test.go diff --git a/space/streamhandler.go b/space/spacecore/streamhandler.go similarity index 70% rename from space/streamhandler.go rename to space/spacecore/streamhandler.go index f65a5dabe..a99d1e9c1 100644 --- a/space/streamhandler.go +++ b/space/spacecore/streamhandler.go @@ -1,4 +1,4 @@ -package space +package spacecore import ( "errors" @@ -8,6 +8,7 @@ import ( "github.com/anyproto/any-sync/commonspace/objectsync" "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/net/peer" + "go.uber.org/zap" "golang.org/x/net/context" "storj.io/drpc" ) @@ -19,11 +20,11 @@ var ( var lastMsgId atomic.Uint64 type streamHandler struct { - s *service + spaceCore *service } func (s *streamHandler) OpenStream(ctx context.Context, p peer.Peer) (stream drpc.Stream, tags []string, err error) { - return s.OpenSpaceStream(ctx, p, s.s.getOpenedSpaceIds()) + return s.OpenSpaceStream(ctx, p, s.spaceCore.getOpenedSpaceIds()) } func (s *streamHandler) OpenSpaceStream(ctx context.Context, p peer.Peer, spaceIds []string) (stream drpc.Stream, tags []string, err error) { @@ -63,10 +64,10 @@ func (s *streamHandler) HandleMessage(ctx context.Context, peerId string, msg dr ctx = peer.CtxWithPeerId(ctx, peerId) if syncMsg.SpaceId == "" { - return s.s.HandleMessage(ctx, peerId, syncMsg) + return s.spaceCore.HandleMessage(ctx, peerId, syncMsg) } - space, err := s.s.GetSpace(ctx, syncMsg.SpaceId) + space, err := s.spaceCore.Get(ctx, syncMsg.SpaceId) if err != nil { return } @@ -80,6 +81,19 @@ func (s *streamHandler) HandleMessage(ctx context.Context, peerId string, msg dr return } +func (s *streamHandler) handleMessage(ctx context.Context, senderId string, req *spacesyncproto.ObjectSyncMessage) (err error) { + var msg = &spacesyncproto.SpaceSubscription{} + if err = msg.Unmarshal(req.Payload); err != nil { + return + } + log.InfoCtx(ctx, "got subscription message", zap.Strings("spaceIds", msg.SpaceIds)) + if msg.Action == spacesyncproto.SpaceSubscriptionAction_Subscribe { + return s.spaceCore.streamPool.AddTagsCtx(ctx, msg.SpaceIds...) + } else { + return s.spaceCore.streamPool.RemoveTagsCtx(ctx, msg.SpaceIds...) + } +} + func (s *streamHandler) NewReadMessage() drpc.Message { // TODO: we can use sync.Pool here return new(spacesyncproto.ObjectSyncMessage) diff --git a/space/syncstatusprovider/syncstatusprovider.go b/space/spacecore/syncstatusprovider/syncstatusprovider.go similarity index 100% rename from space/syncstatusprovider/syncstatusprovider.go rename to space/spacecore/syncstatusprovider/syncstatusprovider.go diff --git a/space/typeprovider/mock_typeprovider/mock_SmartBlockTypeProvider.go b/space/spacecore/typeprovider/mock_typeprovider/mock_SmartBlockTypeProvider.go similarity index 100% rename from space/typeprovider/mock_typeprovider/mock_SmartBlockTypeProvider.go rename to space/spacecore/typeprovider/mock_typeprovider/mock_SmartBlockTypeProvider.go diff --git a/space/typeprovider/typeprovider.go b/space/spacecore/typeprovider/typeprovider.go similarity index 96% rename from space/typeprovider/typeprovider.go rename to space/spacecore/typeprovider/typeprovider.go index 674d17143..04ded9f65 100644 --- a/space/typeprovider/typeprovider.go +++ b/space/spacecore/typeprovider/typeprovider.go @@ -22,7 +22,7 @@ import ( "github.com/anyproto/anytype-heart/pkg/lib/localstore/addr" "github.com/anyproto/anytype-heart/pkg/lib/logging" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/anyproto/anytype-heart/space" + "github.com/anyproto/anytype-heart/space/spacecore" ) const CName = "space.typeprovider" @@ -54,7 +54,7 @@ func (p *provider) PartitionIDsByType(spaceId string, ids []string) (map[smartbl type provider struct { sync.RWMutex - spaceService space.Service + spaceService spacecore.SpaceCoreService badger *badger.DB cache map[string]smartblock.SmartBlockType } @@ -95,7 +95,7 @@ func (p *provider) Init(a *app.App) (err error) { if err != nil { return fmt.Errorf("init cache from badger: %w", err) } - p.spaceService = app.MustComponent[space.Service](a) + p.spaceService = app.MustComponent[spacecore.SpaceCoreService](a) return } @@ -179,7 +179,7 @@ func (p *provider) objectTypeFromSpace(spaceID string, id string) (tp smartblock } p.RUnlock() - sp, err := p.spaceService.GetSpace(context.Background(), spaceID) + sp, err := p.spaceService.Get(context.Background(), spaceID) if err != nil { return } @@ -218,7 +218,7 @@ func GetTypeFromRoot(rawRoot *treechangeproto.RawTreeChangeWithId) (smartblock.S if err != nil { return 0, fmt.Errorf("unmarshall root: %w", err) } - if root.ChangeType != space.ChangeType { + if root.ChangeType != spacecore.ChangeType { err = ErrUnknownChangeType return 0, err } diff --git a/space/spaceinfo/spaceinfo.go b/space/spaceinfo/spaceinfo.go new file mode 100644 index 000000000..b3122da7f --- /dev/null +++ b/space/spaceinfo/spaceinfo.go @@ -0,0 +1,29 @@ +package spaceinfo + +import "github.com/anyproto/anytype-heart/pkg/lib/pb/model" + +type LocalStatus int + +const ( + LocalStatusUnknown = LocalStatus(model.SpaceStatus_Unknown) + LocalStatusLoading = LocalStatus(model.SpaceStatus_Loading) + LocalStatusOk = LocalStatus(model.SpaceStatus_Ok) + LocalStatusMissing = LocalStatus(model.SpaceStatus_Missing) +) + +type RemoteStatus int + +const ( + RemoteStatusUnknown = RemoteStatus(model.SpaceStatus_Unknown) + RemoteStatusOk = RemoteStatus(model.SpaceStatus_Ok) + RemoteStatusWaitingDeletion = RemoteStatus(model.SpaceStatus_RemoteWaitingDeletion) + RemoteStatusDeleted = RemoteStatus(model.SpaceStatus_RemoteDeleted) + RemoteStatusError = RemoteStatus(model.SpaceStatus_Error) +) + +type SpaceInfo struct { + SpaceID string + ViewID string + LocalStatus LocalStatus + RemoteStatus RemoteStatus +} diff --git a/space/statusreceiver.go b/space/statusreceiver.go deleted file mode 100644 index daf2b4ee7..000000000 --- a/space/statusreceiver.go +++ /dev/null @@ -1,21 +0,0 @@ -package space - -import ( - "context" - - "github.com/anyproto/any-sync/commonspace/syncstatus" - "go.uber.org/zap" -) - -type statusReceiver struct { -} - -func (s *statusReceiver) UpdateNodeStatus(status syncstatus.ConnectionStatus) { - log.With(zap.Int("nodes status", int(status))).Debug("updating node status") -} - -func (s *statusReceiver) UpdateTree(ctx context.Context, treeId string, status syncstatus.SyncStatus) (err error) { - log.With(zap.String("treeId", treeId), zap.Bool("synced", status == syncstatus.StatusSynced)). - Debug("updating sync status") - return nil -} diff --git a/space/techspace/mock_techspace/mock_TechSpace.go b/space/techspace/mock_techspace/mock_TechSpace.go new file mode 100644 index 000000000..fa834d567 --- /dev/null +++ b/space/techspace/mock_techspace/mock_TechSpace.go @@ -0,0 +1,446 @@ +// Code generated by mockery v2.26.1. DO NOT EDIT. + +package mock_techspace + +import ( + context "context" + + app "github.com/anyproto/any-sync/app" + mock "github.com/stretchr/testify/mock" + + editor "github.com/anyproto/anytype-heart/core/block/editor" + spaceinfo "github.com/anyproto/anytype-heart/space/spaceinfo" +) + +// MockTechSpace is an autogenerated mock type for the TechSpace type +type MockTechSpace struct { + mock.Mock +} + +type MockTechSpace_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTechSpace) EXPECT() *MockTechSpace_Expecter { + return &MockTechSpace_Expecter{mock: &_m.Mock} +} + +// Close provides a mock function with given fields: ctx +func (_m *MockTechSpace) Close(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTechSpace_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type MockTechSpace_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockTechSpace_Expecter) Close(ctx interface{}) *MockTechSpace_Close_Call { + return &MockTechSpace_Close_Call{Call: _e.mock.On("Close", ctx)} +} + +func (_c *MockTechSpace_Close_Call) Run(run func(ctx context.Context)) *MockTechSpace_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockTechSpace_Close_Call) Return(err error) *MockTechSpace_Close_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockTechSpace_Close_Call) RunAndReturn(run func(context.Context) error) *MockTechSpace_Close_Call { + _c.Call.Return(run) + return _c +} + +// CreateSpaceView provides a mock function with given fields: ctx, spaceID +func (_m *MockTechSpace) CreateSpaceView(ctx context.Context, spaceID string) (*editor.SpaceView, error) { + ret := _m.Called(ctx, spaceID) + + var r0 *editor.SpaceView + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*editor.SpaceView, error)); ok { + return rf(ctx, spaceID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) *editor.SpaceView); ok { + r0 = rf(ctx, spaceID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*editor.SpaceView) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, spaceID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTechSpace_CreateSpaceView_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSpaceView' +type MockTechSpace_CreateSpaceView_Call struct { + *mock.Call +} + +// CreateSpaceView is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +func (_e *MockTechSpace_Expecter) CreateSpaceView(ctx interface{}, spaceID interface{}) *MockTechSpace_CreateSpaceView_Call { + return &MockTechSpace_CreateSpaceView_Call{Call: _e.mock.On("CreateSpaceView", ctx, spaceID)} +} + +func (_c *MockTechSpace_CreateSpaceView_Call) Run(run func(ctx context.Context, spaceID string)) *MockTechSpace_CreateSpaceView_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockTechSpace_CreateSpaceView_Call) Return(spaceView *editor.SpaceView, err error) *MockTechSpace_CreateSpaceView_Call { + _c.Call.Return(spaceView, err) + return _c +} + +func (_c *MockTechSpace_CreateSpaceView_Call) RunAndReturn(run func(context.Context, string) (*editor.SpaceView, error)) *MockTechSpace_CreateSpaceView_Call { + _c.Call.Return(run) + return _c +} + +// DeriveSpaceViewID provides a mock function with given fields: ctx, spaceID +func (_m *MockTechSpace) DeriveSpaceViewID(ctx context.Context, spaceID string) (string, error) { + ret := _m.Called(ctx, spaceID) + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { + return rf(ctx, spaceID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { + r0 = rf(ctx, spaceID) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, spaceID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTechSpace_DeriveSpaceViewID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveSpaceViewID' +type MockTechSpace_DeriveSpaceViewID_Call struct { + *mock.Call +} + +// DeriveSpaceViewID is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +func (_e *MockTechSpace_Expecter) DeriveSpaceViewID(ctx interface{}, spaceID interface{}) *MockTechSpace_DeriveSpaceViewID_Call { + return &MockTechSpace_DeriveSpaceViewID_Call{Call: _e.mock.On("DeriveSpaceViewID", ctx, spaceID)} +} + +func (_c *MockTechSpace_DeriveSpaceViewID_Call) Run(run func(ctx context.Context, spaceID string)) *MockTechSpace_DeriveSpaceViewID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockTechSpace_DeriveSpaceViewID_Call) Return(_a0 string, _a1 error) *MockTechSpace_DeriveSpaceViewID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTechSpace_DeriveSpaceViewID_Call) RunAndReturn(run func(context.Context, string) (string, error)) *MockTechSpace_DeriveSpaceViewID_Call { + _c.Call.Return(run) + return _c +} + +// GetInfo provides a mock function with given fields: spaceID +func (_m *MockTechSpace) GetInfo(spaceID string) spaceinfo.SpaceInfo { + ret := _m.Called(spaceID) + + var r0 spaceinfo.SpaceInfo + if rf, ok := ret.Get(0).(func(string) spaceinfo.SpaceInfo); ok { + r0 = rf(spaceID) + } else { + r0 = ret.Get(0).(spaceinfo.SpaceInfo) + } + + return r0 +} + +// MockTechSpace_GetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInfo' +type MockTechSpace_GetInfo_Call struct { + *mock.Call +} + +// GetInfo is a helper method to define mock.On call +// - spaceID string +func (_e *MockTechSpace_Expecter) GetInfo(spaceID interface{}) *MockTechSpace_GetInfo_Call { + return &MockTechSpace_GetInfo_Call{Call: _e.mock.On("GetInfo", spaceID)} +} + +func (_c *MockTechSpace_GetInfo_Call) Run(run func(spaceID string)) *MockTechSpace_GetInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockTechSpace_GetInfo_Call) Return(_a0 spaceinfo.SpaceInfo) *MockTechSpace_GetInfo_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockTechSpace_GetInfo_Call) RunAndReturn(run func(string) spaceinfo.SpaceInfo) *MockTechSpace_GetInfo_Call { + _c.Call.Return(run) + return _c +} + +// Init provides a mock function with given fields: a +func (_m *MockTechSpace) Init(a *app.App) error { + ret := _m.Called(a) + + var r0 error + if rf, ok := ret.Get(0).(func(*app.App) error); ok { + r0 = rf(a) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTechSpace_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init' +type MockTechSpace_Init_Call struct { + *mock.Call +} + +// Init is a helper method to define mock.On call +// - a *app.App +func (_e *MockTechSpace_Expecter) Init(a interface{}) *MockTechSpace_Init_Call { + return &MockTechSpace_Init_Call{Call: _e.mock.On("Init", a)} +} + +func (_c *MockTechSpace_Init_Call) Run(run func(a *app.App)) *MockTechSpace_Init_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*app.App)) + }) + return _c +} + +func (_c *MockTechSpace_Init_Call) Return(err error) *MockTechSpace_Init_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockTechSpace_Init_Call) RunAndReturn(run func(*app.App) error) *MockTechSpace_Init_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *MockTechSpace) Name() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockTechSpace_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockTechSpace_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockTechSpace_Expecter) Name() *MockTechSpace_Name_Call { + return &MockTechSpace_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockTechSpace_Name_Call) Run(run func()) *MockTechSpace_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockTechSpace_Name_Call) Return(name string) *MockTechSpace_Name_Call { + _c.Call.Return(name) + return _c +} + +func (_c *MockTechSpace_Name_Call) RunAndReturn(run func() string) *MockTechSpace_Name_Call { + _c.Call.Return(run) + return _c +} + +// Run provides a mock function with given fields: ctx +func (_m *MockTechSpace) Run(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTechSpace_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type MockTechSpace_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockTechSpace_Expecter) Run(ctx interface{}) *MockTechSpace_Run_Call { + return &MockTechSpace_Run_Call{Call: _e.mock.On("Run", ctx)} +} + +func (_c *MockTechSpace_Run_Call) Run(run func(ctx context.Context)) *MockTechSpace_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *MockTechSpace_Run_Call) Return(err error) *MockTechSpace_Run_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockTechSpace_Run_Call) RunAndReturn(run func(context.Context) error) *MockTechSpace_Run_Call { + _c.Call.Return(run) + return _c +} + +// SetInfo provides a mock function with given fields: ctx, info +func (_m *MockTechSpace) SetInfo(ctx context.Context, info spaceinfo.SpaceInfo) error { + ret := _m.Called(ctx, info) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, spaceinfo.SpaceInfo) error); ok { + r0 = rf(ctx, info) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTechSpace_SetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetInfo' +type MockTechSpace_SetInfo_Call struct { + *mock.Call +} + +// SetInfo is a helper method to define mock.On call +// - ctx context.Context +// - info spaceinfo.SpaceInfo +func (_e *MockTechSpace_Expecter) SetInfo(ctx interface{}, info interface{}) *MockTechSpace_SetInfo_Call { + return &MockTechSpace_SetInfo_Call{Call: _e.mock.On("SetInfo", ctx, info)} +} + +func (_c *MockTechSpace_SetInfo_Call) Run(run func(ctx context.Context, info spaceinfo.SpaceInfo)) *MockTechSpace_SetInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(spaceinfo.SpaceInfo)) + }) + return _c +} + +func (_c *MockTechSpace_SetInfo_Call) Return(err error) *MockTechSpace_SetInfo_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockTechSpace_SetInfo_Call) RunAndReturn(run func(context.Context, spaceinfo.SpaceInfo) error) *MockTechSpace_SetInfo_Call { + _c.Call.Return(run) + return _c +} + +// SetStatuses provides a mock function with given fields: ctx, spaceID, local, remote +func (_m *MockTechSpace) SetStatuses(ctx context.Context, spaceID string, local spaceinfo.LocalStatus, remote spaceinfo.RemoteStatus) error { + ret := _m.Called(ctx, spaceID, local, remote) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, spaceinfo.LocalStatus, spaceinfo.RemoteStatus) error); ok { + r0 = rf(ctx, spaceID, local, remote) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockTechSpace_SetStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStatuses' +type MockTechSpace_SetStatuses_Call struct { + *mock.Call +} + +// SetStatuses is a helper method to define mock.On call +// - ctx context.Context +// - spaceID string +// - local spaceinfo.LocalStatus +// - remote spaceinfo.RemoteStatus +func (_e *MockTechSpace_Expecter) SetStatuses(ctx interface{}, spaceID interface{}, local interface{}, remote interface{}) *MockTechSpace_SetStatuses_Call { + return &MockTechSpace_SetStatuses_Call{Call: _e.mock.On("SetStatuses", ctx, spaceID, local, remote)} +} + +func (_c *MockTechSpace_SetStatuses_Call) Run(run func(ctx context.Context, spaceID string, local spaceinfo.LocalStatus, remote spaceinfo.RemoteStatus)) *MockTechSpace_SetStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(spaceinfo.LocalStatus), args[3].(spaceinfo.RemoteStatus)) + }) + return _c +} + +func (_c *MockTechSpace_SetStatuses_Call) Return(err error) *MockTechSpace_SetStatuses_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockTechSpace_SetStatuses_Call) RunAndReturn(run func(context.Context, string, spaceinfo.LocalStatus, spaceinfo.RemoteStatus) error) *MockTechSpace_SetStatuses_Call { + _c.Call.Return(run) + return _c +} + +type mockConstructorTestingTNewMockTechSpace interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockTechSpace creates a new instance of MockTechSpace. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockTechSpace(t mockConstructorTestingTNewMockTechSpace) *MockTechSpace { + mock := &MockTechSpace{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/space/techspace/techspace.go b/space/techspace/techspace.go new file mode 100644 index 000000000..c1a9f8d53 --- /dev/null +++ b/space/techspace/techspace.go @@ -0,0 +1,207 @@ +package techspace + +import ( + "context" + "fmt" + "sync" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/app/logger" + "go.uber.org/zap" + + "github.com/anyproto/anytype-heart/core/block/editor" + editorsb "github.com/anyproto/anytype-heart/core/block/editor/smartblock" + "github.com/anyproto/anytype-heart/core/block/editor/state" + "github.com/anyproto/anytype-heart/core/block/object/objectcache" + "github.com/anyproto/anytype-heart/core/block/object/payloadcreator" + "github.com/anyproto/anytype-heart/core/domain" + "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" + "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spaceinfo" +) + +const CName = "client.space.techspace" + +var log = logger.NewNamed(CName) + +func New() TechSpace { + return &techSpace{} +} + +type TechSpace interface { + CreateSpaceView(ctx context.Context, spaceID string) (spaceView *editor.SpaceView, err error) + DeriveSpaceViewID(ctx context.Context, spaceID string) (string, error) + SetStatuses(ctx context.Context, spaceID string, local spaceinfo.LocalStatus, remote spaceinfo.RemoteStatus) (err error) + SetInfo(ctx context.Context, info spaceinfo.SpaceInfo) (err error) + + GetInfo(spaceID string) spaceinfo.SpaceInfo + + app.ComponentRunnable +} + +type techSpace struct { + techCore *spacecore.AnySpace + spaceCoreService spacecore.SpaceCoreService + objectCache objectcache.Cache + + info map[string]spaceinfo.SpaceInfo + mu sync.Mutex + + ctx context.Context + ctxCancel context.CancelFunc + idsWakedUp chan struct{} +} + +func (s *techSpace) Init(a *app.App) (err error) { + s.info = make(map[string]spaceinfo.SpaceInfo) + s.objectCache = app.MustComponent[objectcache.Cache](a) + s.spaceCoreService = app.MustComponent[spacecore.SpaceCoreService](a) + s.ctx, s.ctxCancel = context.WithCancel(context.Background()) + return +} + +func (s *techSpace) Name() (name string) { + return CName +} + +func (s *techSpace) Run(ctx context.Context) (err error) { + if s.techCore, err = s.spaceCoreService.Derive(ctx, spacecore.TechSpaceType); err != nil { + return + } + s.idsWakedUp = make(chan struct{}) + go func() { + defer close(s.idsWakedUp) + if e := s.wakeUpViews(); e != nil { + log.Warn("wake up views error", zap.Error(e)) + } + }() + return +} + +func (s *techSpace) wakeUpViews() (err error) { + for _, id := range s.techCore.StoredIds() { + _ = s.doSpaceView(s.ctx, "", id, func(spaceView *editor.SpaceView) error { + return nil + }) + } + s.techCore.TreeSyncer().StartSync() + return +} + +func (s *techSpace) CreateSpaceView(ctx context.Context, spaceID string) (spaceView *editor.SpaceView, err error) { + uniqueKey, err := domain.NewUniqueKey(smartblock.SmartBlockTypeSpaceView, "") + if err != nil { + return + } + obj, err := s.objectCache.DeriveTreeObject(ctx, s.techCore.Id(), objectcache.TreeDerivationParams{ + Key: uniqueKey, + InitFunc: func(id string) *editorsb.InitContext { + return &editorsb.InitContext{Ctx: ctx, SpaceID: s.techCore.Id(), State: state.NewDoc(id, nil).(*state.State)} + }, + TargetSpaceID: spaceID, + }) + if err != nil { + return + } + spaceView, ok := obj.(*editor.SpaceView) + if !ok { + return nil, fmt.Errorf("smartblock not a spaceView") + } + return spaceView, nil +} + +func (s *techSpace) DeriveSpaceViewID(ctx context.Context, spaceID string) (string, error) { + uniqueKey, err := domain.NewUniqueKey(smartblock.SmartBlockTypeSpaceView, "") + if err != nil { + return "", err + } + payload, err := s.objectCache.DeriveTreePayload(ctx, s.techCore.Id(), payloadcreator.PayloadDerivationParams{ + Key: uniqueKey, + TargetSpaceID: spaceID, + }) + if err != nil { + return "", err + } + return payload.RootRawChange.Id, nil +} + +func (s *techSpace) getOrCreate(ctx context.Context, spaceID, viewID string) (*editor.SpaceView, error) { + obj, err := s.objectCache.GetObject(ctx, domain.FullID{ + ObjectID: viewID, + SpaceID: s.techCore.Id(), + }) + if err != nil { // TODO: check specific error + return s.CreateSpaceView(ctx, spaceID) + } + spaceView, ok := obj.(*editor.SpaceView) + if !ok { + return nil, fmt.Errorf("smartblock not a spaceView") + } + return spaceView, nil +} + +func (s *techSpace) doSpaceView(ctx context.Context, spaceID, viewID string, apply func(spaceView *editor.SpaceView) error) (err error) { + spaceView, err := s.getOrCreate(ctx, spaceID, viewID) + if err != nil { + return err + } + spaceView.Lock() + defer spaceView.Unlock() + return apply(spaceView) +} + +func (s *techSpace) SetStatuses(ctx context.Context, spaceID string, local spaceinfo.LocalStatus, remote spaceinfo.RemoteStatus) (err error) { + s.mu.Lock() + info, ok := s.info[spaceID] + if !ok { + s.mu.Unlock() + return fmt.Errorf("space info not found") + } + var isChanged bool + if info.LocalStatus != local { + info.LocalStatus = local + isChanged = true + } + if info.RemoteStatus != remote { + info.RemoteStatus = remote + isChanged = true + } + if isChanged { + s.info[spaceID] = info + } + s.mu.Unlock() + if !isChanged { + return + } + return s.doSpaceView(ctx, info.SpaceID, info.ViewID, func(spaceView *editor.SpaceView) error { + return spaceView.SetSpaceInfo(info) + }) +} + +func (s *techSpace) SetInfo(ctx context.Context, info spaceinfo.SpaceInfo) (err error) { + s.mu.Lock() + // do nothing if it's identical + if s.info[info.SpaceID] == info { + s.mu.Unlock() + return nil + } + s.info[info.SpaceID] = info + s.mu.Unlock() + return s.doSpaceView(ctx, info.SpaceID, info.ViewID, func(spaceView *editor.SpaceView) error { + return spaceView.SetSpaceInfo(info) + }) +} + +func (s *techSpace) GetInfo(spaceID string) spaceinfo.SpaceInfo { + s.mu.Lock() + defer s.mu.Unlock() + return s.info[spaceID] +} + +func (s *techSpace) Close(ctx context.Context) (err error) { + s.ctxCancel() + if s.idsWakedUp != nil { + <-s.idsWakedUp + } + return +} diff --git a/space/techspace/techspace_test.go b/space/techspace/techspace_test.go new file mode 100644 index 000000000..d44e56885 --- /dev/null +++ b/space/techspace/techspace_test.go @@ -0,0 +1,174 @@ +package techspace + +import ( + "context" + "fmt" + "testing" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/mock_commonspace" + "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" + "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" + "github.com/anyproto/any-sync/commonspace/object/treesyncer/mock_treesyncer" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/anyproto/anytype-heart/core/block/editor" + "github.com/anyproto/anytype-heart/core/block/editor/smartblock/smarttest" + "github.com/anyproto/anytype-heart/core/block/object/objectcache/mock_objectcache" + "github.com/anyproto/anytype-heart/core/domain" + space "github.com/anyproto/anytype-heart/space/spacecore" + "github.com/anyproto/anytype-heart/space/spacecore/mock_spacecore" + "github.com/anyproto/anytype-heart/space/spaceinfo" + "github.com/anyproto/anytype-heart/tests/testutil" +) + +var ctx = context.Background() + +const ( + testTechSpaceId = "techSpace.id" +) + +func TestTechSpace_Init(t *testing.T) { + var initIDs = []string{"1", "2", "3"} + fx := newFixture(t, initIDs) + defer fx.finish(t) +} + +func TestTechSpace_CreateSpaceView(t *testing.T) { + fx := newFixture(t, nil) + defer fx.finish(t) + + spaceView := &editor.SpaceView{} + fx.objectCache.EXPECT().DeriveTreeObject(ctx, testTechSpaceId, mock.Anything).Return(spaceView, nil) + + res, err := fx.CreateSpaceView(ctx, "new.space") + require.NoError(t, err) + assert.Equal(t, spaceView, res) +} + +func TestTechSpace_DeriveSpaceViewID(t *testing.T) { + fx := newFixture(t, nil) + defer fx.finish(t) + + payload := treestorage.TreeStorageCreatePayload{ + RootRawChange: &treechangeproto.RawTreeChangeWithId{ + Id: "viewId", + }, + } + fx.objectCache.EXPECT().DeriveTreePayload(ctx, testTechSpaceId, mock.Anything).Return(payload, nil) + + res, err := fx.DeriveSpaceViewID(ctx, "new.space") + require.NoError(t, err) + assert.Equal(t, payload.RootRawChange.Id, res) +} + +func TestTechSpace_SetInfo(t *testing.T) { + info := spaceinfo.SpaceInfo{ + SpaceID: "1", + ViewID: "2", + } + spaceView := &editor.SpaceView{SmartBlock: smarttest.New(info.ViewID)} + + t.Run("existing spaceView", func(t *testing.T) { + fx := newFixture(t, nil) + defer fx.finish(t) + + fx.objectCache.EXPECT().GetObject(ctx, domain.FullID{ObjectID: info.ViewID, SpaceID: testTechSpaceId}).Return(spaceView, nil) + + require.NoError(t, fx.SetInfo(ctx, info)) + assert.Equal(t, info, fx.GetInfo(info.SpaceID)) + }) + + t.Run("create spaceView", func(t *testing.T) { + fx := newFixture(t, nil) + defer fx.finish(t) + + fx.objectCache.EXPECT().GetObject(ctx, domain.FullID{ObjectID: info.ViewID, SpaceID: testTechSpaceId}).Return(nil, fmt.Errorf("no object")) + fx.objectCache.EXPECT().DeriveTreeObject(ctx, testTechSpaceId, mock.Anything).Return(spaceView, nil) + + require.NoError(t, fx.SetInfo(ctx, info)) + // second call with same info + require.NoError(t, fx.SetInfo(ctx, info)) + + assert.Equal(t, info, fx.GetInfo(info.SpaceID)) + }) +} + +func TestTechSpace_SetStatuses(t *testing.T) { + info := spaceinfo.SpaceInfo{ + SpaceID: "1", + ViewID: "2", + } + spaceView := &editor.SpaceView{SmartBlock: smarttest.New(info.ViewID)} + + t.Run("changed", func(t *testing.T) { + fx := newFixture(t, nil) + defer fx.finish(t) + + fx.objectCache.EXPECT().GetObject(ctx, domain.FullID{ObjectID: info.ViewID, SpaceID: testTechSpaceId}).Return(spaceView, nil) + require.NoError(t, fx.SetInfo(ctx, info)) + + changedInfo := info + changedInfo.LocalStatus = spaceinfo.LocalStatusLoading + changedInfo.RemoteStatus = spaceinfo.RemoteStatusError + + require.NoError(t, fx.SetStatuses(ctx, info.SpaceID, changedInfo.LocalStatus, changedInfo.RemoteStatus)) + assert.Equal(t, changedInfo, fx.GetInfo(info.SpaceID)) + }) + t.Run("not changed", func(t *testing.T) { + fx := newFixture(t, nil) + defer fx.finish(t) + + fx.objectCache.EXPECT().GetObject(ctx, domain.FullID{ObjectID: info.ViewID, SpaceID: testTechSpaceId}).Return(spaceView, nil) + require.NoError(t, fx.SetInfo(ctx, info)) + + require.NoError(t, fx.SetStatuses(ctx, info.SpaceID, info.LocalStatus, info.RemoteStatus)) + assert.Equal(t, info, fx.GetInfo(info.SpaceID)) + }) +} + +type fixture struct { + TechSpace + a *app.App + spaceCore *mock_spacecore.MockSpaceCoreService + objectCache *mock_objectcache.MockCache + ctrl *gomock.Controller + techCore *mock_commonspace.MockSpace +} + +func newFixture(t *testing.T, storeIDs []string) *fixture { + ctrl := gomock.NewController(t) + fx := &fixture{ + TechSpace: New(), + a: new(app.App), + ctrl: ctrl, + spaceCore: mock_spacecore.NewMockSpaceCoreService(t), + objectCache: mock_objectcache.NewMockCache(t), + techCore: mock_commonspace.NewMockSpace(ctrl), + } + fx.a.Register(testutil.PrepareMock(ctx, fx.a, fx.spaceCore)). + Register(testutil.PrepareMock(ctx, fx.a, fx.objectCache)). + Register(fx.TechSpace) + + treeSyncer := mock_treesyncer.NewMockTreeSyncer(fx.ctrl) + treeSyncer.EXPECT().StartSync() + fx.techCore.EXPECT().Id().Return(testTechSpaceId).AnyTimes() + fx.techCore.EXPECT().StoredIds().Return(storeIDs) + for _, id := range storeIDs { + fx.objectCache.EXPECT().GetObject(mock.Anything, domain.FullID{ObjectID: id, SpaceID: testTechSpaceId}).Return(&editor.SpaceView{SmartBlock: smarttest.New(id)}, nil) + } + fx.techCore.EXPECT().TreeSyncer().Return(treeSyncer) + + fx.spaceCore.EXPECT().Derive(ctx, space.TechSpaceType).Return(&space.AnySpace{Space: fx.techCore}, nil) + + require.NoError(t, fx.a.Start(ctx)) + return fx +} + +func (fx *fixture) finish(t *testing.T) { + require.NoError(t, fx.a.Close(ctx)) + fx.ctrl.Finish() +} diff --git a/tests/testutil/util.go b/tests/testutil/util.go index 6da3ed6e4..bd5956294 100644 --- a/tests/testutil/util.go +++ b/tests/testutil/util.go @@ -1,62 +1,15 @@ package testutil import ( - "context" "reflect" + "context" "github.com/anyproto/any-sync/app" + mock2 "github.com/stretchr/testify/mock" ) -func PrepareMock(a *app.App, mock app.Component) app.Component { +func PrepareMock(ctx context.Context, a *app.App, mock app.Component) app.Component { mockValue := reflect.ValueOf(mock) - - prepareInitMock(a, mockValue) - - return mock -} - -func PrepareRunnableMock(ctx context.Context, a *app.App, mock app.Component) app.Component { - mockValue := reflect.ValueOf(mock) - - prepareInitMock(a, mockValue) - result := callChainOfMethods(mockValue, []methodNameAndParams{ - { - name: "EXPECT", - params: nil, - }, - { - name: "Run", - params: []reflect.Value{reflect.ValueOf(ctx)}, - }, - { - name: "Return", - params: []reflect.Value{reflect.Zero(reflect.TypeOf((*error)(nil)).Elem())}, - }, - }) - call := result[0] - callAnyTimes(call) - - result = callChainOfMethods(mockValue, []methodNameAndParams{ - { - name: "EXPECT", - params: nil, - }, - { - name: "Close", - params: []reflect.Value{reflect.ValueOf(ctx)}, - }, - { - name: "Return", - params: []reflect.Value{reflect.Zero(reflect.TypeOf((*error)(nil)).Elem())}, - }, - }) - call = result[0] - callAnyTimes(call) - - return mock -} - -func prepareInitMock(a *app.App, mockValue reflect.Value) { mockName := mockValue.Type().String() result := callChainOfMethods(mockValue, []methodNameAndParams{ @@ -92,6 +45,43 @@ func prepareInitMock(a *app.App, mockValue reflect.Value) { }) call = result[0] callAnyTimes(call) + + if _, ok := mock.(app.ComponentRunnable); ok { + result = callChainOfMethods(mockValue, []methodNameAndParams{ + { + name: "EXPECT", + params: nil, + }, + { + name: "Run", + params: []reflect.Value{reflect.ValueOf(ctx)}, + }, + { + name: "Return", + params: []reflect.Value{reflect.Zero(reflect.TypeOf((*error)(nil)).Elem())}, + }, + }) + call = result[0] + callAnyTimes(call) + + result = callChainOfMethods(mockValue, []methodNameAndParams{ + { + name: "EXPECT", + params: nil, + }, + { + name: "Close", + params: []reflect.Value{reflect.ValueOf(mock2.Anything)}, + }, + { + name: "Return", + params: []reflect.Value{reflect.Zero(reflect.TypeOf((*error)(nil)).Elem())}, + }, + }) + call = result[0] + callAnyTimes(call) + } + return mock } type methodNameAndParams struct { diff --git a/util/badgerhelper/helper.go b/util/badgerhelper/helper.go index 12c5c05f8..440e7b1aa 100644 --- a/util/badgerhelper/helper.go +++ b/util/badgerhelper/helper.go @@ -56,6 +56,8 @@ func marshalValue(value any) ([]byte, error) { return proto.Marshal(v) case string: return []byte(v), nil + case []byte: + return v, nil default: return nil, fmt.Errorf("unsupported type %T", v) } diff --git a/util/builtintemplate/builtintemplate_test.go b/util/builtintemplate/builtintemplate_test.go index 34823a08d..664524bb5 100644 --- a/util/builtintemplate/builtintemplate_test.go +++ b/util/builtintemplate/builtintemplate_test.go @@ -28,12 +28,13 @@ func Test_registerBuiltin(t *testing.T) { builtInTemplates := New() + ctx := context.Background() a := new(app.App) - a.Register(testutil.PrepareMock(a, sourceService)) + a.Register(testutil.PrepareMock(ctx, a, sourceService)) a.Register(builtInTemplates) a.Register(config.New()) - a.Register(testutil.PrepareMock(a, objectStore)) - a.Register(testutil.PrepareMock(a, systemObjectService)) + a.Register(testutil.PrepareMock(ctx, a, objectStore)) + a.Register(testutil.PrepareMock(ctx, a, systemObjectService)) err := builtInTemplates.Init(a) assert.NoError(t, err) diff --git a/util/testMock/anytype.go b/util/testMock/anytype.go index ee0656190..e10fd1b89 100644 --- a/util/testMock/anytype.go +++ b/util/testMock/anytype.go @@ -1,7 +1,7 @@ //go:generate mockgen -package testMock -destination anytype_mock.go github.com/anyproto/anytype-heart/pkg/lib/core Service //go:generate mockgen -package testMock -destination objectstore_mock.go github.com/anyproto/anytype-heart/pkg/lib/localstore/objectstore ObjectStore //go:generate mockgen -package testMock -destination history_mock.go github.com/anyproto/anytype-heart/core/block/undo History -//go:generate mockgen -package testMock -destination sbt_provider_mock.go github.com/anyproto/anytype-heart/space/typeprovider SmartBlockTypeProvider +//go:generate mockgen -package testMock -destination sbt_provider_mock.go github.com/anyproto/anytype-heart/space/spacecore/typeprovider SmartBlockTypeProvider //go:generate mockgen -package testMock -destination file_service_mock.go -mock_names Service=MockFileService github.com/anyproto/anytype-heart/core/files Service,Image,File package testMock diff --git a/util/testMock/anytype_mock.go b/util/testMock/anytype_mock.go index d15f9aecd..9697e53e7 100644 --- a/util/testMock/anytype_mock.go +++ b/util/testMock/anytype_mock.go @@ -13,11 +13,10 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - gomock "go.uber.org/mock/gomock" - domain "github.com/anyproto/anytype-heart/core/domain" core "github.com/anyproto/anytype-heart/pkg/lib/core" threads "github.com/anyproto/anytype-heart/pkg/lib/threads" + gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. @@ -71,51 +70,6 @@ func (mr *MockServiceMockRecorder) Close(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockService)(nil).Close), arg0) } -// DeriveObjectId mocks base method. -func (m *MockService) DeriveObjectId(arg0 context.Context, arg1 string, arg2 domain.UniqueKey) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeriveObjectId", arg0, arg1, arg2) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DeriveObjectId indicates an expected call of DeriveObjectId. -func (mr *MockServiceMockRecorder) DeriveObjectId(arg0, arg1, arg2 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeriveObjectId", reflect.TypeOf((*MockService)(nil).DeriveObjectId), arg0, arg1, arg2) -} - -// DerivePredefinedObjects mocks base method. -func (m *MockService) DerivePredefinedObjects(arg0 context.Context, arg1 string, arg2 bool) (threads.DerivedSmartblockIds, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DerivePredefinedObjects", arg0, arg1, arg2) - ret0, _ := ret[0].(threads.DerivedSmartblockIds) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DerivePredefinedObjects indicates an expected call of DerivePredefinedObjects. -func (mr *MockServiceMockRecorder) DerivePredefinedObjects(arg0, arg1, arg2 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DerivePredefinedObjects", reflect.TypeOf((*MockService)(nil).DerivePredefinedObjects), arg0, arg1, arg2) -} - -// EnsurePredefinedBlocks mocks base method. -func (m *MockService) EnsurePredefinedBlocks(arg0 context.Context, arg1 string) (threads.DerivedSmartblockIds, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsurePredefinedBlocks", arg0, arg1) - ret0, _ := ret[0].(threads.DerivedSmartblockIds) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// EnsurePredefinedBlocks indicates an expected call of EnsurePredefinedBlocks. -func (mr *MockServiceMockRecorder) EnsurePredefinedBlocks(arg0, arg1 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsurePredefinedBlocks", reflect.TypeOf((*MockService)(nil).EnsurePredefinedBlocks), arg0, arg1) -} - // GetSystemRelationID mocks base method. func (m *MockService) GetSystemRelationID(arg0 string, arg1 domain.RelationKey) string { m.ctrl.T.Helper() diff --git a/util/testMock/file_service_mock.go b/util/testMock/file_service_mock.go index 18fd6d708..79617da79 100644 --- a/util/testMock/file_service_mock.go +++ b/util/testMock/file_service_mock.go @@ -14,14 +14,13 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - types "github.com/gogo/protobuf/types" - gomock "go.uber.org/mock/gomock" - domain "github.com/anyproto/anytype-heart/core/domain" files "github.com/anyproto/anytype-heart/core/files" pb "github.com/anyproto/anytype-heart/pb" mill "github.com/anyproto/anytype-heart/pkg/lib/mill" storage "github.com/anyproto/anytype-heart/pkg/lib/pb/storage" + types "github.com/gogo/protobuf/types" + gomock "go.uber.org/mock/gomock" ) // MockFileService is a mock of Service interface. diff --git a/util/testMock/history_mock.go b/util/testMock/history_mock.go index 7fed7aa57..d89e05210 100644 --- a/util/testMock/history_mock.go +++ b/util/testMock/history_mock.go @@ -11,9 +11,8 @@ package testMock import ( reflect "reflect" - gomock "go.uber.org/mock/gomock" - undo "github.com/anyproto/anytype-heart/core/block/undo" + gomock "go.uber.org/mock/gomock" ) // MockHistory is a mock of History interface. diff --git a/util/testMock/mockDetailsModifier/dm_mock.go b/util/testMock/mockDetailsModifier/dm_mock.go index 7886afce9..f597b70cb 100644 --- a/util/testMock/mockDetailsModifier/dm_mock.go +++ b/util/testMock/mockDetailsModifier/dm_mock.go @@ -11,10 +11,9 @@ package mockDetailsModifier import ( reflect "reflect" + session "github.com/anyproto/anytype-heart/core/session" types "github.com/gogo/protobuf/types" gomock "go.uber.org/mock/gomock" - - session "github.com/anyproto/anytype-heart/core/session" ) // MockDetailsModifier is a mock of DetailsModifier interface. diff --git a/util/testMock/mockKanban/kanban_mock.go b/util/testMock/mockKanban/kanban_mock.go index b19f1b9fa..5d1c92ed9 100644 --- a/util/testMock/mockKanban/kanban_mock.go +++ b/util/testMock/mockKanban/kanban_mock.go @@ -12,9 +12,8 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - gomock "go.uber.org/mock/gomock" - kanban "github.com/anyproto/anytype-heart/core/kanban" + gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. diff --git a/util/testMock/mockSource/source_mock.go b/util/testMock/mockSource/source_mock.go index 0f2ae028c..3d1fcad68 100644 --- a/util/testMock/mockSource/source_mock.go +++ b/util/testMock/mockSource/source_mock.go @@ -13,14 +13,13 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - types "github.com/gogo/protobuf/types" - gomock "go.uber.org/mock/gomock" - state "github.com/anyproto/anytype-heart/core/block/editor/state" source "github.com/anyproto/anytype-heart/core/block/source" domain "github.com/anyproto/anytype-heart/core/domain" pb "github.com/anyproto/anytype-heart/pb" smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" + types "github.com/gogo/protobuf/types" + gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. diff --git a/util/testMock/mockSpace/space_mock.go b/util/testMock/mockSpace/space_mock.go index b210dc2eb..8c7650319 100644 --- a/util/testMock/mockSpace/space_mock.go +++ b/util/testMock/mockSpace/space_mock.go @@ -17,7 +17,7 @@ import ( streampool "github.com/anyproto/any-sync/net/streampool" gomock "go.uber.org/mock/gomock" - space "github.com/anyproto/anytype-heart/space" + space "github.com/anyproto/anytype-heart/space/spacecore" ) // MockService is a mock of Service interface. @@ -102,10 +102,10 @@ func (mr *MockServiceMockRecorder) CreateSpace(arg0 interface{}) *gomock.Call { } // DeleteAccount mocks base method. -func (m *MockService) DeleteAccount(arg0 context.Context, arg1 bool) (space.StatusPayload, error) { +func (m *MockService) DeleteAccount(arg0 context.Context, arg1 bool) (space.NetworkStatus, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteAccount", arg0, arg1) - ret0, _ := ret[0].(space.StatusPayload) + ret0, _ := ret[0].(space.NetworkStatus) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -117,10 +117,10 @@ func (mr *MockServiceMockRecorder) DeleteAccount(arg0, arg1 any) *gomock.Call { } // DeleteSpace mocks base method. -func (m *MockService) DeleteSpace(arg0 context.Context, arg1 string, arg2 bool) (space.StatusPayload, error) { +func (m *MockService) DeleteSpace(arg0 context.Context, arg1 string, arg2 bool) (space.NetworkStatus, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteSpace", arg0, arg1, arg2) - ret0, _ := ret[0].(space.StatusPayload) + ret0, _ := ret[0].(space.NetworkStatus) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/util/testMock/objectstore_mock.go b/util/testMock/objectstore_mock.go index 64d5aa1b5..9b530dd83 100644 --- a/util/testMock/objectstore_mock.go +++ b/util/testMock/objectstore_mock.go @@ -14,13 +14,12 @@ import ( app "github.com/anyproto/any-sync/app" coordinatorproto "github.com/anyproto/any-sync/coordinator/coordinatorproto" - types "github.com/gogo/protobuf/types" - gomock "go.uber.org/mock/gomock" - smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" database "github.com/anyproto/anytype-heart/pkg/lib/database" ftsearch "github.com/anyproto/anytype-heart/pkg/lib/localstore/ftsearch" model "github.com/anyproto/anytype-heart/pkg/lib/pb/model" + types "github.com/gogo/protobuf/types" + gomock "go.uber.org/mock/gomock" ) // MockObjectStore is a mock of ObjectStore interface. @@ -161,18 +160,18 @@ func (mr *MockObjectStoreMockRecorder) GetByIDs(arg0, arg1 any) *gomock.Call { } // GetChecksums mocks base method. -func (m *MockObjectStore) GetChecksums() (*model.ObjectStoreChecksums, error) { +func (m *MockObjectStore) GetChecksums(arg0 string) (*model.ObjectStoreChecksums, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetChecksums") + ret := m.ctrl.Call(m, "GetChecksums", arg0) ret0, _ := ret[0].(*model.ObjectStoreChecksums) ret1, _ := ret[1].(error) return ret0, ret1 } // GetChecksums indicates an expected call of GetChecksums. -func (mr *MockObjectStoreMockRecorder) GetChecksums() *gomock.Call { +func (mr *MockObjectStoreMockRecorder) GetChecksums(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChecksums", reflect.TypeOf((*MockObjectStore)(nil).GetChecksums)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChecksums", reflect.TypeOf((*MockObjectStore)(nil).GetChecksums), arg0) } // GetDetails mocks base method. @@ -190,6 +189,21 @@ func (mr *MockObjectStoreMockRecorder) GetDetails(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDetails", reflect.TypeOf((*MockObjectStore)(nil).GetDetails), arg0) } +// GetGlobalChecksums mocks base method. +func (m *MockObjectStore) GetGlobalChecksums() (*model.ObjectStoreChecksums, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetGlobalChecksums") + ret0, _ := ret[0].(*model.ObjectStoreChecksums) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetGlobalChecksums indicates an expected call of GetGlobalChecksums. +func (mr *MockObjectStoreMockRecorder) GetGlobalChecksums() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGlobalChecksums", reflect.TypeOf((*MockObjectStore)(nil).GetGlobalChecksums)) +} + // GetInboundLinksByID mocks base method. func (m *MockObjectStore) GetInboundLinksByID(arg0 string) ([]string, error) { m.ctrl.T.Helper() @@ -461,17 +475,31 @@ func (mr *MockObjectStoreMockRecorder) SaveAccountStatus(arg0 any) *gomock.Call } // SaveChecksums mocks base method. -func (m *MockObjectStore) SaveChecksums(arg0 *model.ObjectStoreChecksums) error { +func (m *MockObjectStore) SaveChecksums(arg0 string, arg1 *model.ObjectStoreChecksums) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SaveChecksums", arg0) + ret := m.ctrl.Call(m, "SaveChecksums", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // SaveChecksums indicates an expected call of SaveChecksums. -func (mr *MockObjectStoreMockRecorder) SaveChecksums(arg0 any) *gomock.Call { +func (mr *MockObjectStoreMockRecorder) SaveChecksums(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveChecksums", reflect.TypeOf((*MockObjectStore)(nil).SaveChecksums), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveChecksums", reflect.TypeOf((*MockObjectStore)(nil).SaveChecksums), arg0, arg1) +} + +// SaveGlobalChecksums mocks base method. +func (m *MockObjectStore) SaveGlobalChecksums(arg0 *model.ObjectStoreChecksums) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SaveGlobalChecksums", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// SaveGlobalChecksums indicates an expected call of SaveGlobalChecksums. +func (mr *MockObjectStoreMockRecorder) SaveGlobalChecksums(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveGlobalChecksums", reflect.TypeOf((*MockObjectStore)(nil).SaveGlobalChecksums), arg0) } // SaveLastIndexedHeadsHash mocks base method. diff --git a/util/testMock/sbt_provider_mock.go b/util/testMock/sbt_provider_mock.go index 8e51e0778..d4eb0fd47 100644 --- a/util/testMock/sbt_provider_mock.go +++ b/util/testMock/sbt_provider_mock.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/anyproto/anytype-heart/space/typeprovider (interfaces: SmartBlockTypeProvider) +// Source: github.com/anyproto/anytype-heart/space/spacecore/typeprovider (interfaces: SmartBlockTypeProvider) // // Generated by this command: // -// mockgen -package testMock -destination sbt_provider_mock.go github.com/anyproto/anytype-heart/space/typeprovider SmartBlockTypeProvider +// mockgen -package testMock -destination sbt_provider_mock.go github.com/anyproto/anytype-heart/space/spacecore/typeprovider SmartBlockTypeProvider // // Package testMock is a generated GoMock package. package testMock @@ -12,9 +12,8 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - gomock "go.uber.org/mock/gomock" - smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" + gomock "go.uber.org/mock/gomock" ) // MockSmartBlockTypeProvider is a mock of SmartBlockTypeProvider interface.