Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
User defines a simple domain object that will have methods that support event sourcing.
func NewUser ¶
NewUser instantiates an instance of User, and initializes the embedded aggregate structure.
func NewUserFromHistory ¶
NewUserFromHistory instantiates a User and applies its event history to derive the current state of hte aggregate.
func (*User) Apply ¶
Apply is the standard event sourcing method that routes an event then records the event in the event history
func (*User) Store ¶
func (u *User) Store(eventStore goes.EventStore) error
Store uses the event store passed to it to persistently recorded the current set of unperistent events.
func (*User) UpdateFirstName ¶
UpdateFirstName is a command handler that handles updating the user first name, generating a UserFirstNameUpdated event.
type UserCreated ¶
UserCreated is the event generated when a user struct is first instantiated.
type UserFirstNameUpdated ¶
UserFirstNameUpdated is an event generated when the first name is updated.
type UserLastNameUpdated ¶
UserLastNameUpdated is an event generated when the last name is updated.