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
@@ -20,7 +20,7 @@ import (
"mstore/pkg/client"
"mstore/pkg/descr"
"mstore/pkg/term"
"mstore/pkg/terms"
)
const (
@@ -154,12 +154,12 @@ func (util *AccountUtil) createAccount(common *CommonAccountParams, params *Crea
}
fullRights := []string{
term.RightWriteAccounts,
term.RightReadAccounts,
term.RightWriteFiles,
term.RightReadFiles,
term.RightWriteImages,
term.RightReadImages,
terms.RightWriteAccounts,
terms.RightReadAccounts,
terms.RightWriteFiles,
terms.RightReadFiles,
terms.RightWriteImages,
terms.RightReadImages,
}
for _, right := range fullRights {
id, err := client.NewClient().CreateGrantByAccountID(ctx, hostname, accountID, right, ".*")
+12 -12
View File
@@ -27,7 +27,7 @@ import (
"mstore/pkg/client"
"mstore/pkg/descr"
"mstore/pkg/term"
"mstore/pkg/terms"
)
func (util *FileUtil) CreateFileCmds() *cobra.Command {
@@ -341,11 +341,11 @@ func (util *FileUtil) listFiles(common *CommonFileParams, params *ListFilesParam
var pathUsage string
switch {
case params.AsRegexp:
pathUsage = term.AsRegexp
pathUsage = terms.AsRegexp
case params.AsPrefix:
pathUsage = term.AsPrefix
pathUsage = terms.AsPrefix
default:
pathUsage = term.AsFinePath
pathUsage = terms.AsFinePath
}
timeout := time.Duration(common.Timeout) * time.Second
ctx, _ := context.WithTimeout(context.Background(), timeout)
@@ -467,11 +467,11 @@ func (util *FileUtil) exportFiles(common *CommonFileParams, params *ExportFilesP
var pathUsage string
switch {
case params.AsRegexp:
pathUsage = term.AsRegexp
pathUsage = terms.AsRegexp
case params.AsPrefix:
pathUsage = term.AsPrefix
pathUsage = terms.AsPrefix
default:
pathUsage = term.AsFinePath
pathUsage = terms.AsFinePath
}
timeout := time.Duration(common.Timeout) * time.Second
ctx, _ := context.WithTimeout(context.Background(), timeout)
@@ -556,11 +556,11 @@ func (util *FileUtil) listCollections(common *CommonFileParams, params *ListColl
var pathUsage string
switch {
case params.AsRegexp:
pathUsage = term.AsRegexp
pathUsage = terms.AsRegexp
case params.AsPrefix:
pathUsage = term.AsPrefix
pathUsage = terms.AsPrefix
default:
pathUsage = term.AsFinePath
pathUsage = terms.AsFinePath
}
timeout := time.Duration(common.Timeout) * time.Second
ctx, _ := context.WithTimeout(context.Background(), timeout)
@@ -606,9 +606,9 @@ func (util *FileUtil) deleteCollection(common *CommonFileParams, params *DeleteC
var pathUsage string
switch {
case params.AsPrefix:
pathUsage = term.AsPrefix
pathUsage = terms.AsPrefix
default:
pathUsage = term.AsFinePath
pathUsage = terms.AsFinePath
}
files, err := client.NewClient().DeleteCollection(ctx, params.Path, pathUsage, params.DryRun)
if err != nil {