Commit 9fe2a845 authored by Łukasz Magiera's avatar Łukasz Magiera

commands: switch object commands to CoreAPI

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 00f6430f
...@@ -31,7 +31,6 @@ type ObjectStat struct { ...@@ -31,7 +31,6 @@ type ObjectStat struct {
CumulativeSize int CumulativeSize int
} }
const ( const (
// DiffAdd is a Type of ObjectChange where a link was added to the graph // DiffAdd is a Type of ObjectChange where a link was added to the graph
DiffAdd = iota DiffAdd = iota
...@@ -57,11 +56,11 @@ type ObjectChange struct { ...@@ -57,11 +56,11 @@ type ObjectChange struct {
// Before holds the link path before the change. Note that when a link is // Before holds the link path before the change. Note that when a link is
// added, this will be nil. // added, this will be nil.
Before Path Before ResolvedPath
// After holds the link path after the change. Note that when a link is // After holds the link path after the change. Note that when a link is
// removed, this will be nil. // removed, this will be nil.
After Path After ResolvedPath
} }
// ObjectAPI specifies the interface to MerkleDAG and contains useful utilities // ObjectAPI specifies the interface to MerkleDAG and contains useful utilities
......
...@@ -105,9 +105,9 @@ func (objectOpts) DataType(t string) ObjectPutOption { ...@@ -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 // objects, default is false
func (objectOpts) WithPin(pin bool) ObjectPutOption { func (objectOpts) Pin(pin bool) ObjectPutOption {
return func(settings *ObjectPutSettings) error { return func(settings *ObjectPutSettings) error {
settings.Pin = pin settings.Pin = pin
return nil return nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment