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
28
native/desktop/maplefile/internal/domain/file/interface.go
Normal file
28
native/desktop/maplefile/internal/domain/file/interface.go
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
package file
|
||||
|
||||
// Repository defines the data access operations for files
|
||||
type Repository interface {
|
||||
// Create stores a new file record
|
||||
Create(file *File) error
|
||||
|
||||
// Get retrieves a file by its ID
|
||||
Get(id string) (*File, error)
|
||||
|
||||
// Update modifies an existing file record
|
||||
Update(file *File) error
|
||||
|
||||
// Delete removes a file record by its ID
|
||||
Delete(id string) error
|
||||
|
||||
// List returns all file records
|
||||
List() ([]*File, error)
|
||||
|
||||
// ListByCollection returns all files belonging to a specific collection
|
||||
ListByCollection(collectionID string) ([]*File, error)
|
||||
|
||||
// ListByStatus returns all files with a specific sync status
|
||||
ListByStatus(status SyncStatus) ([]*File, error)
|
||||
|
||||
// Exists checks if a file with the given ID exists
|
||||
Exists(id string) (bool, error)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue