You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
274 B
14 lines
274 B
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
|
|
}
|