commands: switch object commands to CoreAPI

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>


This commit was moved from ipfs/interface-go-ipfs-core@9fe2a84573

This commit was moved from ipfs/boxo@157bb70fa9
This commit is contained in:
Łukasz Magiera 2018-02-02 22:36:01 +01:00
parent 5dbe176f53
commit cb79396b35
2 changed files with 4 additions and 5 deletions

View File

@ -31,7 +31,6 @@ type ObjectStat struct {
CumulativeSize int
}
const (
// DiffAdd is a Type of ObjectChange where a link was added to the graph
DiffAdd = iota
@ -57,11 +56,11 @@ type ObjectChange struct {
// Before holds the link path before the change. Note that when a link is
// added, this will be nil.
Before Path
Before ResolvedPath
// After holds the link path after the change. Note that when a link is
// removed, this will be nil.
After Path
After ResolvedPath
}
// ObjectAPI specifies the interface to MerkleDAG and contains useful utilities

View File

@ -105,9 +105,9 @@ func (objectOpts) DataType(t string) ObjectPutOption {
}
}
// WithPin is an option for Object.Put which specifies whether to pin the added
// Pin is an option for Object.Put which specifies whether to pin the added
// objects, default is false
func (objectOpts) WithPin(pin bool) ObjectPutOption {
func (objectOpts) Pin(pin bool) ObjectPutOption {
return func(settings *ObjectPutSettings) error {
settings.Pin = pin
return nil