dto

package
v0.0.0-...-055cc3d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError error

type Config

type Config struct {
	DSN           string `json:"DSN"`
	SigningSecret string `json:"signingSecret"`
	Broker        string `json:"broker"`
}

type CreateAlertRequest

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

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

type FirmwareIndexResponse struct {
	Version float32 `json:"version"`
	Source  string  `json:"source"`
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

type RegisterRequest

type RegisterRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type RegisterResponse

type RegisterResponse struct {
	Token string `json:"token"`
}

type TopicMessage

type TopicMessage struct {
	DeviceID uint    `json:"device_id"`
	Value    float64 `json:"value"`
	Type     string  `json:"type"`
	Time     int64   `json:"time"`
}

type UpdateAlertRequest

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

type UpdateDeviceRequest struct {
	Name            string `json:"name" validate:"required"`
	ReadingInterval int    `json:"reading_interval" validate:"required"`
	PushInterval    int    `json:"push_interval" validate:"required"`
}

Jump to

Keyboard shortcuts

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