mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-25 12:27:43 +08:00
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:
parent
5dbe176f53
commit
cb79396b35
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user