Documentation ¶
Index ¶
- func GeneratedAdminListResourceIds()
- func GeneratedCheckMultiplePermissions()
- func GeneratedCheckPermission()
- func GeneratedDeleteResource()
- func GeneratedDeleteTopic()
- func GeneratedGetResource()
- func GeneratedGetTopic()
- func GeneratedListAccessibleResourceIds()
- func GeneratedListComputedPermissions()
- func GeneratedListResourcesWithAdminPermission()
- func GeneratedListTopics()
- func GeneratedQueryListComputedPermissions()
- func GeneratedSetPermission()
- func GeneratedSetTopic()
- func GeneratedSetTopicByPost()
- func GeneratedSwagger()
- func GetRouter(config config.Config, control Controller) http.Handler
- func GetRouterWithoutMiddleware(config config.Config, command Controller) http.Handler
- func Start(ctx context.Context, config config.Config, control Controller) (err error)
- type AspectEndpoints
- func (this *AspectEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *AspectEndpoints) GetMeasuringFunctions(config config.Config, router *http.ServeMux, control Controller)
- func (this *AspectEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
- func (this *AspectEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- func (this *AspectEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
- type AspectNodeEndpoints
- func (this *AspectNodeEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *AspectNodeEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
- func (this *AspectNodeEndpoints) ListMeasuringFunctions(config config.Config, router *http.ServeMux, control Controller)
- func (this *AspectNodeEndpoints) Query(config config.Config, router *http.ServeMux, control Controller)
- type AspectNodeQuery
- type CharacteristicsEndpoints
- func (this *CharacteristicsEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *CharacteristicsEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
- func (this *CharacteristicsEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- func (this *CharacteristicsEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
- type ConceptEndpoints
- func (this *ConceptEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *ConceptEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- func (this *ConceptEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
- type Controller
- type DeviceClassEndpoints
- func (this *DeviceClassEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceClassEndpoints) GetControllingFunctions(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceClassEndpoints) GetFunctions(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceClassEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceClassEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceClassEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
- type DeviceEndpoints
- type DeviceGroupEndpoints
- func (this *DeviceGroupEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceGroupEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceGroupEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
- type DeviceTypeEndpoints
- func (this *DeviceTypeEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceTypeEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceTypeEndpoints) ListV3(config config.Config, router *http.ServeMux, control Controller)
- func (this *DeviceTypeEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- type DeviceTypeSelectableEndpoints
- type EndpointMethod
- type ExtendedDeviceEndpoints
- type ExtendedHubEndpoints
- type FunctionsEndpoints
- func (this *FunctionsEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *FunctionsEndpoints) ListControllingFunctions(config config.Config, router *http.ServeMux, control Controller)
- func (this *FunctionsEndpoints) ListMeasuringFunctions(config config.Config, router *http.ServeMux, control Controller)
- func (this *FunctionsEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- func (this *FunctionsEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
- type HubEndpoints
- func (this *HubEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *HubEndpoints) GetDevices(config config.Config, router *http.ServeMux, control Controller)
- func (this *HubEndpoints) Head(config config.Config, router *http.ServeMux, control Controller)
- func (this *HubEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
- func (this *HubEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- type InvalidElements
- type LocationEndpoints
- type ProtocolEndpoints
- func (this *ProtocolEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
- func (this *ProtocolEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
- func (this *ProtocolEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
- type QueryEndpoint
- type ServiceEndpoints
- type Swagger
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratedAdminListResourceIds ¶ added in v0.1.15
func GeneratedAdminListResourceIds()
GeneratedAdminListResourceIds godoc @Summary lists resource ids in topic @Description lists resource ids in topic, requesting user must be in admin group @Tags topics, resources, admin @Security Bearer @Param topic path string true "Topic Id" @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Produce json @Success 200 {array} string @Failure 400 @Failure 401 @Failure 403 @Failure 500 @Router /permissions/admin/resources/{topic} [get]
func GeneratedCheckMultiplePermissions ¶ added in v0.1.15
func GeneratedCheckMultiplePermissions()
GeneratedCheckMultiplePermissions godoc @Summary check multiple permissions @Description check multiple permissions @Tags check @Security Bearer @Param topic path string true "Topic Id" @Param ids query string true "Resource Ids, comma seperated" @Param permissions query string false "checked permissions in the form of 'rwxa', defaults to 'r'" @Produce json @Success 200 {object} map[string]bool @Failure 400 @Failure 401 @Failure 500 @Router /permissions/check/{topic} [get]
func GeneratedCheckPermission ¶ added in v0.1.15
func GeneratedCheckPermission()
GeneratedCheckPermission godoc @Summary check permission @Description check permission @Tags check @Security Bearer @Param topic path string true "Topic Id" @Param id path string true "Resource Id" @Param permissions query string false "checked permissions in the form of 'rwxa', defaults to 'r'" @Produce json @Success 200 {object} bool @Failure 400 @Failure 401 @Failure 500 @Router /permissions/check/{topic}/{id} [get]
func GeneratedDeleteResource ¶ added in v0.1.15
func GeneratedDeleteResource()
GeneratedDeleteResource godoc @Summary delete resource @Description delete resource, requesting user must have admin right on the resource, topic must have NoCqrs=true @Tags manage, resource @Security Bearer @Param topic path string true "Topic Id" @Param id path string true "Resource Id" @Success 200 {object} model.Resource @Failure 400 @Failure 401 @Failure 403 @Failure 500 @Router /permissions/manage/{topic}/{id} [delete]
func GeneratedDeleteTopic ¶ added in v0.1.15
func GeneratedDeleteTopic()
GeneratedDeleteTopic godoc @Summary remove topic config @Description remove topic config, requesting user must be admin @Tags topics @Security Bearer @Param id path string true "Topic Id" @Success 200 @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /permissions/admin/topics/{id} [delete]
func GeneratedGetResource ¶ added in v0.1.15
func GeneratedGetResource()
GeneratedGetResource godoc @Summary get resource @Description get resource, requesting user must have admin right on the resource @Tags manage, resource @Security Bearer @Param topic path string true "Topic Id" @Param id path string true "Resource Id" @Produce json @Success 200 {object} model.Resource @Failure 400 @Failure 401 @Failure 403 @Failure 500 @Router /permissions/manage/{topic}/{id} [get]
func GeneratedGetTopic ¶ added in v0.1.15
func GeneratedGetTopic()
GeneratedGetTopic godoc @Summary get topic config @Description get topic config, requesting user must be admin @Tags topics @Security Bearer @Param id path string true "Topic Id" @Produce json @Success 200 {object} model.Topic @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /permissions/admin/topics/{id} [get]
func GeneratedListAccessibleResourceIds ¶ added in v0.1.15
func GeneratedListAccessibleResourceIds()
GeneratedListAccessibleResourceIds godoc @Summary list accessible resource ids @Description list accessible resource ids @Tags accessible, resource @Security Bearer @Param topic path string true "Topic Id" @Param permissions query string false "checked permissions in the form of 'rwxa', defaults to 'r'" @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Produce json @Success 200 {array} string @Failure 400 @Failure 401 @Failure 500 @Router /permissions/accessible/{topic} [get]
func GeneratedListComputedPermissions ¶ added in v0.1.15
func GeneratedListComputedPermissions()
GeneratedListComputedPermissions godoc @Summary list the computed permissions to resources of the given topic and ids @Description list the computed permissions to resources of the given topic and ids, group and user permissions are merged, unknown ids will get entries in the result @Tags permissions, check, list @Security Bearer @Param topic path string true "Topic Id" @Param ids query string true "Resource Ids, comma seperated" @Produce json @Success 200 {array} model.ComputedPermissions @Failure 400 @Failure 401 @Failure 500 @Router /permissions/permissions/{topic} [get]
func GeneratedListResourcesWithAdminPermission ¶ added in v0.1.15
func GeneratedListResourcesWithAdminPermission()
GeneratedListResourcesWithAdminPermission godoc @Summary lists resources the user has admin rights to @Description lists resources the user has admin rights to @Tags manage, resource @Security Bearer @Param topic path string true "Topic Id" @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Produce json @Success 200 {array} model.Resource @Failure 400 @Failure 401 @Failure 403 @Failure 500 @Router /permissions/manage/{topic} [get]
func GeneratedListTopics ¶ added in v0.1.15
func GeneratedListTopics()
GeneratedListTopics godoc @Summary lists topics with their configuration @Description lists topics with their configuration, requesting user must be admin @Tags topics @Security Bearer @Param limit query integer false "limits size of result; 0 means unlimited" @Param offset query integer false "offset to be used in combination with limit" @Produce json @Success 200 {array} model.Topic @Failure 400 @Failure 401 @Failure 403 @Failure 500 @Router /permissions/admin/topics [get]
func GeneratedQueryListComputedPermissions ¶ added in v0.1.15
func GeneratedQueryListComputedPermissions()
GeneratedQueryListComputedPermissions godoc @Summary list the computed permissions to resources of the given topic and ids @Description list the computed permissions to resources of the given topic and ids, group and user permissions are merged, unknown ids will get entries in the result @Tags permissions, check, list, query @Security Bearer @Param topic path string true "Topic Id" @Param ids body []string true "Resource Ids" @Produce json @Success 200 {array} model.ComputedPermissions @Failure 400 @Failure 401 @Failure 500 @Router /permissions/query/permissions/{topic} [post]
func GeneratedSetPermission ¶ added in v0.1.15
func GeneratedSetPermission()
GeneratedSetPermission godoc @Summary set resource rights @Description get resource rights, requesting user must have admin right @Tags manage, resource-rights @Security Bearer @Param topic path string true "Topic Id" @Param id path string true "Resource Id" @Param wait query bool false "if set to true, the response will be sent after the corresponding kafka done signal has been received" @Param message body model.ResourcePermissions true "Topic" @Accept json @Produce json @Success 200 {object} model.ResourcePermissions @Failure 400 @Failure 401 @Failure 403 @Failure 500 @Router /permissions/manage/{topic}/{id} [put]
func GeneratedSetTopic ¶ added in v0.1.15
func GeneratedSetTopic()
GeneratedSetTopic godoc @Summary set topic config @Description set topic config, requesting user must be admin @Tags topics @Accept json @Produce json @Security Bearer @Param id path string true "Topic Id" @Param message body model.Topic true "Topic" @Success 200 {object} model.Topic @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /permissions/admin/topics/{id} [put]
func GeneratedSetTopicByPost ¶ added in v0.1.15
func GeneratedSetTopicByPost()
GeneratedSetTopicByPost godoc @Summary set topic config @Description set topic config, requesting user must be admin @Tags topics @Accept json @Produce json @Security Bearer @Param message body model.Topic true "Topic" @Success 200 {object} model.Topic @Success 202 {object} model.Topic @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /permissions/admin/topics [POST]
func GeneratedSwagger ¶ added in v0.1.15
func GeneratedSwagger()
func GetRouter ¶ added in v0.1.15
func GetRouter(config config.Config, control Controller) http.Handler
GetRouter doc @title Device-Repository API @version 0.1 @license.name Apache 2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html @BasePath / @securityDefinitions.apikey Bearer @in header @name Authorization @description Type "Bearer" followed by a space and JWT token.
func GetRouterWithoutMiddleware ¶ added in v0.1.15
func GetRouterWithoutMiddleware(config config.Config, command Controller) http.Handler
Types ¶
type AspectEndpoints ¶ added in v0.1.15
type AspectEndpoints struct{}
func (*AspectEndpoints) Get ¶ added in v0.1.15
func (this *AspectEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get aspect @Description get aspect @Tags get, aspects @Produce json @Security Bearer @Param id path string true "Aspect Id" @Success 200 {object} models.Aspect @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /aspects/{id} [GET]
func (*AspectEndpoints) GetMeasuringFunctions ¶ added in v0.1.15
func (this *AspectEndpoints) GetMeasuringFunctions(config config.Config, router *http.ServeMux, control Controller)
GetMeasuringFunctions godoc @Summary list aspect measuring-functions @Description list measuring-functions used in combination with this aspect @Tags list, aspects, functions @Produce json @Security Bearer @Param id path string true "Aspect Id" @Success 200 {array} models.Function @Param ancestors query bool false "filter; if true, returns also functions used in combination with ancestors of the input aspect" @Param descendants query bool false "filter; if true, returns also functions used in combination with descendants of the input aspect" @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /aspects/{id}/measuring-functions [GET]
func (*AspectEndpoints) List ¶ added in v0.1.15
func (this *AspectEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list aspects @Description list aspects @Tags list, aspects @Produce json @Security Bearer @Param function query string false "filter; only 'measuring-function' is a valid value; if set, returns aspects used in combination with measuring-functions" @Param ancestors query bool false "filter; in combination with 'function'; if true, returns also ancestor nodes of matching aspects" @Param descendants query bool false "filter; in combination with 'function'; if true, returns also descendant nodes of matching aspects" @Success 200 {array} models.Aspect @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /aspects [GET]
func (*AspectEndpoints) Validate ¶ added in v0.1.15
func (this *AspectEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate aspect @Description validate aspect @Tags validate, aspects @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Aspect true "Aspect to be validated" @Success 200 @Failure 400 @Failure 500 @Router /aspects [PUT]
func (*AspectEndpoints) ValidateDelete ¶ added in v0.1.15
func (this *AspectEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
ValidateDelete godoc @Summary validate aspect delete @Description validate if aspect may be deleted @Tags validate, aspects @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not a delete but a validation" @Param id path string true "Aspect Id" @Success 200 @Failure 400 @Failure 500 @Router /aspects/{id} [DELETE]
type AspectNodeEndpoints ¶ added in v0.1.15
type AspectNodeEndpoints struct{}
func (*AspectNodeEndpoints) Get ¶ added in v0.1.15
func (this *AspectNodeEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get aspect-node @Description get aspect-node @Tags get, aspect-nodes, aspects @Produce json @Security Bearer @Param id path string true "Aspect-Node Id" @Success 200 {object} models.AspectNode @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /aspect-nodes/{id} [GET]
func (*AspectNodeEndpoints) List ¶ added in v0.1.15
func (this *AspectNodeEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list aspect-nodes @Description list aspect-nodes @Tags list, aspect-nodes, aspects @Produce json @Security Bearer @Param function query string false "filter; only 'measuring-function' is a valid value; if set, returns aspect-nodes used in combination with measuring-functions" @Param ancestors query bool false "filter; in combination with 'function'; if true, returns also ancestor nodes of matching nodes" @Param descendants query bool false "filter; in combination with 'function'; if true, returns also descendant nodes of matching nodes" @Success 200 {array} models.AspectNode @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /aspect-nodes [GET]
func (*AspectNodeEndpoints) ListMeasuringFunctions ¶ added in v0.1.15
func (this *AspectNodeEndpoints) ListMeasuringFunctions(config config.Config, router *http.ServeMux, control Controller)
ListMeasuringFunctions godoc @Summary list aspect-node measuring-functions @Description list measuring-functions used in combination with this aspect-node @Tags list, aspect-nodes, aspects, functions @Produce json @Security Bearer @Param id path string true "Aspect-Node Id" @Success 200 {array} models.Function @Param ancestors query bool false "filter; if true, returns also functions used in combination with ancestors of the input aspect-node" @Param descendants query bool false "filter; if true, returns also functions used in combination with descendants of the input aspect-node" @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /aspect-nodes/{id}/measuring-functions [GET]
func (*AspectNodeEndpoints) Query ¶ added in v0.1.15
func (this *AspectNodeEndpoints) Query(config config.Config, router *http.ServeMux, control Controller)
Query godoc @Summary query aspect-nodes @Description query aspect-nodes @Tags query, aspect-nodes @Accept json @Produce json @Security Bearer @Param message body AspectNodeQuery true "AspectNodeQuery" @Success 200 {array} models.AspectNode @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /query/aspect-nodes [POST]
type AspectNodeQuery ¶
type AspectNodeQuery struct {
Ids *[]string `json:"ids,omitempty"`
}
type CharacteristicsEndpoints ¶ added in v0.1.15
type CharacteristicsEndpoints struct{}
func (*CharacteristicsEndpoints) Get ¶ added in v0.1.15
func (this *CharacteristicsEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get characteristic @Description get characteristic @Tags get, characteristics @Produce json @Security Bearer @Param id path string true "Characteristic Id" @Success 200 {object} models.Characteristic @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /characteristics/{id} [GET]
func (*CharacteristicsEndpoints) List ¶ added in v0.1.15
func (this *CharacteristicsEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list characteristics @Description list characteristics @Tags list, characteristics @Produce json @Security Bearer @Param leafsOnly query bool false "default=true; filter; return only characteristics that have no sub-characteristics" @Success 200 {array} models.Characteristic @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /characteristics [GET]
func (*CharacteristicsEndpoints) Validate ¶ added in v0.1.15
func (this *CharacteristicsEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate characteristic @Description validate characteristic @Tags validate, characteristics @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Characteristic true "Characteristic to be validated" @Success 200 @Failure 400 @Failure 500 @Router /characteristics [PUT]
func (*CharacteristicsEndpoints) ValidateDelete ¶ added in v0.1.15
func (this *CharacteristicsEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
ValidateDelete godoc @Summary validate characteristic delete @Description validate if characteristic may be deleted @Tags validate, characteristics @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not a delete but a validation" @Param id path string true "Characteristics Id" @Success 200 @Failure 400 @Failure 500 @Router /characteristics/{id} [DELETE]
type ConceptEndpoints ¶ added in v0.1.15
type ConceptEndpoints struct{}
func (*ConceptEndpoints) Get ¶ added in v0.1.15
func (this *ConceptEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get concept @Description get concept @Tags get, concepts @Produce json @Security Bearer @Param id path string true "Concepts Id" @Param sub-class query bool false "default=false; true -> returns models.ConceptWithCharacteristics; false -> returns models.Concept" @Success 200 {object} models.Concept @Success 200 {object} models.ConceptWithCharacteristics @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /concepts/{id} [GET]
func (*ConceptEndpoints) Validate ¶ added in v0.1.15
func (this *ConceptEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate concept @Description validate concept @Tags validate, concepts @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Concept true "Concept to be validated" @Success 200 @Failure 400 @Failure 500 @Router /concepts [PUT]
func (*ConceptEndpoints) ValidateDelete ¶ added in v0.1.15
func (this *ConceptEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
ValidateDelete godoc @Summary validate concepts delete @Description validate if concept may be deleted @Tags validate, concepts @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not a delete but a validation" @Param id path string true "Concepts Id" @Success 200 @Failure 400 @Failure 500 @Router /concepts/{id} [DELETE]
type Controller ¶
type Controller interface { ListDevices(token string, options model.DeviceListOptions) (result []models.Device, err error, errCode int) ReadDevice(id string, token string, action model.AuthAction) (result models.Device, err error, errCode int) ReadDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction) (result models.Device, err error, errCode int) ValidateDevice(token string, device models.Device) (err error, code int) ListExtendedDevices(token string, options model.DeviceListOptions) (result []models.ExtendedDevice, total int64, err error, errCode int) ReadExtendedDevice(id string, token string, action model.AuthAction) (result models.ExtendedDevice, err error, errCode int) ReadExtendedDeviceByLocalId(ownerId string, localId string, token string, action model.AuthAction) (result models.ExtendedDevice, err error, errCode int) ReadHub(id string, token string, action model.AuthAction) (result models.Hub, err error, errCode int) ListHubs(token string, options model.HubListOptions) (result []models.Hub, err error, errCode int) ListHubDeviceIds(id string, token string, action model.AuthAction, asLocalId bool) (result []string, err error, errCode int) ValidateHub(token string, hub models.Hub) (err error, code int) ListExtendedHubs(token string, options model.HubListOptions) (result []models.ExtendedHub, total int64, err error, errCode int) ReadExtendedHub(id string, token string, action model.AuthAction) (result models.ExtendedHub, err error, errCode int) ReadDeviceType(id string, token string) (result models.DeviceType, err error, errCode int) 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) ListDeviceTypesV2(token string, limit int64, offset int64, sort string, filter []model.FilterCriteria, includeModified bool, includeUnmodified bool) (result []models.DeviceType, err error, errCode int) ListDeviceTypesV3(token string, listOptions model.DeviceTypeListOptions) (result []models.DeviceType, err error, errCode int) ValidateDeviceType(deviceType models.DeviceType, options model.ValidationOptions) (err error, code int) GetDeviceTypeSelectables(query []model.FilterCriteria, pathPrefix string, interactionsFilter []string, includeModified bool) (result []model.DeviceTypeSelectable, err error, code int) GetDeviceTypeSelectablesV2(query []model.FilterCriteria, pathPrefix string, includeModified bool, servicesMustMatchAllCriteria bool) (result []model.DeviceTypeSelectable, err error, code int) ReadDeviceGroup(id string, token string, filterGenericDuplicateCriteria bool) (result models.DeviceGroup, err error, errCode int) ValidateDeviceGroup(token string, deviceGroup models.DeviceGroup) (err error, code int) ValidateDeviceGroupDelete(token string, id string) (err error, code int) ReadProtocol(id string, token string) (result models.Protocol, err error, errCode int) ListProtocols(token string, limit int64, offset int64, sort string) (result []models.Protocol, err error, errCode int) ValidateProtocol(protocol models.Protocol) (err error, code int) GetService(id string) (result models.Service, err error, code int) GetAspects() ([]models.Aspect, error, int) GetAspectsWithMeasuringFunction(ancestors bool, descendants bool) ([]models.Aspect, error, int) //returns all aspects used in combination with measuring functions (usage may optionally be by its descendants or ancestors) GetAspect(id string) (models.Aspect, error, int) ValidateAspect(aspect models.Aspect) (err error, code int) ValidateAspectDelete(id string) (err error, code int) GetAspectNode(id string) (models.AspectNode, error, int) GetAspectNodes() ([]models.AspectNode, error, int) GetAspectNodesMeasuringFunctions(id string, ancestors bool, descendants bool) (result []models.Function, err error, errCode int) //returns all measuring functions used in combination with given aspect (and optional its descendants and ancestors) GetAspectNodesWithMeasuringFunction(ancestors bool, descendants bool) ([]models.AspectNode, error, int) //returns all aspect-nodes used in combination with measuring functions (usage may optionally be by its descendants or ancestors) GetAspectNodesByIdList(strings []string) ([]models.AspectNode, error, int) GetCharacteristics(leafsOnly bool) (result []models.Characteristic, err error, errCode int) GetCharacteristic(id string) (result models.Characteristic, err error, errCode int) ValidateCharacteristics(characteristic models.Characteristic) (err error, code int) ValidateCharacteristicDelete(id string) (err error, code int) GetConceptWithCharacteristics(id string) (models.ConceptWithCharacteristics, error, int) GetConceptWithoutCharacteristics(id string) (models.Concept, error, int) ValidateConcept(concept models.Concept) (err error, code int) ValidateConceptDelete(id string) (err error, code int) GetDeviceClasses() ([]models.DeviceClass, error, int) GetDeviceClassesWithControllingFunctions() ([]models.DeviceClass, error, int) //returns all device-classes used in combination with controlling functions GetDeviceClassesFunctions(id string) (result []models.Function, err error, errCode int) //returns all functions used in combination with given device-class GetDeviceClassesControllingFunctions(id string) (result []models.Function, err error, errCode int) //returns all controlling functions used in combination with given device-class GetDeviceClass(id string) (result models.DeviceClass, err error, errCode int) ValidateDeviceClass(deviceclass models.DeviceClass) (err error, code int) ValidateDeviceClassDelete(id string) (err error, code int) GetFunctionsByType(rdfType string) (result []models.Function, err error, errCode int) GetFunction(id string) (result models.Function, err error, errCode int) ValidateFunction(function models.Function) (err error, code int) ValidateFunctionDelete(id string) (err error, code int) GetLocation(id string, token string) (location models.Location, err error, errCode int) ValidateLocation(location models.Location) (err error, code int) GetUsedInDeviceType(query model.UsedInDeviceTypeQuery) (result model.UsedInDeviceTypeResponse, err error, errCode int) }
type DeviceClassEndpoints ¶
type DeviceClassEndpoints struct{}
func (*DeviceClassEndpoints) Get ¶ added in v0.1.15
func (this *DeviceClassEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get device-class @Description get device-class @Tags get, device-classes @Produce json @Security Bearer @Param id path string true "Device Class Id" @Success 200 {object} models.DeviceClass @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /device-classes/{id} [GET]
func (*DeviceClassEndpoints) GetControllingFunctions ¶ added in v0.1.15
func (this *DeviceClassEndpoints) GetControllingFunctions(config config.Config, router *http.ServeMux, control Controller)
GetControllingFunctions godoc @Summary list device-class functions @Description list controlling-functions used in combination with this device-class @Tags list, device-classes, functions @Produce json @Security Bearer @Param id path string true "Device Class Id" @Success 200 {array} models.Function @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /device-classes/{id}/controlling-functions [GET]
func (*DeviceClassEndpoints) GetFunctions ¶ added in v0.1.15
func (this *DeviceClassEndpoints) GetFunctions(config config.Config, router *http.ServeMux, control Controller)
GetFunctions godoc @Summary list device-class functions @Description list functions used in combination with this device-class @Tags list, device-classes, functions @Produce json @Security Bearer @Param id path string true "Device Class Id" @Success 200 {array} models.Function @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /device-classes/{id}/functions [GET]
func (*DeviceClassEndpoints) List ¶ added in v0.1.15
func (this *DeviceClassEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list device-classes @Description list device-classes @Tags list, device-classes @Produce json @Security Bearer @Param function query string false "filter; only 'controlling-function' is a valid value; if set, returns device-classes used in combination with controlling-function" @Success 200 {array} models.DeviceClass @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /device-classes [GET]
func (*DeviceClassEndpoints) Validate ¶ added in v0.1.15
func (this *DeviceClassEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate device-class @Description validate device-class @Tags validate, device-classes @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.DeviceClass true "Device-Class to be validated" @Success 200 @Failure 400 @Failure 500 @Router /device-classes [PUT]
func (*DeviceClassEndpoints) ValidateDelete ¶ added in v0.1.15
func (this *DeviceClassEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
ValidateDelete godoc @Summary validate device-class delete @Description validate if device-class may be deleted @Tags validate, device-classes @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not a delete but a validation" @Param id path string true "DeviceClass Id" @Success 200 @Failure 400 @Failure 500 @Router /device-classes/{id} [DELETE]
type DeviceEndpoints ¶
type DeviceEndpoints struct{}
func (*DeviceEndpoints) Get ¶ added in v0.1.15
func (this *DeviceEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get device @Description get device @Tags get, devices @Produce json @Security Bearer @Param id path string true "Device Id" @Param as query string false "interprets the id as local_id if as=='local_id'" @Param owner_id query string false "default requesting user; used in combination with local_id (as=='local_id') to identify the device" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 {object} models.Device @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /devices/{id} [GET]
func (*DeviceEndpoints) List ¶ added in v0.1.15
func (this *DeviceEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list devices @Description list devices @Tags list, devices @Produce json @Security Bearer @Param limit query integer false "default 100, will be ignored if 'ids' is set" @Param offset query integer false "default 0, will be ignored if 'ids' is set" @Param search query string false "filter" @Param sort query string false "default name.asc" @Param ids query string false "filter; ignores limit/offset; comma-seperated list" @Param device-type-ids query string false "filter; comma-seperated list" @Param attr-keys query string false "filter; comma-seperated list; lists elements only if they have an attribute key that is in the given list" @Param attr-values query string false "filter; comma-seperated list; lists elements only if they have an attribute value that is in the given list" @Param connection-state query integer false "filter; valid values are 'online', 'offline' and an empty string for unknown states" @Success 200 {array} models.Device @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /devices [GET]
func (*DeviceEndpoints) Validate ¶ added in v0.1.15
func (this *DeviceEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate device @Description validate device @Tags validate, devices @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Device true "Device to be validated" @Success 200 @Failure 400 @Failure 500 @Router /devices [PUT]
type DeviceGroupEndpoints ¶
type DeviceGroupEndpoints struct{}
func (*DeviceGroupEndpoints) Get ¶ added in v0.1.15
func (this *DeviceGroupEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get device-group @Description get device-group @Tags get, device-groups @Produce json @Security Bearer @Param id path string true "Device Group Id" @Param filter_generic_duplicate_criteria query bool false "remove criteria that are more generalized variations of already listed criteria (ref SNRGY-3027)" @Success 200 {object} models.DeviceGroup @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /device-groups/{id} [GET]
func (*DeviceGroupEndpoints) Validate ¶ added in v0.1.15
func (this *DeviceGroupEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate device-group @Description validate device-group @Tags validate, device-groups @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.DeviceGroup true "DeviceGroup to be validated" @Success 200 @Failure 400 @Failure 500 @Router /device-groups [PUT]
func (*DeviceGroupEndpoints) ValidateDelete ¶ added in v0.1.18
func (this *DeviceGroupEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
ValidateDelete godoc @Summary validate device-group delete @Description validate if device-group may be deleted @Tags validate, device-groups @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not a delete but a validation" @Param id path string true "Device-Group Id" @Success 200 @Failure 400 @Failure 500 @Router /device-groups/{id} [DELETE]
type DeviceTypeEndpoints ¶
type DeviceTypeEndpoints struct{}
func (*DeviceTypeEndpoints) Get ¶ added in v0.1.15
func (this *DeviceTypeEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get device-type @Description get device-type @Tags get, device-types @Produce json @Security Bearer @Param id path string true "Device-Type Id" @Success 200 {object} models.DeviceType @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /device-types/{id} [GET]
func (*DeviceTypeEndpoints) List ¶ added in v0.1.15
func (this *DeviceTypeEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
deprecated
func (*DeviceTypeEndpoints) ListV3 ¶ added in v0.1.15
func (this *DeviceTypeEndpoints) ListV3(config config.Config, router *http.ServeMux, control Controller)
ListV3 godoc @Summary list device-types @Description list device-types @Tags list, device-types @Produce json @Security Bearer @Param limit query integer false "default 100, will be ignored if 'ids' is set" @Param offset query integer false "default 0, will be ignored if 'ids' is set" @Param search query string false "filter" @Param sort query string false "default name.asc" @Param ids query string false "filter; ignores limit/offset; comma-seperated list" @Param attr-keys query string false "filter; comma-seperated list; lists elements only if they have an attribute key that is in the given list" @Param attr-values query string false "filter; comma-seperated list; lists elements only if they have an attribute value that is in the given list" @Param include-modified query bool false "include id-modified device-types" @Param ignore-unmodified query bool false "no unmodified device-types" @Param criteria query string false "filter; json encoded []model.FilterCriteria" @Success 200 {array} models.DeviceType @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /v3/device-types [GET]
func (*DeviceTypeEndpoints) Validate ¶ added in v0.1.15
func (this *DeviceTypeEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate device-type @Description validate device-type @Tags validate, device-types @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.DeviceType true "Device-Type to be validated" @Success 200 @Failure 400 @Failure 500 @Router /device-types [PUT]
type DeviceTypeSelectableEndpoints ¶
type DeviceTypeSelectableEndpoints struct{}
func (*DeviceTypeSelectableEndpoints) Query ¶ added in v0.1.15
func (this *DeviceTypeSelectableEndpoints) Query(config config.Config, router *http.ServeMux, control Controller)
Query godoc @Summary validate device-type @Description validate device-type @Tags validate, device-types @Accept json @Produce json @Security Bearer @Param message body []model.FilterCriteria true "filtered by criteria" @Param path-prefix query string false "prefix added to variable paths" @Param interactions-filter query string false "'event', 'request', 'event+request'" @Param include_id_modified query bool false "include id-modified device-types" @Success 200 {array} model.DeviceTypeSelectable @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /query/device-type-selectables [POST]
func (*DeviceTypeSelectableEndpoints) QueryV2 ¶ added in v0.1.15
func (this *DeviceTypeSelectableEndpoints) QueryV2(config config.Config, router *http.ServeMux, control Controller)
QueryV2 godoc @Summary validate device-type @Description validate device-type @Tags validate, device-types @Accept json @Produce json @Security Bearer @Param message body []model.FilterCriteria true "filtered by criteria" @Param path-prefix query string false "prefix added to variable paths" @Param services_must_match_all_criteria query bool false "toggle if filter criteria is 'and' or 'or' combination" @Param include_id_modified query bool false "include id-modified device-types" @Success 200 {array} model.DeviceTypeSelectable @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /v2/query/device-type-selectables [POST]
type EndpointMethod ¶ added in v0.1.15
type EndpointMethod = func(config config.Config, router *http.ServeMux, ctrl Controller)
type ExtendedDeviceEndpoints ¶ added in v0.1.0
type ExtendedDeviceEndpoints struct{}
func (*ExtendedDeviceEndpoints) Get ¶ added in v0.1.15
func (this *ExtendedDeviceEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get extended-device @Description get extended-device @Tags get, devices, extended-devices @Produce json @Security Bearer @Param id path string true "Device Id" @Param as query string false "interprets the id as local_id if as=='local_id'" @Param owner_id query string false "default requesting user; used in combination with local_id (as=='local_id') to identify the device" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 {object} models.Device @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /extended-devices/{id} [GET]
func (*ExtendedDeviceEndpoints) List ¶ added in v0.1.15
func (this *ExtendedDeviceEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list extended-device @Description list extended-device @Tags list, devices, extended-devices @Produce json @Security Bearer @Param limit query integer false "default 100, will be ignored if 'ids' is set" @Param offset query integer false "default 0, will be ignored if 'ids' is set" @Param search query string false "filter" @Param sort query string false "default name.asc" @Param ids query string false "filter; ignores limit/offset; comma-seperated list" @Param device-type-ids query string false "filter; comma-seperated list" @Param attr-keys query string false "filter; comma-seperated list; lists elements only if they have an attribute key that is in the given list" @Param attr-values query string false "filter; comma-seperated list; lists elements only if they have an attribute value that is in the given list" @Param connection-state query integer false "filter; valid values are 'online', 'offline' and an empty string for unknown states" @Success 200 {array} models.ExtendedDevice @Header 200 {integer} X-Total-Count "count of all matching elements; used for pagination" @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /extended-devices [GET]
type ExtendedHubEndpoints ¶ added in v0.1.0
type ExtendedHubEndpoints struct{}
func (*ExtendedHubEndpoints) Get ¶ added in v0.1.15
func (this *ExtendedHubEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get extended-hubs @Description get extended-hubs @Tags get, hubs, extended-hubs @Produce json @Security Bearer @Param id path string true "Hub Id" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 {object} models.ExtendedHub @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /extended-hubs/{id} [GET]
func (*ExtendedHubEndpoints) List ¶ added in v0.1.15
func (this *ExtendedHubEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list extended-hubs @Description list extended-hubs @Tags list, hubs, extended-hubs @Produce json @Security Bearer @Param limit query integer false "default 100, will be ignored if 'ids' is set" @Param offset query integer false "default 0, will be ignored if 'ids' is set" @Param search query string false "filter" @Param sort query string false "default name.asc" @Param ids query string false "filter; ignores limit/offset; comma-seperated list" @Param connection-state query integer false "filter; valid values are 'online', 'offline' and an empty string for unknown states" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 {array} models.ExtendedHub @Header 200 {integer} X-Total-Count "count of all matching elements; used for pagination" @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /extended-hubs [GET]
type FunctionsEndpoints ¶
type FunctionsEndpoints struct{}
func (*FunctionsEndpoints) Get ¶ added in v0.1.15
func (this *FunctionsEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get function @Description get function @Tags get, functions @Produce json @Security Bearer @Param id path string true "Function Id" @Success 200 {object} models.DeviceClass @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /functions/{id} [GET]
func (*FunctionsEndpoints) ListControllingFunctions ¶ added in v0.1.15
func (this *FunctionsEndpoints) ListControllingFunctions(config config.Config, router *http.ServeMux, control Controller)
ListControllingFunctions godoc @Summary list controlling-functions @Description list controlling-functions @Tags list, controlling-functions, functions @Produce json @Security Bearer @Success 200 {array} models.Function @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /controlling-functions [GET]
func (*FunctionsEndpoints) ListMeasuringFunctions ¶ added in v0.1.15
func (this *FunctionsEndpoints) ListMeasuringFunctions(config config.Config, router *http.ServeMux, control Controller)
ListMeasuringFunctions godoc @Summary list measuring-functions @Description list measuring-functions @Tags list, measuring-functions, functions @Produce json @Security Bearer @Success 200 {array} models.Function @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /measuring-functions [GET]
func (*FunctionsEndpoints) Validate ¶ added in v0.1.15
func (this *FunctionsEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate function @Description validate function @Tags validate, functions @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Function true "Function to be validated" @Success 200 @Failure 400 @Failure 500 @Router /functions [PUT]
func (*FunctionsEndpoints) ValidateDelete ¶ added in v0.1.15
func (this *FunctionsEndpoints) ValidateDelete(config config.Config, router *http.ServeMux, control Controller)
ValidateDelete godoc @Summary validate function delete @Description validate if function may be deleted @Tags validate, functions @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not a delete but a validation" @Param id path string true "Function Id" @Success 200 @Failure 400 @Failure 500 @Router /functions/{id} [DELETE]
type HubEndpoints ¶
type HubEndpoints struct{}
func (*HubEndpoints) Get ¶ added in v0.1.15
func (this *HubEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get hub @Description get hub @Tags get, hubs @Produce json @Security Bearer @Param id path string true "Hub Id" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 {object} models.Hub @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /hubs/{id} [GET]
func (*HubEndpoints) GetDevices ¶ added in v0.1.15
func (this *HubEndpoints) GetDevices(config config.Config, router *http.ServeMux, control Controller)
GetDevices godoc @Summary get device ids of hub @Description get device ids of hub @Tags get, hubs, devices @Produce json @Security Bearer @Param id path string true "Hub Id" @Param as query string false "default 'local_id'; valid values 'local_id', 'localId', 'id'; selects if device ids or device local-ids should be returned" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 {array} string @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /hubs/{id}/devices [GET]
func (*HubEndpoints) Head ¶ added in v0.1.15
func (this *HubEndpoints) Head(config config.Config, router *http.ServeMux, control Controller)
Head godoc @Summary head hub @Description head hub @Tags head, hubs @Security Bearer @Param id path string true "Hub Id" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /hubs/{id} [HEAD]
func (*HubEndpoints) List ¶ added in v0.1.15
func (this *HubEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary list hubs @Description list hubs @Tags list, hubs @Produce json @Security Bearer @Param limit query integer false "default 100, will be ignored if 'ids' is set" @Param offset query integer false "default 0, will be ignored if 'ids' is set" @Param search query string false "filter" @Param sort query string false "default name.asc" @Param ids query string false "filter; ignores limit/offset; comma-seperated list" @Param connection-state query integer false "filter; valid values are 'online', 'offline' and an empty string for unknown states" @Param p query string false "default 'r'; used to check permissions on request; valid values are 'r', 'w', 'x', 'a' for read, write, execute, administrate" @Success 200 {array} models.Hub @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /hubs [GET]
func (*HubEndpoints) Validate ¶ added in v0.1.15
func (this *HubEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate hub @Description validate hub @Tags validate, hubs @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Hub true "Hub to be validated" @Success 200 @Failure 400 @Failure 500 @Router /hubs [PUT]
type InvalidElements ¶ added in v0.0.5
type InvalidElements struct{}
func (*InvalidElements) DeviceTypes ¶ added in v0.1.15
func (this *InvalidElements) DeviceTypes(config config.Config, router *http.ServeMux, control Controller)
DeviceTypes godoc @Summary @Description validate existing device-types @Tags validate, device-types @Produce json @Security Bearer @Param limit query integer false "default 100; limit of checked device-types not of returned errors" @Param offset query integer false "default 0" @Param sort query string false "default name.asc" @Param allow_none_leaf_aspect_nodes_in_device_types query string false "allow none leaf aspect nodes in device-types" @Success 200 {array} ValidationError @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /invalid/device-type [GET]
type LocationEndpoints ¶
type LocationEndpoints struct{}
func (*LocationEndpoints) Get ¶ added in v0.1.15
func (this *LocationEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get location @Description get location @Tags get, locations @Produce json @Security Bearer @Param id path string true "Location Id" @Success 200 {object} models.Location @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /locations/{id} [GET]
func (*LocationEndpoints) Validate ¶ added in v0.1.15
func (this *LocationEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate location @Description validate location @Tags validate, locations @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Location true "Location to be validated" @Success 200 @Failure 400 @Failure 500 @Router /functions [PUT]
type ProtocolEndpoints ¶
type ProtocolEndpoints struct{}
func (*ProtocolEndpoints) Get ¶ added in v0.1.15
func (this *ProtocolEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get protocol @Description get protocol @Tags get, protocols @Produce json @Security Bearer @Param id path string true "Protocol Id" @Success 200 {object} models.Protocol @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /protocols/{id} [GET]
func (*ProtocolEndpoints) List ¶ added in v0.1.15
func (this *ProtocolEndpoints) List(config config.Config, router *http.ServeMux, control Controller)
List godoc @Summary get protocol @Description get protocol @Tags get, protocols @Produce json @Security Bearer @Param limit query integer false "default 100" @Param offset query integer false "default 0" @Param sort query string false "default name.asc" @Success 200 {array} models.Protocol @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /protocols [GET]
func (*ProtocolEndpoints) Validate ¶ added in v0.1.15
func (this *ProtocolEndpoints) Validate(config config.Config, router *http.ServeMux, control Controller)
Validate godoc @Summary validate protocol @Description validate protocol @Tags validate, protocols @Accept json @Security Bearer @Param dry-run query bool true "must be true; reminder, that this is not an update but a validation" @Param message body models.Protocol true "Location to be validated" @Success 200 @Failure 400 @Failure 500 @Router /protocols [PUT]
type QueryEndpoint ¶ added in v0.0.6
type QueryEndpoint struct{}
func (*QueryEndpoint) Query ¶ added in v0.1.15
func (this *QueryEndpoint) Query(config config.Config, router *http.ServeMux, control Controller)
Query godoc @Summary query used-in-device-type @Description query used-in-device-type @Tags query, device-types @Accept json @Produce json @Security Bearer @Param message body model.UsedInDeviceTypeQuery true "filter" @Success 200 {object} model.UsedInDeviceTypeResponse @Failure 400 @Failure 404 @Failure 500 @Router /query/used-in-device-type [POST]
type ServiceEndpoints ¶
type ServiceEndpoints struct{}
func (*ServiceEndpoints) Get ¶ added in v0.1.15
func (this *ServiceEndpoints) Get(config config.Config, router *http.ServeMux, control Controller)
Get godoc @Summary get service @Description get service @Tags get, services @Produce json @Security Bearer @Param id path string true "Service Id" @Success 200 {object} models.Service @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /services/{id} [GET]
type ValidationError ¶ added in v0.0.5
Source Files ¶
- api.go
- aspectnodes.go
- aspects.go
- characteristics.go
- concepts.go
- deviceclasses.go
- devicegroups.go
- devices.go
- devices_extended.go
- devicetypes.go
- devicetypeselectable.go
- functions.go
- generated_permissions.go
- hubs.go
- hubs_extended.go
- interfaces.go
- invalid.go
- locations.go
- protocols.go
- query.go
- services.go
- swagger.go