todo: load path-specific store from filer.toml
This commit is contained in:
@@ -27,6 +27,9 @@ func (f *Filer) LoadConfiguration(config *viper.Viper) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO load path-specific filer store here
|
||||||
|
// f.Store.AddPathSpecificStore(path, store)
|
||||||
|
|
||||||
println()
|
println()
|
||||||
println("Supported filer stores are:")
|
println("Supported filer stores are:")
|
||||||
for _, store := range Stores {
|
for _, store := range Stores {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ type VirtualFilerStore interface {
|
|||||||
FilerStore
|
FilerStore
|
||||||
DeleteHardLink(ctx context.Context, hardLinkId HardLinkId) error
|
DeleteHardLink(ctx context.Context, hardLinkId HardLinkId) error
|
||||||
DeleteOneEntry(ctx context.Context, entry *Entry) error
|
DeleteOneEntry(ctx context.Context, entry *Entry) error
|
||||||
|
AddPathSpecificStore(path string, store FilerStore)
|
||||||
}
|
}
|
||||||
|
|
||||||
type FilerStoreWrapper struct {
|
type FilerStoreWrapper struct {
|
||||||
@@ -67,7 +68,7 @@ func NewFilerStoreWrapper(store FilerStore) *FilerStoreWrapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fsw *FilerStoreWrapper) addStore(path string, store FilerStore) {
|
func (fsw *FilerStoreWrapper) AddPathSpecificStore(path string, store FilerStore) {
|
||||||
fsw.pathToStore.Put([]byte(path), store)
|
fsw.pathToStore.Put([]byte(path), store)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user