You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package auth
typeUserstruct { *aggregate.Base }
func (u*User) Delete() {
aggregate.Delete(u)
// will be called under the hood:aggregate.Next(u, aggregate.Deleted, aggregate.Deletion{})
}
func (u*User) Restore() {
aggregate.Restore(u)
// will be called under the hood:aggregate.Next(u, aggregate.Restored, aggregate.Restoration{})
}
A new codec.Option will be added to the aggregate package to register the built-in deletion events:
package example
funcexample() {
r:=codec.New(aggregate.BuiltinEvents())
}
Maybe add a new helper that automatically registers builtin events:
package example
funcexample() {
r:=aggregate.NewEventRegistry()
}
The text was updated successfully, but these errors were encountered:
Example:
A new
codec.Option
will be added to theaggregate
package to register the built-in deletion events:Maybe add a new helper that automatically registers builtin events:
The text was updated successfully, but these errors were encountered: