Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
interface-go-dms3-core
Commits
7fad9653
Commit
7fad9653
authored
Oct 15, 2018
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coreapi unixfs: Return seeker from get
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
26985dbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
unixfs.go
unixfs.go
+7
-1
No files found.
unixfs.go
View file @
7fad9653
...
@@ -2,6 +2,7 @@ package iface
...
@@ -2,6 +2,7 @@ package iface
import
(
import
(
"context"
"context"
"io"
options
"github.com/ipfs/go-ipfs/core/coreapi/interface/options"
options
"github.com/ipfs/go-ipfs/core/coreapi/interface/options"
...
@@ -17,6 +18,11 @@ type AddEvent struct {
...
@@ -17,6 +18,11 @@ type AddEvent struct {
Size
string
`json:",omitempty"`
Size
string
`json:",omitempty"`
}
}
type
UnixfsFile
interface
{
files
.
SizeFile
io
.
Seeker
}
// UnixfsAPI is the basic interface to immutable files in IPFS
// UnixfsAPI is the basic interface to immutable files in IPFS
// NOTE: This API is heavily WIP, things are guaranteed to break frequently
// NOTE: This API is heavily WIP, things are guaranteed to break frequently
type
UnixfsAPI
interface
{
type
UnixfsAPI
interface
{
...
@@ -29,7 +35,7 @@ type UnixfsAPI interface {
...
@@ -29,7 +35,7 @@ type UnixfsAPI interface {
//
//
// Note that some implementations of this API may apply the specified context
// Note that some implementations of this API may apply the specified context
// to operations performed on the returned file
// to operations performed on the returned file
Get
(
context
.
Context
,
Path
)
(
files
.
File
,
error
)
Get
(
context
.
Context
,
Path
)
(
Unixfs
File
,
error
)
// Ls returns the list of links in a directory
// Ls returns the list of links in a directory
Ls
(
context
.
Context
,
Path
)
([]
*
ipld
.
Link
,
error
)
Ls
(
context
.
Context
,
Path
)
([]
*
ipld
.
Link
,
error
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment