Documentation ¶
Index ¶
- Variables
- type User
- func (u *User) Activate() error
- func (u *User) Apply(e core.Event, new bool)
- func (u *User) Deactivate() error
- func (u User) Events() []core.Event
- func (u *User) GetEmail() string
- func (u *User) GetEntity() core.Person
- func (u *User) GetID() uuid.UUID
- func (u *User) GetName() string
- func (u *User) GetPassword() string
- func (u *User) IsActivated() bool
- func (u *User) UpdateEmail(email string) error
- func (u *User) UpdateName(name string) error
- func (u *User) UpdatePassword(password string) error
- func (u User) Version() int
- type UserActivated
- type UserDeactivated
- type UserEmailChanged
- type UserNameChanged
- type UserPasswordChanged
- type UserRegistered
- type UserRepository
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) GetPassword ¶
GetPassword returns the hashed password of the user.
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.
func (*User) UpdatePassword ¶
UpdatePassword updates the user's password.
type UserActivated ¶
UserActivated event.
func (UserActivated) EventName ¶
func (e UserActivated) EventName() string
type UserDeactivated ¶
UserDeactivated event.
func (UserDeactivated) EventName ¶
func (e UserDeactivated) EventName() string
type UserEmailChanged ¶
UserEmailChanged event.
func (UserEmailChanged) EventName ¶
func (e UserEmailChanged) EventName() string
type UserNameChanged ¶
UserNameChanged event.
func (UserNameChanged) EventName ¶
func (e UserNameChanged) EventName() string
type UserPasswordChanged ¶
UserPasswordChanged event.
func (UserPasswordChanged) EventName ¶
func (e UserPasswordChanged) EventName() string
Click to show internal directories.
Click to hide internal directories.