mirror of
https://github.com/volodymyrsmirnov/MalwareMultiScan.git
synced 2025-08-25 22:01:16 +00:00
unit tests for API (99% coverage)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace MalwareMultiScan.Api.Services.Interfaces
|
||||
{
|
||||
public interface IReceiverHostedService : IHostedService
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
using System.Threading.Tasks;
|
||||
using MalwareMultiScan.Api.Data.Configuration;
|
||||
using MalwareMultiScan.Api.Data.Models;
|
||||
|
||||
namespace MalwareMultiScan.Api.Services.Interfaces
|
||||
{
|
||||
public interface IScanBackendService
|
||||
{
|
||||
ScanBackend[] List { get; }
|
||||
|
||||
Task QueueUrlScan(ScanResult result, ScanBackend backend, string fileUrl);
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using MalwareMultiScan.Api.Data.Models;
|
||||
|
||||
namespace MalwareMultiScan.Api.Services.Interfaces
|
||||
{
|
||||
public interface IScanResultService
|
||||
{
|
||||
Task<ScanResult> CreateScanResult();
|
||||
|
||||
Task<ScanResult> GetScanResult(string id);
|
||||
|
||||
Task UpdateScanResultForBackend(string resultId, string backendId, long duration,
|
||||
bool completed = false, bool succeeded = false, string[] threats = null);
|
||||
|
||||
Task QueueUrlScan(ScanResult result, string fileUrl);
|
||||
|
||||
Task<string> StoreFile(string fileName, Stream fileStream);
|
||||
|
||||
Task<Stream> ObtainFile(string id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user