modernice / goes

goes is an event-sourcing framework for Go.
https://goes.modernice.dev
Apache License 2.0
134 stars 12 forks source link

aggregate.Event helper type #137

Open bounoable opened 1 year ago

bounoable commented 1 year ago
package auth

import "github.com/modernice/goes/aggregate"

const UserRegistered  = aggregate.Event("auth.user.registered")

type User struct {
  *aggregate.Base
}

func (u *User) Register(email string) {
  UserRegistered.New(u, email)
}