Files
backend/controllers/categoryController.go
2026-04-07 00:44:04 +02:00

161 lines
6.2 KiB
Go

package controllers
import (
"github.com/gin-gonic/gin"
_ "github.com/swaggo/swag/example/celler/httputil"
_ "git.dynamicdiscord.de/harakat/backend/models"
)
/*
models:
- language
- ressource
- category
- tag
- region
*/
type DummyController struct{}
// Register godoc
// @Summary List all categories
// @Tags category
// @Accept json
// @Produce json
// @Success 200 {array} models.Category
// @Failure 400 {object} httputil.HTTPError
// @Router /category/ [get]
func (dc *DummyController) ListCategories(c *gin.Context) {}
// Register godoc
// @Summary Create a category
// @Tags category
// @Accept json
// @Produce json
// @Param category body models.CategoryRequest true "category"
// @Success 200 {object} models.Category
// @Failure 400 {object} httputil.HTTPError
// @Router /category/ [post]
func (dc *DummyController) CreateCategory(c *gin.Context) {}
// Register godoc
// @Summary Retreive a category
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying this category."
// @Success 200 {object} models.Category
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id} [get]
func (dc *DummyController) RetreiveCategory(c *gin.Context) {}
// Register godoc
// @Summary Update an existing category
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying this category."
// @Param category body models.CategoryRequest true "updated category"
// @Success 200 {object} models.Category
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id} [put]
func (dc *DummyController) UpdateCategory(c *gin.Context) {}
// Register godoc
// @Summary Partially update an existing category
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying this category."
// @Param category body models.CategoryRequest true "partially updated category"
// @Success 200 {object} models.Category
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id} [patch]
func (dc *DummyController) PatchCategory(c *gin.Context) {}
// Register godoc
// @Summary Delete an existing category
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying this category."
// @Success 200 {object} EmptyResponse
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id} [delete]
func (dc *DummyController) DeleteCategory(c *gin.Context) {}
// CATEGORY TRANSLATIONS
// Register godoc
// @Summary List all category translations
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying the category."
// @Success 200 {array} models.CategoryTranslation
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id}/translation [get]
func (dc *DummyController) ListCategorieTranslation(c *gin.Context) {}
// Register godoc
// @Summary Create a category translation
// @Tags category
// @Accept json
// @Produce json
// @Param category body models.CategoryTranslationRequest true "category translation"
// @Success 200 {object} models.CategoryTranslation
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id}/translation [post]
func (dc *DummyController) CreateCategoryTranslation(c *gin.Context) {}
// Register godoc
// @Summary Retreive a category translation
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying the category."
// @Param id path int true "A unique integer value identifying the category translation."
// @Success 200 {object} models.CategoryTranslation
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id}/translation/{id} [get]
func (dc *DummyController) RetreiveCategoryTranslation(c *gin.Context) {}
// Register godoc
// @Summary Update an existing category translation
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying this category."
// @Param id path int true "A unique integer value identifying the category translation."
// @Param category body models.CategoryTranslationRequest true "updated category translation"
// @Success 200 {object} models.CategoryTranslation
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id}/translation/{id} [put]
func (dc *DummyController) UpdateCategoryTranslation(c *gin.Context) {}
// Register godoc
// @Summary Partially update an existing category translation
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying this category."
// @Param id path int true "A unique integer value identifying the category translation."
// @Param category body models.CategoryTranslationRequest true "partially updated category translation"
// @Success 200 {object} models.CategoryTranslation
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id}/translation/{id} [patch]
func (dc *DummyController) PatchCategoryTranslation(c *gin.Context) {}
// Register godoc
// @Summary Delete an existing category translation
// @Tags category
// @Accept json
// @Produce json
// @Param id path int true "A unique integer value identifying this category."
// @Param id path int true "A unique integer value identifying the category translation."
// @Success 200 {object} EmptyResponse
// @Failure 400 {object} httputil.HTTPError
// @Router /category/{id}/translation/{id} [delete]
func (dc *DummyController) DeleteCategoryTranslation(c *gin.Context) {}