modernice/goes

aggregate.Event helper type

Opened this issue · 0 comments

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)
}