[#1] Define SDK structure
TODO: Вынести маппинг модель -> grpc в отдельный слой Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
This commit is contained in:
parent
905f683bf1
commit
2800fff041
57 changed files with 5760 additions and 0 deletions
26
sdk/src/FrostFS.SDK.ClientV2/RequestConstructor.cs
Normal file
26
sdk/src/FrostFS.SDK.ClientV2/RequestConstructor.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using FrostFS.SDK.ModelsV2;
|
||||
using FrostFS.Session;
|
||||
|
||||
namespace FrostFS.SDK.ClientV2;
|
||||
|
||||
public static class RequestConstructor
|
||||
{
|
||||
public static void AddMetaHeader(this IRequest request, MetaHeader? metaHeader = null)
|
||||
{
|
||||
if (request.MetaHeader is not null) return;
|
||||
|
||||
metaHeader ??= MetaHeader.Default();
|
||||
|
||||
request.MetaHeader = new RequestMetaHeader
|
||||
{
|
||||
Version = new Refs.Version
|
||||
{
|
||||
Major = (uint)metaHeader.Version.Major,
|
||||
Minor = (uint)metaHeader.Version.Minor,
|
||||
|
||||
},
|
||||
Epoch = (uint)metaHeader.Epoch,
|
||||
Ttl = (uint)metaHeader.Ttl
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue