grafana/pkg/models/alert_notifications.go

46 lines
1.2 KiB
Go
Raw Normal View History

2016-06-13 09:39:00 -05:00
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"`
Settings *simplejson.Json `json:"settings"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
2016-06-13 09:39:00 -05:00
}
type CreateAlertNotificationCommand struct {
Name string `json:"name" binding:"Required"`
Type string `json:"type" binding:"Required"`
OrgID int64 `json:"-"`
Settings *simplejson.Json `json:"settings"`
2016-06-13 09:39:00 -05:00
Result *AlertNotification
}
type UpdateAlertNotificationCommand struct {
Id int64 `json:"id" binding:"Required"`
Name string `json:"name" binding:"Required"`
Type string `json:"type" binding:"Required"`
OrgID int64 `json:"-"`
Settings *simplejson.Json `json:"settings" binding:"Required"`
2016-06-13 09:39:00 -05:00
Result *AlertNotification
}
type GetAlertNotificationQuery struct {
Name string
Id int64
Ids []int64
2016-06-13 09:39:00 -05:00
OrgID int64
Result []*AlertNotification
}