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
6c7f760b
Commit
6c7f760b
authored
Sep 20, 2018
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coreapi unixfs: cid prefix options
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
78136afe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
options/unixfs.go
options/unixfs.go
+6
-2
unixfs.go
unixfs.go
+1
-0
No files found.
options/unixfs.go
View file @
6c7f760b
...
@@ -9,6 +9,8 @@ type UnixfsAddSettings struct {
...
@@ -9,6 +9,8 @@ type UnixfsAddSettings struct {
MhType
uint64
MhType
uint64
InlineLimit
int
InlineLimit
int
RawLeaves
bool
RawLeavesSet
bool
}
}
type
UnixfsAddOption
func
(
*
UnixfsAddSettings
)
error
type
UnixfsAddOption
func
(
*
UnixfsAddSettings
)
error
...
@@ -19,6 +21,8 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, error) {
...
@@ -19,6 +21,8 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, error) {
MhType
:
mh
.
SHA2_256
,
MhType
:
mh
.
SHA2_256
,
InlineLimit
:
0
,
InlineLimit
:
0
,
RawLeaves
:
false
,
RawLeavesSet
:
false
,
}
}
for
_
,
opt
:=
range
opts
{
for
_
,
opt
:=
range
opts
{
...
...
unixfs.go
View file @
6c7f760b
...
@@ -10,6 +10,7 @@ import (
...
@@ -10,6 +10,7 @@ import (
)
)
// 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
type
UnixfsAPI
interface
{
type
UnixfsAPI
interface
{
// Add imports the data from the reader into merkledag file
// Add imports the data from the reader into merkledag file
Add
(
context
.
Context
,
io
.
ReadCloser
,
...
options
.
UnixfsAddOption
)
(
ResolvedPath
,
error
)
Add
(
context
.
Context
,
io
.
ReadCloser
,
...
options
.
UnixfsAddOption
)
(
ResolvedPath
,
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