Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidCredentials = errors.New("Informed credentials are invalid")
View Source
var ErrInvalidEmail = errors.New("invalid email")
View Source
var ErrInvalidPassword = errors.New("invalid Password")
View Source
var ErrInvalidPasswordLenght = errors.New("password length is lower than 8")
View Source
var ErrInvalidUserID = errors.New("invalid User id")
View Source
var ErrInvalidUsername = errors.New("invalid Username")
Functions ¶
This section is empty.
Types ¶
type EmailValueObject ¶
type EmailValueObject struct {
// contains filtered or unexported fields
}
func LoadEmail ¶
func LoadEmail(value string) (*EmailValueObject, error)
func NewEmail ¶
func NewEmail(value string) (*EmailValueObject, error)
func (*EmailValueObject) GetValue ¶
func (e *EmailValueObject) GetValue() string
type PasswordValueObject ¶
type PasswordValueObject struct {
// contains filtered or unexported fields
}
func LoadPassword ¶
func LoadPassword(value string) (*PasswordValueObject, error)
func NewPassword ¶
func NewPassword(value string) (*PasswordValueObject, error)
func (*PasswordValueObject) ComparePassword ¶
func (p *PasswordValueObject) ComparePassword(pass string) error
func (*PasswordValueObject) String ¶
func (p *PasswordValueObject) String() string
type User ¶
type User struct {
// contains filtered or unexported fields
}
func LoadUser ¶
func LoadUser(id *uuid.UUID, userName *UsernameValueObject, email *EmailValueObject, password *PasswordValueObject) (*User, error)
func NewUser ¶
func NewUser(userName *UsernameValueObject, email *EmailValueObject, password *PasswordValueObject) (*User, error)
func (*User) GetEmail ¶
func (u *User) GetEmail() *EmailValueObject
func (*User) GetPassword ¶
func (u *User) GetPassword() *PasswordValueObject
func (*User) GetUsername ¶
func (*User) ValidateCredentials ¶
type UsernameValueObject ¶
type UsernameValueObject struct {
// contains filtered or unexported fields
}
func LoadUsername ¶
func LoadUsername(value string) (*UsernameValueObject, error)
func NewUsername ¶
func NewUsername(value string) (*UsernameValueObject, error)
func (*UsernameValueObject) GetValue ¶
func (u *UsernameValueObject) GetValue() string
Click to show internal directories.
Click to hide internal directories.