seaweedfs/weed/filer2/filerstore.go

20 lines
577 B
Go
Raw Normal View History

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