aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/filerstore.go
blob: b169c6f80c2ea59c04df5b603490e3bd0fb083f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package filer2

import (
	"errors"
)

type FilerStore interface {
	// GetName gets the name to locate the configuration in filer.toml file
	GetName() string
	// Initialize initializes the file store
	Initialize(configuration Configuration) error
	InsertEntry(*Entry) error
	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)
}

var ErrNotFound = errors.New("filer: no entry is found in filer store")