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

Method ToMap

hckms/keysource.go:248–254  ·  view source on GitHub ↗

ToMap converts the MasterKey to a map for serialization purposes.

()

Source from the content-addressed store, hash-verified

246
247// ToMap converts the MasterKey to a map for serialization purposes.
248func (key MasterKey) ToMap() map[string]interface{} {
249 out := make(map[string]interface{})
250 out["key_id"] = key.KeyID
251 out["created_at"] = key.CreationDate.UTC().Format(time.RFC3339)
252 out["enc"] = key.EncryptedKey
253 return out
254}
255
256// TypeToIdentifier returns the string identifier for the MasterKey type.
257func (key *MasterKey) TypeToIdentifier() string {

Callers 1

TestMasterKey_ToMapFunction · 0.95

Calls 1

FormatMethod · 0.80

Tested by 1

TestMasterKey_ToMapFunction · 0.76