mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-10 02:40:11 +08:00
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@6c7f760b5d This commit was moved from ipfs/boxo@0df36df660
This commit is contained in:
parent
7d9ebdcebe
commit
d7afe85fe0
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user