package entities type EntityId interface { GetId() string GetEntityType() EntityType } type EntityType int const ( TENANT EntityType = iota DEVICE ALARM RULE_CHAIN RULE_NODE ) type RuleNodeId struct { id string } func (r *RuleNodeId) GetId() string { return r.id } func (r *RuleNodeId) GetEntityType() EntityType { return RULE_NODE } type RuleChainId struct { id string } func (r *RuleChainId) GetId() string { return r.id } func (r *RuleChainId) GetEntityType() EntityType { return RULE_CHAIN }