2020-09-22 06:51:47 +00:00
|
|
|
package searchsvc
|
|
|
|
|
|
|
|
import (
|
2020-12-10 12:26:40 +00:00
|
|
|
"github.com/nspcc-dev/neofs-api-go/pkg/client"
|
|
|
|
objectSDK "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-22 06:51:47 +00:00
|
|
|
)
|
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
// Prm groups parameters of Get service call.
|
2020-09-22 06:51:47 +00:00
|
|
|
type Prm struct {
|
2020-12-10 12:26:40 +00:00
|
|
|
writer IDListWriter
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
common *util.CommonPrm
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
client.SearchObjectParams
|
|
|
|
}
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
// IDListWriter is an interface of target component
|
|
|
|
// to write list of object identifiers.
|
|
|
|
type IDListWriter interface {
|
|
|
|
WriteIDs([]*objectSDK.ID) error
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
// SetCommonParameters sets common parameters of the operation.
|
|
|
|
func (p *Prm) SetCommonParameters(common *util.CommonPrm) {
|
|
|
|
p.common = common
|
|
|
|
}
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
// SetWriter sets target component to write list of object identifiers.
|
|
|
|
func (p *Prm) SetWriter(w IDListWriter) {
|
|
|
|
p.writer = w
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|