2018-05-26 06:27:06 +00:00
|
|
|
package filer2
|
|
|
|
|
2018-05-26 10:49:46 +00:00
|
|
|
import (
|
|
|
|
"errors"
|
2018-08-19 22:17:55 +00:00
|
|
|
"github.com/chrislusf/seaweedfs/weed/util"
|
2018-05-26 10:49:46 +00:00
|
|
|
)
|
2018-05-26 06:27:06 +00:00
|
|
|
|
|
|
|
type FilerStore interface {
|
2018-06-17 20:24:57 +00:00
|
|
|
// GetName gets the name to locate the configuration in filer.toml file
|
2018-05-26 10:49:46 +00:00
|
|
|
GetName() string
|
2018-06-17 20:01:57 +00:00
|
|
|
// Initialize initializes the file store
|
2018-08-19 22:17:55 +00:00
|
|
|
Initialize(configuration util.Configuration) error
|
2018-05-27 18:52:26 +00:00
|
|
|
InsertEntry(*Entry) error
|
2018-05-26 06:27:06 +00:00
|
|
|
UpdateEntry(*Entry) (err error)
|
2018-07-20 09:14:18 +00:00
|
|
|
// err == filer2.ErrNotFound if not found
|
2018-05-26 10:49:46 +00:00
|
|
|
FindEntry(FullPath) (entry *Entry, err error)
|
2018-05-31 03:24:57 +00:00
|
|
|
DeleteEntry(FullPath) (err error)
|
2018-06-17 20:24:57 +00:00
|
|
|
ListDirectoryEntries(dirPath FullPath, startFileName string, includeStartFile bool, limit int) ([]*Entry, error)
|
2018-05-26 06:27:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var ErrNotFound = errors.New("filer: no entry is found in filer store")
|