aboutsummaryrefslogtreecommitdiffstats
path: root/bug/snapshot.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/snapshot.go')
-rw-r--r--bug/snapshot.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/bug/snapshot.go b/bug/snapshot.go
index d73e4bb6..2efc067e 100644
--- a/bug/snapshot.go
+++ b/bug/snapshot.go
@@ -5,9 +5,12 @@ import (
"time"
"github.com/MichaelMure/git-bug/entity"
+ "github.com/MichaelMure/git-bug/entity/dag"
"github.com/MichaelMure/git-bug/identity"
)
+var _ dag.Snapshot = &Snapshot{}
+
// Snapshot is a compiled form of the Bug data structure used for storage and merge
type Snapshot struct {
id entity.Id
@@ -23,7 +26,7 @@ type Snapshot struct {
Timeline []TimelineItem
- Operations []Operation
+ Operations []dag.Operation
}
// Id returns the Bug identifier
@@ -35,6 +38,10 @@ func (snap *Snapshot) Id() entity.Id {
return snap.id
}
+func (snap *Snapshot) AllOperations() []dag.Operation {
+ return snap.Operations
+}
+
// EditTime returns the last time a bug was modified
func (snap *Snapshot) EditTime() time.Time {
if len(snap.Operations) == 0 {
@@ -133,5 +140,5 @@ func (snap *Snapshot) HasAnyActor(ids ...entity.Id) bool {
return false
}
-// Sign post method for gqlgen
+// IsAuthored is a sign post method for gqlgen
func (snap *Snapshot) IsAuthored() {}