service

package
v0.0.0-...-1f9399d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2019 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL