sensors

package
v0.0.0-...-9b8362b Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllSensors

func GetAllSensors(w http.ResponseWriter, r *http.Request)

func GetCurrentHumidity

func GetCurrentHumidity(w http.ResponseWriter, r *http.Request)

func GetCurrentPressure

func GetCurrentPressure(w http.ResponseWriter, r *http.Request)

func GetCurrentTemperature

func GetCurrentTemperature(w http.ResponseWriter, r *http.Request)

func GetHumidityHistory

func GetHumidityHistory(w http.ResponseWriter, r *http.Request)

func GetPressureHistory

func GetPressureHistory(w http.ResponseWriter, r *http.Request)

func GetSensorByID

func GetSensorByID(w http.ResponseWriter, r *http.Request)

func GetSensorsByFarmID

func GetSensorsByFarmID(w http.ResponseWriter, r *http.Request)

func GetSensorsByFieldID

func GetSensorsByFieldID(w http.ResponseWriter, r *http.Request)

func GetTemperatureHistory

func GetTemperatureHistory(w http.ResponseWriter, r *http.Request)

Types

type ErrorResponse

type ErrorResponse struct {
	ErrorMsg string `json:"error_msg"`
}

type Humidity

type Humidity struct {
	Timestamp string  `json:"timestamp"`
	Value     float64 `json:"value"`
	SensorID  int     `json:"sensor_id"`
}

type Pressure

type Pressure struct {
	Timestamp string  `json:"timestamp"`
	Value     float64 `json:"value"`
	SensorID  int     `json:"sensor_id"`
}

type Sensor

type Sensor struct {
	ID           int    `json:"id"`
	Manufacturer string `json:"manufacturer"`
	SensorType   string `json:"type"`
	Name         string `json:"name"`
	FieldID      int    `json:"field_id"`
}

type Temperature

type Temperature struct {
	Timestamp string  `json:"timestamp"`
	Value     float64 `json:"value"`
	SensorID  int     `json:"sensor_id"`
}

Jump to

Keyboard shortcuts

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