Skip to content

Commit

Permalink
object coreapi: Address review
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>


This commit was moved from ipfs/interface-go-ipfs-core@af43bf0
  • Loading branch information
magik6k committed Aug 1, 2018
1 parent 157bb70 commit c1cdbfd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions coreiface/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,27 @@ type ObjectStat struct {
CumulativeSize int
}

// ChangeType denotes type of change in ObjectChange
type ChangeType int

const (
// DiffAdd is a Type of ObjectChange where a link was added to the graph
DiffAdd = iota
// DiffAdd is set when a link was added to the graph
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

// 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
)

// ObjectChange represents a change ia a graph
// TODO: do we want this to be an interface?
type ObjectChange struct {
// Type of the change, either:
// * DiffAdd - Added a link
// * DiffRemove - Removed a link
// * DiffMod - Modified a link
Type int
Type ChangeType

// Path to the changed link
Path string
Expand Down

0 comments on commit c1cdbfd

Please sign in to comment.