[#291] container: Rename field Account to OwnerID in PrmContainerList
All checks were successful
DCO / DCO (pull_request) Successful in 1m27s
Tests and linters / Tests (pull_request) Successful in 1m46s
Tests and linters / Lint (pull_request) Successful in 2m18s

Renaming this field so that it matches PrmContainerListStream.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
Ekaterina Lebedeva 2024-12-10 12:18:06 +03:00
parent 83b26b08b9
commit 5e7bc0588e
2 changed files with 6 additions and 6 deletions

View file

@ -20,7 +20,7 @@ import (
type PrmContainerList struct { type PrmContainerList struct {
XHeaders []string XHeaders []string
Account user.ID OwnerID user.ID
Session *session.Container Session *session.Container
} }
@ -28,18 +28,18 @@ type PrmContainerList struct {
// SetAccount sets identifier of the FrostFS account to list the containers. // SetAccount sets identifier of the FrostFS account to list the containers.
// Required parameter. // Required parameter.
// //
// Deprecated: Use PrmContainerList.Account instead. // Deprecated: Use PrmContainerList.OwnerID instead.
func (x *PrmContainerList) SetAccount(id user.ID) { func (x *PrmContainerList) SetAccount(id user.ID) {
x.Account = id x.OwnerID = id
} }
func (x *PrmContainerList) buildRequest(c *Client) (*v2container.ListRequest, error) { func (x *PrmContainerList) buildRequest(c *Client) (*v2container.ListRequest, error) {
if x.Account.IsEmpty() { if x.OwnerID.IsEmpty() {
return nil, errorAccountNotSet return nil, errorAccountNotSet
} }
var ownerV2 refs.OwnerID var ownerV2 refs.OwnerID
x.Account.WriteToV2(&ownerV2) x.OwnerID.WriteToV2(&ownerV2)
reqBody := new(v2container.ListRequestBody) reqBody := new(v2container.ListRequestBody)
reqBody.SetOwnerID(&ownerV2) reqBody.SetOwnerID(&ownerV2)

View file

@ -515,7 +515,7 @@ func (c *clientWrapper) containerList(ctx context.Context, prm PrmContainerList)
} }
cliPrm := sdkClient.PrmContainerList{ cliPrm := sdkClient.PrmContainerList{
Account: prm.OwnerID, OwnerID: prm.OwnerID,
Session: prm.Session, Session: prm.Session,
} }