service

package
v0.0.0-...-388bb28 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryService

type CategoryService struct {
	// contains filtered or unexported fields
}

func NewCategoryService

func NewCategoryService(repo repository.ICategoryRepository, countStatsService service.ICountStatsService, configService website_config.Service) *CategoryService

func (*CategoryService) AdminCreateCategory

func (s *CategoryService) AdminCreateCategory(ctx context.Context, category domain.Category) error

func (*CategoryService) AdminGetCategories

func (s *CategoryService) AdminGetCategories(ctx context.Context, pageDTO dto.PageDTO) ([]domain.Category, int64, error)

func (*CategoryService) AdminGetSelectCategories

func (s *CategoryService) AdminGetSelectCategories(ctx context.Context) ([]domain.Category, error)

func (*CategoryService) DeleteCategory

func (s *CategoryService) DeleteCategory(ctx context.Context, id string) error

func (*CategoryService) GetCategories

func (s *CategoryService) GetCategories(ctx context.Context) ([]domain.CategoryWithCount, error)

func (*CategoryService) GetCategoryByRoute

func (s *CategoryService) GetCategoryByRoute(ctx context.Context, route string) (domain.Category, error)

func (*CategoryService) GetMenus

func (s *CategoryService) GetMenus(ctx context.Context) (menuVO []domain.Category, err error)

func (*CategoryService) ModifyCategory

func (s *CategoryService) ModifyCategory(ctx context.Context, id string, description string) error

func (*CategoryService) ModifyCategoryEnabled

func (s *CategoryService) ModifyCategoryEnabled(ctx context.Context, id string, enabled bool) error

func (*CategoryService) ModifyCategoryNavigation

func (s *CategoryService) ModifyCategoryNavigation(ctx context.Context, id string, showInNav bool) error

func (*CategoryService) QueryCategoriesPage

func (s *CategoryService) QueryCategoriesPage(ctx context.Context, pageDTO dto.PageDTO) ([]domain.Category, int64, error)

type ICategoryService

type ICategoryService interface {
	GetCategories(ctx context.Context) ([]domain.CategoryWithCount, error)
	GetMenus(ctx context.Context) ([]domain.Category, error)
	GetCategoryByRoute(ctx context.Context, route string) (domain.Category, error)
	AdminGetCategories(ctx context.Context, pageDTO dto.PageDTO) ([]domain.Category, int64, error)
	AdminCreateCategory(ctx context.Context, category domain.Category) error
	ModifyCategoryEnabled(ctx context.Context, id string, enabled bool) error
	ModifyCategory(ctx context.Context, id string, description string) error
	DeleteCategory(ctx context.Context, id string) error
	ModifyCategoryNavigation(ctx context.Context, id string, showInNav bool) error
	AdminGetSelectCategories(ctx context.Context) ([]domain.Category, error)
}

Jump to

Keyboard shortcuts

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