[#34] Client: Add rules deserialization

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2025-02-27 17:35:19 +03:00
parent bd8eb7cc60
commit 8835b23ed3
18 changed files with 426 additions and 52 deletions

View file

@ -1,7 +1,6 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Frostfs.V2.Ape;
using Frostfs.V2.Apemanager;
using Google.Protobuf;
@ -61,7 +60,7 @@ internal sealed class ApeManagerServiceProvider : ContextAccessor
Verifier.CheckResponse(response);
}
internal async Task<Chain[]> ListChainAsync(PrmApeChainList args, CallContext ctx)
internal async Task<FrostFsChain[]> ListChainAsync(PrmApeChainList args, CallContext ctx)
{
ListChainsRequest request = new()
{
@ -78,6 +77,6 @@ internal sealed class ApeManagerServiceProvider : ContextAccessor
Verifier.CheckResponse(response);
return [.. response.Body.Chains];
return [.. response.Body.Chains.Select(c => RuleSerializer.Deserialize([.. c.Raw]))];
}
}