Documentation ¶
Index ¶
- type ChangedType
- type FeatureDefinitionChangedHandler
- type FeatureHandler
- type FeatureOperationsHandler
- type FeaturePropertyChangedHandler
- type ThingAttributeChangedHandler
- type ThingDefinitionChangedHandler
- type ThingFeatureChangedHandler
- type ThingHandler
- type ThingOperationsHandler
- type ThingRegistryHandler
- type ThingsRegistryChangedHandler
- type ThingsRegistryChangedType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangedType ¶
type ChangedType int
ChangedType represents the type of change that took place in the digital twin when emmiting an event
const ( // Created is used to mark the creation of an new thing in an event Created ChangedType = iota // Modified is used in an event ater an existing thing has been modified Modified // Deleted is used in an event ater an existing thing has been deleted Deleted )
type FeatureDefinitionChangedHandler ¶
type FeatureDefinitionChangedHandler func(changedType ChangedType, defId []model.DefinitionID)
FeatureDefinitionChangedHandler is used when a feature's definition has been modified, created or deleted
type FeatureHandler ¶
type FeatureHandler interface { // Set the feature's definition changed handler SetDefinitionChangedHandler(handler FeatureDefinitionChangedHandler) // Get the feature's definition changed handler GetDefinitionChangedHandler() FeatureDefinitionChangedHandler // Set the feature's property changed handler SetPropertyChangedHandler(handler FeaturePropertyChangedHandler) // Get the feature's property changed handler GetPropertyChangedHandler() FeaturePropertyChangedHandler // Set the feature's operations handler SetOperationsHandler(handler FeatureOperationsHandler) // Get the feature's operations handler GetOperationsHandler() FeatureOperationsHandler }
FeatureHandler is used to manage incoming feature changes and operations
type FeatureOperationsHandler ¶
FeatureOperationsHandler is used to handle incoming feature operations
type FeaturePropertyChangedHandler ¶
type FeaturePropertyChangedHandler func(changedType ChangedType, propertyId string, propertyValue interface{})
FeaturePropertyChangedHandler is used when a feature's property has been modified, created or deleted
type ThingAttributeChangedHandler ¶
type ThingAttributeChangedHandler func(changedType ChangedType, attributeId string, attributeValue interface{})
ThingAttributeChangedHandler is used when a things's attribute has been modified, created or deleted
type ThingDefinitionChangedHandler ¶
type ThingDefinitionChangedHandler func(changedType ChangedType, defId model.DefinitionID)
ThingDefinitionChangedHandler is used when a things's definition has been modified, created or deleted
type ThingFeatureChangedHandler ¶
type ThingFeatureChangedHandler func(changedType ChangedType, featureId string, feature model.Feature)
ThingFeatureChangedHandler is used when a things's feature has been modified, created or deleted
type ThingHandler ¶
type ThingHandler interface { // Set the thing's definition changed handler SetDefinitionChangedHandler(handler ThingDefinitionChangedHandler) // Get the thing's definition changed handler GetDefinitionChangedHandler() ThingDefinitionChangedHandler // Set the thing's attribute changed handler SetAttributeChangedHandler(handler ThingAttributeChangedHandler) // Get the thing's attribute changed handler GetAttributeChangedHandler() ThingAttributeChangedHandler // Set the thing's feature changed handler SetFeatureChangedHandler(handler ThingFeatureChangedHandler) // Get the thing's feature changed handler GetFeatureChangedHandler() ThingFeatureChangedHandler // Set the thing's operations handler SetOperationsHandler(handler ThingOperationsHandler) // Get the thing's operations handler GetOperationsHandler() ThingOperationsHandler }
ThingHandler is used to manage the handlers for incoming thing changes and operations
type ThingOperationsHandler ¶
ThingOperationsHandler is used to handle incoming thing operations
type ThingRegistryHandler ¶
type ThingRegistryHandler interface { // Set the registry's handler SetThingsRegistryChangedHandler(handler ThingsRegistryChangedHandler) // Get the registry's handler GetThingsRegistryChangedHandler() ThingsRegistryChangedHandler }
ThingRegistryHandler is used to manage the handlers for incoming thing changes and operations in the local things registy
type ThingsRegistryChangedHandler ¶
type ThingsRegistryChangedHandler func(changedType ThingsRegistryChangedType, thing model.Thing)
ThingsRegistryChangedHandler is used when a thing has been modified, created or deleted
type ThingsRegistryChangedType ¶
type ThingsRegistryChangedType int
ThingsRegistryChangedType represents the type of change that took place in the local things registry
const ( // Added is used to mark the addition of a new thing to the local things registry Added ThingsRegistryChangedType = iota // Updated is used when the data for an existing thing has been updated in the local things registry Updated // Removed is used then a thing has been removed from the local things registry Removed )