@cryptotaxi247 / kubo / commits / cb79396b3

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@9fe2a845730cb243ba72ceb3a1be7871467b416b This commit was moved from ipfs/boxo@157bb70fa94828c5c37466e6cc75e2058454ed2c

Łukasz Magiera committed Feb 2, 2018 at 22:36 UTC cb79396b3531b910737e28a6e4bd4bc35a4ffdeb
2 files changed +4 -5
core/coreiface/object.go
+2 -3
@@ -31,7 +31,6 @@ type ObjectStat struct {
31 CumulativeSize int
32 }
33
34 -
34 const (
35 // DiffAdd is a Type of ObjectChange where a link was added to the graph
36 DiffAdd = iota
@@ -57,11 +56,11 @@ type ObjectChange struct {
56
57 // Before holds the link path before the change. Note that when a link is
58 // added, this will be nil.
60 - Before Path
59 + Before ResolvedPath
60
61 // After holds the link path after the change. Note that when a link is
62 // removed, this will be nil.
64 - After Path
63 + After ResolvedPath
64 }
65
66 // ObjectAPI specifies the interface to MerkleDAG and contains useful utilities
core/coreiface/options/object.go
+2 -2
@@ -105,9 +105,9 @@ func (objectOpts) DataType(t string) ObjectPutOption {
105 }
106 }
107
108 -// WithPin is an option for Object.Put which specifies whether to pin the added
108 +// Pin is an option for Object.Put which specifies whether to pin the added
109 // objects, default is false
110 -func (objectOpts) WithPin(pin bool) ObjectPutOption {
110 +func (objectOpts) Pin(pin bool) ObjectPutOption {
111 return func(settings *ObjectPutSettings) error {
112 settings.Pin = pin
113 return nil