Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService represents the user service.
func NewUserService ¶
func NewUserService(r repository.UserRepository) *UserService
NewUserService returns a new user service.
func (*UserService) GenerateID ¶
func (s *UserService) GenerateID() (model.UserID, error)
GenerateID generates a user ID.
func (*UserService) HashPassword ¶
func (s *UserService) HashPassword(pw string) (string, error)
HashPassword hashes a password.
func (*UserService) IsEmailDuplicated ¶
func (s *UserService) IsEmailDuplicated(email string) error
IsEmailDuplicated checks whether the e-mail address is duplicated.
func (*UserService) VerifyPassword ¶
func (s *UserService) VerifyPassword(hash, pw string) error
VerifyPassword verify a hashed password.
Click to show internal directories.
Click to hide internal directories.