// 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;
///
/// No-op implementation of for when publishing is disabled.
/// Sprint: SPRINT_20251228_002_BE_oci_attestation_attach (T5)
///
internal sealed class NullOciAttestationPublisher : IOciAttestationPublisher
{
///
/// Singleton instance.
///
public static readonly NullOciAttestationPublisher Instance = new();
private NullOciAttestationPublisher() { }
///
public bool IsEnabled => false;
///
public Task PublishAsync(
ReportDocumentDto report,
DsseEnvelopeDto? envelope,
string tenant,
CancellationToken cancellationToken = default)
{
return Task.FromResult(OciAttestationPublishResult.Skipped());
}
}