frostfs-node/pkg/services/object/search/prm.go
Leonard Lyubich 39c17253be [#57] services/object: Combine common service parameters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-02 11:25:36 +03:00

39 lines
591 B
Go

package searchsvc
import (
"github.com/nspcc-dev/neofs-api-go/pkg/container"
"github.com/nspcc-dev/neofs-node/pkg/services/object/search/query"
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
)
type Prm struct {
common *util.CommonPrm
cid *container.ID
query query.Query
}
func (p *Prm) WithContainerID(v *container.ID) *Prm {
if p != nil {
p.cid = v
}
return p
}
func (p *Prm) WithSearchQuery(v query.Query) *Prm {
if p != nil {
p.query = v
}
return p
}
func (p *Prm) WithCommonPrm(v *util.CommonPrm) *Prm {
if p != nil {
p.common = v
}
return p
}