MasterKeysFromResourceIDString takes a comma separated list of GCP KMS resource IDs and returns a slice of new MasterKeys for them.
(resourceID string)
| 98 | // MasterKeysFromResourceIDString takes a comma separated list of GCP KMS |
| 99 | // resource IDs and returns a slice of new MasterKeys for them. |
| 100 | func MasterKeysFromResourceIDString(resourceID string) []*MasterKey { |
| 101 | var keys []*MasterKey |
| 102 | if resourceID == "" { |
| 103 | return keys |
| 104 | } |
| 105 | for _, s := range strings.Split(resourceID, ",") { |
| 106 | keys = append(keys, NewMasterKeyFromResourceID(s)) |
| 107 | } |
| 108 | return keys |
| 109 | } |
| 110 | |
| 111 | // TokenSource is an oauth2.TokenSource used for authenticating towards the |
| 112 | // GCP KMS service. |