forked from TrueCloudLab/frostfs-node
[#525] morph/container: Accept container session token in Put
`Put` method of latest `Container` contract accepts binary session token as an argument. Provide `PutArgs.SetSessionToken` method. Accept session token as a `[]byte` in `Wrapper.Put` method and attach it to `PutArgs`. Marshal session token from container in `wrapper.Put` function and pass it to the method. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
1deb3f3d01
commit
db67a117f0
3 changed files with 17 additions and 4 deletions
|
@ -36,6 +36,13 @@ func (p *PutArgs) SetSignature(v []byte) {
|
|||
p.sig = v
|
||||
}
|
||||
|
||||
// SetSessionToken sets token of the session
|
||||
// within which the container was created
|
||||
// in a binary format.
|
||||
func (p *PutArgs) SetSessionToken(v []byte) {
|
||||
p.token = v
|
||||
}
|
||||
|
||||
// Put invokes the call of put container method
|
||||
// of NeoFS Container contract.
|
||||
func (c *Client) Put(args PutArgs) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue