Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 3763061

Browse files
committed
Mark legacy alert notifiers as deprecated
1 parent 29b9687 commit 3763061

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

alertnotification.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
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.
1011
type 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.
2527
func (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.
3740
func (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.
4953
func (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.
6772
func (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.
7985
func (c *Client) DeleteAlertNotification(id int64) error {
8086
path := fmt.Sprintf("/api/alert-notifications/%d", id)
8187

0 commit comments

Comments
 (0)