Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -4,7 +4,7 @@ using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
namespace StellaOps.Cryptography.Kms;
|
||||
|
||||
internal interface IGcpKmsFacade : IDisposable
|
||||
public interface IGcpKmsFacade : IDisposable
|
||||
{
|
||||
Task<GcpSignResult> SignAsync(string versionName, ReadOnlyMemory<byte> digest, CancellationToken cancellationToken);
|
||||
|
||||
@@ -15,11 +15,11 @@ internal interface IGcpKmsFacade : IDisposable
|
||||
Task<GcpPublicKeyMaterial> GetPublicKeyAsync(string versionName, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
internal sealed record GcpSignResult(string VersionName, byte[] Signature);
|
||||
public sealed record GcpSignResult(string VersionName, byte[] Signature);
|
||||
|
||||
internal sealed record GcpCryptoKeyMetadata(string KeyName, string? PrimaryVersionName, DateTimeOffset CreateTime);
|
||||
public sealed record GcpCryptoKeyMetadata(string KeyName, string? PrimaryVersionName, DateTimeOffset CreateTime);
|
||||
|
||||
internal enum GcpCryptoKeyVersionState
|
||||
public enum GcpCryptoKeyVersionState
|
||||
{
|
||||
Unspecified = 0,
|
||||
PendingGeneration = 1,
|
||||
@@ -32,13 +32,13 @@ internal enum GcpCryptoKeyVersionState
|
||||
GenerationFailed = 8,
|
||||
}
|
||||
|
||||
internal sealed record GcpCryptoKeyVersionMetadata(
|
||||
public sealed record GcpCryptoKeyVersionMetadata(
|
||||
string VersionName,
|
||||
GcpCryptoKeyVersionState State,
|
||||
DateTimeOffset CreateTime,
|
||||
DateTimeOffset? DestroyTime);
|
||||
|
||||
internal sealed record GcpPublicKeyMaterial(string VersionName, string Algorithm, string Pem);
|
||||
public sealed record GcpPublicKeyMaterial(string VersionName, string Algorithm, string Pem);
|
||||
|
||||
internal sealed class GcpKmsFacade : IGcpKmsFacade
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user