2018-05-26 14:27:06 +08:00
|
|
|
package filer2
|
|
|
|
|
2018-05-26 18:49:46 +08:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
2018-05-26 14:27:06 +08:00
|
|
|
|
|
|
|
type FilerStore interface {
|
2018-06-18 04:24:57 +08:00
|
|
|
// GetName gets the name to locate the configuration in filer.toml file
|
2018-05-26 18:49:46 +08:00
|
|
|
GetName() string
|
2018-06-18 04:01:57 +08:00
|
|
|
// Initialize initializes the file store
|
|
|
|
Initialize(configuration Configuration) error
|
2018-05-28 02:52:26 +08:00
|
|
|
InsertEntry(*Entry) error
|
2018-05-26 14:27:06 +08:00
|
|
|
UpdateEntry(*Entry) (err error)
|
2018-05-26 18:49:46 +08:00
|
|
|
FindEntry(FullPath) (entry *Entry, err error)
|
2018-05-31 11:24:57 +08:00
|
|
|
DeleteEntry(FullPath) (err error)
|
2018-06-18 04:24:57 +08:00
|
|
|
ListDirectoryEntries(dirPath FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error)
|
2018-05-26 14:27:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
var ErrNotFound = errors.New("filer: no entry is found in filer store")
|