refactor(v2): init eventstore package (#7806)

* refactor(v2): init database package

* refactor(v2): init eventstore package

* add mock package

* test query constructors

* option based push analog to query
This commit is contained in:
Silvan
2024-04-26 17:05:21 +02:00
committed by GitHub
parent 2254434692
commit 5811a7b6a5
16 changed files with 5681 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package eventstore
type Aggregate struct {
ID string
Type string
Instance string
Owner string
}
func (agg *Aggregate) Equals(aggregate *Aggregate) bool {
if aggregate.ID != "" && aggregate.ID != agg.ID {
return false
}
if aggregate.Type != "" && aggregate.Type != agg.Type {
return false
}
if aggregate.Instance != "" && aggregate.Instance != agg.Instance {
return false
}
if aggregate.Owner != "" && aggregate.Owner != agg.Owner {
return false
}
return true
}