frostfs-http-gw/api/layer/tree_service.go
Pavel Pogodaev 8c3c3782f5 [#30] add object name resolving
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2023-05-12 12:52:57 +03:00

22 lines
650 B
Go

package layer
import (
"context"
"errors"
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/api"
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) (*api.NodeVersion, 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")
)