[#291] container: Rename field Account to OwnerID in PrmContainerList
Renaming this field so that it matches PrmContainerListStream. Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
parent
852dac1476
commit
c4463df8d4
2 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,7 @@ import (
|
|||
type PrmContainerList struct {
|
||||
XHeaders []string
|
||||
|
||||
Account user.ID
|
||||
OwnerID user.ID
|
||||
|
||||
Session *session.Container
|
||||
}
|
||||
|
@ -28,18 +28,18 @@ type PrmContainerList struct {
|
|||
// SetAccount sets identifier of the FrostFS account to list the containers.
|
||||
// Required parameter.
|
||||
//
|
||||
// Deprecated: Use PrmContainerList.Account instead.
|
||||
// Deprecated: Use PrmContainerList.OwnerID instead.
|
||||
func (x *PrmContainerList) SetAccount(id user.ID) {
|
||||
x.Account = id
|
||||
x.OwnerID = id
|
||||
}
|
||||
|
||||
func (x *PrmContainerList) buildRequest(c *Client) (*v2container.ListRequest, error) {
|
||||
if x.Account.IsEmpty() {
|
||||
if x.OwnerID.IsEmpty() {
|
||||
return nil, errorAccountNotSet
|
||||
}
|
||||
|
||||
var ownerV2 refs.OwnerID
|
||||
x.Account.WriteToV2(&ownerV2)
|
||||
x.OwnerID.WriteToV2(&ownerV2)
|
||||
|
||||
reqBody := new(v2container.ListRequestBody)
|
||||
reqBody.SetOwnerID(&ownerV2)
|
||||
|
|
|
@ -515,7 +515,7 @@ func (c *clientWrapper) containerList(ctx context.Context, prm PrmContainerList)
|
|||
}
|
||||
|
||||
cliPrm := sdkClient.PrmContainerList{
|
||||
Account: prm.OwnerID,
|
||||
OwnerID: prm.OwnerID,
|
||||
Session: prm.Session,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue