You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
620 B

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. package filer2
  2. import (
  3. "errors"
  4. )
  5. type FilerStore interface {
  6. // GetName gets the name to locate the configuration in filer.toml file
  7. GetName() string
  8. // Initialize initializes the file store
  9. Initialize(configuration Configuration) error
  10. InsertEntry(*Entry) error
  11. UpdateEntry(*Entry) (err error)
  12. // err == filer2.ErrNotFound if not found
  13. FindEntry(FullPath) (entry *Entry, err error)
  14. DeleteEntry(FullPath) (err error)
  15. ListDirectoryEntries(dirPath FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error)
  16. }
  17. var ErrNotFound = errors.New("filer: no entry is found in filer store")