MCPcopy
hub / github.com/getsops/sops / MasterKeysFromResourceIDString

Function MasterKeysFromResourceIDString

gcpkms/keysource.go:100–109  ·  view source on GitHub ↗

MasterKeysFromResourceIDString takes a comma separated list of GCP KMS resource IDs and returns a slice of new MasterKeys for them.

(resourceID string)

Source from the content-addressed store, hash-verified

98// MasterKeysFromResourceIDString takes a comma separated list of GCP KMS
99// resource IDs and returns a slice of new MasterKeys for them.
100func 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.

Callers 4

getMasterKeysFunction · 0.92
keyGroupsFunction · 0.92

Calls 1

Tested by 1