mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 10:50:37 -06:00
2ca7284a56
closes #5883
66 lines
1.5 KiB
Go
66 lines
1.5 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/grafana/grafana/pkg/components/simplejson"
|
|
)
|
|
|
|
type AlertNotification struct {
|
|
Id int64 `json:"id"`
|
|
OrgId int64 `json:"-"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
IsDefault bool `json:"isDefault"`
|
|
Settings *simplejson.Json `json:"settings"`
|
|
Created time.Time `json:"created"`
|
|
Updated time.Time `json:"updated"`
|
|
}
|
|
|
|
type CreateAlertNotificationCommand struct {
|
|
Name string `json:"name" binding:"Required"`
|
|
Type string `json:"type" binding:"Required"`
|
|
IsDefault bool `json:"isDefault"`
|
|
Settings *simplejson.Json `json:"settings"`
|
|
|
|
OrgId int64 `json:"-"`
|
|
Result *AlertNotification
|
|
}
|
|
|
|
type UpdateAlertNotificationCommand struct {
|
|
Id int64 `json:"id" binding:"Required"`
|
|
Name string `json:"name" binding:"Required"`
|
|
Type string `json:"type" binding:"Required"`
|
|
IsDefault bool `json:"isDefault"`
|
|
Settings *simplejson.Json `json:"settings" binding:"Required"`
|
|
|
|
OrgId int64 `json:"-"`
|
|
Result *AlertNotification
|
|
}
|
|
|
|
type DeleteAlertNotificationCommand struct {
|
|
Id int64
|
|
OrgId int64
|
|
}
|
|
|
|
type GetAlertNotificationsQuery struct {
|
|
Name string
|
|
Id int64
|
|
OrgId int64
|
|
|
|
Result *AlertNotification
|
|
}
|
|
|
|
type GetAlertNotificationsToSendQuery struct {
|
|
Ids []int64
|
|
OrgId int64
|
|
|
|
Result []*AlertNotification
|
|
}
|
|
|
|
type GetAllAlertNotificationsQuery struct {
|
|
OrgId int64
|
|
|
|
Result []*AlertNotification
|
|
}
|