chore: add pkg names

This commit is contained in:
Jon Lundy
2022-10-13 15:32:25 -06:00
parent e7df4cc479
commit 33bba9d8f7
13 changed files with 239 additions and 18 deletions

View File

@@ -6,6 +6,8 @@ import (
"sync"
)
// Aggregate implements functionality for working with event store streams as an aggregate.
// When creating a new Aggregate the struct should have an ApplyEvent method and embed the AggregateRoot.
type Aggregate interface {
// ApplyEvent applies the event to the aggrigate state
ApplyEvent(...Event)

View File

@@ -1,3 +1,4 @@
// package event implements functionality for working with an eventstore.
package event
import (
@@ -28,6 +29,7 @@ func getULID() ulid.ULID {
return ulid.MustNew(ulid.Now(), entropy)
}
// Event implements functionality of an individual event used with the event store. It should implement the getter/setter for EventMeta and BinaryMarshaler/BinaryUnmarshaler.
type Event interface {
EventMeta() Meta
SetEventMeta(Meta)