You've already forked CasaOS
mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-07-15 23:54:17 +02:00
add message-bus-codegen
CLI tool for generating a markdown of all event types (#1346)
This commit is contained in:
@ -1,23 +1,12 @@
|
||||
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",
|
||||
}
|
||||
)
|
||||
// devtype -> action -> event
|
||||
var EventTypes = []message_bus.EventType{
|
||||
{Name: "casaos:system:utilization", SourceID: SERVICENAME, PropertyTypeList: []message_bus.PropertyType{}},
|
||||
{Name: "casaos:file:recover", SourceID: SERVICENAME, PropertyTypeList: []message_bus.PropertyType{}},
|
||||
{Name: "casaos:file:operate", SourceID: SERVICENAME, PropertyTypeList: []message_bus.PropertyType{}},
|
||||
}
|
||||
|
Reference in New Issue
Block a user