files: export DAGService
This commit is contained in:
parent
36071b3a79
commit
4b649f5996
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user