2020-09-30 10:52:14 +00:00
|
|
|
package deletesvc
|
|
|
|
|
|
|
|
import (
|
2023-03-07 13:38:26 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
|
|
|
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
2020-09-30 10:52:14 +00:00
|
|
|
)
|
|
|
|
|
2021-11-01 08:35:33 +00:00
|
|
|
// TombstoneAddressWriter is an interface of tombstone address setter.
|
|
|
|
type TombstoneAddressWriter interface {
|
2022-05-31 17:00:41 +00:00
|
|
|
SetAddress(address oid.Address)
|
2021-11-01 08:35:33 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 08:04:04 +00:00
|
|
|
// Prm groups parameters of Delete service call.
|
2020-09-30 10:52:14 +00:00
|
|
|
type Prm struct {
|
|
|
|
common *util.CommonPrm
|
|
|
|
|
2022-05-31 17:00:41 +00:00
|
|
|
addr oid.Address
|
2021-11-01 08:35:33 +00:00
|
|
|
|
|
|
|
tombAddrWriter TombstoneAddressWriter
|
2020-09-30 10:52:14 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 08:04:04 +00:00
|
|
|
// SetCommonParameters sets common parameters of the operation.
|
|
|
|
func (p *Prm) SetCommonParameters(common *util.CommonPrm) {
|
|
|
|
p.common = common
|
2020-09-30 10:52:14 +00:00
|
|
|
}
|
2021-11-01 08:35:33 +00:00
|
|
|
|
|
|
|
// WithAddress sets address of the object to be removed.
|
2022-05-31 17:00:41 +00:00
|
|
|
func (p *Prm) WithAddress(addr oid.Address) {
|
2021-11-01 08:35:33 +00:00
|
|
|
p.addr = addr
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithTombstoneAddressTarget sets tombstone address destination.
|
|
|
|
func (p *Prm) WithTombstoneAddressTarget(w TombstoneAddressWriter) {
|
|
|
|
p.tombAddrWriter = w
|
|
|
|
}
|