controllers

package
v0.0.0-...-08d64cc Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Error string `json:"error"`
}

type ResponseData

type ResponseData struct {
	Data interface{} `json:"data"`
}

type ResponseDataArray

type ResponseDataArray struct {
	Data []interface{} `json:"data"`
}

type SensorDataNumericResponseData

type SensorDataNumericResponseData struct {
	ID        uint64    `json:"id"`
	SensorID  uint64    `json:"sensor_id"`
	Data      float64   `json:"data"`
	Timestamp time.Time `json:"timestamp"`
}

type SensorResponseData

type SensorResponseData struct {
	ID     uint64 `json:"id"`
	Model  string `json:"model"`
	Handle string `json:"handle"`
	Name   string `json:"name"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(db *db.Database) *Server

func (*Server) CreateSensor

func (s *Server) CreateSensor(c *gin.Context)

func (*Server) GetSensor

func (s *Server) GetSensor(c *gin.Context)

func (*Server) ListSensor

func (s *Server) ListSensor(c *gin.Context)

func (*Server) ListSensorDataNumeric

func (s *Server) ListSensorDataNumeric(c *gin.Context)

func (*Server) RemoveAllSensorDataNumeric

func (s *Server) RemoveAllSensorDataNumeric(c *gin.Context)

func (*Server) RemoveSensor

func (s *Server) RemoveSensor(c *gin.Context)

func (*Server) Run

func (s *Server) Run()

func (*Server) UpdateSensor

func (s *Server) UpdateSensor(c *gin.Context)

Jump to

Keyboard shortcuts

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