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/syncstate/get.go
Normal file
19
native/desktop/maplefile/internal/usecase/syncstate/get.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package syncstate
|
||||
|
||||
import (
|
||||
"codeberg.org/mapleopentech/monorepo/native/desktop/maplefile/internal/domain/syncstate"
|
||||
)
|
||||
|
||||
type GetUseCase struct {
|
||||
syncStateRepo syncstate.Repository
|
||||
}
|
||||
|
||||
// ProvideGetUseCase creates the use case for Wire
|
||||
func ProvideGetUseCase(syncStateRepo syncstate.Repository) *GetUseCase {
|
||||
return &GetUseCase{syncStateRepo: syncStateRepo}
|
||||
}
|
||||
|
||||
// Execute retrieves the current sync state
|
||||
func (uc *GetUseCase) Execute() (*syncstate.SyncState, error) {
|
||||
return uc.syncStateRepo.Get()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue