forked from TrueCloudLab/frostfs-api-go
[#140] sdk: Refactor reference types
Refactor v2-compatible reference types to be wrappers over corresponding types from v2. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2026473733
commit
524280a5e8
10 changed files with 73 additions and 215 deletions
|
@ -262,10 +262,7 @@ func (c *Client) putObjectV2(ctx context.Context, p *PutObjectParams, opts ...Ca
|
|||
}
|
||||
|
||||
// convert object identifier
|
||||
id, err := object.IDFromV2(resp.GetBody().GetObjectID())
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not convert object identifier")
|
||||
}
|
||||
id := object.NewIDFromV2(resp.GetBody().GetObjectID())
|
||||
|
||||
return id, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue