add models and validation
This commit is contained in:
@@ -24,6 +24,17 @@ type Sensor struct {
|
||||
}
|
||||
|
||||
type SensorData struct {
|
||||
Value float64 `json:"value"`
|
||||
SensorID string `json:"sensor_id"`
|
||||
Value *float64 `json:"value"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
}
|
||||
|
||||
type SensorRequest struct {
|
||||
SensorID string `json:"sensor_id"`
|
||||
}
|
||||
|
||||
type SensorDataRequest struct {
|
||||
SensorID string `json:"sensor_id"`
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user