Document creation fixes
This commit is contained in:
parent
071d0800b7
commit
282ef17df3
@ -37,7 +37,7 @@ func newListStorage(spaceId string, db *badger.DB, txn *badger.Txn) (ls storage.
|
|||||||
|
|
||||||
ls = &listStorage{
|
ls = &listStorage{
|
||||||
db: db,
|
db: db,
|
||||||
keys: aclKeys{},
|
keys: newACLKeys(spaceId),
|
||||||
id: stringId,
|
id: stringId,
|
||||||
root: rootWithId,
|
root: rootWithId,
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ func createListStorage(spaceId string, db *badger.DB, txn *badger.Txn, root *acl
|
|||||||
|
|
||||||
ls = &listStorage{
|
ls = &listStorage{
|
||||||
db: db,
|
db: db,
|
||||||
keys: aclKeys{},
|
keys: newACLKeys(spaceId),
|
||||||
id: root.Id,
|
id: root.Id,
|
||||||
root: root,
|
root: root,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,5 +125,5 @@ func (s *spaceStorage) StoredIds() (ids []string, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *spaceStorage) Close() (err error) {
|
func (s *spaceStorage) Close() (err error) {
|
||||||
return s.objDb.Close()
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/client/badgerprovider"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/client/badgerprovider"
|
||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app"
|
||||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/storage"
|
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/commonspace/storage"
|
||||||
@ -14,6 +15,7 @@ type storageService struct {
|
|||||||
|
|
||||||
type ClientStorage interface {
|
type ClientStorage interface {
|
||||||
storage.SpaceStorageProvider
|
storage.SpaceStorageProvider
|
||||||
|
app.ComponentRunnable
|
||||||
AllSpaceIds() (ids []string, err error)
|
AllSpaceIds() (ids []string, err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,3 +64,11 @@ func (s *storageService) AllSpaceIds() (ids []string, err error) {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *storageService) Run(ctx context.Context) (err error) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *storageService) Close(ctx context.Context) (err error) {
|
||||||
|
return s.db.Close()
|
||||||
|
}
|
||||||
|
|||||||
@ -89,6 +89,14 @@ func (s *space) Init(ctx context.Context) (err error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
aclStorage, err := s.storage.ACLStorage()
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
s.aclList, err = list.BuildACLList(aclStorage)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
s.diffService.Init(initialIds)
|
s.diffService.Init(initialIds)
|
||||||
s.syncService.Init()
|
s.syncService.Init()
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user