Documentation ¶
Index ¶
- func CreateCategory(context *gin.Context)
- func CreateTask(context *gin.Context)
- func DeleteCategory(context *gin.Context)
- func DeleteTask(context *gin.Context)
- func DeleteUser(context *gin.Context)
- func GetAllCategories(context *gin.Context)
- func GetAllTasks(context *gin.Context)
- func Login(context *gin.Context)
- func Register(context *gin.Context)
- func UpdateCategory(context *gin.Context)
- func UpdateCategoryIdTask(context *gin.Context)
- func UpdateStatusTask(context *gin.Context)
- func UpdateTask(context *gin.Context)
- func UpdateUser(context *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCategory ¶
CreateCategory godoc @Summary Creates a new category @Tags Categories @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param model.Category body model.CategoryCreate true "Category object to be created" @Success 201 {object} model.User "Category created successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /categories [post]
func CreateTask ¶
CreateTask godoc @Summary Creates a new task @Tags Task @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param model.Category body model.TaskCreate true "Task object to be created" @Success 201 {object} model.TaskCreateResponse "Task created successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /tasks [post]
func DeleteCategory ¶
DeleteCategory godoc @Summary Delete a category item @Description Delete a category item by id @Tags Categories @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param categoryId path int true "Category id" @Success 200 {string} string "OK" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 404 {object} helper.ErrorResponse "Not Found" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /categories/{categoryId} [delete]
func DeleteTask ¶
DeleteTask godoc @Summary Delete a task item @Description Delete a task item by id @Tags Task @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param taskId path int true "Task id" @Success 200 {string} string "OK" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 404 {object} helper.ErrorResponse "Not Found" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /task/{taskId} [delete]
func DeleteUser ¶
DeleteAccount godoc @Summary Delete an Account. @Tags Users @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Success 200 {object} model.User "User deleted successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /users/delete-account [delete]
func GetAllCategories ¶
GetAllCategories godoc @Summary Get all categories @Description Retrieve a list of all categories @Tags Categories @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Success 200 {object} []model.Category @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 404 {object} helper.ErrorResponse "Not Found" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /categories [get]
func GetAllTasks ¶
GetAllTasks godoc @Summary Get all task @Description Retrieve a list of all task @Tags Task @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Success 200 {object} []model.Task @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 404 {object} helper.ErrorResponse "Not Found" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /tasks [get]
func Login ¶
Login godoc @Summary Login an Account. @Tags Users @Accept json @Produce json @Param model.User body model.LoginCredential true "User login credentials" @Success 200 {object} model.User "User logged in successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Router /users/login [post]
func Register ¶
Register godoc @Summary Register an Account. @Tags Users @Accept json @Produce json @Param model.User body model.UserCreate true "User object to be created" @Success 201 {object} model.User "User created successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Router /users/register [post]
func UpdateCategory ¶
UpdateCategory godoc @Summary Update a Category. @Tags Categories @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param categoryId path int true "Category ID" @Param model.Category body model.CategoryUpdate true "Category object to be updated" @Success 200 {object} model.User "Category updated successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /categories/{categoryId} [put]
func UpdateCategoryIdTask ¶
UpdateTaskCategory godoc @Summary Update a Task. @Tags Task @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param taskId path int true "Task ID" @Param model.Task body model.TaskCategoryUpdate true "Task Category object to be updated" @Success 200 {object} model.TaskUpdateResponse "Task Category updated successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /tasks/update-category/{taskId} [patch]
func UpdateStatusTask ¶
UpdateTaskStatus godoc @Summary Update a Task. @Tags Task @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param taskId path int true "Task ID" @Param model.Task body model.TaskStatusUpdate true "Task Status object to be updated" @Success 200 {object} model.TaskUpdateResponse "Task Status updated successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /tasks/update-status/{taskId} [patch]
func UpdateTask ¶
UpdateTask godoc @Summary Update a Task. @Tags Task @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param taskId path int true "Task ID" @Param model.Task body model.TaskUpdate true "Task object to be updated" @Success 200 {object} model.TaskUpdateResponse "Task updated successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /tasks/{taskId} [put]
func UpdateUser ¶
UpdateAccount godoc @Summary Update an Account. @Tags Users @Accept json @Produce json @Param Authorization header string true "Bearer Token" @Param model.User body model.UserUpdate true "User object to be updated" @Success 200 {object} model.User "User updated successfully" @Failure 400 {object} helper.ErrorResponse "Bad Request" @Failure 401 {object} helper.ErrorResponse "Unauthorized" @Failure 422 {object} helper.ErrorResponse "Unprocessable Entity" @Failure 500 {object} helper.ErrorResponse "Server Error" @Security Bearer @Router /users/update-account [put]
Types ¶
This section is empty.