Documentation ¶
Index ¶
- func Mongo(ctx context.Context, wg *sync.WaitGroup) (mongoUrl string, err error)
- type Database
- func (this *Database) Disconnect()
- func (this *Database) GetAspect(ctx context.Context, id string) (result models.Aspect, exists bool, err error)
- func (this *Database) GetCharacteristic(ctx context.Context, id string) (result models.Characteristic, exists bool, err error)
- func (this *Database) GetConceptWithCharacteristics(ctx context.Context, id string) (result models.ConceptWithCharacteristics, exists bool, err error)
- func (this *Database) GetConceptWithoutCharacteristics(ctx context.Context, id string) (result models.Concept, exists bool, err error)
- func (this *Database) GetDevice(ctx context.Context, id string) (device models.Device, exists bool, err error)
- func (this *Database) GetDeviceByLocalId(ctx context.Context, localId string) (device models.Device, exists bool, err error)
- func (this *Database) GetDeviceClass(ctx context.Context, id string) (result models.DeviceClass, exists bool, err error)
- func (this *Database) GetDeviceGroup(ctx context.Context, id string) (deviceGroup models.DeviceGroup, exists bool, err error)
- func (this *Database) GetDeviceType(ctx context.Context, id string) (deviceType models.DeviceType, exists bool, err error)
- func (this *Database) GetDeviceTypesByServiceId(ctx context.Context, serviceId string) ([]models.DeviceType, error)
- func (this *Database) GetFunction(ctx context.Context, id string) (result models.Function, exists bool, err error)
- func (this *Database) GetHub(ctx context.Context, id string) (hub models.Hub, exists bool, err error)
- func (this *Database) GetHubsByDeviceId(ctx context.Context, id string) (hubs []models.Hub, err error)
- func (this *Database) GetLocation(ctx context.Context, id string) (result models.Location, exists bool, err error)
- func (this *Database) GetProtocol(ctx context.Context, id string) (result models.Protocol, exists bool, err error)
- func (this *Database) ListAllAspects(ctx context.Context) ([]models.Aspect, error)
- func (this *Database) ListAllCharacteristics(ctx context.Context) ([]models.Characteristic, error)
- func (this *Database) ListAllControllingFunctionsByDeviceClass(ctx context.Context, class string) ([]models.Function, error)
- func (this *Database) ListAllDeviceClasses(ctx context.Context) ([]models.DeviceClass, error)
- func (this *Database) ListAllDeviceClassesUsedWithControllingFunctions(ctx context.Context) ([]models.DeviceClass, error)
- func (this *Database) ListAllFunctionsByDeviceClass(ctx context.Context, class string) ([]models.Function, error)
- func (this *Database) ListAllFunctionsByType(ctx context.Context, rdfType string) ([]models.Function, error)
- func (this *Database) ListAllMeasuringFunctionsByAspect(ctx context.Context, aspect string) ([]models.Function, error)
- func (this *Database) ListAspectsWithMeasuringFunction(ctx context.Context) ([]models.Aspect, error)
- func (this *Database) ListDeviceGroups(ctx context.Context, limit int64, offset int64, sort string) (result []models.DeviceGroup, err error)
- func (this *Database) ListDeviceTypes(ctx context.Context, limit int64, offset int64, sort string, ...) (result []models.DeviceType, err error)
- func (this *Database) ListFunctions(ctx context.Context, limit int, offset int, search string, direction string) (result []models.Function, count int, err error)
- func (this *Database) ListProtocols(ctx context.Context, limit int64, offset int64, sort string) ([]models.Protocol, error)
- func (this *Database) RemoveAspect(ctx context.Context, id string) error
- func (this *Database) RemoveCharacteristic(ctx context.Context, id string) error
- func (this *Database) RemoveConcept(ctx context.Context, id string) error
- func (this *Database) RemoveDevice(ctx context.Context, id string) error
- func (this *Database) RemoveDeviceClass(ctx context.Context, id string) error
- func (this *Database) RemoveDeviceGroup(ctx context.Context, id string) error
- func (this *Database) RemoveDeviceType(ctx context.Context, id string) error
- func (this *Database) RemoveFunction(ctx context.Context, id string) error
- func (this *Database) RemoveHub(ctx context.Context, id string) error
- func (this *Database) RemoveLocation(ctx context.Context, id string) error
- func (this *Database) RemoveProtocol(ctx context.Context, id string) error
- func (this *Database) SetAspect(ctx context.Context, aspect models.Aspect) error
- func (this *Database) SetCharacteristic(ctx context.Context, characteristic models.Characteristic) error
- func (this *Database) SetConcept(ctx context.Context, concept models.Concept) error
- func (this *Database) SetDevice(ctx context.Context, device models.Device) error
- func (this *Database) SetDeviceClass(ctx context.Context, class models.DeviceClass) error
- func (this *Database) SetDeviceGroup(ctx context.Context, deviceGroup models.DeviceGroup) error
- func (this *Database) SetDeviceType(ctx context.Context, deviceType models.DeviceType) error
- func (this *Database) SetFunction(ctx context.Context, function models.Function) error
- func (this *Database) SetHub(ctx context.Context, hub models.Hub) error
- func (this *Database) SetLocation(ctx context.Context, location models.Location) error
- func (this *Database) SetProtocol(ctx context.Context, protocol models.Protocol) error
- type Security
- func (this *Security) CheckBool(token string, kind string, id string, action model.AuthAction) (allowed bool, err error)
- func (this *Security) CheckMultiple(token string, kind string, ids []string, action model.AuthAction) (map[string]bool, error)
- func (this *Security) GetAdminUsers(token string, kind string, id string) (admins []string, err error)
- func (this *Security) GetPermissionsInfo(token string, kind string, id string) (requestingUser string, permissions models.Permissions, err error)
- func (this *Security) ListAccessibleResourceIds(token string, topic string, limit int64, offset int64, action model.AuthAction) (result []string, err error)
- func (this *Security) Set(kind string, id string, access bool)
- func (this *Security) SetAdmins(kind string, id string, admins []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func NewDatabase() *Database
func (*Database) Disconnect ¶
func (this *Database) Disconnect()
func (*Database) GetCharacteristic ¶
func (*Database) GetConceptWithCharacteristics ¶
func (*Database) GetConceptWithoutCharacteristics ¶
func (*Database) GetDeviceByLocalId ¶
func (*Database) GetDeviceClass ¶
func (*Database) GetDeviceGroup ¶
func (*Database) GetDeviceType ¶
func (*Database) GetDeviceTypesByServiceId ¶
func (*Database) GetFunction ¶
func (*Database) GetHubsByDeviceId ¶ added in v0.0.20
func (*Database) GetLocation ¶
func (*Database) GetProtocol ¶
func (*Database) ListAllAspects ¶
func (*Database) ListAllCharacteristics ¶
func (*Database) ListAllControllingFunctionsByDeviceClass ¶
func (*Database) ListAllDeviceClasses ¶
func (*Database) ListAllDeviceClassesUsedWithControllingFunctions ¶
func (*Database) ListAllFunctionsByDeviceClass ¶
func (*Database) ListAllFunctionsByType ¶
func (*Database) ListAllMeasuringFunctionsByAspect ¶
func (*Database) ListAspectsWithMeasuringFunction ¶
func (*Database) ListDeviceGroups ¶
func (*Database) ListDeviceTypes ¶
func (*Database) ListFunctions ¶
func (*Database) ListProtocols ¶
func (*Database) RemoveAspect ¶
func (*Database) RemoveCharacteristic ¶
func (*Database) RemoveConcept ¶
func (*Database) RemoveDevice ¶
func (*Database) RemoveDeviceClass ¶
func (*Database) RemoveDeviceGroup ¶
func (*Database) RemoveDeviceType ¶
func (*Database) RemoveFunction ¶
func (*Database) RemoveLocation ¶
func (*Database) RemoveProtocol ¶
func (*Database) SetCharacteristic ¶
func (*Database) SetConcept ¶
func (*Database) SetDeviceClass ¶
func (*Database) SetDeviceGroup ¶
func (*Database) SetDeviceType ¶
func (*Database) SetFunction ¶
func (*Database) SetLocation ¶
type Security ¶
type Security struct {
// contains filtered or unexported fields
}
func NewSecurity ¶
func NewSecurity() *Security
func (*Security) CheckMultiple ¶
func (*Security) GetAdminUsers ¶ added in v0.0.19
func (*Security) GetPermissionsInfo ¶ added in v0.1.0
func (*Security) ListAccessibleResourceIds ¶ added in v0.0.20
Click to show internal directories.
Click to hide internal directories.