Files
futur-web-app/server/internal/service/category_service.go
2025-11-03 12:24:01 +02:00

20 lines
444 B
Go

package service
import (
"context"
"go-server/internal/models"
"go-server/internal/repository"
)
type CategoryService struct {
categoryRepo *repository.CategoryRepository
}
func NewCategoryService(categoryRepo *repository.CategoryRepository) *CategoryService {
return &CategoryService{categoryRepo: categoryRepo}
}
func (s *CategoryService) GetAll(ctx context.Context) ([]models.Category, error) {
return s.categoryRepo.GetAll(ctx)
}