forked from TrueCloudLab/frostfs-sdk-go
[#146] client: Customize private key in object HEAD/DELETE
We should provide the ability to customize private of object HEAD / DELETE ops. Implement `UseKey` method on `PrmObjectHead` / `PrmObjectDelete` types. Sign requests with the specified key if called. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
b0f7f75929
commit
e1c73fd43d
3 changed files with 40 additions and 2 deletions
|
@ -262,6 +262,11 @@ func (x *contextCall) processCall() bool {
|
|||
// initializes static cross-call parameters inherited from client.
|
||||
func (c *Client) initCallContext(ctx *contextCall) {
|
||||
ctx.key = *c.opts.key
|
||||
c.initCallContextWithoutKey(ctx)
|
||||
}
|
||||
|
||||
// initializes static cross-call parameters inherited from client except private key.
|
||||
func (c *Client) initCallContextWithoutKey(ctx *contextCall) {
|
||||
ctx.resolveAPIFailures = c.opts.parseNeoFSErrors
|
||||
ctx.callbackResp = c.opts.cbRespInfo
|
||||
ctx.netMagic = c.opts.netMagic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue