[#211] blobstor: Refactor GetBig parameters and result
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
fb6857a1cb
commit
6813f40665
3 changed files with 44 additions and 23 deletions
33
pkg/local_object_storage/blobstor/util.go
Normal file
33
pkg/local_object_storage/blobstor/util.go
Normal file
|
@ -0,0 +1,33 @@
|
|||
package blobstor
|
||||
|
||||
import (
|
||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/object"
|
||||
)
|
||||
|
||||
type address struct {
|
||||
addr *objectSDK.Address
|
||||
}
|
||||
|
||||
// SetAddress sets the address of the requested object.
|
||||
func (a *address) SetAddress(addr *objectSDK.Address) {
|
||||
a.addr = addr
|
||||
}
|
||||
|
||||
type roObject struct {
|
||||
obj *object.Object
|
||||
}
|
||||
|
||||
// Object returns the object.
|
||||
func (o roObject) Object() *object.Object {
|
||||
return o.obj
|
||||
}
|
||||
|
||||
type rwObject struct {
|
||||
roObject
|
||||
}
|
||||
|
||||
// SetObject sets the object.
|
||||
func (o *rwObject) SetObject(obj *object.Object) {
|
||||
o.obj = obj
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue