sensor

package
v0.0.0-...-13b120a Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeFormat = "2006-01-02 15:04:05"

Functions

func ExportSensorDataToCSV

func ExportSensorDataToCSV(ref string, db *sqlx.DB) (interface{}, error)

ExportSensorDataToCSV generates a csv dataset with corresponding columns Exported data will include id, and time columns and then data points

Types

type RawSensorData

type RawSensorData struct {
	ID   int              `json:"id"`
	Data *json.RawMessage `json:"data"`
	Time time.Time        `json:"time"`
}

func GetRawDataByDateAndRef

func GetRawDataByDateAndRef(db *sqlx.DB, DateFrom string, DateTo string, reference string) ([]RawSensorData, error)

func GetRawDataWithLimitByRef

func GetRawDataWithLimitByRef(db *sqlx.DB, limit int, reference string) ([]RawSensorData, error)

GetRawDataWithLimitByRef fetches the last n records available for given dataset id and reference.

Jump to

Keyboard shortcuts

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