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