Documentation
¶
Index ¶
- func GetRouterWithoutMiddleware(config configuration.Config, command *controller.Controller) http.Handler
- func Router(config configuration.Config, ctrl *controller.Controller) http.Handler
- func Start(ctx context.Context, wg *sync.WaitGroup, config configuration.Config, ...) (err error)
- type BulkEndpoints
- func (this *BulkEndpoints) Selectables(router *http.ServeMux, config configuration.Config, ...)
- func (this *BulkEndpoints) SelectablesCombinedDevices(router *http.ServeMux, config configuration.Config, ...)
- func (this *BulkEndpoints) SelectablesV2(router *http.ServeMux, config configuration.Config, ...)
- type DeviceGroupsHelper
- func (this *DeviceGroupsHelper) DeviceGroupsHelper(router *http.ServeMux, config configuration.Config, ...)
- func (this *DeviceGroupsHelper) QuerySelectables(router *http.ServeMux, config configuration.Config, ...)
- func (this *DeviceGroupsHelper) Selectables(router *http.ServeMux, config configuration.Config, ...)
- func (this *DeviceGroupsHelper) SelectablesV2(router *http.ServeMux, config configuration.Config, ...)
- type EndpointMethod
- type SelectablesEndpoints
- type Swagger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRouterWithoutMiddleware ¶ added in v0.0.20
func GetRouterWithoutMiddleware(config configuration.Config, command *controller.Controller) http.Handler
func Router ¶
func Router(config configuration.Config, ctrl *controller.Controller) http.Handler
Router doc @title Device-Selection 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 Start ¶
func Start(ctx context.Context, wg *sync.WaitGroup, config configuration.Config, ctrl *controller.Controller) (err error)
starts http server; if wg is not nil it will be set as done when the server is stopped
Types ¶
type BulkEndpoints ¶
type BulkEndpoints struct{}
func (*BulkEndpoints) Selectables ¶ added in v0.0.20
func (this *BulkEndpoints) Selectables(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)
Selectables godoc @Summary deprecated bulk selectables @Description deprecated bulk selectables @Tags bulk, selectables, deprecated @Accept json @Produce json @Security Bearer @Param message body model.BulkRequest true "BulkRequest" @Param complete_services query bool false "adds full import-type and import path options to the result. device services are already complete, the name is a legacy artefact" @Success 200 {array} model.BulkResult @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /bulk/selectables [POST]
func (*BulkEndpoints) SelectablesCombinedDevices ¶ added in v0.0.20
func (this *BulkEndpoints) SelectablesCombinedDevices(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)
SelectablesCombinedDevices godoc @Summary bulk selectables combined devices @Description returns a list of devices, that fulfill any element of the bulk-request list; include_groups and include_imports must be false @Tags bulk, selectables, devices @Accept json @Produce json @Security Bearer @Param message body model.BulkRequest true "BulkRequest" @Success 200 {array} []model.PermSearchDevice @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /bulk/selectables/combined/devices [POST]
func (*BulkEndpoints) SelectablesV2 ¶ added in v0.0.20
func (this *BulkEndpoints) SelectablesV2(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)
SelectablesV2 godoc @Summary bulk selectables v2 @Description bulk selectables v2 @Tags bulk, selectables @Accept json @Produce json @Security Bearer @Param message body model.BulkRequestV2 true "BulkRequestV2" @Param complete_services query bool false "adds full import-type and import path options to the result. device services are already complete, the name is a legacy artefact" @Success 200 {array} model.BulkResult @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /v2/bulk/selectables [POST]
type DeviceGroupsHelper ¶
type DeviceGroupsHelper struct{}
func (*DeviceGroupsHelper) DeviceGroupsHelper ¶ added in v0.0.20
func (this *DeviceGroupsHelper) DeviceGroupsHelper(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)
DeviceGroupsHelper godoc @Summary device group helper @Description helper to create valid device-groups by providing the criteria list resulting of the supplied device-ids and a list of compatible devices, that can be added @Tags device-group, helper @Accept json @Produce json @Security Bearer @Param message body []string true "device id list" @Success 200 {array} model.DeviceGroupHelperResult @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /device-group-helper [POST]
func (*DeviceGroupsHelper) QuerySelectables ¶ added in v0.0.20
func (this *DeviceGroupsHelper) QuerySelectables(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)
QuerySelectables godoc @Summary selectables @Description finds devices, device-groups and/or imports that match all provided filter-criteria @Tags selectables @Produce json @Security Bearer @Param include_devices query bool false "result should include matching devices" @Param include_groups query bool false "result should include matching device-groups" @Param include_imports query bool false "result should include matching imports" @Param include_id_modified query bool false "result should include all valid device id modifications" @Param import_path_trim_first_element query bool false "trim first element of import paths" @Param devices query string false "comma seperated list of device ids; result devices must be in this list (if one is given)" @Param local_devices query string false "comma seperated list of local device ids; result devices must be in this list (if one is given)" @Param local_device_owner query string false "used in combination with local_devices to identify devices, default is the requesting user" @Param filter_devices_by_attr_keys query string false "comma seperated list of attribute keys; result devices have these attributes (if one is given)" @Param message body model.FilterCriteriaAndSet true "criteria list" @Success 200 {array} []model.Selectable @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /v2/query/selectables [POST]
func (*DeviceGroupsHelper) Selectables ¶ added in v0.0.20
func (this *DeviceGroupsHelper) Selectables(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)
Selectables godoc @Summary deprecated selectables @Description deprecated; finds devices, device-groups and/or imports that match all provided filter-criteria @Tags selectables, deprecated @Produce json @Security Bearer @Param include_groups query bool false "result should include matching device-groups" @Param include_imports query bool false "result should include matching imports" @Param local_devices query string false "comma seperated list of local device ids; result devices must be in this list (if one is given)" @Param complete_services query bool false "adds full import-type and import path options to the result. device services are already complete, the name is a legacy artefact" @Param filter_protocols query string false "comma seperated list of protocol ids, that should be ignored" @Param filter_interaction query string false "interaction that is not allowed in the result" @Param json query string false "json encoded criteria list (model.FilterCriteriaAndSet like [{"function_id":"","aspect_id":"","device_class_id":""}])" @Param base64 query string false "alternative to json; base64 encoded json of criteria list" @Param function_id query string false "alternative to json and base64 if only one filter criteria is needed" @Param device_class_id query string false "alternative to json and base64 if only one filter criteria is needed" @Param aspect_id query string false "alternative to json and base64 if only one filter criteria is needed" @Success 200 {array} []model.Selectable @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /selectables [GET]
func (*DeviceGroupsHelper) SelectablesV2 ¶ added in v0.0.20
func (this *DeviceGroupsHelper) SelectablesV2(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)
SelectablesV2 godoc @Summary selectables @Description finds devices, device-groups and/or imports that match all provided filter-criteria @Tags selectables @Produce json @Security Bearer @Param include_devices query bool false "result should include matching devices" @Param include_groups query bool false "result should include matching device-groups" @Param include_imports query bool false "result should include matching imports" @Param include_id_modified query bool false "result should include all valid device id modifications" @Param import_path_trim_first_element query bool false "trim first element of import paths" @Param devices query string false "comma seperated list of device ids; result devices must be in this list (if one is given)" @Param local_devices query string false "comma seperated list of local device ids; result devices must be in this list (if one is given)" @Param local_device_owner query string false "used in combination with local_devices to identify devices, default is the requesting user" @Param json query string false "json encoded criteria list (model.FilterCriteriaAndSet like [{"interaction":"","function_id":"","aspect_id":"","device_class_id":""}])" @Param base64 query string false "alternative to json; base64 encoded json of criteria list" @Param interaction query string false "alternative to json and base64 if only one filter criteria is needed" @Param function_id query string false "alternative to json and base64 if only one filter criteria is needed" @Param device_class_id query string false "alternative to json and base64 if only one filter criteria is needed" @Param aspect_id query string false "alternative to json and base64 if only one filter criteria is needed" @Param filter_devices_by_attr_keys query string false "comma seperated list of attribute keys; result devices have these attributes (if one is given)" @Success 200 {array} []model.Selectable @Failure 400 @Failure 401 @Failure 403 @Failure 404 @Failure 500 @Router /v2/selectables [GET]
type EndpointMethod ¶ added in v0.0.20
type EndpointMethod = func(router *http.ServeMux, config configuration.Config, control *controller.Controller)
type SelectablesEndpoints ¶
type SelectablesEndpoints struct{}
type Swagger ¶ added in v0.0.20
type Swagger struct{}
func (*Swagger) Swagger ¶ added in v0.0.20
func (this *Swagger) Swagger(router *http.ServeMux, config configuration.Config, ctrl *controller.Controller)