Documentation ¶
Index ¶
- type CommonAuthService
- func (service *CommonAuthService) CreateRefreshToken(ctx context.Context, userID uint64, refreshToken string, ttl time.Duration) (uint64, error)
- func (service *CommonAuthService) ExpireRefreshToken(ctx context.Context, refreshToken string) error
- func (service *CommonAuthService) GetRefreshTokenByUserID(ctx context.Context, userID uint64) (*entities.RefreshToken, error)
- func (service *CommonAuthService) RegisterUser(ctx context.Context, userData entities.RegisterUserDTO) (uint64, error)
- type CommonUsersService
- func (service *CommonUsersService) GetAllUsers(ctx context.Context) ([]entities.User, error)
- func (service *CommonUsersService) GetUserByEmail(ctx context.Context, email string) (*entities.User, error)
- func (service *CommonUsersService) GetUserByID(ctx context.Context, id uint64) (*entities.User, error)
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(ctx context.Context, refreshToken string) error
func (*CommonAuthService) GetRefreshTokenByUserID ¶ added in v0.1.0
func (service *CommonAuthService) GetRefreshTokenByUserID( ctx context.Context, userID uint64, ) (*entities.RefreshToken, error)
func (*CommonAuthService) RegisterUser ¶
func (service *CommonAuthService) RegisterUser(ctx context.Context, 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 (*CommonUsersService) GetUserByEmail ¶ added in v0.1.0
func (*CommonUsersService) GetUserByID ¶
Click to show internal directories.
Click to hide internal directories.