frostfs-node/pkg/services/object/search/prm.go
Leonard Lyubich fb50362dcc [] services/object: Share common parameters across services
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 17:19:37 +03:00

32 lines
772 B
Go

package searchsvc
import (
"github.com/nspcc-dev/neofs-api-go/pkg/client"
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
)
// Prm groups parameters of Get service call.
type Prm struct {
writer IDListWriter
common *util.CommonPrm
client.SearchObjectParams
}
// IDListWriter is an interface of target component
// to write list of object identifiers.
type IDListWriter interface {
WriteIDs([]*objectSDK.ID) error
}
// SetCommonParameters sets common parameters of the operation.
func (p *Prm) SetCommonParameters(common *util.CommonPrm) {
p.common = common
}
// SetWriter sets target component to write list of object identifiers.
func (p *Prm) SetWriter(w IDListWriter) {
p.writer = w
}