forked from TrueCloudLab/frostfs-node
[#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:
parent
166e5440ab
commit
631d7b0e07
3 changed files with 17 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue