[#176] localstore: Fix linter's remarks
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f194c840d7
commit
4518357ad7
3 changed files with 4 additions and 7 deletions
|
@ -4,13 +4,12 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DeletePrm groups the parameters of Delete operation.
|
// DeletePrm groups the parameters of Delete operation.
|
||||||
type DeletePrm struct {
|
type DeletePrm struct {
|
||||||
addr *objectSDK.Address
|
addr *object.Address
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteRes groups resulting values of Delete operation.
|
// DeleteRes groups resulting values of Delete operation.
|
||||||
|
@ -19,7 +18,7 @@ type DeleteRes struct{}
|
||||||
// WithAddress is a Delete option to set the address of the object to delete.
|
// WithAddress is a Delete option to set the address of the object to delete.
|
||||||
//
|
//
|
||||||
// Option is required.
|
// Option is required.
|
||||||
func (p *DeletePrm) WithAddress(addr *objectSDK.Address) *DeletePrm {
|
func (p *DeletePrm) WithAddress(addr *object.Address) *DeletePrm {
|
||||||
if p != nil {
|
if p != nil {
|
||||||
p.addr = addr
|
p.addr = addr
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
|
||||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -18,7 +17,7 @@ type SelectRes struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithFilters is a Select option to set the object filters.
|
// WithFilters is a Select option to set the object filters.
|
||||||
func (p *SelectPrm) WithFilters(fs objectSDK.SearchFilters) *SelectPrm {
|
func (p *SelectPrm) WithFilters(fs object.SearchFilters) *SelectPrm {
|
||||||
if p != nil {
|
if p != nil {
|
||||||
p.filters = fs
|
p.filters = fs
|
||||||
}
|
}
|
||||||
|
@ -27,7 +26,7 @@ func (p *SelectPrm) WithFilters(fs objectSDK.SearchFilters) *SelectPrm {
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddressList returns list of addresses of the selected objects.
|
// AddressList returns list of addresses of the selected objects.
|
||||||
func (r *SelectRes) AddressList() []*objectSDK.Address {
|
func (r *SelectRes) AddressList() []*object.Address {
|
||||||
return r.addrList
|
return r.addrList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,6 @@ func (s *Shard) Get(prm *GetPrm) (*GetRes, error) {
|
||||||
if prm.ln < 0 {
|
if prm.ln < 0 {
|
||||||
// try to read from WriteCache
|
// try to read from WriteCache
|
||||||
// TODO: implement
|
// TODO: implement
|
||||||
|
|
||||||
res, err := s.blobStor.Get(
|
res, err := s.blobStor.Get(
|
||||||
new(blobstor.GetPrm).
|
new(blobstor.GetPrm).
|
||||||
WithAddress(prm.addr),
|
WithAddress(prm.addr),
|
||||||
|
|
Loading…
Reference in a new issue