tag

package
v0.0.0-...-702f6d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CategoryTag

func CategoryTag(categoryParams types.RouteParams)

func GetTagByCategory

func GetTagByCategory(db *gorm.DB, categoryID uuid.UUID, tagID uuid.UUID) (*models.Tag, *errors.Error)

func GetTagsByCategory

func GetTagsByCategory(db *gorm.DB, categoryID uuid.UUID, limit int, page int) ([]models.Tag, *errors.Error)

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 (t *CategoryTagService) GetTagByCategory(categoryID string, tagID string) (*models.Tag, *errors.Error)

func (*CategoryTagService) GetTagsByCategory

func (t *CategoryTagService) GetTagsByCategory(categoryID string, limit string, page string) ([]models.Tag, *errors.Error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL