forked from TrueCloudLab/frostfs-node
[#243] services/object: Share common parameters across services
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
a01262d8bd
commit
fb50362dcc
12 changed files with 89 additions and 163 deletions
|
@ -1,20 +1,14 @@
|
|||
package deletesvc
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/client"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
|
||||
)
|
||||
|
||||
// Prm groups parameters of Delete service call.
|
||||
type Prm struct {
|
||||
key *ecdsa.PrivateKey
|
||||
|
||||
common *util.CommonPrm
|
||||
|
||||
callOpts []client.CallOption
|
||||
|
||||
client.DeleteObjectParams
|
||||
}
|
||||
|
||||
|
@ -22,13 +16,3 @@ type Prm struct {
|
|||
func (p *Prm) SetCommonParameters(common *util.CommonPrm) {
|
||||
p.common = common
|
||||
}
|
||||
|
||||
// SetPrivateKey sets private key to use during execution.
|
||||
func (p *Prm) SetPrivateKey(key *ecdsa.PrivateKey) {
|
||||
p.key = key
|
||||
}
|
||||
|
||||
// SetRemoteCallOptions sets call options of remote client calls.
|
||||
func (p *Prm) SetRemoteCallOptions(opts ...client.CallOption) {
|
||||
p.callOpts = opts
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue