feat: alist v3 index permission (#2653)

* feat: alist v3 index permission

* fix allowIndexed check

Co-authored-by: Noah Hsu <i@nn.ci>
This commit is contained in:
BoYanZh
2022-12-10 19:03:09 +08:00
committed by GitHub
parent 446f82888c
commit 62ea93837c
5 changed files with 30 additions and 10 deletions

View File

@ -21,6 +21,10 @@ import (
// so it should actually be a storage, just wrapped by the driver
var storagesMap generic_sync.MapOf[string, driver.Driver]
func GetAllStorages() []driver.Driver {
return storagesMap.Values()
}
func GetStorageByVirtualPath(virtualPath string) (driver.Driver, error) {
storageDriver, ok := storagesMap.Load(virtualPath)
if !ok {