aboutsummaryrefslogtreecommitdiffstats
path: root/entity/dag/operation.go
diff options
context:
space:
mode:
Diffstat (limited to 'entity/dag/operation.go')
-rw-r--r--entity/dag/operation.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/entity/dag/operation.go b/entity/dag/operation.go
index 9fcc055b..86e2f7d7 100644
--- a/entity/dag/operation.go
+++ b/entity/dag/operation.go
@@ -12,17 +12,19 @@ type Operation interface {
// Id return the Operation identifier
// Some care need to be taken to define a correct Id derivation and enough entropy in the data used to avoid
// collisions. Notably:
- // - the Id of the first Operation will be used as the Id of the Entity. Collision need to be avoided across Entities.
+ // - the Id of the first Operation will be used as the Id of the Entity. Collision need to be avoided across entities of the same type
+ // (example: no collision within the "bug" namespace).
// - collisions can also happen within the set of Operations of an Entity. Simple Operation might not have enough
- // entropy to yield unique Ids.
+ // entropy to yield unique Ids (example: two "close" operation within the same second, same author).
// A common way to derive an Id will be to use the DeriveId function on the serialized operation data.
Id() entity.Id
// Validate check if the Operation data is valid
Validate() error
-
+ // Author returns the author of this operation
Author() identity.Interface
}
+// TODO: remove?
type operationBase struct {
author identity.Interface