2023-05-05 08:19:35 +00:00
|
|
|
package layer
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"errors"
|
|
|
|
|
2023-08-31 08:37:03 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-http-gw/internal/api"
|
2023-05-05 08:19:35 +00:00
|
|
|
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")
|
|
|
|
)
|