Documentation ¶
Index ¶
- Constants
- Variables
- func PreventIdModifier(id string) error
- func RemoveDuplicates[T comparable](slice []T) []T
- type Com
- func (this *Com) DeviceLocalIdToId(token auth.Token, localId string) (id string, err error, code int)
- func (this *Com) DevicesOfTypeExist(token auth.Token, deviceTypeId string) (result bool, err error, code int)
- func (this *Com) GetAspect(token auth.Token, id string) (aspect models.Aspect, err error, code int)
- func (this *Com) GetCharacteristic(token auth.Token, id string) (concept models.Characteristic, err error, code int)
- func (this *Com) GetConcept(token auth.Token, id string) (concept models.Concept, err error, code int)
- func (this *Com) GetDevice(token auth.Token, id string) (device models.Device, err error, code int)
- func (this *Com) GetDeviceClass(token auth.Token, id string) (deviceClass models.DeviceClass, err error, code int)
- func (this *Com) GetDeviceType(token auth.Token, id string) (dt models.DeviceType, err error, code int)
- func (this *Com) GetFunction(token auth.Token, id string) (function models.Function, err error, code int)
- func (this *Com) GetHub(token auth.Token, id string) (hub models.Hub, err error, code int)
- func (this *Com) GetLocation(token auth.Token, id string) (Location models.Location, err error, code int)
- func (this *Com) GetPermissions(token auth.Token, kind string, id string) (permmodel.ResourceRights, error)
- func (this *Com) GetProtocol(token auth.Token, id string) (protocol models.Protocol, err error, code int)
- func (this *Com) GetResourceOwner(token auth.Token, kind string, id string, rights string) (owner string, found bool, err error)
- func (this *Com) GetTechnicalDeviceGroup(token auth.Token, id string) (dt models.DeviceGroup, err error, code int)
- func (this *Com) PermissionCheck(token auth.Token, id string, permission string, resource string) (err error, code int)
- func (this *Com) PermissionCheckForCharacteristic(token auth.Token, id string, permission string) (err error, code int)
- func (this *Com) PermissionCheckForConcept(token auth.Token, id string, permission string) (err error, code int)
- func (this *Com) PermissionCheckForDevice(token auth.Token, id string, permission string) (err error, code int)
- func (this *Com) PermissionCheckForDeviceGroup(token auth.Token, id string, permission string) (err error, code int)
- func (this *Com) PermissionCheckForDeviceList(token auth.Token, ids []string, rights string) (result map[string]bool, err error, code int)
- func (this *Com) PermissionCheckForDeviceType(token auth.Token, id string, permission string) (err error, code int)
- func (this *Com) PermissionCheckForHub(token auth.Token, id string, permission string) (err error, code int)
- func (this *Com) PermissionCheckForLocation(token auth.Token, id string, permission string) (err error, code int)
- func (this *Com) QueryPermissionsSearch(token string, query QueryMessage, result interface{}) (err error, code int)
- func (this *Com) ResourcesEffectedByUserDelete(token auth.Token, resource string) (deleteResourceIds []string, deleteUserFromResourceIds []string, err error)
- func (this *Com) ValidateAspect(token auth.Token, aspect models.Aspect) (err error, code int)
- func (this *Com) ValidateAspectDelete(token auth.Token, id string) (err error, code int)
- func (this *Com) ValidateCharacteristic(token auth.Token, characteristic models.Characteristic) (err error, code int)
- func (this *Com) ValidateCharacteristicDelete(token auth.Token, id string) (err error, code int)
- func (this *Com) ValidateConcept(token auth.Token, concept models.Concept) (err error, code int)
- func (this *Com) ValidateConceptDelete(token auth.Token, id string) (err error, code int)
- func (this *Com) ValidateDevice(token auth.Token, device models.Device) (err error, code int)
- func (this *Com) ValidateDeviceClass(token auth.Token, deviceClass models.DeviceClass) (err error, code int)
- func (this *Com) ValidateDeviceClassDelete(token auth.Token, id string) (err error, code int)
- func (this *Com) ValidateDeviceGroup(token auth.Token, dg models.DeviceGroup) (err error, code int)
- func (this *Com) ValidateDeviceType(token auth.Token, dt models.DeviceType) (err error, code int)
- func (this *Com) ValidateFunction(token auth.Token, function models.Function) (err error, code int)
- func (this *Com) ValidateFunctionDelete(token auth.Token, id string) (err error, code int)
- func (this *Com) ValidateHub(token auth.Token, hub models.Hub) (err error, code int)
- func (this *Com) ValidateLocation(token auth.Token, location models.Location) (err error, code int)
- func (this *Com) ValidateProtocol(token auth.Token, protocol models.Protocol) (err error, code int)
- type ConditionConfig
- type ListAfter
- type PermSearchElement
- type PermissionHolders
- type QueryCheckIds
- type QueryFind
- type QueryListCommons
- type QueryListIds
- type QueryMessage
- type QueryOperationType
- type Selection
Constants ¶
View Source
const Seperator = "$"
Variables ¶
View Source
var ResourcesEffectedByUserDelete_BATCH_SIZE = 1000
Functions ¶
func PreventIdModifier ¶
func RemoveDuplicates ¶
func RemoveDuplicates[T comparable](slice []T) []T
Types ¶
type Com ¶
type Com struct {
// contains filtered or unexported fields
}
func (*Com) DeviceLocalIdToId ¶
func (*Com) DevicesOfTypeExist ¶
func (*Com) GetCharacteristic ¶
func (*Com) GetConcept ¶
func (*Com) GetDeviceClass ¶
func (*Com) GetDeviceType ¶
func (*Com) GetFunction ¶
func (*Com) GetLocation ¶
func (*Com) GetPermissions ¶
func (*Com) GetProtocol ¶
func (*Com) GetResourceOwner ¶
func (this *Com) GetResourceOwner(token auth.Token, kind string, id string, rights string) (owner string, found bool, err error)
GetResourceOwner queries the permission-search service for the entity identified by kind and id and extracts its owner the rights parameter is a mandatory part of the permission-search api it is used to identify which rights the user (token) must have for the entity, to get the entity as a result for example, if a user has 'r' rights to an entity, the query will find the entity, if requested with rights="r" but not with rights="w" or rights="rw"
func (*Com) GetTechnicalDeviceGroup ¶
func (*Com) PermissionCheck ¶
func (*Com) PermissionCheckForCharacteristic ¶
func (*Com) PermissionCheckForConcept ¶
func (*Com) PermissionCheckForDevice ¶
func (*Com) PermissionCheckForDeviceGroup ¶
func (*Com) PermissionCheckForDeviceList ¶
func (*Com) PermissionCheckForDeviceType ¶
func (*Com) PermissionCheckForHub ¶
func (*Com) PermissionCheckForLocation ¶
func (*Com) QueryPermissionsSearch ¶
func (this *Com) QueryPermissionsSearch(token string, query QueryMessage, result interface{}) (err error, code int)
func (*Com) ResourcesEffectedByUserDelete ¶
func (*Com) ValidateAspect ¶
func (*Com) ValidateAspectDelete ¶
func (*Com) ValidateCharacteristic ¶
func (*Com) ValidateCharacteristicDelete ¶
func (*Com) ValidateConcept ¶
func (*Com) ValidateConceptDelete ¶
func (*Com) ValidateDevice ¶
func (*Com) ValidateDeviceClass ¶
func (*Com) ValidateDeviceClassDelete ¶
func (*Com) ValidateDeviceGroup ¶
func (*Com) ValidateDeviceType ¶
func (*Com) ValidateFunction ¶
func (*Com) ValidateFunctionDelete ¶
func (*Com) ValidateHub ¶
func (*Com) ValidateLocation ¶
type ConditionConfig ¶
type ConditionConfig struct { Feature string `json:"feature"` Operation QueryOperationType `json:"operation"` Value interface{} `json:"value"` Ref string `json:"ref"` }
type ListAfter ¶
type ListAfter struct { SortFieldValue interface{} `json:"sort_field_value"` Id string `json:"id"` }
type PermSearchElement ¶
type PermSearchElement struct { Id string `json:"id"` Name string `json:"name"` Creator string `json:"creator"` PermissionHolders PermissionHolders `json:"permission_holders"` }
type PermissionHolders ¶
type QueryCheckIds ¶
type QueryFind ¶
type QueryFind struct { QueryListCommons Search string `json:"search"` Filter *Selection `json:"filter"` }
type QueryListCommons ¶
type QueryListIds ¶
type QueryListIds struct { QueryListCommons Ids []string `json:"ids"` }
type QueryMessage ¶
type QueryMessage struct { Resource string `json:"resource"` Find *QueryFind `json:"find"` ListIds *QueryListIds `json:"list_ids"` CheckIds *QueryCheckIds `json:"check_ids"` }
type QueryOperationType ¶
type QueryOperationType string
const ( QueryEqualOperation QueryOperationType = "==" QueryUnequalOperation QueryOperationType = "!=" QueryAnyValueInFeatureOperation QueryOperationType = "any_value_in_feature" )
Click to show internal directories.
Click to hide internal directories.