alrm/config/alarm.go

15 lines
274 B
Go
Raw Permalink Normal View History

2021-11-14 07:04:25 -09:00
package config
type Alarm struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Attrs map[string]interface{} `yaml:",inline"`
}
func (alm Alarm) NameOrType() string {
if alm.Name == "" {
return alm.Type
}
return alm.Name
}