Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type IsAdminDTO ¶
type IsAdminDTO struct {
UserId int
}
type RegisterDTO ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New( log *slog.Logger, userRepo userRepository, appRepo appRepository, adminRepo adminRepository, tokenManager tokenManager, secretManager secretManager, hasher hasher, accessTokenTTL time.Duration, refreshTokenTTL time.Duration, ) *Service
New creates new auth Service
func (*Service) IsAdmin ¶
IsAdmin checks if user is admin
If user doesn't exist, returns error ErrInvalidUserId
Click to show internal directories.
Click to hide internal directories.