MCPcopy Index your code
hub / github.com/getsops/sops / ToMap

Method ToMap

gcpkms/keysource.go:273–279  ·  view source on GitHub ↗

ToMap converts the MasterKey to a map for serialization purposes.

()

Source from the content-addressed store, hash-verified

271
272// ToMap converts the MasterKey to a map for serialization purposes.
273func (key MasterKey) ToMap() map[string]interface{} {
274 out := make(map[string]interface{})
275 out["resource_id"] = key.ResourceID
276 out["created_at"] = key.CreationDate.UTC().Format(time.RFC3339)
277 out["enc"] = key.EncryptedKey
278 return out
279}
280
281// TypeToIdentifier returns the string identifier for the MasterKey type.
282func (key *MasterKey) TypeToIdentifier() string {

Callers 1

TestMasterKey_ToMapFunction · 0.95

Calls 1

FormatMethod · 0.80

Tested by 1

TestMasterKey_ToMapFunction · 0.76