mirror of
https://github.com/ipfs/kubo.git
synced 2025-08-26 12:32:31 +08:00
coreapi: remove options from interfaces
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
@ -21,15 +21,6 @@ type BlockAPI interface {
|
||||
// Put imports raw block data, hashing it using specified settings.
|
||||
Put(context.Context, io.Reader, ...options.BlockPutOption) (Path, error)
|
||||
|
||||
// WithFormat is an option for Put which specifies the multicodec to use to
|
||||
// serialize the object. Default is "v0"
|
||||
WithFormat(codec string) options.BlockPutOption
|
||||
|
||||
// WithHash is an option for Put which specifies the multihash settings to use
|
||||
// when hashing the object. Default is mh.SHA2_256 (0x12).
|
||||
// If mhLen is set to -1, default length for the hash will be used
|
||||
WithHash(mhType uint64, mhLen int) options.BlockPutOption
|
||||
|
||||
// Get attempts to resolve the path and return a reader for data in the block
|
||||
Get(context.Context, Path) (io.Reader, error)
|
||||
|
||||
@ -40,10 +31,6 @@ type BlockAPI interface {
|
||||
// will be returned
|
||||
Rm(context.Context, Path, ...options.BlockRmOption) error
|
||||
|
||||
// WithForce is an option for Rm which, when set to true, will ignore
|
||||
// non-existing blocks
|
||||
WithForce(force bool) options.BlockRmOption
|
||||
|
||||
// Stat returns information on
|
||||
Stat(context.Context, Path) (BlockStat, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user