forked from TrueCloudLab/frostfs-node
[#1423] session: Upgrade SDK package
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
dda56f1319
commit
4c8ec20e32
41 changed files with 740 additions and 663 deletions
|
@ -18,20 +18,19 @@ func Delete(c *Client, witness core.RemovalWitness) error {
|
|||
return errNilArgument
|
||||
}
|
||||
|
||||
binToken, err := witness.SessionToken().Marshal()
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not marshal session token: %w", err)
|
||||
}
|
||||
|
||||
binCnr := make([]byte, sha256.Size)
|
||||
id.Encode(binCnr)
|
||||
|
||||
return c.Delete(
|
||||
DeletePrm{
|
||||
cid: binCnr,
|
||||
signature: witness.Signature(),
|
||||
token: binToken,
|
||||
})
|
||||
var prm DeletePrm
|
||||
|
||||
prm.SetCID(binCnr)
|
||||
prm.SetSignature(witness.Signature())
|
||||
|
||||
if tok := witness.SessionToken(); tok != nil {
|
||||
prm.SetToken(tok.Marshal())
|
||||
}
|
||||
|
||||
return c.Delete(prm)
|
||||
}
|
||||
|
||||
// DeletePrm groups parameters of Delete client operation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue