Nikita Zinkevich
1be92fa4be
Some checks failed
/ DCO (pull_request) Successful in 4m21s
/ Vulncheck (pull_request) Successful in 4m31s
/ Builds (pull_request) Successful in 1m35s
/ Lint (pull_request) Successful in 2m56s
/ Tests (pull_request) Successful in 1m57s
/ Builds (push) Has been cancelled
/ Lint (push) Has been cancelled
/ Tests (push) Has been cancelled
/ Vulncheck (push) Has been cancelled
Prioritize getting s3 object with the key, which equals to valid FrostFS OID, rather than getting non-existent object with OID via native protocol for GET and HEAD requests Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
24 lines
871 B
Go
24 lines
871 B
Go
package layer
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/internal/data"
|
|
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
|
)
|
|
|
|
// TreeService provide interface to interact with tree service using s3 data models.
|
|
type TreeService interface {
|
|
GetLatestVersion(ctx context.Context, cnrID *cid.ID, objectName string) (*data.NodeVersion, error)
|
|
GetSubTreeByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string, latestOnly bool) ([]data.NodeInfo, string, error)
|
|
CheckSettingsNodeExists(ctx context.Context, bktInfo *data.BucketInfo) error
|
|
}
|
|
|
|
var (
|
|
// ErrNodeNotFound is returned from Tree service in case of not found error.
|
|
ErrNodeNotFound = errors.New("not found")
|
|
|
|
// ErrNodeAccessDenied is returned from Tree service in case of access denied error.
|
|
ErrNodeAccessDenied = errors.New("access denied")
|
|
)
|