seaweedfs/weed/filer2/filerstore.go

20 lines
577 B
Go
Raw Normal View History

2018-05-26 14:27:06 +08:00
package filer2
import (
"errors"
)
2018-05-26 14:27:06 +08:00
type FilerStore interface {
// GetName gets the name to locate the configuration in filer.toml file
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)
FindEntry(FullPath) (entry *Entry, err error)
DeleteEntry(FullPath) (err error)
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")