forked from TrueCloudLab/frostfs-node
[#14] Adopt stackitems in morph requests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
0c06eafc60
commit
29d6ababae
9 changed files with 23 additions and 22 deletions
|
@ -42,7 +42,7 @@ func (c *Client) EACL(args EACLArgs) (*EACLValues, error) {
|
|||
return nil, errors.Errorf("unexpected stack item count (%s): %d", c.eaclMethod, ln)
|
||||
}
|
||||
|
||||
eacl, err := client.BytesFromStackParameter(prms[0])
|
||||
eacl, err := client.BytesFromStackItem(prms[0])
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "could not get byte array from stack item (%s)", c.eaclMethod)
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ func (c *Client) Get(args GetArgs) (*GetValues, error) {
|
|||
return nil, errors.Errorf("unexpected stack item count (%s): %d", c.getMethod, ln)
|
||||
}
|
||||
|
||||
cnrBytes, err := client.BytesFromStackParameter(prms[0])
|
||||
cnrBytes, err := client.BytesFromStackItem(prms[0])
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "could not get byte array from stack item (%s)", c.getMethod)
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ func (c *Client) List(args ListArgs) (*ListValues, error) {
|
|||
return nil, errors.Errorf("unexpected stack item count (%s): %d", c.listMethod, ln)
|
||||
}
|
||||
|
||||
prms, err = client.ArrayFromStackParameter(prms[0])
|
||||
prms, err = client.ArrayFromStackItem(prms[0])
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "could not get stack item array from stack item (%s)", c.listMethod)
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ func (c *Client) List(args ListArgs) (*ListValues, error) {
|
|||
}
|
||||
|
||||
for i := range prms {
|
||||
cid, err := client.BytesFromStackParameter(prms[i])
|
||||
cid, err := client.BytesFromStackItem(prms[i])
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "could not get byte array from stack item (%s)", c.listMethod)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue