@cryptotaxi247 / kubo / commits / d7afe85fe

coreapi unixfs: cid prefix options

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@6c7f760b5d8ae479518992b322a7bd1ccc406247 This commit was moved from ipfs/boxo@0df36df660ece10808c7af055b59cd7052aaa7cf

Łukasz Magiera committed Sep 20, 2018 at 15:59 UTC d7afe85fe0523066da04d3274cd6f048328ca12f
2 files changed +7 -2
core/coreiface/options/unixfs.go
+6 -2
@@ -8,7 +8,9 @@ type UnixfsAddSettings struct {
8 CidVersion int
9 MhType uint64
10
11 - InlineLimit int
11 + InlineLimit int
12 + RawLeaves bool
13 + RawLeavesSet bool
14 }
15
16 type UnixfsAddOption func(*UnixfsAddSettings) error
@@ -18,7 +20,9 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, error) {
20 CidVersion: -1,
21 MhType: mh.SHA2_256,
22
21 - InlineLimit: 0,
23 + InlineLimit: 0,
24 + RawLeaves: false,
25 + RawLeavesSet: false,
26 }
27
28 for _, opt := range opts {
core/coreiface/unixfs.go
+1
@@ -10,6 +10,7 @@ import (
10 )
11
12 // UnixfsAPI is the basic interface to immutable files in IPFS
13 +// NOTE: This API is heavily WIP, things are guaranteed to break frequently
14 type UnixfsAPI interface {
15 // Add imports the data from the reader into merkledag file
16 Add(context.Context, io.ReadCloser, ...options.UnixfsAddOption) (ResolvedPath, error)