1
0
voyager-api/ScrapperAPI/Interfaces/IContentRepository.cs

23 lines
707 B
C#

using ScrapperAPI.Dtos;
using ScrapperAPI.Records;
namespace ScrapperAPI.Interfaces;
public interface IContentRepository
{
Task<int> SaveAsync(int queueId, string content, CancellationToken ct);
/// <summary>
/// Saves already-compressed content (e.g. from a remote agent) without recompressing.
/// </summary>
Task<int> SaveCompressedAsync(
int queueId,
string contentEncoding,
byte[] contentBytes,
int originalLength,
int compressedLength,
CancellationToken ct);
Task<ContentRow?> GetByQueueIdAsync(int queueId, CancellationToken ct);
Task<CompressedContent?> GetCompressedByQueueIdAsync(int queueId, CancellationToken ct);
}