monorepo/native/desktop/maplefile/internal/usecase/collection/get.go

19 lines
521 B
Go

package collection
import (
"codeberg.org/mapleopentech/monorepo/native/desktop/maplefile/internal/domain/collection"
)
type GetUseCase struct {
collectionRepo collection.Repository
}
// ProvideGetUseCase creates the use case for Wire
func ProvideGetUseCase(collectionRepo collection.Repository) *GetUseCase {
return &GetUseCase{collectionRepo: collectionRepo}
}
// Execute retrieves a collection by ID
func (uc *GetUseCase) Execute(id string) (*collection.Collection, error) {
return uc.collectionRepo.Get(id)
}