19 lines
514 B
Go
19 lines
514 B
Go
package collection
|
|
|
|
import (
|
|
"codeberg.org/mapleopentech/monorepo/native/desktop/maplefile/internal/domain/collection"
|
|
)
|
|
|
|
type DeleteUseCase struct {
|
|
collectionRepo collection.Repository
|
|
}
|
|
|
|
// ProvideDeleteUseCase creates the use case for Wire
|
|
func ProvideDeleteUseCase(collectionRepo collection.Repository) *DeleteUseCase {
|
|
return &DeleteUseCase{collectionRepo: collectionRepo}
|
|
}
|
|
|
|
// Execute deletes a collection by ID
|
|
func (uc *DeleteUseCase) Execute(id string) error {
|
|
return uc.collectionRepo.Delete(id)
|
|
}
|