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