Commit 6c7f760b authored by Łukasz Magiera's avatar Łukasz Magiera

coreapi unixfs: cid prefix options

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 78136afe
......@@ -8,7 +8,9 @@ type UnixfsAddSettings struct {
CidVersion int
MhType uint64
InlineLimit int
InlineLimit int
RawLeaves bool
RawLeavesSet bool
}
type UnixfsAddOption func(*UnixfsAddSettings) error
......@@ -18,7 +20,9 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, error) {
CidVersion: -1,
MhType: mh.SHA2_256,
InlineLimit: 0,
InlineLimit: 0,
RawLeaves: false,
RawLeavesSet: false,
}
for _, opt := range opts {
......
......@@ -10,6 +10,7 @@ import (
)
// 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 {
// Add imports the data from the reader into merkledag file
Add(context.Context, io.ReadCloser, ...options.UnixfsAddOption) (ResolvedPath, error)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment