[#326] client: Provide pointers requests for signing

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-08-29 12:43:10 +03:00 committed by fyrchik
parent 456167e777
commit cf7bee3087
3 changed files with 3 additions and 3 deletions

View file

@ -146,7 +146,7 @@ func (c *Client) ObjectDelete(ctx context.Context, prm PrmObjectDelete) (*ResObj
key = prm.key
}
err := signature.SignServiceMessage(&key, req)
err := signature.SignServiceMessage(&key, &req)
if err != nil {
return nil, fmt.Errorf("sign request: %w", err)
}

View file

@ -433,7 +433,7 @@ func (c *Client) ObjectHead(ctx context.Context, prm PrmObjectHead) (*ResObjectH
}
// sign the request
err := signature.SignServiceMessage(&key, req)
err := signature.SignServiceMessage(&key, &req)
if err != nil {
return nil, fmt.Errorf("sign request: %w", err)
}

View file

@ -176,7 +176,7 @@ func (c *Client) ObjectHash(ctx context.Context, prm PrmObjectHash) (*ResObjectH
c.prepareRequest(&req, &prm.meta)
req.SetBody(&prm.body)
err := signature.SignServiceMessage(&c.prm.key, req)
err := signature.SignServiceMessage(&c.prm.key, &req)
if err != nil {
return nil, fmt.Errorf("sign request: %w", err)
}