forked from TrueCloudLab/frostfs-node
2da323c4b9
Add session token field to CommonPrm. Remove session token field from Put parameters. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
43 lines
693 B
Go
43 lines
693 B
Go
package putsvc
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neofs-node/pkg/core/object"
|
|
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
|
|
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement"
|
|
)
|
|
|
|
type PutInitPrm struct {
|
|
common *util.CommonPrm
|
|
|
|
hdr *object.RawObject
|
|
|
|
traverseOpts []placement.Option
|
|
}
|
|
|
|
type PutChunkPrm struct {
|
|
chunk []byte
|
|
}
|
|
|
|
func (p *PutInitPrm) WithCommonPrm(v *util.CommonPrm) *PutInitPrm {
|
|
if p != nil {
|
|
p.common = v
|
|
}
|
|
|
|
return p
|
|
}
|
|
|
|
func (p *PutInitPrm) WithObject(v *object.RawObject) *PutInitPrm {
|
|
if p != nil {
|
|
p.hdr = v
|
|
}
|
|
|
|
return p
|
|
}
|
|
|
|
func (p *PutChunkPrm) WithChunk(v []byte) *PutChunkPrm {
|
|
if p != nil {
|
|
p.chunk = v
|
|
}
|
|
|
|
return p
|
|
}
|