files: export DAGService
This commit is contained in:
1 parent
c565071dad
commit
bb25dd0ea1
1 file changed
+6
@@ -31,6 +31,8 @@ type FileService interface {
|
||||
GetFile(ctx context.Context, c cid.Cid) (ufsio.ReadSeekCloser, error)
|
||||
// AddFile adds file to ipfs storage
|
||||
AddFile(ctx context.Context, r io.Reader) (ipld.Node, error)
|
||||
// DAGService returns ipld.DAGService object
|
||||
DAGService() ipld.DAGService
|
||||
app.Component
|
||||
}
|
||||
|
||||
@@ -60,6 +62,10 @@ func (fs *fileService) Name() string {
|
||||
return CName
|
||||
}
|
||||
|
||||
func (fs *fileService) DAGService() ipld.DAGService {
|
||||
return fs.merkledag
|
||||
}
|
||||
|
||||
func (fs *fileService) AddFile(ctx context.Context, r io.Reader) (ipld.Node, error) {
|
||||
dbp := helpers.DagBuilderParams{
|
||||
Dagserv: fs.merkledag,
|
||||
|
||||
Reference in new issue
Block a user