< Summary

Information
Class: Elsa.Platform.Integration.Models.PlatformArtifactDigest
Assembly: Elsa.Platform.Integration
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Platform.Integration/Models/PlatformRuntimeContracts.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 138
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Algorithm()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Platform.Integration/Models/PlatformRuntimeContracts.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Elsa.Platform.Integration.Models;
 4
 5[JsonConverter(typeof(JsonStringEnumConverter<PlatformRuntimeCommandAction>))]
 6public enum PlatformRuntimeCommandAction
 7{
 8    Unknown,
 9    Deploy,
 10    Rollback,
 11    Validate,
 12    RuntimeControl
 13}
 14
 15[JsonConverter(typeof(JsonStringEnumConverter<PlatformRuntimeCommandStatus>))]
 16public enum PlatformRuntimeCommandStatus
 17{
 18    Unknown,
 19    Pending,
 20    Claimed,
 21    Running,
 22    Completed,
 23    Failed,
 24    Rejected,
 25    Cancelled,
 26    RecoveryRequired,
 27    Expired
 28}
 29
 30[JsonConverter(typeof(JsonStringEnumConverter<PlatformArtifactStatus>))]
 31public enum PlatformArtifactStatus
 32{
 33    Pending,
 34    Downloading,
 35    Validated,
 36    Applying,
 37    Applied,
 38    Failed,
 39    Rejected,
 40    Skipped
 41}
 42
 43[JsonConverter(typeof(JsonStringEnumConverter<PlatformDiagnosticSeverity>))]
 44public enum PlatformDiagnosticSeverity
 45{
 46    Info,
 47    Warning,
 48    Error
 49}
 50
 51public sealed record PlatformRuntimeCommandListResponse(IReadOnlyList<PlatformRuntimeCommand> Commands);
 52
 53public sealed record PlatformRuntimeCommandClaimRequest(Guid EngineId, string WorkerId, int LeaseSeconds);
 54
 55public sealed record PlatformRuntimeCommandClaimResponse(PlatformRuntimeCommand Command, string LeaseToken);
 56
 57public sealed record PlatformRuntimeCommandHeartbeatRequest(string LeaseToken, string WorkerId);
 58
 59public sealed record PlatformRuntimeCommandProgressRequest(string LeaseToken, string Status, int? PercentComplete, strin
 60
 61public sealed record PlatformRuntimeCommandCompleteRequest(
 62    string LeaseToken,
 63    PlatformArtifactDigest? ObservedArtifactDigest,
 64    string? RuntimeReference,
 65    IReadOnlyList<PlatformDiagnostic> Diagnostics,
 66    IReadOnlyList<PlatformArtifactOutcome>? Artifacts = null);
 67
 68public sealed record PlatformRuntimeCommandFailRequest(
 69    string LeaseToken,
 70    IReadOnlyList<PlatformDiagnostic> Diagnostics,
 71    IReadOnlyList<PlatformArtifactOutcome>? Artifacts = null);
 72
 73public sealed record PlatformRuntimeCommandRejectRequest(
 74    string LeaseToken,
 75    IReadOnlyList<PlatformDiagnostic> Diagnostics,
 76    IReadOnlyList<PlatformArtifactOutcome>? Artifacts = null);
 77
 78public sealed record PlatformRuntimeCommand(
 79    Guid Id,
 80    Guid WorkspaceId,
 81    Guid RunId,
 82    Guid EnvironmentId,
 83    Guid EngineId,
 84    PlatformRuntimeCommandAction Action,
 85    PlatformRuntimeCommandStatus Status,
 86    PlatformRuntimeCommandArtifactReference? Artifact,
 87    PlatformRuntimeCommandRevisionReference? Revision,
 88    string IdempotencyKey,
 89    string? WorkerId,
 90    DateTimeOffset? ClaimedAt,
 91    DateTimeOffset? LeaseExpiresAt,
 92    DateTimeOffset? HeartbeatAt,
 93    int AttemptNumber,
 94    int? PercentComplete,
 95    string? ProgressMessage,
 96    PlatformArtifactDigest? ObservedArtifactDigest,
 97    string? RuntimeReference,
 98    IReadOnlyList<PlatformDiagnostic> Diagnostics,
 99    DateTimeOffset CreatedAt,
 100    DateTimeOffset UpdatedAt,
 101    DateTimeOffset? AvailableAt,
 102    DateTimeOffset? ExpiresAt,
 103    DateTimeOffset? CompletedAt,
 104    IReadOnlyList<PlatformArtifactItem>? Artifacts = null);
 105
 106public sealed record PlatformRuntimeCommandArtifactReference(
 107    Guid? ArtifactRecordId,
 108    string? ArtifactId,
 109    string? ArtifactTypeId,
 110    PlatformArtifactDigest? ContentDigest);
 111
 112public sealed record PlatformRuntimeCommandRevisionReference(Guid? RevisionId);
 113
 114public sealed record PlatformArtifactItem(
 115    Guid ArtifactRecordId,
 116    string ArtifactId,
 117    string ArtifactTypeId,
 118    string? ArtifactSchemaVersion,
 119    PlatformArtifactDigest ContentDigest,
 120    string DisplayName,
 121    string? DownloadUrl,
 122    PlatformArtifactStatus Status,
 123    PlatformArtifactDigest? ObservedDigest,
 124    string? RuntimeReference,
 125    IReadOnlyList<PlatformDiagnostic>? Diagnostics);
 126
 127public sealed record PlatformArtifactOutcome(
 128    Guid ArtifactRecordId,
 129    PlatformArtifactStatus Status,
 130    PlatformArtifactDigest? ObservedDigest = null,
 131    string? RuntimeReference = null,
 132    IReadOnlyList<PlatformDiagnostic>? Diagnostics = null);
 133
 12134public sealed record PlatformArtifactDigest(string Algorithm, string Value);
 135
 136public sealed record PlatformDiagnostic(string Code, PlatformDiagnosticSeverity Severity, string Message);
 137
 138public sealed record PlatformProblemDetails(string? Title, string? Detail);

Methods/Properties

get_Algorithm()