container: Add ListStream method #291

Merged
fyrchik merged 3 commits from elebedeva/frostfs-sdk-go:feat/stream-for-list into master 2024-12-10 11:11:41 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit c4463df8d4 - Show all commits

View file

@ -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)

View file

@ -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,
}