Documentation ¶
Index ¶
- Constants
- func CreateAspectNodes(db database.Database, aspect models.Aspect, rootId string, parentId string, ...) (descendents []string, err error)
- func DeviceGroupFilterGenericDuplicateCriteria(dg models.DeviceGroup, aspectNodeProvider AspectNodeProvider) (result models.DeviceGroup, err error)
- func ValidateCharacteristicsWithoutDbAccess(characteristic models.Characteristic) (err error, code int)
- func ValidateDeviceName(device models.Device) (err error)
- func ValidateName(name string) (err error, code int)
- func ValidateServiceGroups(groups []models.ServiceGroup, services []models.Service) error
- func ValidateVariableName(name string) (err error, code int)
- type AspectNodeProvider
- type Controller
- func (this *Controller) CheckAccessToDevicesOfGroup(token string, group models.DeviceGroup) (err error, code int)
- func (this *Controller) DeleteAspect(id string) error
- func (this *Controller) DeleteCharacteristic(id string) error
- func (this *Controller) DeleteConcept(id string) error
- func (this *Controller) DeleteDevice(id string) error
- func (this *Controller) DeleteDeviceClass(id string) error
- func (this *Controller) DeleteDeviceGroup(id string) error
- func (this *Controller) DeleteDeviceType(id string) error
- func (this *Controller) DeleteFunction(id string) error
- func (this *Controller) DeleteHub(id string) error
- func (this *Controller) DeleteLocation(id string) error
- func (this *Controller) DeleteProtocol(id string) error
- func (this *Controller) EnsureInitialRights(topic string, resourceId string, owner string) error
- func (this *Controller) FilterDevicesOfGroupByAccess(token string, group models.DeviceGroup) (result models.DeviceGroup, err error, code int)
- func (this *Controller) GetAspect(id string) (result models.Aspect, err error, code int)
- func (this *Controller) GetAspectNode(id string) (result models.AspectNode, err error, code int)
- func (this *Controller) GetAspectNodes() (result []models.AspectNode, err error, code int)
- func (this *Controller) GetAspectNodesByIdList(ids []string) (result []models.AspectNode, err error, code int)
- func (this *Controller) GetAspectNodesMeasuringFunctions(aspect string, ancestors bool, descendants bool) (result []models.Function, err error, code int)
- func (this *Controller) GetAspectNodesWithMeasuringFunction(ancestors bool, descendants bool) (result []models.AspectNode, err error, code int)
- func (this *Controller) GetAspects() (result []models.Aspect, err error, code int)
- func (this *Controller) GetAspectsWithMeasuringFunction(ancestors bool, descendants bool) (result []models.Aspect, err error, code int)
- func (this *Controller) GetCharacteristic(id string) (result models.Characteristic, err error, errCode int)
- func (this *Controller) GetCharacteristics(leafsOnly bool) (result []models.Characteristic, err error, code int)
- func (this *Controller) GetConceptWithCharacteristics(id string) (result models.ConceptWithCharacteristics, err error, code int)
- func (this *Controller) GetConceptWithoutCharacteristics(id string) (result models.Concept, err error, code int)
- func (this *Controller) GetDeviceClass(id string) (result models.DeviceClass, err error, errCode int)
- func (this *Controller) GetDeviceClasses() (result []models.DeviceClass, err error, code int)
- func (this *Controller) GetDeviceClassesControllingFunctions(deviceClass string) (result []models.Function, err error, code int)
- func (this *Controller) GetDeviceClassesFunctions(deviceClass string) (result []models.Function, err error, code int)
- func (this *Controller) GetDeviceClassesWithControllingFunctions() (result []models.DeviceClass, err error, code int)
- func (this *Controller) GetDeviceTypeSelectables(query []model.FilterCriteria, pathPrefix string, interactionsFilter []string, ...) (result []model.DeviceTypeSelectable, err error, code int)
- func (this *Controller) GetDeviceTypeSelectablesV2(query []model.FilterCriteria, pathPrefix string, includeModified bool, ...) (result []model.DeviceTypeSelectable, err error, code int)
- func (this *Controller) GetFunction(id string) (result models.Function, err error, code int)
- func (this *Controller) GetFunctionsByType(rdfType string) (result []models.Function, err error, code int)
- func (this *Controller) GetLocation(id string, token string) (result models.Location, err error, code int)
- func (c *Controller) GetPermissionsClient() client.Client
- func (this *Controller) GetService(id string) (result models.Service, err error, code int)
- func (this *Controller) GetUsedInDeviceType(query model.UsedInDeviceTypeQuery) (result model.UsedInDeviceTypeResponse, err error, errCode int)
- func (this *Controller) ListDeviceTypes(token string, limit int64, offset int64, sort string, ...) (result []models.DeviceType, err error, errCode int)
- func (this *Controller) ListDeviceTypesV2(token string, limit int64, offset int64, sort string, ...) (result []models.DeviceType, err error, errCode int)
- func (this *Controller) ListDeviceTypesV3(token string, listOptions model.DeviceTypeListOptions) (result []models.DeviceType, err error, errCode int)
- func (this *Controller) ListDevices(token string, options model.DeviceListOptions) (result []models.Device, err error, errCode int)
- func (this *Controller) ListExtendedDevices(token string, options model.DeviceListOptions) (result []models.ExtendedDevice, total int64, err error, errCode int)
- func (this *Controller) ListExtendedHubs(token string, options model.HubListOptions) (result []models.ExtendedHub, total int64, err error, errCode int)
- func (this *Controller) ListHubDeviceIds(id string, token string, action model.AuthAction, asLocalId bool) (result []string, err error, errCode int)
- func (this *Controller) ListHubs(token string, options model.HubListOptions) (result []models.Hub, err error, errCode int)
- func (this *Controller) ListProtocols(token string, limit int64, offset int64, sort string) (result []models.Protocol, err error, errCode int)
- func (this *Controller) PublishDeviceDelete(id string, owner string) error
- func (this *Controller) ReadDevice(id string, token string, action model.AuthAction) (result models.Device, err error, errCode int)
- func (this *Controller) ReadDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction) (result models.Device, err error, errCode int)
- func (this *Controller) ReadDeviceGroup(id string, token string, filterGenericDuplicateCriteria bool) (result models.DeviceGroup, err error, errCode int)
- func (this *Controller) ReadDeviceType(id string, token string) (result models.DeviceType, err error, errCode int)
- func (this *Controller) ReadExtendedDevice(id string, token string, action model.AuthAction) (result models.ExtendedDevice, err error, errCode int)
- func (this *Controller) ReadExtendedDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction) (result models.ExtendedDevice, err error, errCode int)
- func (this *Controller) ReadExtendedHub(id string, token string, action model.AuthAction) (result models.ExtendedHub, err error, errCode int)
- func (this *Controller) ReadHub(id string, token string, action model.AuthAction) (result models.Hub, err error, errCode int)
- func (this *Controller) ReadProtocol(id string, token string) (result models.Protocol, err error, errCode int)
- func (this *Controller) RemoveRights(topic string, id string) error
- func (this *Controller) SendDone(done donewait.DoneMsg) error
- func (this *Controller) SetAspect(aspect models.Aspect, owner string) error
- func (this *Controller) SetCharacteristic(characteristic models.Characteristic, owner string) error
- func (this *Controller) SetConcept(concept models.Concept, owner string) error
- func (this *Controller) SetDevice(device models.Device, owner string) (err error)
- func (this *Controller) SetDeviceClass(class models.DeviceClass, owner string) error
- func (this *Controller) SetDeviceConnectionState(id string, connected bool) error
- func (this *Controller) SetDeviceGroup(deviceGroup models.DeviceGroup, owner string) (err error)
- func (this *Controller) SetDeviceType(deviceType models.DeviceType, owner string) (err error)
- func (this *Controller) SetFunction(function models.Function, owner string) error
- func (this *Controller) SetHub(hub models.Hub, owner string) (err error)
- func (this *Controller) SetHubConnectionState(id string, connected bool) error
- func (this *Controller) SetLocation(location models.Location, owner string) error
- func (this *Controller) SetProtocol(protocol models.Protocol, owner string) (err error)
- func (this *Controller) SetRights(resourceKind string, resourceId string, rights model.ResourceRights) error
- func (this *Controller) ValidateAspect(aspect models.Aspect) (err error, code int)
- func (this *Controller) ValidateAspectDelete(id string) (err error, code int)
- func (this *Controller) ValidateCharacteristicDelete(id string) (err error, code int)
- func (this *Controller) ValidateCharacteristics(characteristic models.Characteristic) (err error, code int)
- func (this *Controller) ValidateConcept(concept models.Concept) (err error, code int)
- func (this *Controller) ValidateConceptDelete(id string) (err error, code int)
- func (this *Controller) ValidateContent(content models.Content, protocol models.Protocol, ...) (err error, code int)
- func (this *Controller) ValidateDevice(token string, device models.Device) (err error, code int)
- func (this *Controller) ValidateDeviceClass(deviceClass models.DeviceClass) (err error, code int)
- func (this *Controller) ValidateDeviceClassDelete(id string) (err error, code int)
- func (this *Controller) ValidateDeviceGroup(group models.DeviceGroup) (err error, code int)
- func (this *Controller) ValidateDeviceGroupSelection(criteria []models.DeviceGroupFilterCriteria, devices []string) (error, int)
- func (this *Controller) ValidateDeviceType(dt models.DeviceType, options model.ValidationOptions) (err error, code int)
- func (this *Controller) ValidateFunction(function models.Function) (err error, code int)
- func (this *Controller) ValidateFunctionDelete(id string) (err error, code int)
- func (this *Controller) ValidateHub(token string, hub models.Hub) (err error, code int)
- func (this *Controller) ValidateHubDevices(hub models.Hub) (err error, code int)
- func (this *Controller) ValidateListSubVariables(variables []models.ContentVariable, serialization models.Serialization, ...) (err error, code int)
- func (this *Controller) ValidateLocation(location models.Location) (err error, code int)
- func (this *Controller) ValidateProtocol(protocol models.Protocol) (err error, code int)
- func (this *Controller) ValidateService(service models.Service, protocolCache *map[string]models.Protocol, ...) (error, int)
- func (this *Controller) ValidateStructureSubVariables(variables []models.ContentVariable, serialization models.Serialization, ...) (err error, code int)
- func (this *Controller) ValidateVariable(variable models.ContentVariable, serialization models.Serialization, ...) (err error, code int)
- type ErrorProducer
- func (this ErrorProducer) PublishAspectDelete(id string, owner string) (err error)
- func (this ErrorProducer) PublishAspectUpdate(aspect models.Aspect, owner string) (err error)
- func (this ErrorProducer) PublishDevice(element models.Device, userId string) (err error)
- func (this ErrorProducer) PublishDeviceDelete(id string, owner string) (err error)
- func (this ErrorProducer) PublishDeviceRights(deviceId string, userId string, rights model.ResourceRights) (err error)
- func (this ErrorProducer) PublishHub(hub models.Hub, userId string) (err error)
- func (this ErrorProducer) SendDone(msg donewait.DoneMsg) (err error)
- type Producer
- type Security
Constants ¶
View Source
const DisplayNameAttributeName = "shared/nickname"
View Source
const FilterDevicesOfGroupByAccess = true
View Source
const ServiceGroupSelectionIdModifier = "service_group_selection"
Variables ¶
This section is empty.
Functions ¶
func CreateAspectNodes ¶
func DeviceGroupFilterGenericDuplicateCriteria ¶ added in v0.0.3
func DeviceGroupFilterGenericDuplicateCriteria(dg models.DeviceGroup, aspectNodeProvider AspectNodeProvider) (result models.DeviceGroup, err error)
DeviceGroupFilterGenericDuplicateCriteria removes criteria without aspect, that are already present with an aspect ref: https://bitnify.atlassian.net/browse/SNRGY-3027
func ValidateCharacteristicsWithoutDbAccess ¶
func ValidateCharacteristicsWithoutDbAccess(characteristic models.Characteristic) (err error, code int)
func ValidateDeviceName ¶
func ValidateName ¶
func ValidateServiceGroups ¶
func ValidateServiceGroups(groups []models.ServiceGroup, services []models.Service) error
func ValidateVariableName ¶
Types ¶
type AspectNodeProvider ¶ added in v0.0.3
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) CheckAccessToDevicesOfGroup ¶
func (this *Controller) CheckAccessToDevicesOfGroup(token string, group models.DeviceGroup) (err error, code int)
only the first element of group.Devices is checked. this should be enough because every used device should be referenced in each element of group.Devices use ValidateDeviceGroup() to ensure that this constraint is adhered to
func (*Controller) DeleteAspect ¶
func (this *Controller) DeleteAspect(id string) error
func (*Controller) DeleteCharacteristic ¶
func (this *Controller) DeleteCharacteristic(id string) error
func (*Controller) DeleteConcept ¶
func (this *Controller) DeleteConcept(id string) error
func (*Controller) DeleteDevice ¶
func (this *Controller) DeleteDevice(id string) error
func (*Controller) DeleteDeviceClass ¶
func (this *Controller) DeleteDeviceClass(id string) error
func (*Controller) DeleteDeviceGroup ¶
func (this *Controller) DeleteDeviceGroup(id string) error
func (*Controller) DeleteDeviceType ¶
func (this *Controller) DeleteDeviceType(id string) error
func (*Controller) DeleteFunction ¶
func (this *Controller) DeleteFunction(id string) error
func (*Controller) DeleteHub ¶
func (this *Controller) DeleteHub(id string) error
func (*Controller) DeleteLocation ¶
func (this *Controller) DeleteLocation(id string) error
func (*Controller) DeleteProtocol ¶
func (this *Controller) DeleteProtocol(id string) error
func (*Controller) EnsureInitialRights ¶ added in v0.1.15
func (this *Controller) EnsureInitialRights(topic string, resourceId string, owner string) error
func (*Controller) FilterDevicesOfGroupByAccess ¶
func (this *Controller) FilterDevicesOfGroupByAccess(token string, group models.DeviceGroup) (result models.DeviceGroup, err error, code int)
func (*Controller) GetAspectNode ¶
func (this *Controller) GetAspectNode(id string) (result models.AspectNode, err error, code int)
func (*Controller) GetAspectNodes ¶
func (this *Controller) GetAspectNodes() (result []models.AspectNode, err error, code int)
func (*Controller) GetAspectNodesByIdList ¶
func (this *Controller) GetAspectNodesByIdList(ids []string) (result []models.AspectNode, err error, code int)
func (*Controller) GetAspectNodesMeasuringFunctions ¶
func (this *Controller) GetAspectNodesMeasuringFunctions(aspect string, ancestors bool, descendants bool) (result []models.Function, err error, code int)
returns all measuring functions used in combination with given aspect (and optional its descendants and ancestors)
func (*Controller) GetAspectNodesWithMeasuringFunction ¶
func (this *Controller) GetAspectNodesWithMeasuringFunction(ancestors bool, descendants bool) (result []models.AspectNode, err error, code int)
func (*Controller) GetAspects ¶
func (this *Controller) GetAspects() (result []models.Aspect, err error, code int)
func (*Controller) GetAspectsWithMeasuringFunction ¶
func (*Controller) GetCharacteristic ¶
func (this *Controller) GetCharacteristic(id string) (result models.Characteristic, err error, errCode int)
func (*Controller) GetCharacteristics ¶ added in v0.1.15
func (this *Controller) GetCharacteristics(leafsOnly bool) (result []models.Characteristic, err error, code int)
func (*Controller) GetConceptWithCharacteristics ¶
func (this *Controller) GetConceptWithCharacteristics(id string) (result models.ConceptWithCharacteristics, err error, code int)
func (*Controller) GetConceptWithoutCharacteristics ¶
func (*Controller) GetDeviceClass ¶
func (this *Controller) GetDeviceClass(id string) (result models.DeviceClass, err error, errCode int)
func (*Controller) GetDeviceClasses ¶
func (this *Controller) GetDeviceClasses() (result []models.DeviceClass, err error, code int)
func (*Controller) GetDeviceClassesControllingFunctions ¶
func (*Controller) GetDeviceClassesFunctions ¶
func (*Controller) GetDeviceClassesWithControllingFunctions ¶
func (this *Controller) GetDeviceClassesWithControllingFunctions() (result []models.DeviceClass, err error, code int)
func (*Controller) GetDeviceTypeSelectables ¶
func (this *Controller) GetDeviceTypeSelectables(query []model.FilterCriteria, pathPrefix string, interactionsFilter []string, includeModified bool) (result []model.DeviceTypeSelectable, err error, code int)
func (*Controller) GetDeviceTypeSelectablesV2 ¶
func (this *Controller) GetDeviceTypeSelectablesV2(query []model.FilterCriteria, pathPrefix string, includeModified bool, servicesMustMatchAllCriteria bool) (result []model.DeviceTypeSelectable, err error, code int)
func (*Controller) GetFunction ¶
func (*Controller) GetFunctionsByType ¶
func (*Controller) GetLocation ¶
func (*Controller) GetPermissionsClient ¶ added in v0.1.15
func (c *Controller) GetPermissionsClient() client.Client
func (*Controller) GetService ¶
func (*Controller) GetUsedInDeviceType ¶ added in v0.0.6
func (this *Controller) GetUsedInDeviceType(query model.UsedInDeviceTypeQuery) (result model.UsedInDeviceTypeResponse, err error, errCode int)
func (*Controller) ListDeviceTypes ¶
func (this *Controller) ListDeviceTypes(token string, limit int64, offset int64, sort string, filter []model.FilterCriteria, interactionsFilter []string, includeModified bool, includeUnmodified bool) (result []models.DeviceType, err error, errCode int)
func (*Controller) ListDeviceTypesV2 ¶
func (this *Controller) ListDeviceTypesV2(token string, limit int64, offset int64, sort string, filter []model.FilterCriteria, includeModified bool, includeUnmodified bool) (result []models.DeviceType, err error, errCode int)
func (*Controller) ListDeviceTypesV3 ¶ added in v0.1.12
func (this *Controller) ListDeviceTypesV3(token string, listOptions model.DeviceTypeListOptions) (result []models.DeviceType, err error, errCode int)
func (*Controller) ListDevices ¶ added in v0.0.20
func (this *Controller) ListDevices(token string, options model.DeviceListOptions) (result []models.Device, err error, errCode int)
func (*Controller) ListExtendedDevices ¶ added in v0.1.0
func (this *Controller) ListExtendedDevices(token string, options model.DeviceListOptions) (result []models.ExtendedDevice, total int64, err error, errCode int)
func (*Controller) ListExtendedHubs ¶ added in v0.1.0
func (this *Controller) ListExtendedHubs(token string, options model.HubListOptions) (result []models.ExtendedHub, total int64, err error, errCode int)
func (*Controller) ListHubDeviceIds ¶
func (this *Controller) ListHubDeviceIds(id string, token string, action model.AuthAction, asLocalId bool) (result []string, err error, errCode int)
func (*Controller) ListHubs ¶ added in v0.1.0
func (this *Controller) ListHubs(token string, options model.HubListOptions) (result []models.Hub, err error, errCode int)
func (*Controller) ListProtocols ¶
func (*Controller) PublishDeviceDelete ¶
func (this *Controller) PublishDeviceDelete(id string, owner string) error
func (*Controller) ReadDevice ¶
func (this *Controller) ReadDevice(id string, token string, action model.AuthAction) (result models.Device, err error, errCode int)
func (*Controller) ReadDeviceByLocalId ¶
func (this *Controller) ReadDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction) (result models.Device, err error, errCode int)
func (*Controller) ReadDeviceGroup ¶
func (this *Controller) ReadDeviceGroup(id string, token string, filterGenericDuplicateCriteria bool) (result models.DeviceGroup, err error, errCode int)
func (*Controller) ReadDeviceType ¶
func (this *Controller) ReadDeviceType(id string, token string) (result models.DeviceType, err error, errCode int)
func (*Controller) ReadExtendedDevice ¶ added in v0.1.0
func (this *Controller) ReadExtendedDevice(id string, token string, action model.AuthAction) (result models.ExtendedDevice, err error, errCode int)
func (*Controller) ReadExtendedDeviceByLocalId ¶ added in v0.1.0
func (this *Controller) ReadExtendedDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction) (result models.ExtendedDevice, err error, errCode int)
func (*Controller) ReadExtendedHub ¶ added in v0.1.0
func (this *Controller) ReadExtendedHub(id string, token string, action model.AuthAction) (result models.ExtendedHub, err error, errCode int)
func (*Controller) ReadHub ¶
func (this *Controller) ReadHub(id string, token string, action model.AuthAction) (result models.Hub, err error, errCode int)
func (*Controller) ReadProtocol ¶
func (*Controller) RemoveRights ¶ added in v0.1.15
func (this *Controller) RemoveRights(topic string, id string) error
func (*Controller) SendDone ¶ added in v0.0.11
func (this *Controller) SendDone(done donewait.DoneMsg) error
func (*Controller) SetAspect ¶
func (this *Controller) SetAspect(aspect models.Aspect, owner string) error
func (*Controller) SetCharacteristic ¶
func (this *Controller) SetCharacteristic(characteristic models.Characteristic, owner string) error
func (*Controller) SetConcept ¶
func (this *Controller) SetConcept(concept models.Concept, owner string) error
func (*Controller) SetDevice ¶
func (this *Controller) SetDevice(device models.Device, owner string) (err error)
func (*Controller) SetDeviceClass ¶
func (this *Controller) SetDeviceClass(class models.DeviceClass, owner string) error
func (*Controller) SetDeviceConnectionState ¶ added in v0.1.0
func (this *Controller) SetDeviceConnectionState(id string, connected bool) error
func (*Controller) SetDeviceGroup ¶
func (this *Controller) SetDeviceGroup(deviceGroup models.DeviceGroup, owner string) (err error)
func (*Controller) SetDeviceType ¶
func (this *Controller) SetDeviceType(deviceType models.DeviceType, owner string) (err error)
func (*Controller) SetFunction ¶
func (this *Controller) SetFunction(function models.Function, owner string) error
func (*Controller) SetHub ¶
func (this *Controller) SetHub(hub models.Hub, owner string) (err error)
func (*Controller) SetHubConnectionState ¶ added in v0.1.0
func (this *Controller) SetHubConnectionState(id string, connected bool) error
func (*Controller) SetLocation ¶
func (this *Controller) SetLocation(location models.Location, owner string) error
func (*Controller) SetProtocol ¶
func (this *Controller) SetProtocol(protocol models.Protocol, owner string) (err error)
func (*Controller) SetRights ¶ added in v0.1.15
func (this *Controller) SetRights(resourceKind string, resourceId string, rights model.ResourceRights) error
func (*Controller) ValidateAspect ¶
func (this *Controller) ValidateAspect(aspect models.Aspect) (err error, code int)
func (*Controller) ValidateAspectDelete ¶
func (this *Controller) ValidateAspectDelete(id string) (err error, code int)
func (*Controller) ValidateCharacteristicDelete ¶
func (this *Controller) ValidateCharacteristicDelete(id string) (err error, code int)
func (*Controller) ValidateCharacteristics ¶
func (this *Controller) ValidateCharacteristics(characteristic models.Characteristic) (err error, code int)
func (*Controller) ValidateConcept ¶
func (this *Controller) ValidateConcept(concept models.Concept) (err error, code int)
func (*Controller) ValidateConceptDelete ¶
func (this *Controller) ValidateConceptDelete(id string) (err error, code int)
func (*Controller) ValidateContent ¶
func (this *Controller) ValidateContent(content models.Content, protocol models.Protocol, options model.ValidationOptions) (err error, code int)
func (*Controller) ValidateDevice ¶
func (*Controller) ValidateDeviceClass ¶
func (this *Controller) ValidateDeviceClass(deviceClass models.DeviceClass) (err error, code int)
func (*Controller) ValidateDeviceClassDelete ¶
func (this *Controller) ValidateDeviceClassDelete(id string) (err error, code int)
func (*Controller) ValidateDeviceGroup ¶
func (this *Controller) ValidateDeviceGroup(group models.DeviceGroup) (err error, code int)
func (*Controller) ValidateDeviceGroupSelection ¶
func (this *Controller) ValidateDeviceGroupSelection(criteria []models.DeviceGroupFilterCriteria, devices []string) (error, int)
func (*Controller) ValidateDeviceType ¶
func (this *Controller) ValidateDeviceType(dt models.DeviceType, options model.ValidationOptions) (err error, code int)
func (*Controller) ValidateFunction ¶
func (this *Controller) ValidateFunction(function models.Function) (err error, code int)
func (*Controller) ValidateFunctionDelete ¶
func (this *Controller) ValidateFunctionDelete(id string) (err error, code int)
func (*Controller) ValidateHub ¶
func (*Controller) ValidateHubDevices ¶ added in v0.0.18
func (this *Controller) ValidateHubDevices(hub models.Hub) (err error, code int)
func (*Controller) ValidateListSubVariables ¶
func (this *Controller) ValidateListSubVariables(variables []models.ContentVariable, serialization models.Serialization, options model.ValidationOptions) (err error, code int)
func (*Controller) ValidateLocation ¶
func (this *Controller) ValidateLocation(location models.Location) (err error, code int)
func (*Controller) ValidateProtocol ¶
func (this *Controller) ValidateProtocol(protocol models.Protocol) (err error, code int)
func (*Controller) ValidateService ¶
func (this *Controller) ValidateService(service models.Service, protocolCache *map[string]models.Protocol, options model.ValidationOptions) (error, int)
func (*Controller) ValidateStructureSubVariables ¶
func (this *Controller) ValidateStructureSubVariables(variables []models.ContentVariable, serialization models.Serialization, options model.ValidationOptions) (err error, code int)
func (*Controller) ValidateVariable ¶
func (this *Controller) ValidateVariable(variable models.ContentVariable, serialization models.Serialization, options model.ValidationOptions) (err error, code int)
type ErrorProducer ¶
type ErrorProducer struct{}
func (ErrorProducer) PublishAspectDelete ¶
func (this ErrorProducer) PublishAspectDelete(id string, owner string) (err error)
func (ErrorProducer) PublishAspectUpdate ¶
func (this ErrorProducer) PublishAspectUpdate(aspect models.Aspect, owner string) (err error)
func (ErrorProducer) PublishDevice ¶ added in v0.0.18
func (this ErrorProducer) PublishDevice(element models.Device, userId string) (err error)
func (ErrorProducer) PublishDeviceDelete ¶
func (this ErrorProducer) PublishDeviceDelete(id string, owner string) (err error)
func (ErrorProducer) PublishDeviceRights ¶ added in v0.0.18
func (this ErrorProducer) PublishDeviceRights(deviceId string, userId string, rights model.ResourceRights) (err error)
func (ErrorProducer) PublishHub ¶
func (this ErrorProducer) PublishHub(hub models.Hub, userId string) (err error)
type Producer ¶
type Producer interface { PublishDevice(element models.Device, userId string) error PublishDeviceRights(deviceId string, userId string, rights model.ResourceRights) (err error) PublishDeviceDelete(id string, owner string) error PublishHub(hub models.Hub, userId string) (err error) PublishAspectDelete(id string, owner string) error PublishAspectUpdate(aspect models.Aspect, owner string) error SendDone(msg donewait.DoneMsg) error }
type Security ¶
type Security interface { CheckBool(token string, kind string, id string, action model.AuthAction) (allowed bool, err error) CheckMultiple(token string, kind string, ids []string, action model.AuthAction) (map[string]bool, error) GetAdminUsers(token string, topic string, resourceId string) (admins []string, err error) ListAccessibleResourceIds(token string, topic string, limit int64, offset int64, action model.AuthAction) ([]string, error) GetPermissionsInfo(token string, kind string, id string) (requestingUser string, permissions models.Permissions, err error) RightsElementExists(topic string, resourceId string) (exists bool, err error) }
Click to show internal directories.
Click to hide internal directories.