| | | 1 | | namespace Envilder; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// One variable of the map file with the outcome for the path it maps to. |
| | | 5 | | /// </summary> |
| | | 6 | | public class KeyCheck |
| | | 7 | | { |
| | | 8 | | /// <summary>Initializes a new instance.</summary> |
| | | 9 | | /// <param name="variable">The environment variable name.</param> |
| | | 10 | | /// <param name="path">The secret path or name it maps to.</param> |
| | | 11 | | /// <param name="provider">The provider the path was checked against.</param> |
| | | 12 | | /// <param name="status">Whether the secret exists.</param> |
| | | 13 | | /// <param name="reason">Why the status is not <c>Exists</c> or <c>Missing</c>, when known.</param> |
| | 1 | 14 | | public KeyCheck( |
| | 1 | 15 | | string variable, |
| | 1 | 16 | | string path, |
| | 1 | 17 | | SecretProviderType provider, |
| | 1 | 18 | | SecretExistenceStatus status, |
| | 1 | 19 | | string? reason = null) |
| | | 20 | | { |
| | 1 | 21 | | Variable = variable; |
| | 1 | 22 | | Path = path; |
| | 1 | 23 | | Provider = provider; |
| | 1 | 24 | | Status = status; |
| | 1 | 25 | | Reason = reason; |
| | 1 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary>The environment variable name.</summary> |
| | | 29 | | public string Variable { get; } |
| | | 30 | | |
| | | 31 | | /// <summary>The secret path or name the variable maps to.</summary> |
| | | 32 | | public string Path { get; } |
| | | 33 | | |
| | | 34 | | /// <summary>The provider the path was checked against.</summary> |
| | | 35 | | public SecretProviderType Provider { get; } |
| | | 36 | | |
| | | 37 | | /// <summary>Whether the secret exists.</summary> |
| | | 38 | | public SecretExistenceStatus Status { get; } |
| | | 39 | | |
| | | 40 | | /// <summary>The provider's explanation for the status, when it gave one.</summary> |
| | | 41 | | public string? Reason { get; } |
| | | 42 | | } |