mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
19 lines
422 B
Go
19 lines
422 B
Go
package useCases
|
|
|
|
import (
|
|
"RenewCMS/domain/article"
|
|
"RenewCMS/domain/gateways"
|
|
)
|
|
|
|
type ListArticlesUseCase struct {
|
|
articleRepository gateways.IArticleRepository
|
|
}
|
|
|
|
func NewListArticlesUseCase(articleRepository gateways.IArticleRepository) *ListArticlesUseCase {
|
|
return &ListArticlesUseCase{articleRepository}
|
|
}
|
|
|
|
func (g *ListArticlesUseCase) ListArticles() []article.Article {
|
|
return g.articleRepository.GetAll()
|
|
}
|