Documentation ¶
Index ¶
- func CreateSensor(_ service.Service) fiber.Handler
- func DeleteSensor(_ service.Service) fiber.Handler
- func GetAllSensors(svc service.SensorService) fiber.Handler
- func GetSensorByID(_ service.Service) fiber.Handler
- func GetSensorDataByID(_ service.Service) fiber.Handler
- func RegisterRoutes(svc service.SensorService) *fiber.App
- func UpdateSensor(_ service.Service) fiber.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSensor ¶
@Summary Create sensor @Description Create sensor @Id create-sensor @Tags Sensor @Produce json @Success 200 {object} entities.SensorResponse @Failure 400 {object} HTTPError @Failure 401 {object} HTTPError @Failure 403 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/sensor/ [post] @Security Keycloak @Param body body entities.SensorCreateRequest true "Sensor to create"
func DeleteSensor ¶
@Summary Delete sensor @Description Delete sensor @Id delete-sensor @Tags Sensor @Produce json @Success 200 @Failure 400 {object} HTTPError @Failure 401 {object} HTTPError @Failure 403 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/sensor/{sensor_id} [delete] @Param sensor_id path string true "Sensor ID" @Security Keycloak
func GetAllSensors ¶
func GetAllSensors(svc service.SensorService) fiber.Handler
@Summary Get all sensors @Description Get all sensors @Id get-all-sensors @Tags Sensor @Produce json @Success 200 {object} entities.SensorListResponse @Failure 400 {object} HTTPError @Failure 401 {object} HTTPError @Failure 403 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/sensor [get] @Param status query string false "Sensor Status" @Param page query string false "Page" @Param limit query string false "Limit" @Security Keycloak
func GetSensorByID ¶
@Summary Get sensor by ID @Description Get sensor by ID @Id get-sensor-by-id @Tags Sensor @Produce json @Success 200 {object} entities.SensorResponse @Failure 400 {object} HTTPError @Failure 401 {object} HTTPError @Failure 403 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/sensor/{sensor_id} [get] @Param sensor_id path string true "Sensor ID" @Security Keycloak
func GetSensorDataByID ¶
@Summary Get sensor data by ID @Description Get sensor data by ID @Id get-sensor-data-by-id @Tags Sensor @Produce json @Success 200 {object} entities.SensorDataListResponse @Failure 400 {object} HTTPError @Failure 401 {object} HTTPError @Failure 403 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/sensor/{sensor_id}/data [get] @Param sensor_id path string true "Sensor ID" @Param page query string false "Page" @Param limit query string false "Limit" @Param start_time query string false "Start time" @Param end_time query string false "End time" @Param treecluster_id query string false "TreeCluster ID" @Security Keycloak
func RegisterRoutes ¶
func RegisterRoutes(svc service.SensorService) *fiber.App
func UpdateSensor ¶
@Summary Update sensor @Description Update sensor @Id update-sensor @Tags Sensor @Produce json @Success 200 {object} entities.SensorResponse @Failure 400 {object} HTTPError @Failure 401 {object} HTTPError @Failure 403 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/sensor/{sensor_id} [put] @Param sensor_id path string true "Sensor ID" @Security Keycloak @Param body body entities.SensorUpdateRequest true "Sensor information to update"
Types ¶
This section is empty.