forked from TrueCloudLab/frostfs-sdk-go
[#121] pool: Refactor PrmObjectSearch usage
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
a9237aabd2
commit
6fbe1595cb
1 changed files with 6 additions and 15 deletions
21
pool/pool.go
21
pool/pool.go
|
@ -1000,21 +1000,12 @@ func (c *clientWrapper) objectSearch(ctx context.Context, prm PrmObjectSearch) (
|
||||||
return ResObjectSearch{}, err
|
return ResObjectSearch{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var cliPrm sdkClient.PrmObjectSearch
|
cliPrm := sdkClient.PrmObjectSearch{
|
||||||
|
ContainerID: &prm.cnrID,
|
||||||
cliPrm.InContainer(prm.cnrID)
|
Filters: prm.filters,
|
||||||
cliPrm.SetFilters(prm.filters)
|
Session: prm.stoken,
|
||||||
|
BearerToken: prm.btoken,
|
||||||
if prm.stoken != nil {
|
Key: prm.key,
|
||||||
cliPrm.WithinSession(*prm.stoken)
|
|
||||||
}
|
|
||||||
|
|
||||||
if prm.btoken != nil {
|
|
||||||
cliPrm.WithBearerToken(*prm.btoken)
|
|
||||||
}
|
|
||||||
|
|
||||||
if prm.key != nil {
|
|
||||||
cliPrm.UseKey(*prm.key)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := cl.ObjectSearchInit(ctx, cliPrm)
|
res, err := cl.ObjectSearchInit(ctx, cliPrm)
|
||||||
|
|
Loading…
Reference in a new issue