app

package
v0.0.0-...-06e3a6e Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileToS3

func AddFileToS3(file []byte, deviceId string) error

func Payload

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

func Telemetry

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

func TelemetryData

func TelemetryData(deviceInfo map[string]string, data []byte) error

func UploadDataToInflux

func UploadDataToInflux(telementryData map[string]interface{}, userId string, deviceId string) error

Types

type TelementryData

type TelementryData struct {
	RealTimeClock time.Time `json:"real_time_clock"`
	Temperature   float32   `json:"temperature"`
	Pressure      float32   `json:"pressure"`
	Humidity      float32   `json:"humidity"`
	Accel         []float32 `json:"accel"`
	Gyro          []float32 `json:"gyro"`
	Mag           []float32 `json:"mag"`
	Voltages      []float32 `json:"voltages"`
}

Jump to

Keyboard shortcuts

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