frostfs-node/pkg/services/object/delete/prm.go
Pavel Karpy 923f84722a Move to frostfs-node
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-28 15:04:29 +03:00

35 lines
878 B
Go

package deletesvc
import (
"github.com/TrueCloudLab/frostfs-node/pkg/services/object/util"
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
)
// TombstoneAddressWriter is an interface of tombstone address setter.
type TombstoneAddressWriter interface {
SetAddress(address oid.Address)
}
// Prm groups parameters of Delete service call.
type Prm struct {
common *util.CommonPrm
addr oid.Address
tombAddrWriter TombstoneAddressWriter
}
// SetCommonParameters sets common parameters of the operation.
func (p *Prm) SetCommonParameters(common *util.CommonPrm) {
p.common = common
}
// WithAddress sets address of the object to be removed.
func (p *Prm) WithAddress(addr oid.Address) {
p.addr = addr
}
// WithTombstoneAddressTarget sets tombstone address destination.
func (p *Prm) WithTombstoneAddressTarget(w TombstoneAddressWriter) {
p.tombAddrWriter = w
}