summaryrefslogtreecommitdiffstatshomepage
path: root/entity/snapshot.go
blob: c6ea43fc7f0adfd0f22bab2f86da66f48641cd72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package entity

// Snapshot is the minimal interface that a snapshot need to implement
type Snapshot interface {
	// AllOperations returns all the operations that have been applied to that snapshot, in order
	AllOperations() []Operation
	// AppendOperation add an operation in the list
	AppendOperation(op Operation)
}

type CompileToSnapshot[SnapT Snapshot] interface {
	// Compile an Entity in an easily usable snapshot
	Compile() SnapT
}