[#1786] engine: Unify parameter setters

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-09-14 17:36:37 +03:00 committed by fyrchik
parent b064fb24d8
commit 5321f8ef9c
7 changed files with 16 additions and 42 deletions

View file

@ -23,18 +23,14 @@ type DeleteRes struct{}
//
// Option is required.
func (p *DeletePrm) WithAddress(addr oid.Address) {
if p != nil {
p.addr = addr
}
p.addr = addr
}
// WithForceRemoval is a Delete option to remove an object despite any
// restrictions imposed on deleting that object. Expected to be used
// only in control service.
func (p *DeletePrm) WithForceRemoval() {
if p != nil {
p.forceRemoval = true
}
p.forceRemoval = true
}
// Delete marks the objects to be removed.