Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func CreateUser(c *fiber.Ctx) error
CreateUser function to create a new user @Summary Create a new user @Description Creates a new user in the database. @Tags Users @Accept json @Produce json @Param user body models.User true "User object" @Success 201 {object} models.User @Failure 400 {object} map[string]interface{} @Failure 500 {object} map[string]interface{} @Router /api/v1/users [post]
func DeleteUser ¶
func DeleteUser(c *fiber.Ctx) error
DeleteUser function to delete a user @Summary Delete a user @Description Deletes a user from the database. @Tags Users @Accept json @Produce json @Param id path int true "User ID" @Success 204 @Failure 404 {object} map[string]interface{} @Failure 500 {object} map[string]interface{} @Router /api/v1/user/{id} [delete]
func GetCoins ¶
func GetCoins(c *fiber.Ctx) error
GetCoins function to get all coins @Summary Get all coins @Description Get all coins @Tags Coins @Accept json @Produce json @Success 200 {object} []models.Token @Router /api/coins [get]
func GetUser ¶
func GetUser(c *fiber.Ctx) error
GetUser function to get user by ID @Summary Get user by ID @Description Retrieves a user by ID from the database. @Tags Users @Accept json @Produce json @Param id path int true "User ID" @Success 200 {object} models.User @Failure 404 {object} map[string]interface{} @Failure 500 {object} map[string]interface{} @Router /api/v1/user/{id} [get]
func GetUsers ¶
func GetUsers(c *fiber.Ctx) error
GetUsers function to get all users @Summary Get all users @Description Retrieves a list of all users in the database. @Tags Users @Accept json @Produce json @Success 200 {object} models.User @Failure 500 {object} map[string]interface{} @Router /api/v1/users [get]
func HealthCheck ¶
func HealthCheck(c *fiber.Ctx) error
HealthCheck function to check server health @Summary Check server health @Description Check server health @Tags HealthCheck @Accept json @Produce json @Success 200 {object} map[string]interface{} @Router /api/v1/healthCheck [get]
func UpdateUser ¶
func UpdateUser(c *fiber.Ctx) error
UpdateUser function to update a user @Summary Update a user @Description Updates a user in the database. @Tags Users @Accept json @Produce json @Param id path int true "User ID" @Param user body models.User true "User object" @Success 200 {object} models.User @Failure 400 {object} map[string]interface{} @Failure 404 {object} map[string]interface{} @Failure 500 {object} map[string]interface{} @Router /api/v1/user/{id} [put]
Types ¶
This section is empty.