service

package
v0.0.0-...-78dacf9 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

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

func NewAuthService

func NewAuthService(userRepo repository.UserRepository, blacklistRepo repository.BlacklistRepository, emailService EmailService) *AuthService

func (*AuthService) ForgotPassword

func (s *AuthService) ForgotPassword(email string) (string, error)

func (*AuthService) GetUserProfile

func (s *AuthService) GetUserProfile(email string) (*model.User, error)

func (*AuthService) Login

func (s *AuthService) Login(loginRequest dto.LoginRequest) (*model.User, string, string, error)

func (*AuthService) Logout

func (s *AuthService) Logout(tokenString string) error

func (*AuthService) Register

func (s *AuthService) Register(registerRequest dto.RegisterRequest) (*model.User, string, string, error)

func (*AuthService) ResetPassword

func (s *AuthService) ResetPassword(resetPasswordRequest dto.ResetPasswordRequest) error

type EmailService

type EmailService interface {
	SendPasswordResetEmail(to, token string) error
}

func NewEmailService

func NewEmailService() EmailService

type UserService

type UserService interface {
	GetAllUsers() ([]model.User, error)
	RemoveAllUsers() error
}

func NewUserService

func NewUserService(userRepo repository.UserRepository) UserService

Jump to

Keyboard shortcuts

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