Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSystemDefaultRules ¶
func LoadSystemDefaultRules(dir string) (map[string]*DeviceModelRules, error)
LoadSystemDefaultRules loads YAML files from brand/model directory structure These are system default rules that apply to all devices of a specific brand/model
Types ¶
type DeviceModelRules ¶
type DeviceModelRules struct {
Brand string `yaml:"brand"` // e.g., "rakwireless"
Model string `yaml:"model"` // e.g., "rak4630"
ModelID string `yaml:"model_id"` // Resolved from device service
DisplayName string `yaml:"display_name"`
Rules []YAMLRule `yaml:"rules"`
}
DeviceModelRules represents event rules for a specific device model
type YAMLRule ¶
type YAMLRule struct {
RuleKey string `yaml:"rule_key"`
EntityIDPattern string `yaml:"entity_id_pattern"`
Operator string `yaml:"operator"`
Operand string `yaml:"operand"`
EventType string `yaml:"event_type"`
EventLevel string `yaml:"event_level"`
Description string `yaml:"description"`
IsActive bool `yaml:"is_active"`
RepeatAble bool `yaml:"repeat_able"`
}
YAMLRule represents a single event rule from YAML configuration
Click to show internal directories.
Click to hide internal directories.