36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
// © StellaOps Contributors. See LICENSE and NOTICE.md in the repository root.
|
|
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using StellaOps.Scanner.WebService.Contracts;
|
|
|
|
namespace StellaOps.Scanner.WebService.Services;
|
|
|
|
/// <summary>
|
|
/// No-op implementation of <see cref="IOciAttestationPublisher"/> for when publishing is disabled.
|
|
/// Sprint: SPRINT_20251228_002_BE_oci_attestation_attach (T5)
|
|
/// </summary>
|
|
internal sealed class NullOciAttestationPublisher : IOciAttestationPublisher
|
|
{
|
|
/// <summary>
|
|
/// Singleton instance.
|
|
/// </summary>
|
|
public static readonly NullOciAttestationPublisher Instance = new();
|
|
|
|
private NullOciAttestationPublisher() { }
|
|
|
|
/// <inheritdoc />
|
|
public bool IsEnabled => false;
|
|
|
|
/// <inheritdoc />
|
|
public Task<OciAttestationPublishResult> PublishAsync(
|
|
ReportDocumentDto report,
|
|
DsseEnvelopeDto? envelope,
|
|
string tenant,
|
|
CancellationToken cancellationToken = default)
|
|
{
|
|
return Task.FromResult(OciAttestationPublishResult.Skipped());
|
|
}
|
|
}
|