working commit

This commit is contained in:
2026-02-21 13:16:30 +02:00
parent cd37a4508c
commit d650d58a6d
1149 changed files with 116 additions and 722633 deletions
+7 -7
View File
@@ -24,7 +24,7 @@ import (
"mstore/pkg/auxtool"
"mstore/pkg/auxuuid"
"mstore/pkg/descr"
"mstore/pkg/term"
"mstore/pkg/terms"
)
// FileInfo
@@ -300,14 +300,14 @@ func (oper *Operator) ListFiles(ctx context.Context, operatorID string, params *
Files: make([]descr.File, 0),
}
switch params.PathAs {
case term.AsRegexp:
case terms.AsRegexp:
files, err := oper.listFilesWithRegex(ctx, params.Filepath)
if err != nil {
code := http.StatusInternalServerError
return code, res, err
}
res.Files = files
case term.AsPrefix:
case terms.AsPrefix:
params.Filepath, err = cleanFilepath(params.Filepath)
if err != nil {
code := http.StatusInternalServerError
@@ -414,13 +414,13 @@ func (oper *Operator) ListCollections(ctx context.Context, operatorID string, pa
collectionList := make([]string, 0)
switch param.PathAS {
case term.AsRegexp:
case terms.AsRegexp:
collectionList, err = oper.listCollectionsWithRegexp(ctx, param.Path)
if err != nil {
code := http.StatusInternalServerError
return code, res, err
}
case term.AsPrefix:
case terms.AsPrefix:
param.Path, err = cleanFilepath(param.Path)
if err != nil {
code := http.StatusInternalServerError
@@ -545,7 +545,7 @@ func (oper *Operator) DeleteColletion(ctx context.Context, operatorID string, pa
Files: make([]descr.File, 0),
}
switch param.PathAs {
case term.AsRegexp:
case terms.AsRegexp:
collections, err := oper.listCollectionsWithRegexp(ctx, param.Path)
if err != nil {
code := http.StatusInternalServerError
@@ -562,7 +562,7 @@ func (oper *Operator) DeleteColletion(ctx context.Context, operatorID string, pa
}
res.Files = allfiles
case term.AsPrefix:
case terms.AsPrefix:
param.Path, err = cleanFilepath(param.Path)
if err != nil {
code := http.StatusInternalServerError