[#525] morph/container: Accept container session token in Delete

`Delete` method of latest `Container` contract accepts binary session token
as an argument.

Provide `DeleteArgs.SetSessionToken` method. Accept session token as a
`[]byte` in `Wrapper.Put` method and attach it to `PutArgs`. Marshal session
token from `RemovalWitness` in `wrapper.Delete` function and pass it to the
method.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-26 14:01:38 +03:00 committed by Leonard Lyubich
parent 166e5440ab
commit 631d7b0e07
3 changed files with 17 additions and 4 deletions

View file

@ -26,6 +26,13 @@ func (p *DeleteArgs) SetSignature(v []byte) {
p.sig = v
}
// SetSessionToken sets token of the session
// within which the container was removed
// in a NeoFS API binary format.
func (p *DeleteArgs) SetSessionToken(v []byte) {
p.token = v
}
// Delete invokes the call of delete container
// method of NeoFS Container contract.
func (c *Client) Delete(args DeleteArgs) error {