sensor

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSensor

func CreateSensor(_ service.Service) fiber.Handler

@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

func DeleteSensor(_ service.Service) fiber.Handler

@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

func GetSensorByID(_ service.Service) fiber.Handler

@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

func GetSensorDataByID(_ service.Service) fiber.Handler

@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

func UpdateSensor(_ service.Service) fiber.Handler

@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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL