ToMap converts the MasterKey to a map for serialization purposes.
()
| 246 | |
| 247 | // ToMap converts the MasterKey to a map for serialization purposes. |
| 248 | func (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. |
| 257 | func (key *MasterKey) TypeToIdentifier() string { |