[#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
17
sdk/src/FrostFS.SDK.Cryptography/UUID.cs
Normal file
17
sdk/src/FrostFS.SDK.Cryptography/UUID.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using Google.Protobuf;
|
||||
|
||||
namespace FrostFS.SDK.Cryptography
|
||||
{
|
||||
public static class UUIDExtension
|
||||
{
|
||||
public static Guid ToUuid(this ByteString id)
|
||||
{
|
||||
return Guid.Parse(Convert.ToHexString(id.ToByteArray()));
|
||||
}
|
||||
|
||||
public static byte[] ToBytes(this Guid id)
|
||||
{
|
||||
return Convert.FromHexString(id.ToString("N"));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue