Closed bounoable closed 3 years ago
Allow aggregates to provide tags so that they can be queried more efficiently.
package foo type Foo struct { *aggregate.Base *aggregate.Tags } func NewFoo(id uuid.UUID) *Foo { return &Foo{ Base: aggregate.New("foo", id), Tags: &aggregate.Tags{}, } } func example() { foo := NewFoo(uuid.New()) foo.Tag("some-tag", "another-tag") foo.HasTag("some-tag") foo.Untag("some-tag", "another-tag") var repo aggregate.Repository str, errs, err := repo.Query(context.TODO(), query.New( query.Tag("some-tag", "another-tag"), )) }
Allow aggregates to provide tags so that they can be queried more efficiently.