Initial commit (history squashed)

This commit is contained in:
master
2025-10-07 10:14:21 +03:00
commit 016c5a3fe7
1132 changed files with 117842 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using StellaOps.Feedser.Core.Jobs;
namespace StellaOps.Feedser.Source.Ghsa;
internal static class GhsaJobKinds
{
public const string Fetch = "source:ghsa:fetch";
public const string Parse = "source:ghsa:parse";
public const string Map = "source:ghsa:map";
}
internal sealed class GhsaFetchJob : IJob
{
private readonly GhsaConnector _connector;
public GhsaFetchJob(GhsaConnector connector)
=> _connector = connector ?? throw new ArgumentNullException(nameof(connector));
public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
=> _connector.FetchAsync(context.Services, cancellationToken);
}
internal sealed class GhsaParseJob : IJob
{
private readonly GhsaConnector _connector;
public GhsaParseJob(GhsaConnector connector)
=> _connector = connector ?? throw new ArgumentNullException(nameof(connector));
public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
=> _connector.ParseAsync(context.Services, cancellationToken);
}
internal sealed class GhsaMapJob : IJob
{
private readonly GhsaConnector _connector;
public GhsaMapJob(GhsaConnector connector)
=> _connector = connector ?? throw new ArgumentNullException(nameof(connector));
public Task ExecuteAsync(JobExecutionContext context, CancellationToken cancellationToken)
=> _connector.MapAsync(context.Services, cancellationToken);
}