refactoring

This commit is contained in:
Chris Lu
2018-05-25 23:27:06 -07:00
parent 6de84c64c6
commit c34feca59c
5 changed files with 129 additions and 79 deletions

13
weed/filer2/filerstore.go Normal file
View File

@@ -0,0 +1,13 @@
package filer2
import "errors"
type FilerStore interface {
InsertEntry(*Entry) (error)
UpdateEntry(*Entry) (err error)
FindEntry(FullPath) (found bool, entry *Entry, err error)
DeleteEntry(FullPath) (fileEntry *Entry, err error)
ListDirectoryEntries(dirPath FullPath, startFileName string, inclusive bool, limit int) ([]*Entry, error)
}
var ErrNotFound = errors.New("filer: no entry is found in filer store")