Documentation ¶
Index ¶
- type CommonAuthService
- func (service *CommonAuthService) CreateRefreshToken(userID uint64, refreshToken string, ttl time.Duration) (uint64, error)
- func (service *CommonAuthService) ExpireRefreshToken(refreshToken string) error
- func (service *CommonAuthService) GetRefreshTokenByUserID(userID uint64) (*entities.RefreshToken, error)
- func (service *CommonAuthService) RegisterUser(userData entities.RegisterUserDTO) (uint64, error)
- type CommonUsersService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonAuthService ¶
type CommonAuthService struct {
// contains filtered or unexported fields
}
func NewCommonAuthService ¶ added in v1.0.1
func NewCommonAuthService( authRepository interfaces.AuthRepository, usersRepository interfaces.UsersRepository, logger *slog.Logger, ) *CommonAuthService
func (*CommonAuthService) CreateRefreshToken ¶ added in v0.1.0
func (*CommonAuthService) ExpireRefreshToken ¶ added in v0.1.0
func (service *CommonAuthService) ExpireRefreshToken(refreshToken string) error
func (*CommonAuthService) GetRefreshTokenByUserID ¶ added in v0.1.0
func (service *CommonAuthService) GetRefreshTokenByUserID(userID uint64) (*entities.RefreshToken, error)
func (*CommonAuthService) RegisterUser ¶
func (service *CommonAuthService) RegisterUser(userData entities.RegisterUserDTO) (uint64, error)
type CommonUsersService ¶
type CommonUsersService struct {
// contains filtered or unexported fields
}
func NewCommonUsersService ¶ added in v1.0.1
func NewCommonUsersService(usersRepository interfaces.UsersRepository, logger *slog.Logger) *CommonUsersService
func (*CommonUsersService) GetAllUsers ¶
func (service *CommonUsersService) GetAllUsers() ([]entities.User, error)
func (*CommonUsersService) GetUserByEmail ¶ added in v0.1.0
func (service *CommonUsersService) GetUserByEmail(email string) (*entities.User, error)
func (*CommonUsersService) GetUserByID ¶
func (service *CommonUsersService) GetUserByID(id uint64) (*entities.User, error)
Click to show internal directories.
Click to hide internal directories.