< Summary - Envilder .NET SDK

Information
Class: Envilder.Infrastructure.Azure.AzureSecretName
Assembly: Envilder
File(s): /home/runner/work/envilder/envilder/src/sdks/dotnet/Infrastructure/Azure/AzureSecretName.cs
Tag: 561_41292037308
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 17
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
From(...)100%11100%

File(s)

/home/runner/work/envilder/envilder/src/sdks/dotnet/Infrastructure/Azure/AzureSecretName.cs

#LineLine coverage
 1namespace Envilder.Infrastructure.Azure;
 2
 3/// <summary>
 4/// The only translation between a map-file reference and a Key Vault secret
 5/// name, shared with the envilder CLI: <c>/</c> becomes <c>-</c>, ignoring
 6/// leading slashes, so a path-style reference such as <c>/myapp/db/password</c>
 7/// reads <c>myapp-db-password</c>. Anything else reaches Key Vault as written,
 8/// and a name it does not accept fails with Key Vault's own error.
 9/// </summary>
 10/// <seealso href="https://learn.microsoft.com/azure/key-vault/general/about-keys-secrets-certificates#objects-identifie
 11internal static class AzureSecretName
 12{
 13  public static string From(string name)
 14  {
 115    return name.TrimStart('/').Replace('/', '-');
 16  }
 17}

Methods/Properties

From(string)