2018-05-26 14:27:06 +08:00
|
|
|
package filer2
|
|
|
|
|
2018-05-26 18:49:46 +08:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
)
|
2018-05-26 14:27:06 +08:00
|
|
|
|
|
|
|
type FilerStore interface {
|
2018-05-26 18:49:46 +08:00
|
|
|
GetName() string
|
|
|
|
Initialize(viper *viper.Viper) (error)
|
2018-05-26 14:27:06 +08:00
|
|
|
InsertEntry(*Entry) (error)
|
|
|
|
UpdateEntry(*Entry) (err error)
|
2018-05-26 18:49:46 +08:00
|
|
|
FindEntry(FullPath) (entry *Entry, err error)
|
2018-05-26 14:27:06 +08:00
|
|
|
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")
|