mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
19 lines
371 B
Go
19 lines
371 B
Go
package useCases
|
|
|
|
import (
|
|
"GoCMS/domain/gateways"
|
|
"GoCMS/domain/post"
|
|
)
|
|
|
|
type ListPostsUseCase struct {
|
|
postRepository gateways.IPostRepository
|
|
}
|
|
|
|
func NewListPostsUseCase(postRepository gateways.IPostRepository) *ListPostsUseCase {
|
|
return &ListPostsUseCase{postRepository}
|
|
}
|
|
|
|
func (g *ListPostsUseCase) ListPosts() []post.Post {
|
|
return g.postRepository.GetAll()
|
|
}
|