Documentation ¶
Index ¶
- type UserController
- type UserControllerImpl
- func (ctr *UserControllerImpl) AccountActivation(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) BanAccount(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) DeleteAccount(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) ForgetPassword(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) GetAll(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) Login(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) Logout(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) MyProfile(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) Register(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) ResetPassword(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) UpdatePassword(c *fiber.Ctx) error
- func (ctr *UserControllerImpl) UpdateProfile(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserController ¶
type UserController interface { // Register handles for user registration for all roles. // This handler will send an email for confirmation. Register(c *fiber.Ctx) error // AccountActivation handles the account activation // process after registration. AccountActivation(c *fiber.Ctx) error // Login handles user login. Login(c *fiber.Ctx) error // ForgetPassword handles the forget password request. // This handler will send an email for reset password. ForgetPassword(c *fiber.Ctx) error // ResetPassword handles the password reset process. ResetPassword(c *fiber.Ctx) error // MyProfile retrieves the user's own profile information. MyProfile(c *fiber.Ctx) error // Logout handles user logout. // Black-listing the user token / JWT. Logout(c *fiber.Ctx) error // UpdateProfile handles updating user profile information. UpdateProfile(c *fiber.Ctx) error // UpdatePassword handles updating user password. UpdatePassword(c *fiber.Ctx) error // DeleteAccount handles the account deletion process. DeleteAccount(c *fiber.Ctx) error // GetAll retrieves all user accounts (need admin access). GetAll(c *fiber.Ctx) error // BanAccount handles banning a user account (need admin access). BanAccount(c *fiber.Ctx) error }
UserController defines methods for handling user-related operations.
func NewUserController ¶
func NewUserController(service service.UserService) UserController
NewUserController creates a singleton UserController instance with the given UserService.
type UserControllerImpl ¶
type UserControllerImpl struct {
// contains filtered or unexported fields
}
UserControllerImpl is the implementation of UserController with a UserService dependency.
func (*UserControllerImpl) AccountActivation ¶
func (ctr *UserControllerImpl) AccountActivation(c *fiber.Ctx) error
AccountActivation handles the account activation process after registration.
func (*UserControllerImpl) BanAccount ¶
func (ctr *UserControllerImpl) BanAccount(c *fiber.Ctx) error
BanAccount handles banning a user account (need admin access).
func (*UserControllerImpl) DeleteAccount ¶
func (ctr *UserControllerImpl) DeleteAccount(c *fiber.Ctx) error
DeleteAccount handles the account deletion process.
func (*UserControllerImpl) ForgetPassword ¶
func (ctr *UserControllerImpl) ForgetPassword(c *fiber.Ctx) error
ForgetPassword handles the forget password request. This handler will send an email for reset password.
func (*UserControllerImpl) GetAll ¶
func (ctr *UserControllerImpl) GetAll(c *fiber.Ctx) error
GetAll retrieves all user accounts (need admin access).
func (*UserControllerImpl) Login ¶
func (ctr *UserControllerImpl) Login(c *fiber.Ctx) error
Login handles user login.
func (*UserControllerImpl) Logout ¶
func (ctr *UserControllerImpl) Logout(c *fiber.Ctx) error
Logout handles user logout. Black-listing the user token / JWT.
func (*UserControllerImpl) MyProfile ¶
func (ctr *UserControllerImpl) MyProfile(c *fiber.Ctx) error
MyProfile retrieves the user's own profile information.
func (*UserControllerImpl) Register ¶
func (ctr *UserControllerImpl) Register(c *fiber.Ctx) error
Register handles for user registration for all roles. This handler will send an email for confirmation.
func (*UserControllerImpl) ResetPassword ¶
func (ctr *UserControllerImpl) ResetPassword(c *fiber.Ctx) error
ResetPassword handles the password reset process.
func (*UserControllerImpl) UpdatePassword ¶
func (ctr *UserControllerImpl) UpdatePassword(c *fiber.Ctx) error
UpdatePassword handles updating user password.
func (*UserControllerImpl) UpdateProfile ¶
func (ctr *UserControllerImpl) UpdateProfile(c *fiber.Ctx) error
UpdateProfile handles updating user profile information.