2024-12-16 15:38:46 +05:00
|
|
|
|
using DD.Persistence.Models;
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
2024-12-16 15:38:46 +05:00
|
|
|
|
namespace DD.Persistence.Client.Clients.Interfaces;
|
2024-12-09 14:45:35 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Клиент для работы с уставками
|
|
|
|
|
/// </summary>
|
2024-12-10 13:55:01 +05:00
|
|
|
|
public interface ISetpointClient : IDisposable
|
2024-12-09 14:45:35 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить уставку
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="setpointKey"></param>
|
|
|
|
|
/// <param name="newValue"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task Add(Guid setpointKey, object newValue, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить актуальные значения уставок
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="setpointKeys"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<SetpointValueDto>> GetCurrent(IEnumerable<Guid> setpointKeys, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить диапазон дат, для которых есть данные в репозитории
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<DatesRangeDto> GetDatesRangeAsync(CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить значения уставок за определенный момент времени
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="setpointKeys"></param>
|
|
|
|
|
/// <param name="historyMoment"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<SetpointValueDto>> GetHistory(IEnumerable<Guid> setpointKeys, DateTimeOffset historyMoment, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить историю изменений значений уставок
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="setpointKeys"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<Dictionary<Guid, IEnumerable<SetpointLogDto>>> GetLog(IEnumerable<Guid> setpointKeys, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить порцию записей, начиная с заданной даты
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dateBegin"></param>
|
|
|
|
|
/// <param name="take"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<SetpointLogDto>> GetPart(DateTimeOffset dateBegin, int take, CancellationToken token);
|
|
|
|
|
}
|