Documentation
¶
Index ¶
- func Create(c *fiber.Ctx) error
- func CreateGroup(c *fiber.Ctx) error
- func GetAll(c *fiber.Ctx) error
- func GetGroups(c *fiber.Ctx) error
- func Remove(c *fiber.Ctx) error
- func RemoveGroup(c *fiber.Ctx) error
- func Setup(app *fiber.App)
- func Update(c *fiber.Ctx) error
- func UpdateGroup(c *fiber.Ctx) error
- type HTTPError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(c *fiber.Ctx) error
Create godoc @Summary Create user @Description add user @ID get-users @Accept json @Produce json @Tags User @Param user body models.CreateUserRequest true "User" @Success 200 {object} models.Users @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/users [post]
func CreateGroup ¶
func CreateGroup(c *fiber.Ctx) error
CreateGroup godoc @Summary Create group @Description add group @ID create group @Accept json @Produce json @Tags Group @Param group body models.CreateGroupRequest true "Group" @Success 200 {object} models.Group @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/groups [post]
func GetAll ¶
func GetAll(c *fiber.Ctx) error
GetAll godoc @Summary Get all users @Description Get users list @ID get-users @Accept json @Produce json @Tags User @Success 200 {object} models.Users @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/users [get]
func GetGroups ¶
func GetGroups(c *fiber.Ctx) error
GetGroups godoc @Summary Get all groups @Description Get group list @ID get-groups @Accept json @Produce json @Tags Group @Success 200 {object} models.Group @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/groups [get]
func Remove ¶
func Remove(c *fiber.Ctx) error
Remove godoc @Summary delete a user @Description Delete user by user id @ID delete-user @Accept json @Produce json @Tags User @Param id path string true "User ID" @Success 200 {object} controllers.Response @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/users/{id} [delete]
func RemoveGroup ¶
func RemoveGroup(c *fiber.Ctx) error
RemoveGroup godoc @Summary delete a group @Description Delete group by group id @ID delete-group @Accept json @Produce json @Tags Group @Param id path string true "Group ID" @Success 200 {object} controllers.Response @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/groups/{id} [delete]
func Setup ¶
func Setup(app *fiber.App)
Setup @title Fiber Example API @version 1.0 @description This is a sample swagger for Fiber @contact.name API Support @contact.email hey@sachinsmc.me @host localhost:3003 @BasePath /
func Update ¶
func Update(c *fiber.Ctx) error
Update godoc @Summary update a user @Description Update user by user id @ID update-user @Accept json @Produce json @Tags User @Param id path string true "User ID" @Param user body models.CreateUserRequest true "User" @Success 200 {object} models.Users @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/users/{id} [put]
func UpdateGroup ¶
func UpdateGroup(c *fiber.Ctx) error
UpdateGroup godoc @Summary update a group @Description Update Group by group id @ID update-group @Accept json @Produce json @Tags Group @Param id path string true "Group ID" @Param group body models.CreateGroupRequest true "Group" @Success 200 {object} models.Group @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /api/v1/groups/{id} [put]