[#233] Fix browsing
All checks were successful
/ DCO (pull_request) Successful in 39s
/ Vulncheck (pull_request) Successful in 59s
/ Builds (pull_request) Successful in 51s
/ OCI image (pull_request) Successful in 1m29s
/ Lint (pull_request) Successful in 2m27s
/ Tests (pull_request) Successful in 1m30s
/ Integration tests (pull_request) Successful in 6m10s
/ Vulncheck (push) Successful in 58s
/ Builds (push) Successful in 1m4s
/ OCI image (push) Successful in 1m28s
/ Lint (push) Successful in 2m13s
/ Tests (push) Successful in 1m11s
/ Integration tests (push) Successful in 5m56s
All checks were successful
/ DCO (pull_request) Successful in 39s
/ Vulncheck (pull_request) Successful in 59s
/ Builds (pull_request) Successful in 51s
/ OCI image (pull_request) Successful in 1m29s
/ Lint (pull_request) Successful in 2m27s
/ Tests (pull_request) Successful in 1m30s
/ Integration tests (pull_request) Successful in 6m10s
/ Vulncheck (push) Successful in 58s
/ Builds (push) Successful in 1m4s
/ OCI image (push) Successful in 1m28s
/ Lint (push) Successful in 2m13s
/ Tests (push) Successful in 1m11s
/ Integration tests (push) Successful in 5m56s
Simplify tree listing (we need only nodes in exactly the same parent level) Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
e579549b41
commit
dbb1bcad00
11 changed files with 302 additions and 151 deletions
|
@ -6,9 +6,9 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/internal/layer"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/tokens"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/tree"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/utils"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/bearer"
|
||||
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
|
@ -93,7 +93,7 @@ func formErrorResponse(err error) (string, int) {
|
|||
switch {
|
||||
case errors.Is(err, ErrAccessDenied):
|
||||
return fmt.Sprintf("Storage Access Denied:\n%v", err), fasthttp.StatusForbidden
|
||||
case errors.Is(err, layer.ErrNodeAccessDenied):
|
||||
case errors.Is(err, tree.ErrNodeAccessDenied):
|
||||
return fmt.Sprintf("Tree Access Denied:\n%v", err), fasthttp.StatusForbidden
|
||||
case errors.Is(err, ErrQuotaLimitReached):
|
||||
return fmt.Sprintf("Quota Reached:\n%v", err), fasthttp.StatusConflict
|
||||
|
@ -101,7 +101,7 @@ func formErrorResponse(err error) (string, int) {
|
|||
return fmt.Sprintf("Container Not Found:\n%v", err), fasthttp.StatusNotFound
|
||||
case errors.Is(err, ErrObjectNotFound):
|
||||
return fmt.Sprintf("Object Not Found:\n%v", err), fasthttp.StatusNotFound
|
||||
case errors.Is(err, layer.ErrNodeNotFound):
|
||||
case errors.Is(err, tree.ErrNodeNotFound):
|
||||
return fmt.Sprintf("Tree Node Not Found:\n%v", err), fasthttp.StatusNotFound
|
||||
case errors.Is(err, ErrGatewayTimeout):
|
||||
return fmt.Sprintf("Gateway Timeout:\n%v", err), fasthttp.StatusGatewayTimeout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue