Skip to content

Commit 0df36df

Browse files
committed
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@6c7f760
1 parent 60c358b commit 0df36df

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

coreiface/options/unixfs.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ type UnixfsAddSettings struct {
88
CidVersion int
99
MhType uint64
1010

11-
InlineLimit int
11+
InlineLimit int
12+
RawLeaves bool
13+
RawLeavesSet bool
1214
}
1315

1416
type UnixfsAddOption func(*UnixfsAddSettings) error
@@ -18,7 +20,9 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, error) {
1820
CidVersion: -1,
1921
MhType: mh.SHA2_256,
2022

21-
InlineLimit: 0,
23+
InlineLimit: 0,
24+
RawLeaves: false,
25+
RawLeavesSet: false,
2226
}
2327

2428
for _, opt := range opts {

coreiface/unixfs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
)
1111

1212
// UnixfsAPI is the basic interface to immutable files in IPFS
13+
// NOTE: This API is heavily WIP, things are guaranteed to break frequently
1314
type UnixfsAPI interface {
1415
// Add imports the data from the reader into merkledag file
1516
Add(context.Context, io.ReadCloser, ...options.UnixfsAddOption) (ResolvedPath, error)

0 commit comments

Comments
 (0)