[#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>
This commit is contained in:
parent
00a1e9412f
commit
7b9c19f37c
42 changed files with 1054 additions and 386 deletions
|
@ -1,52 +1,50 @@
|
|||
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(Context? context = default);
|
||||
Task<NetmapSnapshot> GetNetmapSnapshotAsync(PrmGetNetmapSnapshot? args = null);
|
||||
|
||||
Task<NodeInfo> GetNodeInfoAsync(Context? context = default);
|
||||
Task<NodeInfo> GetNodeInfoAsync(PrmGetNodeInfo? args = null);
|
||||
|
||||
Task<NetworkSettings> GetNetworkSettingsAsync(Context? context = default);
|
||||
Task<NetworkSettings> GetNetworkSettingsAsync(PrmGetNetworkSettings? args = null);
|
||||
#endregion
|
||||
|
||||
#region Session
|
||||
Task<SessionToken> CreateSessionAsync(ulong expiration, Context? context = default);
|
||||
Task<SessionToken> CreateSessionAsync(PrmCreateSession args);
|
||||
#endregion
|
||||
|
||||
#region Container
|
||||
Task<ModelsV2.Container> GetContainerAsync(ContainerId containerId, Context? context = default);
|
||||
Task<ModelsV2.Container> GetContainerAsync(PrmGetContainer args);
|
||||
|
||||
IAsyncEnumerable<ContainerId> ListContainersAsync(Context? context = default);
|
||||
IAsyncEnumerable<ContainerId> ListContainersAsync(PrmListContainer? args = null);
|
||||
|
||||
Task<ContainerId> CreateContainerAsync(ModelsV2.Container container, Context? context = default);
|
||||
Task<ContainerId> CreateContainerAsync(PrmCreateContainer args);
|
||||
|
||||
Task DeleteContainerAsync(ContainerId containerId, Context? context = default);
|
||||
Task DeleteContainerAsync(PrmDeleteContainer args);
|
||||
#endregion
|
||||
|
||||
#region Object
|
||||
Task<ObjectHeader> GetObjectHeadAsync(ContainerId containerId, ObjectId objectId, Context? context = default);
|
||||
Task<ObjectHeader> GetObjectHeadAsync(PrmGetObjectHead args);
|
||||
|
||||
Task<FrostFsObject> GetObjectAsync(ContainerId containerId, ObjectId objectId, Context? context = default);
|
||||
Task<FrostFsObject> GetObjectAsync(PrmGetObject args);
|
||||
|
||||
Task<ObjectId> PutObjectAsync(PutObjectParameters putObjectParameters, Context? context = default);
|
||||
Task<ObjectId> PutObjectAsync(PrmPutObject putObjectParameters);
|
||||
|
||||
Task<ObjectId> PutSingleObjectAsync(FrostFsObject obj, Context? context = default);
|
||||
Task<ObjectId> PutSingleObjectAsync(PrmPutSingleObject args);
|
||||
|
||||
Task DeleteObjectAsync(ContainerId containerId, ObjectId objectId, Context? context = default);
|
||||
Task DeleteObjectAsync(PrmDeleteObject args);
|
||||
|
||||
IAsyncEnumerable<ObjectId> SearchObjectsAsync(ContainerId cid, IEnumerable<ObjectFilter> filters, Context? context = default);
|
||||
IAsyncEnumerable<ObjectId> SearchObjectsAsync(PrmSearchObject args);
|
||||
#endregion
|
||||
|
||||
#region Tools
|
||||
ObjectId CalculateObjectId(ObjectHeader header);
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue