1
0
mirror of https://github.com/IceWhaleTech/CasaOS.git synced 2025-07-15 23:54:17 +02:00

Send notification changes to message bus (#861)

This commit is contained in:
link
2023-02-06 15:47:29 +08:00
committed by GitHub
parent 76bc6e68ae
commit 173997c44b
18 changed files with 2436 additions and 158 deletions

23
common/message.go Normal file
View File

@ -0,0 +1,23 @@
package common
import (
"fmt"
"github.com/IceWhaleTech/CasaOS/codegen/message_bus"
)
var (
// devtype -> action -> event
EventTypes map[string]map[string]message_bus.EventType
PropertyNameLookupMaps = map[string]map[string]string{
"system": {
fmt.Sprintf("%s:%s", SERVICENAME, "utilization"): "ID_BUS",
},
}
ActionPastTense = map[string]string{
"add": "added",
"remove": "removed",
}
)