diff options
-rw-r--r-- | secrets/convenience.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/secrets/convenience.go b/secrets/convenience.go index 058ffc1..4cbe2ae 100644 --- a/secrets/convenience.go +++ b/secrets/convenience.go | |||
@@ -25,3 +25,11 @@ func MustGetCredential(c Client, ctx context.Context, path string) *Credential { | |||
25 | } | 25 | } |
26 | return cred | 26 | return cred |
27 | } | 27 | } |
28 | |||
29 | func MustGetRSAKey(c Client, ctx context.Context, path string) *RSAKey { | ||
30 | key := &RSAKey{} | ||
31 | if _, err := c.Secret(ctx, path, key); err != nil { | ||
32 | log.Fatalf("Error fetching RSA key %s: %s", path, err) | ||
33 | } | ||
34 | return key | ||
35 | } | ||