frostfs-node/pkg/services/object/acl/eacl/v2/localstore.go
Pavel Karpy 99b31e3235 [#1111] object/acl: Refactor service
Make all operations that related to `neofs-api-go` library be placed in `v2`
packages. They parse all v2-versioned structs info `neofs-sdk-go`
abstractions and pass them to the corresponding `acl`/`eacl` packages. `v2`
packages are the only packages that do import `neofs-api-go` library. `eacl`
and `acl` provide public functions that only accepts `sdk` structures.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-03-05 10:06:14 +03:00

21 lines
456 B
Go

package v2
import (
"io"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
objectSDKAddress "github.com/nspcc-dev/neofs-sdk-go/object/address"
)
type localStorage struct {
ls *engine.StorageEngine
}
func (s *localStorage) Head(addr *objectSDKAddress.Address) (*objectSDK.Object, error) {
if s.ls == nil {
return nil, io.ErrUnexpectedEOF
}
return engine.Head(s.ls, addr)
}