object coreapi: Address review
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@af43bf0a5b8a8eb409dc5e3731cf86afd5b67304 This commit was moved from ipfs/boxo@c1cdbfdc59df5b72610ae52ff80a44cb81f679c9
Łukasz Magiera committed
Jul 25, 2018 at 22:49 UTC
5b28066131841060f97c7291189df9271d7d680b
1 file changed
+8
-6
core/coreiface/object.go
+8
-6
@@ -31,25 +31,27 @@ type ObjectStat struct {
31
CumulativeSize int
32
}
33
34
+// ChangeType denotes type of change in ObjectChange
35
+type ChangeType int
36
+
37
const (
35
- // DiffAdd is a Type of ObjectChange where a link was added to the graph
36
- DiffAdd = iota
38
+ // DiffAdd is set when a link was added to the graph
39
+ DiffAdd ChangeType = iota
40
38
- // DiffRemove is a Type of ObjectChange where a link was removed from the graph
41
+ // DiffRemove is set when a link was removed from the graph
42
DiffRemove
43
41
- // DiffMod is a Type of ObjectChange where a link was changed in the graph
44
+ // DiffMod is set when a link was changed in the graph
45
DiffMod
46
)
47
48
// ObjectChange represents a change ia a graph
46
-// TODO: do we want this to be an interface?
49
type ObjectChange struct {
50
// Type of the change, either:
51
// * DiffAdd - Added a link
52
// * DiffRemove - Removed a link
53
// * DiffMod - Modified a link
52
- Type int
54
+ Type ChangeType
55
56
// Path to the changed link
57
Path string