mirror of
https://github.com/grafana/grafana.git
synced 2025-01-02 04:07:15 -06:00
a80f04c949
* Alerting: add collision safe update function for alertmanager configurations * fix typo * use bootstrap func for tests * move hash calculation to store * remove icons lol * remove removed field
31 lines
954 B
Go
31 lines
954 B
Go
package models
|
|
|
|
const AlertConfigurationVersion = 1
|
|
|
|
// AlertConfiguration represents a single version of the Alerting Engine Configuration.
|
|
type AlertConfiguration struct {
|
|
ID int64 `xorm:"pk autoincr 'id'"`
|
|
|
|
AlertmanagerConfiguration string
|
|
ConfigurationHash string
|
|
ConfigurationVersion string
|
|
CreatedAt int64 `xorm:"created"`
|
|
Default bool
|
|
OrgID int64 `xorm:"org_id"`
|
|
}
|
|
|
|
// GetLatestAlertmanagerConfigurationQuery is the query to get the latest alertmanager configuration.
|
|
type GetLatestAlertmanagerConfigurationQuery struct {
|
|
OrgID int64
|
|
Result *AlertConfiguration
|
|
}
|
|
|
|
// SaveAlertmanagerConfigurationCmd is the command to save an alertmanager configuration.
|
|
type SaveAlertmanagerConfigurationCmd struct {
|
|
AlertmanagerConfiguration string
|
|
FetchedConfigurationHash string
|
|
ConfigurationVersion string
|
|
Default bool
|
|
OrgID int64
|
|
}
|