Skip to content

Commit

Permalink
enabling to use double underscore delimiters
Browse files Browse the repository at this point in the history
  • Loading branch information
mhirasawa-sansan committed Apr 19, 2021
1 parent 6789ba8 commit 438203c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task LoadAsync()
{
var secretVersionName = new SecretVersionName(secret.SecretName.ProjectId, secret.SecretName.SecretId, "latest");
var secretVersion = await _client.AccessSecretVersionAsync(secretVersionName);
Set(secret.SecretName.SecretId, secretVersion.Payload.Data.ToStringUtf8());
Set(ConvertDelimiter(secret.SecretName.SecretId), secretVersion.Payload.Data.ToStringUtf8());
} catch (Grpc.Core.RpcException)
{
// This might happen if secret is created but it has no versions available
Expand All @@ -40,5 +40,10 @@ public async Task LoadAsync()
}

}

private static string ConvertDelimiter(string key)
{
return key.Replace("__", ConfigurationPath.KeyDelimiter);
}
}
}

0 comments on commit 438203c

Please sign in to comment.