ToMap converts the MasterKey to a map for serialization purposes.
()
| 271 | |
| 272 | // ToMap converts the MasterKey to a map for serialization purposes. |
| 273 | func (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. |
| 282 | func (key *MasterKey) TypeToIdentifier() string { |