Documentation ¶
Index ¶
- Variables
- type GeneratedDeviceGroupMigrationMethods
- type Kind
- type Mongo
- func (this *Mongo) AspectIsUsed(ctx context.Context, id string) (result bool, where []string, err error)
- func (this *Mongo) CharacteristicIsUsed(ctx context.Context, id string) (result bool, where []string, err error)
- func (this *Mongo) CharacteristicIsUsedWithConceptInDeviceType(ctx context.Context, characteristicId string, conceptId string) (result bool, where []string, err error)
- func (this *Mongo) CheckBool(token string, topic string, id string, action model.AuthAction) (allowed bool, err error)
- func (this *Mongo) CheckMultiple(token string, topic string, ids []string, action model.AuthAction) (result map[string]bool, err error)
- func (this *Mongo) ConceptIsUsed(ctx context.Context, id string) (result bool, where []string, err error)
- func (this *Mongo) CreateId() string
- func (this *Mongo) DeviceClassIsUsed(ctx context.Context, id string) (result bool, where []string, err error)
- func (this *Mongo) DeviceLocalIdsToIds(ctx context.Context, owner string, localIds []string) (ids []string, err error)
- func (this *Mongo) Disconnect()
- func (this *Mongo) FunctionIsUsed(ctx context.Context, id string) (result bool, where []string, err error)
- func (this *Mongo) GetAdminUsers(token string, topic string, resourceId string) (admins []string, err error)
- func (this *Mongo) GetAspect(ctx context.Context, id string) (aspect models.Aspect, exists bool, err error)
- func (this *Mongo) GetAspectNode(ctx context.Context, id string) (aspectNode models.AspectNode, exists bool, err error)
- func (this *Mongo) GetCharacteristic(ctx context.Context, id string) (characteristic models.Characteristic, exists bool, err error)
- func (this *Mongo) GetConceptWithCharacteristics(ctx context.Context, id string) (concept models.ConceptWithCharacteristics, exists bool, err error)
- func (this *Mongo) GetConceptWithoutCharacteristics(ctx context.Context, id string) (concept models.Concept, exists bool, err error)
- func (this *Mongo) GetConfigurableCandidates(ctx context.Context, serviceId string) (result []model.DeviceTypeCriteria, err error)
- func (this *Mongo) GetDevice(ctx context.Context, id string) (device model.DeviceWithConnectionState, exists bool, err error)
- func (this *Mongo) GetDeviceByLocalId(ctx context.Context, ownerId string, localId string) (device model.DeviceWithConnectionState, exists bool, err error)
- func (this *Mongo) GetDeviceClass(ctx context.Context, id string) (deviceClass models.DeviceClass, exists bool, err error)
- func (this *Mongo) GetDeviceGroup(ctx context.Context, id string) (deviceGroup models.DeviceGroup, exists bool, err error)
- func (this *Mongo) GetDeviceType(ctx context.Context, id string) (deviceType models.DeviceType, exists bool, err error)
- func (this *Mongo) GetDeviceTypeCriteriaByAspectIds(ctx context.Context, ids []string, includeModified bool) (result []model.DeviceTypeCriteria, err error)
- func (this *Mongo) GetDeviceTypeCriteriaByCharacteristicIds(ctx context.Context, ids []string, includeModified bool) (result []model.DeviceTypeCriteria, err error)
- func (this *Mongo) GetDeviceTypeCriteriaByDeviceClassIds(ctx context.Context, ids []string, includeModified bool) (result []model.DeviceTypeCriteria, err error)
- func (this *Mongo) GetDeviceTypeCriteriaByFunctionIds(ctx context.Context, ids []string, includeModified bool) (result []model.DeviceTypeCriteria, err error)
- func (this *Mongo) GetDeviceTypeCriteriaForDeviceTypeIdsAndFilterCriteria(ctx context.Context, deviceTypeIds []interface{}, ...) (result []model.DeviceTypeCriteria, err error)
- func (this *Mongo) GetDeviceTypeIdsByFilterCriteria(ctx context.Context, criteria []model.FilterCriteria, ...) (result []interface{}, err error)
- func (this *Mongo) GetDeviceTypeIdsByFilterCriteriaV2(ctx context.Context, criteria []model.FilterCriteria, includeModified bool) (result []interface{}, err error)
- func (this *Mongo) GetDeviceTypesByServiceId(ctx context.Context, serviceId string) (result []models.DeviceType, err error)
- func (this *Mongo) GetFunction(ctx context.Context, id string) (function models.Function, exists bool, err error)
- func (this *Mongo) GetHub(ctx context.Context, id string) (hub model.HubWithConnectionState, exists bool, err error)
- func (this *Mongo) GetHubsByDeviceId(ctx context.Context, id string) (hubs []model.HubWithConnectionState, err error)
- func (this *Mongo) GetLocation(ctx context.Context, id string) (location models.Location, exists bool, err error)
- func (this *Mongo) GetPermissionsInfo(token string, topic string, id string) (requestingUser string, permissions models.Permissions, err error)
- func (this *Mongo) GetProtocol(ctx context.Context, id string) (protocol models.Protocol, exists bool, err error)
- func (this *Mongo) GetRights(topic string, resourceId string) (rights model.ResourceRights, err error)
- func (this *Mongo) ListAccessibleResourceIds(token string, topic string, limit int64, offset int64, action model.AuthAction) (result []string, err error)
- func (this *Mongo) ListAllAspectNodes(ctx context.Context) (result []models.AspectNode, err error)
- func (this *Mongo) ListAllAspects(ctx context.Context) (result []models.Aspect, err error)
- func (this *Mongo) ListAllCharacteristics(ctx context.Context) (result []models.Characteristic, err error)
- func (this *Mongo) ListAllControllingFunctionsByDeviceClass(ctx context.Context, class string) (result []models.Function, err error)
- func (this *Mongo) ListAllDeviceClasses(ctx context.Context) (result []models.DeviceClass, err error)
- func (this *Mongo) ListAllDeviceClassesUsedWithControllingFunctions(ctx context.Context) (result []models.DeviceClass, err error)
- func (this *Mongo) ListAllFunctionsByDeviceClass(ctx context.Context, class string) (result []models.Function, err error)
- func (this *Mongo) ListAllFunctionsByType(ctx context.Context, rdfType string) (result []models.Function, err error)
- func (this *Mongo) ListAllMeasuringFunctionsByAspect(ctx context.Context, aspect string, ancestors bool, descendants bool) (result []models.Function, err error)
- func (this *Mongo) ListAspectNodesByIdList(ctx context.Context, ids []string) (result []models.AspectNode, err error)
- func (this *Mongo) ListAspectNodesWithMeasuringFunction(ctx context.Context, ancestors bool, descendants bool) (result []models.AspectNode, err error)
- func (this *Mongo) ListAspectsWithMeasuringFunction(ctx context.Context, ancestors bool, descendants bool) (result []models.Aspect, err error)
- func (this *Mongo) ListDeviceGroups(ctx context.Context, listOptions model.DeviceGroupListOptions) (result []models.DeviceGroup, total int64, err error)
- func (this *Mongo) ListDeviceTypes(ctx context.Context, limit int64, offset int64, sort string, ...) (result []models.DeviceType, err error)
- func (this *Mongo) ListDeviceTypesV2(ctx context.Context, limit int64, offset int64, sort string, ...) (result []models.DeviceType, err error)
- func (this *Mongo) ListDeviceTypesV3(ctx context.Context, listOptions model.DeviceTypeListOptions) (result []models.DeviceType, err error)
- func (this *Mongo) ListDevices(ctx context.Context, listOptions model.DeviceListOptions, withTotal bool) (result []model.DeviceWithConnectionState, total int64, err error)
- func (this *Mongo) ListFunctions(ctx context.Context, listOptions model.FunctionListOptions) (result []models.Function, total int64, err error)
- func (this *Mongo) ListHubs(ctx context.Context, listOptions model.HubListOptions, withTotal bool) (result []model.HubWithConnectionState, total int64, err error)
- func (this *Mongo) ListLocations(ctx context.Context, listOptions model.LocationListOptions) (result []models.Location, total int64, err error)
- func (this *Mongo) ListProtocols(ctx context.Context, limit int64, offset int64, sort string) (result []models.Protocol, err error)
- func (this *Mongo) ListResourcesByPermissions(topic string, userId string, groupIds []string, keycloakGroups []string, ...) (result []RightsEntry, err error)
- func (this *Mongo) RemoveAspect(ctx context.Context, id string) error
- func (this *Mongo) RemoveAspectNodesByRootId(ctx context.Context, id string) error
- func (this *Mongo) RemoveCharacteristic(ctx context.Context, id string) error
- func (this *Mongo) RemoveConcept(ctx context.Context, id string) error
- func (this *Mongo) RemoveDevice(ctx context.Context, id string) error
- func (this *Mongo) RemoveDeviceClass(ctx context.Context, id string) error
- func (this *Mongo) RemoveDeviceGroup(ctx context.Context, id string) error
- func (this *Mongo) RemoveDeviceType(ctx context.Context, id string) error
- func (this *Mongo) RemoveFunction(ctx context.Context, id string) error
- func (this *Mongo) RemoveHub(ctx context.Context, id string) error
- func (this *Mongo) RemoveLocation(ctx context.Context, id string) error
- func (this *Mongo) RemoveProtocol(ctx context.Context, id string) error
- func (this *Mongo) RemoveRights(topic string, id string) error
- func (this *Mongo) RightsElementExists(topic string, resourceId string) (exists bool, err error)
- func (this *Mongo) RunStartupMigrations(helper GeneratedDeviceGroupMigrationMethods) error
- func (this *Mongo) SetAspect(ctx context.Context, aspect models.Aspect) error
- func (this *Mongo) SetAspectNode(ctx context.Context, aspectNode models.AspectNode) error
- func (this *Mongo) SetCharacteristic(ctx context.Context, characteristic models.Characteristic) error
- func (this *Mongo) SetConcept(ctx context.Context, concept models.Concept) error
- func (this *Mongo) SetDevice(ctx context.Context, device model.DeviceWithConnectionState) error
- func (this *Mongo) SetDeviceClass(ctx context.Context, deviceClass models.DeviceClass) error
- func (this *Mongo) SetDeviceConnectionState(ctx context.Context, id string, state models.ConnectionState) error
- func (this *Mongo) SetDeviceGroup(ctx context.Context, deviceGroup models.DeviceGroup) error
- func (this *Mongo) SetDeviceType(ctx context.Context, deviceType models.DeviceType) error
- func (this *Mongo) SetFunction(ctx context.Context, function models.Function) error
- func (this *Mongo) SetHub(ctx context.Context, hub model.HubWithConnectionState) error
- func (this *Mongo) SetHubConnectionState(ctx context.Context, id string, state models.ConnectionState) error
- func (this *Mongo) SetLocation(ctx context.Context, location models.Location) error
- func (this *Mongo) SetProtocol(ctx context.Context, protocol models.Protocol) error
- func (this *Mongo) SetRights(topic string, resourceId string, rights model.ResourceRights) (err error)
- type RightsEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateCollections = []func(db *Mongo) error{}
View Source
var DeviceBson = getBsonFieldObject[model.DeviceWithConnectionState]()
View Source
var DeviceGroupBson = getBsonFieldObject[models.DeviceGroup]()
View Source
var DeviceTypeBson = getBsonFieldObject[models.DeviceType]()
View Source
var DeviceTypeCriteriaBson = getBsonFieldObject[model.DeviceTypeCriteria]()
View Source
var ErrNoRightsFound = errors.New("no rights found")
View Source
var FunctionBson = getBsonFieldObject[models.Function]()
View Source
var HubBson = getBsonFieldObject[model.HubWithConnectionState]()
View Source
var LocationBson = getBsonFieldObject[models.Location]()
View Source
var RightsEntryBson = getBsonFieldObject[RightsEntry]()
Functions ¶
This section is empty.
Types ¶
type GeneratedDeviceGroupMigrationMethods ¶ added in v0.1.20
type Mongo ¶
type Mongo struct {
// contains filtered or unexported fields
}
func (*Mongo) AspectIsUsed ¶
func (*Mongo) CharacteristicIsUsed ¶
func (*Mongo) CharacteristicIsUsedWithConceptInDeviceType ¶
func (*Mongo) CheckMultiple ¶ added in v0.0.12
func (*Mongo) ConceptIsUsed ¶
func (*Mongo) DeviceClassIsUsed ¶
func (*Mongo) DeviceLocalIdsToIds ¶ added in v0.1.24
func (*Mongo) Disconnect ¶
func (this *Mongo) Disconnect()
func (*Mongo) FunctionIsUsed ¶
func (*Mongo) GetAdminUsers ¶ added in v0.0.18
func (*Mongo) GetAspectNode ¶
func (*Mongo) GetCharacteristic ¶
func (*Mongo) GetConceptWithCharacteristics ¶
func (*Mongo) GetConceptWithoutCharacteristics ¶
func (*Mongo) GetConfigurableCandidates ¶
func (*Mongo) GetDeviceByLocalId ¶
func (*Mongo) GetDeviceClass ¶
func (*Mongo) GetDeviceGroup ¶
func (*Mongo) GetDeviceType ¶
func (*Mongo) GetDeviceTypeCriteriaByAspectIds ¶ added in v0.0.6
func (*Mongo) GetDeviceTypeCriteriaByCharacteristicIds ¶ added in v0.0.6
func (*Mongo) GetDeviceTypeCriteriaByDeviceClassIds ¶ added in v0.0.6
func (*Mongo) GetDeviceTypeCriteriaByFunctionIds ¶ added in v0.0.6
func (*Mongo) GetDeviceTypeCriteriaForDeviceTypeIdsAndFilterCriteria ¶
func (this *Mongo) GetDeviceTypeCriteriaForDeviceTypeIdsAndFilterCriteria(ctx context.Context, deviceTypeIds []interface{}, criteria model.FilterCriteria, includeModified bool) (result []model.DeviceTypeCriteria, err error)
func (*Mongo) GetDeviceTypeIdsByFilterCriteria ¶
func (this *Mongo) GetDeviceTypeIdsByFilterCriteria(ctx context.Context, criteria []model.FilterCriteria, interactionsFilter []string, includeModified bool) (result []interface{}, err error)
all criteria must match; if interactionsFilter is used (len > 0), at least one must match
func (*Mongo) GetDeviceTypeIdsByFilterCriteriaV2 ¶
func (*Mongo) GetDeviceTypesByServiceId ¶
func (*Mongo) GetFunction ¶
func (*Mongo) GetHubsByDeviceId ¶ added in v0.0.20
func (*Mongo) GetLocation ¶
func (*Mongo) GetPermissionsInfo ¶ added in v0.1.0
func (*Mongo) GetProtocol ¶
func (*Mongo) ListAccessibleResourceIds ¶ added in v0.0.20
func (*Mongo) ListAllAspectNodes ¶
func (*Mongo) ListAllAspects ¶
func (*Mongo) ListAllCharacteristics ¶
func (*Mongo) ListAllControllingFunctionsByDeviceClass ¶
func (*Mongo) ListAllDeviceClasses ¶
func (*Mongo) ListAllDeviceClassesUsedWithControllingFunctions ¶
func (*Mongo) ListAllFunctionsByDeviceClass ¶
func (*Mongo) ListAllFunctionsByType ¶
func (*Mongo) ListAllMeasuringFunctionsByAspect ¶
func (this *Mongo) ListAllMeasuringFunctionsByAspect(ctx context.Context, aspect string, ancestors bool, descendants bool) (result []models.Function, err error)
returns all measuring functions used in combination with given aspect (and optional its descendants and ancestors)
func (*Mongo) ListAspectNodesByIdList ¶
func (*Mongo) ListAspectNodesWithMeasuringFunction ¶
func (this *Mongo) ListAspectNodesWithMeasuringFunction(ctx context.Context, ancestors bool, descendants bool) (result []models.AspectNode, err error)
returns all aspects used in combination with measuring functions (usage may optionally be by its descendants or ancestors)
func (*Mongo) ListAspectsWithMeasuringFunction ¶
func (this *Mongo) ListAspectsWithMeasuringFunction(ctx context.Context, ancestors bool, descendants bool) (result []models.Aspect, err error)
returns all aspects used in combination with measuring functions (usage may optionally be by its descendants or ancestors)
func (*Mongo) ListDeviceGroups ¶
func (this *Mongo) ListDeviceGroups(ctx context.Context, listOptions model.DeviceGroupListOptions) (result []models.DeviceGroup, total int64, err error)
func (*Mongo) ListDeviceTypes ¶
func (*Mongo) ListDeviceTypesV2 ¶
func (*Mongo) ListDeviceTypesV3 ¶ added in v0.1.12
func (this *Mongo) ListDeviceTypesV3(ctx context.Context, listOptions model.DeviceTypeListOptions) (result []models.DeviceType, err error)
func (*Mongo) ListDevices ¶ added in v0.1.0
func (this *Mongo) ListDevices(ctx context.Context, listOptions model.DeviceListOptions, withTotal bool) (result []model.DeviceWithConnectionState, total int64, err error)
func (*Mongo) ListFunctions ¶ added in v0.1.38
func (*Mongo) ListHubs ¶ added in v0.1.0
func (this *Mongo) ListHubs(ctx context.Context, listOptions model.HubListOptions, withTotal bool) (result []model.HubWithConnectionState, total int64, err error)
func (*Mongo) ListLocations ¶ added in v0.1.30
func (*Mongo) ListProtocols ¶
func (*Mongo) ListResourcesByPermissions ¶ added in v0.0.20
func (*Mongo) RemoveAspectNodesByRootId ¶
func (*Mongo) RemoveCharacteristic ¶
func (*Mongo) RemoveConcept ¶
func (*Mongo) RemoveDeviceClass ¶
func (*Mongo) RemoveDeviceGroup ¶
func (*Mongo) RemoveDeviceType ¶
func (*Mongo) RemoveFunction ¶
func (*Mongo) RemoveLocation ¶
func (*Mongo) RemoveProtocol ¶
func (*Mongo) RemoveRights ¶ added in v0.0.12
func (*Mongo) RightsElementExists ¶ added in v0.1.15
func (*Mongo) RunStartupMigrations ¶ added in v0.0.15
func (this *Mongo) RunStartupMigrations(helper GeneratedDeviceGroupMigrationMethods) error
func (*Mongo) SetAspectNode ¶
func (*Mongo) SetCharacteristic ¶
func (*Mongo) SetConcept ¶
func (*Mongo) SetDeviceClass ¶
func (*Mongo) SetDeviceConnectionState ¶ added in v0.1.0
func (*Mongo) SetDeviceGroup ¶
func (*Mongo) SetDeviceType ¶
func (*Mongo) SetFunction ¶
func (*Mongo) SetHubConnectionState ¶ added in v0.1.0
func (*Mongo) SetLocation ¶
func (*Mongo) SetProtocol ¶
type RightsEntry ¶ added in v0.0.12
type RightsEntry struct { Kind Kind `json:"kind" bson:"kind"` Id string `json:"id" bson:"id"` AdminUsers []string `json:"admin_users" bson:"admin_users"` AdminGroups []string `json:"admin_groups" bson:"admin_groups"` AdminKeycloakGroups []string `json:"admin_keycloak_groups" bson:"admin_keycloak_groups"` ReadUsers []string `json:"read_users" bson:"read_users"` ReadGroups []string `json:"read_groups" bson:"read_groups"` ReadKeycloakGroups []string `json:"read_keycloak_groups" bson:"read_keycloak_groups"` WriteUsers []string `json:"write_users" bson:"write_users"` WriteGroups []string `json:"write_groups" bson:"write_groups"` WriteKeycloakGroups []string `json:"write_keycloak_groups" bson:"write_keycloak_groups"` ExecuteUsers []string `json:"execute_users" bson:"execute_users"` ExecuteGroups []string `json:"execute_groups" bson:"execute_groups"` ExecuteKeycloakGroups []string `json:"execute_keycloak_groups" bson:"execute_keycloak_groups"` }
func (*RightsEntry) ToResourceRights ¶ added in v0.0.18
func (this *RightsEntry) ToResourceRights() model.ResourceRights
Click to show internal directories.
Click to hide internal directories.