2020-09-25 13:04:55 +00:00
|
|
|
package rangesvc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
2020-09-29 15:05:22 +00:00
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
|
2020-09-25 13:04:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Prm struct {
|
2020-09-29 15:05:22 +00:00
|
|
|
common *util.CommonPrm
|
|
|
|
|
|
|
|
full bool
|
2020-09-25 13:04:55 +00:00
|
|
|
|
|
|
|
addr *object.Address
|
|
|
|
|
|
|
|
rng *object.Range
|
|
|
|
}
|
|
|
|
|
2020-09-29 15:05:22 +00:00
|
|
|
func (p *Prm) WithCommonPrm(v *util.CommonPrm) *Prm {
|
2020-09-25 13:04:55 +00:00
|
|
|
if p != nil {
|
2020-09-29 15:05:22 +00:00
|
|
|
p.common = v
|
2020-09-25 13:04:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Prm) WithAddress(v *object.Address) *Prm {
|
|
|
|
if p != nil {
|
|
|
|
p.addr = v
|
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Prm) WithRange(v *object.Range) *Prm {
|
|
|
|
if p != nil {
|
|
|
|
p.rng = v
|
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
2020-09-26 07:53:08 +00:00
|
|
|
|
|
|
|
func (p *Prm) FullRange() *Prm {
|
|
|
|
if p != nil {
|
|
|
|
p.full = true
|
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|