Documentation ¶
Index ¶
- func CategoryTag(categoryParams types.RouteParams)
- func GetTagByCategory(db *gorm.DB, categoryID uuid.UUID, tagID uuid.UUID) (*models.Tag, *errors.Error)
- func GetTagsByCategory(db *gorm.DB, categoryID uuid.UUID, limit int, page int) ([]models.Tag, *errors.Error)
- type CategoryTagController
- type CategoryTagService
- type CategoryTagServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CategoryTag ¶
func CategoryTag(categoryParams types.RouteParams)
func GetTagByCategory ¶
Types ¶
type CategoryTagController ¶
type CategoryTagController struct {
// contains filtered or unexported fields
}
func NewCategoryTagController ¶
func NewCategoryTagController(categoryTagService CategoryTagServiceInterface) *CategoryTagController
func (*CategoryTagController) GetTagByCategory ¶
func (ct *CategoryTagController) GetTagByCategory(c *fiber.Ctx) error
GetTagByCategory godoc
@Summary Retrieve a tag by category @Description Retrieves a tag associated with a category @ID get-tag-by-category @Tags category-tag @Produce json @Param categoryID path string true "Category ID" @Param tagID path string true "Tag ID" @Success 200 {object} models.Tag @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Failure 500 {object} errors.Error @Router /categories/{categoryID}/tags/{tagID}/ [get]
func (*CategoryTagController) GetTagsByCategory ¶
func (ct *CategoryTagController) GetTagsByCategory(c *fiber.Ctx) error
GetTagsByCategory godoc
@Summary Retrieve all tags by category @Description Retrieves all tags associated with a category @ID get-tags-by-category @Tags category-tag @Produce json @Param categoryID path string true "Category ID" @Param limit query int false "Limit" @Param page query int false "Page" @Success 200 {object} []models.Tag @Failure 400 {object} errors.Error @Failure 404 {object} errors.Error @Failure 500 {object} errors.Error @Router /categories/{categoryID}/tags/ [get]
type CategoryTagService ¶
type CategoryTagService struct {
types.ServiceParams
}
func (*CategoryTagService) GetTagByCategory ¶
func (*CategoryTagService) GetTagsByCategory ¶
type CategoryTagServiceInterface ¶
type CategoryTagServiceInterface interface { GetTagsByCategory(categoryID string, limit string, page string) ([]models.Tag, *errors.Error) GetTagByCategory(categoryID string, tagID string) (*models.Tag, *errors.Error) }
func NewCategoryTagService ¶
func NewCategoryTagService(params types.ServiceParams) CategoryTagServiceInterface