coreapi unixfs: Return seeker from get
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@7fad9653969f1e71a85778e3e4e225c97d71558b This commit was moved from ipfs/boxo@8d4196176a99ab51bfd521afbd061bfcf456354f
Łukasz Magiera committed
Oct 15, 2018 at 12:45 UTC
7301aaa1201e6ecdff3d9ef82d66d957cc917d19
1 file changed
+7
-1
core/coreiface/unixfs.go
+7
-1
@@ -2,6 +2,7 @@ package iface
2
3
import (
4
"context"
5
+ "io"
6
7
options "github.com/ipfs/go-ipfs/core/coreapi/interface/options"
8
@@ -17,6 +18,11 @@ type AddEvent struct {
18
Size string `json:",omitempty"`
19
}
20
21
+type UnixfsFile interface {
22
+ files.SizeFile
23
+ io.Seeker
24
+}
25
+
26
// UnixfsAPI is the basic interface to immutable files in IPFS
27
// NOTE: This API is heavily WIP, things are guaranteed to break frequently
28
type UnixfsAPI interface {
@@ -29,7 +35,7 @@ type UnixfsAPI interface {
35
//
36
// Note that some implementations of this API may apply the specified context
37
// to operations performed on the returned file
32
- Get(context.Context, Path) (files.File, error)
38
+ Get(context.Context, Path) (UnixfsFile, error)
39
40
// Ls returns the list of links in a directory
41
Ls(context.Context, Path) ([]*ipld.Link, error)