usecases

package
v0.0.0-...-2ba808a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefreshTokenUsecase

type RefreshTokenUsecase interface {
	Execute(ctx context.Context, dto dto.UserRefreshTokenRequest) (dto.UserLoginResponse, error)
}

RefreshTokenUsecase provides a method to refresh the token

func NewUserRefreshTokenUsecase

func NewUserRefreshTokenUsecase(
	userRepo repository.UserRepository,
	userTokenRepo repository.UserTokenRepository,
	timeFactory timeutil.TimeFactory,
	jwt services.JWT,
	uuid uuidstring.UUIDString,
) RefreshTokenUsecase

type UserAddUsecase

type UserAddUsecase interface {
	Execute(ctx context.Context, dto dto.UserAddRequest) (entity.User, error)
}

UserAddUsecase provides a method to add an internal user to the system

func NewUserAddUsecase

func NewUserAddUsecase(
	userRepo repository.UserRepository,
	timeFactory timeutil.TimeFactory,
	hashPassword services.HashPass,
) UserAddUsecase

type UserLoginUsecase

type UserLoginUsecase interface {
	Execute(ctx context.Context, dto dto.UserLoginRequest) (dto.UserLoginResponse, error)
}

UserLoginUsecase provides a method to login an user to the system

func NewUserLoginUsecase

func NewUserLoginUsecase(
	userRepo repository.UserRepository,
	userTokenRepo repository.UserTokenRepository,
	timeFactory timeutil.TimeFactory,
	uuid uuidstring.UUIDString,
	hashPass services.HashPass,
	jwt services.JWT,
) UserLoginUsecase

type UserMeUsecase

type UserMeUsecase interface {
	Execute(ctx context.Context, userID uuid.UUID) (entity.User, error)
}

func NewUserMeUsecase

func NewUserMeUsecase(userRepo repository.UserRepository) UserMeUsecase

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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