Documentation ¶
Index ¶
- Variables
- type User
- func (u *User) Activate() error
- func (u *User) Apply(e event.Event, new bool)
- func (u *User) Deactivate() error
- func (u User) Events() []event.Event
- func (u *User) GetEmail() string
- func (u *User) GetEntity() entity.Person
- func (u *User) GetID() uuid.UUID
- func (u *User) GetName() string
- func (u *User) IsActivated() bool
- func (u *User) UpdateEmail(email string) error
- func (u *User) UpdateName(name string) error
- func (u User) Version() int
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInputIsEmpty = errors.New("model: non-empty value must be provided") ErrUserUpdateFailed = errors.New("model: user update failed") )
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
User is a aggregate that combines all entities needed to represent a user.
func NewUserFromEvents ¶
NewFromEvents is a helper method that creates a new user from a series of events.
func (*User) IsActivated ¶
IsActivated returns whether the user is activated.
func (*User) UpdateEmail ¶
UpdateEmail updates the user's email.
func (*User) UpdateName ¶
UpdateName updates the user's name.
Click to show internal directories.
Click to hide internal directories.