Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
19
native/desktop/maplefile/internal/usecase/file/create.go
Normal file
19
native/desktop/maplefile/internal/usecase/file/create.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package file
|
||||
|
||||
import (
|
||||
"codeberg.org/mapleopentech/monorepo/native/desktop/maplefile/internal/domain/file"
|
||||
)
|
||||
|
||||
type CreateUseCase struct {
|
||||
fileRepo file.Repository
|
||||
}
|
||||
|
||||
// ProvideCreateUseCase creates the use case for Wire
|
||||
func ProvideCreateUseCase(fileRepo file.Repository) *CreateUseCase {
|
||||
return &CreateUseCase{fileRepo: fileRepo}
|
||||
}
|
||||
|
||||
// Execute creates a new file record
|
||||
func (uc *CreateUseCase) Execute(f *file.File) error {
|
||||
return uc.fileRepo.Create(f)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue