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
......@@ -9,6 +9,8 @@ type UnixfsAddSettings struct {
MhType uint64
InlineLimit int
RawLeaves bool
RawLeavesSet bool
}
type UnixfsAddOption func(*UnixfsAddSettings) error
......@@ -19,6 +21,8 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, error) {
MhType: mh.SHA2_256,
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