services

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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 (service *CommonAuthService) CreateRefreshToken(
	userID uint64,
	refreshToken string,
	ttl time.Duration,
) (uint64, error)

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)

Jump to

Keyboard shortcuts

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