From d7afe85fe0523066da04d3274cd6f048328ca12f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 20 Sep 2018 15:59:53 +0200 Subject: [PATCH] coreapi unixfs: cid prefix options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera This commit was moved from ipfs/interface-go-ipfs-core@6c7f760b5d8ae479518992b322a7bd1ccc406247 This commit was moved from ipfs/boxo@0df36df660ece10808c7af055b59cd7052aaa7cf --- core/coreiface/options/unixfs.go | 8 ++++++-- core/coreiface/unixfs.go | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/coreiface/options/unixfs.go b/core/coreiface/options/unixfs.go index 8dc9806a7..ffed75577 100644 --- a/core/coreiface/options/unixfs.go +++ b/core/coreiface/options/unixfs.go @@ -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 { diff --git a/core/coreiface/unixfs.go b/core/coreiface/unixfs.go index 10febd9fa..acc3b960c 100644 --- a/core/coreiface/unixfs.go +++ b/core/coreiface/unixfs.go @@ -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)