Discover Packages
github.com/iot-thermometer/server
internal
dto
package
Version:
v0.0.0-...-055cc3d
Opens a new window with list of versions in this module.
Published: Jan 16, 2024
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Config struct {
DSN string `json:"DSN"`
SigningSecret string `json:"signingSecret"`
Broker string `json:"broker"`
}
type CreateAlertRequest struct {
DeviceID uint `json:"device_id"`
Name string `json:"name"`
SoilMoistureMin float64 `json:"soil_moisture_min"`
SoilMoistureMax float64 `json:"soil_moisture_max"`
TemperatureMin float64 `json:"temperature_min"`
TemperatureMax float64 `json:"temperature_max"`
}
type CreateDeviceRequest struct {
Name string `json:"name" validate:"required"`
ReadingInterval int `json:"reading_interval" validate:"required"`
PushInterval int `json:"push_interval" validate:"required"`
}
type FirmwareIndexResponse struct {
Version float32 `json:"version"`
Source string `json:"source"`
}
type LoginRequest struct {
Email string `json:"email"`
Password string `json:"password"`
}
type LoginResponse struct {
Token string `json:"token"`
}
type RegisterRequest struct {
Email string `json:"email"`
Password string `json:"password"`
}
type RegisterResponse struct {
Token string `json:"token"`
}
type TopicMessage struct {
DeviceID uint `json:"device_id"`
Value float64 `json:"value"`
Type string `json:"type"`
Time int64 `json:"time"`
}
type UpdateAlertRequest struct {
Name string `json:"name"`
SoilMoistureMin float64 `json:"soil_moisture_min"`
SoilMoistureMax float64 `json:"soil_moisture_max"`
TemperatureMin float64 `json:"temperature_min"`
TemperatureMax float64 `json:"temperature_max"`
}
type UpdateDeviceRequest struct {
Name string `json:"name" validate:"required"`
ReadingInterval int `json:"reading_interval" validate:"required"`
PushInterval int `json:"push_interval" validate:"required"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.