diff --git a/client/container_list.go b/client/container_list.go index 4197d3d..ebe27c3 100644 --- a/client/container_list.go +++ b/client/container_list.go @@ -17,26 +17,26 @@ import ( // PrmContainerList groups parameters of ContainerList operation. type PrmContainerList struct { - prmCommonMeta + XHeaders []string - ownerSet bool - ownerID user.ID + Account *user.ID } // SetAccount sets identifier of the FrostFS account to list the containers. // Required parameter. +// +// Deprecated: Use PrmContainerList.Account instead. func (x *PrmContainerList) SetAccount(id user.ID) { - x.ownerID = id - x.ownerSet = true + x.Account = &id } func (x *PrmContainerList) buildRequest(c *Client) (*v2container.ListRequest, error) { - if !x.ownerSet { + if x.Account == nil { return nil, errorAccountNotSet } var ownerV2 refs.OwnerID - x.ownerID.WriteToV2(&ownerV2) + x.Account.WriteToV2(&ownerV2) reqBody := new(v2container.ListRequestBody) reqBody.SetOwnerID(&ownerV2) diff --git a/pool/pool.go b/pool/pool.go index a333711..9eb00b9 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -503,8 +503,9 @@ func (c *clientWrapper) containerList(ctx context.Context, prm PrmContainerList) return nil, err } - var cliPrm sdkClient.PrmContainerList - cliPrm.SetAccount(prm.ownerID) + cliPrm := sdkClient.PrmContainerList{ + Account: &prm.ownerID, + } start := time.Now() res, err := cl.ContainerList(ctx, cliPrm)