mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
clean: first clean archi sandbox implementation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package useCases
|
||||
|
||||
import (
|
||||
. "GohCMS2/adapters/secondary/gateways"
|
||||
. "GohCMS2/domain/article"
|
||||
)
|
||||
|
||||
type GetArticleUseCase struct {
|
||||
articleRepository ArticleRepository
|
||||
}
|
||||
|
||||
func NewGetArticleUseCase() *GetArticleUseCase {
|
||||
return &GetArticleUseCase{
|
||||
articleRepository: *NewArticleRepository(),
|
||||
}
|
||||
}
|
||||
|
||||
func (g *GetArticleUseCase) GetArticle(id int) Article {
|
||||
return g.articleRepository.Get(id)
|
||||
}
|
||||
Reference in New Issue
Block a user