Documentation ¶
Index ¶
Constants ¶
View Source
const ( LOCAL_URL = "http://localhost:3000" VERIFY_EMAIL_ROUTE = "register/verify_email" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTService ¶
type JWTService interface { GenerateToken(userId string, role string) string ValidateToken(token string) (*jwt.Token, error) GetUserIDByToken(token string) (string, error) }
func NewJWTService ¶
func NewJWTService() JWTService
type UserService ¶
type UserService interface { RegisterUser(ctx context.Context, req dto.UserCreateRequest) (dto.UserResponse, error) GetAllUserWithPagination(ctx context.Context, req dto.PaginationRequest) (dto.UserPaginationResponse, error) GetUserById(ctx context.Context, userId string) (dto.UserResponse, error) GetUserByEmail(ctx context.Context, email string) (dto.UserResponse, error) SendVerificationEmail(ctx context.Context, req dto.SendVerificationEmailRequest) error VerifyEmail(ctx context.Context, req dto.VerifyEmailRequest) (dto.VerifyEmailResponse, error) UpdateUser(ctx context.Context, req dto.UserUpdateRequest, userId string) (dto.UserUpdateResponse, error) DeleteUser(ctx context.Context, userId string) error Verify(ctx context.Context, req dto.UserLoginRequest) (dto.UserLoginResponse, error) }
func NewUserService ¶
func NewUserService(userRepo repository.UserRepository, jwtService JWTService) UserService
Click to show internal directories.
Click to hide internal directories.