MasterKeysFromURLs takes a comma separated list of Azure Key Vault URLs, and returns a slice of new MasterKeys.
(urls string)
| 115 | // MasterKeysFromURLs takes a comma separated list of Azure Key Vault URLs, |
| 116 | // and returns a slice of new MasterKeys. |
| 117 | func MasterKeysFromURLs(urls string) ([]*MasterKey, error) { |
| 118 | var keys []*MasterKey |
| 119 | if urls == "" { |
| 120 | return keys, nil |
| 121 | } |
| 122 | for _, s := range strings.Split(urls, ",") { |
| 123 | k, err := NewMasterKeyFromURL(s) |
| 124 | if err != nil { |
| 125 | return nil, err |
| 126 | } |
| 127 | keys = append(keys, k) |
| 128 | } |
| 129 | return keys, nil |
| 130 | } |
| 131 | |
| 132 | // TokenCredential is an azcore.TokenCredential used for authenticating towards Azure Key |
| 133 | // Vault. |