usersservice

package
v0.0.0-...-949e8d3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(logger *zerolog.Logger, repo domain.UsersRepository) (*Service, error)

func (*Service) CreateOne

func (s *Service) CreateOne(ctx context.Context, user domain.UserForm) (domain.UserRepoModel, error)

func (*Service) GenerateToken

func (s *Service) GenerateToken(secret []byte, email string) (token string, err error)

func (*Service) GetByEmail

func (s *Service) GetByEmail(ctx context.Context, email string) (user domain.UserRepoModel, ok bool, err error)

func (*Service) ValidatePassword

func (s *Service) ValidatePassword(pwd string) error

func (*Service) ValidateToken

func (s *Service) ValidateToken(secret []byte, token string) (email string, err error)

Jump to

Keyboard shortcuts

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