(annotations map[string]string)
| 678 | } |
| 679 | |
| 680 | func parseAlertAnnotations(annotations map[string]string) alertAnnotations { |
| 681 | if annotations == nil { |
| 682 | return alertAnnotations{} |
| 683 | } |
| 684 | |
| 685 | res := alertAnnotations{} |
| 686 | res.AdminOwnerUserID = annotations["admin_owner_user_id"] |
| 687 | res.AdminManaged, _ = strconv.ParseBool(annotations["admin_managed"]) |
| 688 | res.AdminNonce = annotations["admin_nonce"] |
| 689 | |
| 690 | return res |
| 691 | } |
| 692 | |
| 693 | func virtualFilePathForManagedAlert(name string) string { |
| 694 | return path.Join("alerts", name+".yaml") |
no outgoing calls
no test coverage detected