Documentation
¶
Index ¶
- type AuthController
- func (c *AuthController) ForgotPassword(ctx *gin.Context)
- func (c *AuthController) GetProfile(ctx *gin.Context)
- func (c *AuthController) Login(ctx *gin.Context)
- func (c *AuthController) Logout(ctx *gin.Context)
- func (c *AuthController) Register(ctx *gin.Context)
- func (c *AuthController) ResetPassword(ctx *gin.Context)
- type HealthController
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthController ¶
type AuthController struct {
// contains filtered or unexported fields
}
func NewAuthController ¶
func NewAuthController(authService *service.AuthService) *AuthController
func (*AuthController) ForgotPassword ¶
func (c *AuthController) ForgotPassword(ctx *gin.Context)
@Summary Forgot password @Description Request a password reset @Tags auth @Accept json @Produce json @Param email body dto.ForgotPasswordRequest true "Email" @Success 200 {object} map[string]interface{} @Router /forgot-password [post]
func (*AuthController) GetProfile ¶
func (c *AuthController) GetProfile(ctx *gin.Context)
@Summary Get user profile @Description Get the profile of the logged-in user @Tags auth @Produce json @Success 200 {object} dto.UserResponse @Router /me [get] @Security Bearer
func (*AuthController) Login ¶
func (c *AuthController) Login(ctx *gin.Context)
@Summary Login user @Description Authenticate a user @Tags auth @Accept json @Produce json @Param user body dto.LoginRequest true "User" @Success 200 {object} dto.LoginResponse @Router /login [post]
func (*AuthController) Logout ¶
func (c *AuthController) Logout(ctx *gin.Context)
@Summary Logout user @Description Logout a user @Tags auth @Produce json @Success 204 {object} map[string]interface{} @Router /logout [post] @Security Bearer
func (*AuthController) Register ¶
func (c *AuthController) Register(ctx *gin.Context)
@Summary Register user @Description Register a new user @Tags auth @Accept json @Produce json @Param user body dto.RegisterRequest true "User" @Success 201 {object} dto.RegisterResponse @Failure 409 {object} map[string]interface{} "User already exists" @Router /register [post]
func (*AuthController) ResetPassword ¶
func (c *AuthController) ResetPassword(ctx *gin.Context)
@Summary Reset password @Description Reset the user's password @Tags auth @Accept json @Produce json @Param resetPasswordRequest body dto.ResetPasswordRequest true "Reset Password" @Success 204 {object} map[string]interface{} @Router /reset-password [post]
type HealthController ¶
type HealthController struct{}
func NewHealthController ¶
func NewHealthController() *HealthController
func (*HealthController) Health ¶
func (c *HealthController) Health(ctx *gin.Context)
@Summary Health Check @Description Check the health of the service @Tags health @Produce json @Success 200 {object} map[string]interface{} @Router /health [get]
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func NewUserController ¶
func NewUserController(userService service.UserService) *UserController
func (*UserController) GetAllUsers ¶
func (c *UserController) GetAllUsers(ctx *gin.Context)
@Summary Get all users @Description Get a list of all users @Tags user @Produce json @Success 200 {array} model.User @Router /users [get]
func (*UserController) RemoveAllUsers ¶
func (c *UserController) RemoveAllUsers(ctx *gin.Context)
@Summary Remove all users @Description Remove all users from the database @Tags user @Produce json @Success 200 @Router /remove-users [delete]