77)
88
99// AlertNotification represents a Grafana alert notification.
10+ // Deprecated: Grafana Legacy Alerting is deprecated in 9.0 and will be removed in the future. Use ContactPoint instead.
1011type AlertNotification struct {
1112 ID int64 `json:"id,omitempty"`
1213 UID string `json:"uid"`
@@ -22,6 +23,7 @@ type AlertNotification struct {
2223}
2324
2425// AlertNotifications fetches and returns Grafana alert notifications.
26+ // Deprecated: Grafana Legacy Alerting is deprecated in 9.0 and will be removed in the future. Use ContactPoints instead.
2527func (c * Client ) AlertNotifications () ([]AlertNotification , error ) {
2628 alertnotifications := make ([]AlertNotification , 0 )
2729
@@ -34,6 +36,7 @@ func (c *Client) AlertNotifications() ([]AlertNotification, error) {
3436}
3537
3638// AlertNotification fetches and returns a Grafana alert notification.
39+ // Deprecated: Grafana Legacy Alerting is deprecated in 9.0 and will be removed in the future. Use ContactPoint instead.
3740func (c * Client ) AlertNotification (id int64 ) (* AlertNotification , error ) {
3841 path := fmt .Sprintf ("/api/alert-notifications/%d" , id )
3942 result := & AlertNotification {}
@@ -46,6 +49,7 @@ func (c *Client) AlertNotification(id int64) (*AlertNotification, error) {
4649}
4750
4851// NewAlertNotification creates a new Grafana alert notification.
52+ // Deprecated: Grafana Legacy Alerting is deprecated in 9.0 and will be removed in the future. Use NewContactPoint instead.
4953func (c * Client ) NewAlertNotification (a * AlertNotification ) (int64 , error ) {
5054 data , err := json .Marshal (a )
5155 if err != nil {
@@ -64,6 +68,7 @@ func (c *Client) NewAlertNotification(a *AlertNotification) (int64, error) {
6468}
6569
6670// UpdateAlertNotification updates a Grafana alert notification.
71+ // Deprecated: Grafana Legacy Alerting is deprecated in 9.0 and will be removed in the future. Use UpdateContactPoint instead.
6772func (c * Client ) UpdateAlertNotification (a * AlertNotification ) error {
6873 path := fmt .Sprintf ("/api/alert-notifications/%d" , a .ID )
6974 data , err := json .Marshal (a )
@@ -76,6 +81,7 @@ func (c *Client) UpdateAlertNotification(a *AlertNotification) error {
7681}
7782
7883// DeleteAlertNotification deletes a Grafana alert notification.
84+ // Deprecated: Grafana Legacy Alerting is deprecated in 9.0 and will be removed in the future. Use DeleteContactPoint instead.
7985func (c * Client ) DeleteAlertNotification (id int64 ) error {
8086 path := fmt .Sprintf ("/api/alert-notifications/%d" , id )
8187
0 commit comments