Commit af43bf0a authored by Łukasz Magiera's avatar Łukasz Magiera

object coreapi: Address review

License: MIT
Signed-off-by: default avatarŁukasz Magiera <magik6k@gmail.com>
parent 9fe2a845
...@@ -31,25 +31,27 @@ type ObjectStat struct { ...@@ -31,25 +31,27 @@ type ObjectStat struct {
CumulativeSize int CumulativeSize int
} }
// ChangeType denotes type of change in ObjectChange
type ChangeType int
const ( const (
// DiffAdd is a Type of ObjectChange where a link was added to the graph // DiffAdd is set when a link was added to the graph
DiffAdd = iota DiffAdd ChangeType = iota
// DiffRemove is a Type of ObjectChange where a link was removed from the graph // DiffRemove is set when a link was removed from the graph
DiffRemove DiffRemove
// DiffMod is a Type of ObjectChange where a link was changed in the graph // DiffMod is set when a link was changed in the graph
DiffMod DiffMod
) )
// ObjectChange represents a change ia a graph // ObjectChange represents a change ia a graph
// TODO: do we want this to be an interface?
type ObjectChange struct { type ObjectChange struct {
// Type of the change, either: // Type of the change, either:
// * DiffAdd - Added a link // * DiffAdd - Added a link
// * DiffRemove - Removed a link // * DiffRemove - Removed a link
// * DiffMod - Modified a link // * DiffMod - Modified a link
Type int Type ChangeType
// Path to the changed link // Path to the changed link
Path string Path string
......
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