ImmutableMetadata return all metadata for this Identity, accumulated from each version. If multiple value are found, the first defined takes precedence.
()
| 544 | // ImmutableMetadata return all metadata for this Identity, accumulated from each version. |
| 545 | // If multiple value are found, the first defined takes precedence. |
| 546 | func (i *Identity) ImmutableMetadata() map[string]string { |
| 547 | metadata := make(map[string]string) |
| 548 | |
| 549 | for _, version := range i.versions { |
| 550 | for key, value := range version.metadata { |
| 551 | if _, has := metadata[key]; !has { |
| 552 | metadata[key] = value |
| 553 | } |
| 554 | } |
| 555 | } |
| 556 | |
| 557 | return metadata |
| 558 | } |
| 559 | |
| 560 | // MutableMetadata return all metadata for this Identity, accumulated from each version. |
| 561 | // If multiple value are found, the last defined takes precedence. |
no outgoing calls