Use extracted go-filestore

This commit is contained in:
Łukasz Magiera
2019-07-15 17:08:18 +02:00
parent 1f6629e978
commit 041598dbb6
7 changed files with 28 additions and 305 deletions
+3 -4
View File
@@ -3,7 +3,7 @@ package client
import (
"context"
"github.com/filecoin-project/go-lotus/api"
"github.com/ipfs/go-ipfs/filestore"
"github.com/ipfs/go-filestore"
"go.uber.org/fx"
"os"
@@ -18,7 +18,7 @@ import (
type LocalStorage struct {
fx.In
LocalDAG ipld.DAGService
LocalDAG ipld.DAGService
Filestore *filestore.Filestore
}
@@ -59,7 +59,6 @@ func (s *LocalStorage) ClientImport(ctx context.Context, path string) (cid.Cid,
return nd.Cid(), bufferedDS.Commit()
}
func (s *LocalStorage) ClientListImports(ctx context.Context) ([]api.Import, error) {
next, err := filestore.ListAll(s.Filestore, false)
if err != nil {
@@ -84,4 +83,4 @@ func (s *LocalStorage) ClientListImports(ctx context.Context) ([]api.Import, err
Size: r.Size,
})
}
}
}