[#1] Make Client.OwnerID public

Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
This commit is contained in:
Ivan Pchelintsev 2024-05-17 11:51:27 +03:00
parent 9b5b2eb5dc
commit 63f91ac627
4 changed files with 6 additions and 6 deletions

View file

@ -16,7 +16,7 @@ public partial class Client: IFrostFSClient
{
private GrpcChannel _channel;
private readonly ECDsa _key;
private readonly OwnerId _owner;
public readonly OwnerId OwnerId;
public readonly Version Version = new (2, 13);
private ContainerService.ContainerServiceClient _containerServiceClient;
@ -28,7 +28,7 @@ public partial class Client: IFrostFSClient
{
// TODO: Развязать клиент и реализацию GRPC
_key = key.LoadWif();
_owner = OwnerId.FromKey(_key);
OwnerId = OwnerId.FromKey(_key);
InitGrpcChannel(host);
InitContainerClient();
InitNetmapClient();

View file

@ -27,7 +27,7 @@ public partial class Client
{
Body = new ListRequest.Types.Body
{
OwnerId = _owner.ToGrpcMessage()
OwnerId = OwnerId.ToGrpcMessage()
}
};
request.AddMetaHeader();
@ -41,7 +41,7 @@ public partial class Client
public async Task<ContainerId> CreateContainerAsync(ModelsV2.Container container)
{
var cntnr = container.ToGrpcMessage();
cntnr.OwnerId = _owner.ToGrpcMessage();
cntnr.OwnerId = OwnerId.ToGrpcMessage();
cntnr.Version = Version.ToGrpcMessage();
var request = new PutRequest
{

View file

@ -93,7 +93,7 @@ public partial class Client
{
var sessionToken = await CreateSessionAsync(uint.MaxValue);
var hdr = header.ToGrpcMessage();
hdr.OwnerId = _owner.ToGrpcMessage();
hdr.OwnerId = OwnerId.ToGrpcMessage();
hdr.Version = Version.ToGrpcMessage();
var oid = new ObjectID
{

View file

@ -11,7 +11,7 @@ public partial class Client
{
Body = new CreateRequest.Types.Body
{
OwnerId = _owner.ToGrpcMessage(),
OwnerId = OwnerId.ToGrpcMessage(),
Expiration = expiration,
}
};