[#121] pool: Refactor PrmObjectSearch usage
All checks were successful
DCO / DCO (pull_request) Successful in 1m8s
Tests and linters / Tests (1.21) (pull_request) Successful in 1m16s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m24s
Tests and linters / Lint (pull_request) Successful in 2m33s

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2023-10-23 16:55:36 +03:00
parent a9237aabd2
commit 6fbe1595cb

View file

@ -1000,21 +1000,12 @@ func (c *clientWrapper) objectSearch(ctx context.Context, prm PrmObjectSearch) (
return ResObjectSearch{}, err
}
var cliPrm sdkClient.PrmObjectSearch
cliPrm.InContainer(prm.cnrID)
cliPrm.SetFilters(prm.filters)
if prm.stoken != nil {
cliPrm.WithinSession(*prm.stoken)
}
if prm.btoken != nil {
cliPrm.WithBearerToken(*prm.btoken)
}
if prm.key != nil {
cliPrm.UseKey(*prm.key)
cliPrm := sdkClient.PrmObjectSearch{
ContainerID: &prm.cnrID,
Filters: prm.filters,
Session: prm.stoken,
BearerToken: prm.btoken,
Key: prm.key,
}
res, err := cl.ObjectSearchInit(ctx, cliPrm)