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

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

Provide `SetEACLArgs.SetSessionToken` method. Accept session token as a
`[]byte` in `Wrapper.PutEACL` method and attach it to `SetEACLArgs`. Marshal
session token from container in `wrapper.PutEACL` function and pass it to
the method.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-25 19:16:57 +03:00 committed by Leonard Lyubich
parent c4a3adc8b0
commit 959610080a
3 changed files with 17 additions and 4 deletions

View file

@ -34,6 +34,13 @@ func (p *SetEACLArgs) SetPublicKey(v []byte) {
p.pubkey = v
}
// SetSessionToken sets token of the session
// within which the eACL table was set
// in a binary format.
func (p *SetEACLArgs) SetSessionToken(v []byte) {
p.token = v
}
// SetEACL invokes the call of set eACL method
// of NeoFS Container contract.
func (c *Client) SetEACL(args SetEACLArgs) error {