arasrv

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Overview

Package arasrv provides tools to gather and present aranet4 data over HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Root     string   `json:"root"`
	Devices  []string `json:"devices"`
	DeviceID string   `json:"device_id"`
	Status   string   `json:"status"`
	Refresh  int      `json:"refresh"`
	From     string   `json:"from"`
	To       string   `json:"to"`
	Plots    struct {
		H   string `json:"h"`
		P   string `json:"p"`
		T   string `json:"t"`
		CO2 string `json:"co2"`
	} `json:"plots"`
}

Message holds informations about a device.

type Server

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

func NewServer

func NewServer(root, dbfile string) (*Server, error)

func (*Server) Close

func (srv *Server) Close() error

func (*Server) ServeHTTP

func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳