Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GreetHandler ¶
func GreetHandler(c *fiber.Ctx) error
Types ¶
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func (*UserController) DeleteUserByID ¶
func (controller *UserController) DeleteUserByID(c *fiber.Ctx) error
DeleteUserByID deletes a user by their ID.
c is a pointer to a fiber.Ctx object that represents the HTTP request context. It is used to handle the response and any potential errors.
The function returns an error if there is an issue deleting the user. Otherwise, it returns the deleted user as a JSON response.
func (*UserController) FindUserByID ¶
func (controller *UserController) FindUserByID(c *fiber.Ctx) error
FindUserByID retrieves a user by their ID.
c is a pointer to a fiber.Ctx object that represents the HTTP request context. It is used to handle the response and any potential errors.
The function returns an error if there is an issue retrieving the user. Otherwise, it returns the retrieved user as a JSON response.
func (*UserController) GetAllUsers ¶
func (controller *UserController) GetAllUsers(c *fiber.Ctx) error
GetAllUsers retrieves all users from the UserController.
c is a pointer to a fiber.Ctx object that represents the HTTP request context. It is used to handle the response and any potential errors.
The function returns an error if there is an issue retrieving the users. Otherwise, it returns the retrieved users as a JSON response.
func (*UserController) UpdateUserByID ¶
func (controller *UserController) UpdateUserByID(c *fiber.Ctx) error
UpdateUserByID updates a user by their ID.
c is a pointer to a fiber.Ctx object that represents the HTTP request context. It is used to handle the response and any potential errors.
The function returns an error if there is an issue updating the user. Otherwise, it returns the updated user as a JSON response.