service

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module(c *di.Container)

Types

type Service

type Service struct {
	*service.UserSerice
	// contains filtered or unexported fields
}

func New

func New(
	userService *service.UserSerice,
	logger *zap.Logger,
	userRepo db_user.Repository,
	jwtService *service_jwt.Service,
	transactionalEmailSender transactional.EmailSender,
	onetimeService *service_onetime.Service,
	analyticsClient analytics.Client,
) *Service

func (*Service) Create

func (s *Service) Create(ctx context.Context, name, email string) (*users.User, error)

func (*Service) CreateWithPassword

func (s *Service) CreateWithPassword(ctx context.Context, name, password, email string) (*users.User, error)

func (*Service) SendEmailVerification

func (s *Service) SendEmailVerification(ctx context.Context, userID string) error
func (s *Service) SendMagicLink(ctx context.Context, user *users.User) error

func (*Service) VerifyEmail

func (s *Service) VerifyEmail(ctx context.Context, userID string, rawToken string) (*users.User, error)
func (s *Service) VerifyMagicLink(ctx context.Context, user *users.User, code string) error

Jump to

Keyboard shortcuts

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