MCPcopy Create free account
hub / github.com/rilldata/rill / parseAlertAnnotations

Function parseAlertAnnotations

admin/server/alerts.go:680–691  ·  view source on GitHub ↗
(annotations map[string]string)

Source from the content-addressed store, hash-verified

678}
679
680func 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
693func virtualFilePathForManagedAlert(name string) string {
694 return path.Join("alerts", name+".yaml")

Callers 3

EditAlertMethod · 0.85
UnsubscribeAlertMethod · 0.85
DeleteAlertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected