Documentation ¶
Index ¶
- Constants
- func SetHeaders(w http.ResponseWriter, origin string)
- func StartMQTTBroker(port int, dbConfig timeseries.DBConfig)
- type ConfigureDeviceReq
- type ConfigureSensorReq
- type Device
- type DeviceDesc
- type Input
- type IoTConfig
- type IoTEdge
- func (s *IoTEdge) ConfSensor(w http.ResponseWriter, r *http.Request)
- func (e *IoTEdge) Configure(dev Device) error
- func (s *IoTEdge) ConfigureDevice(w http.ResponseWriter, r *http.Request)
- func (e *IoTEdge) ConfigureSensor(sensor Sensor) error
- func (e *IoTEdge) GetDevice(name string) (Device, error)
- func (e *IoTEdge) GetOrCreateDevice(descr DeviceDesc) (Device, error)
- func (e *IoTEdge) GetSensors(deviceID int) ([]Sensor, error)
- func (e *IoTEdge) Init(deviceDesc DeviceDesc) (Device, error)
- func (s *IoTEdge) InitDevice(w http.ResponseWriter, r *http.Request)
- func (e *IoTEdge) InitializeDB() error
- func (s *IoTEdge) SaveTimeseries(w http.ResponseWriter, req *http.Request)
- func (s *IoTEdge) StartSensorServer() error
- func (s *IoTEdge) UpdateSensorHandler(w http.ResponseWriter, r *http.Request)
- func (s *IoTEdge) UploadDataHandler(w http.ResponseWriter, r *http.Request)
- type MQTTEdge
- type Output
- type Sensor
- type TimeSeriesValue
- type TimeseriesHandler
Constants ¶
View Source
const ( HTTPPort int = 3004 URIInitDevice string = "/init-device" URIUpdateSensor string = "/update-sensor" URIDeviceConfigure string = "/device/configure" URISensorConfigure string = "/sensor/configure" URIUploadData string = "/upload-data" URISaveTimeseries string = "/timeseries/save" )
Variables ¶
This section is empty.
Functions ¶
func SetHeaders ¶
func SetHeaders(w http.ResponseWriter, origin string)
func StartMQTTBroker ¶
func StartMQTTBroker(port int, dbConfig timeseries.DBConfig)
Types ¶
type ConfigureDeviceReq ¶
type ConfigureSensorReq ¶
type DeviceDesc ¶
type Input ¶
type Input struct { Method string `json:"Method"` MethodBody interface{} `json:"MethodBody"` }
type IoTConfig ¶
type IoTConfig struct { Port int MQTTPort int DbConfig timeseries.DBConfig TimeseriesDBConfig timeseries.DBConfig }
type IoTEdge ¶
type IoTEdge struct { Port int DeviceDBConfig timeseries.DBConfig TimeseriesDBConfig timeseries.DBConfig DB *sql.DB Timeseries timeseries.DbHandler // contains filtered or unexported fields }
func (*IoTEdge) ConfSensor ¶
func (s *IoTEdge) ConfSensor(w http.ResponseWriter, r *http.Request)
func (*IoTEdge) ConfigureDevice ¶
func (s *IoTEdge) ConfigureDevice(w http.ResponseWriter, r *http.Request)
func (*IoTEdge) ConfigureSensor ¶
func (*IoTEdge) GetOrCreateDevice ¶
func (e *IoTEdge) GetOrCreateDevice(descr DeviceDesc) (Device, error)
func (*IoTEdge) InitDevice ¶
func (s *IoTEdge) InitDevice(w http.ResponseWriter, r *http.Request)
func (*IoTEdge) InitializeDB ¶
func (*IoTEdge) SaveTimeseries ¶
func (s *IoTEdge) SaveTimeseries(w http.ResponseWriter, req *http.Request)
func (*IoTEdge) StartSensorServer ¶
func (*IoTEdge) UpdateSensorHandler ¶
func (s *IoTEdge) UpdateSensorHandler(w http.ResponseWriter, r *http.Request)
func (*IoTEdge) UploadDataHandler ¶
func (s *IoTEdge) UploadDataHandler(w http.ResponseWriter, r *http.Request)
type MQTTEdge ¶
type MQTTEdge struct { MQTTserver *mqttserver.Server // contains filtered or unexported fields }
type Output ¶
type Output struct { Status string `json:"Status"` Answer interface{} `json:"Answer"` }
type TimeSeriesValue ¶
type TimeseriesHandler ¶
type TimeseriesHandler struct { DataMessageHandler *mqtt.MessageHandler // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.