frostfs-node/pkg/services/object/range/prm.go
Leonard Lyubich 8791c4f0a5 [#53] object/range: Share object range traverser between services
Replace object range chain utilities to object/util package in order to
reuse it in other services.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-02 11:25:36 +03:00

45 lines
514 B
Go

package rangesvc
import (
"github.com/nspcc-dev/neofs-api-go/pkg/object"
)
type Prm struct {
local, full bool
addr *object.Address
rng *object.Range
}
func (p *Prm) OnlyLocal(v bool) *Prm {
if p != nil {
p.local = v
}
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
}
func (p *Prm) FullRange() *Prm {
if p != nil {
p.full = true
}
return p
}