15 lines
274 B
Go
15 lines
274 B
Go
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
|
|
}
|