-
Notifications
You must be signed in to change notification settings - Fork 38
/
prm.go
35 lines (27 loc) · 868 Bytes
/
prm.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package deletesvc
import (
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
oid "github.com/nspcc-dev/neofs-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
}