frostfs-sdk-csharp/src/FrostFS.SDK.ClientV2/Interfaces/IFrostFSClient.cs
Pavel Gross 7b9c19f37c [#17] Client: Add extra parameter
API methods' parameters types with optional session, polling settings, xHeaders etc. and corresponding handlers have been added

Signed-off-by: Pavel Gross <p.gross@yadro.com>
2024-07-18 15:33:40 +03:00

50 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using FrostFS.SDK.ClientV2.Parameters;
using FrostFS.SDK.ModelsV2;
using FrostFS.SDK.ModelsV2.Netmap;
namespace FrostFS.SDK.ClientV2.Interfaces;
public interface IFrostFSClient : IDisposable
{
#region Network
Task<NetmapSnapshot> GetNetmapSnapshotAsync(PrmGetNetmapSnapshot? args = null);
Task<NodeInfo> GetNodeInfoAsync(PrmGetNodeInfo? args = null);
Task<NetworkSettings> GetNetworkSettingsAsync(PrmGetNetworkSettings? args = null);
#endregion
#region Session
Task<SessionToken> CreateSessionAsync(PrmCreateSession args);
#endregion
#region Container
Task<ModelsV2.Container> GetContainerAsync(PrmGetContainer args);
IAsyncEnumerable<ContainerId> ListContainersAsync(PrmListContainer? args = null);
Task<ContainerId> CreateContainerAsync(PrmCreateContainer args);
Task DeleteContainerAsync(PrmDeleteContainer args);
#endregion
#region Object
Task<ObjectHeader> GetObjectHeadAsync(PrmGetObjectHead args);
Task<FrostFsObject> GetObjectAsync(PrmGetObject args);
Task<ObjectId> PutObjectAsync(PrmPutObject putObjectParameters);
Task<ObjectId> PutSingleObjectAsync(PrmPutSingleObject args);
Task DeleteObjectAsync(PrmDeleteObject args);
IAsyncEnumerable<ObjectId> SearchObjectsAsync(PrmSearchObject args);
#endregion
#region Tools
ObjectId CalculateObjectId(ObjectHeader header);
#endregion
}