pages

package
v0.0.0-...-b7f3a94 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Display

type Display struct {
	sync.RWMutex

	Temperature                float64
	LastHourTemperature        float64
	RelativeHumidity           float64
	LastHourRelativeHumidity   float64
	OutdoorTemperature         float64
	LastHourOutdoorTemperature float64
	MesonetLastData            time.Time
	// contains filtered or unexported fields
}

func New

func New(icfg *InfluxDBConfig, ocfg *OutputConfig) *Display

func (*Display) ServeImage

func (d *Display) ServeImage(w http.ResponseWriter, req *http.Request)

func (*Display) ServeJSON

func (d *Display) ServeJSON(w http.ResponseWriter, req *http.Request)

func (*Display) ServeLargePNG

func (d *Display) ServeLargePNG(w http.ResponseWriter, req *http.Request)

func (*Display) UpdateOnce

func (d *Display) UpdateOnce(ctx context.Context) error

type InfluxDBConfig

type InfluxDBConfig struct {
	Address string `` /* 141-byte string literal not displayed */
	Token   string `long:"influxdb_token" env:"INFLUXDB_TOKEN" description:"An access token to query the provided InfluxDB server."`
	Org     string `long:"influxdb_org" env:"INFLUXDB_ORG" description:"The org that your data is in."`
}

type OutputConfig

type OutputConfig struct {
	Width  int `long:"display_width" env:"DISPLAY_WIDTH" default:"64" description:"The width, in pixels, of the target display."`
	Height int `long:"display_height" env:"DISPLAY_HEIGHT" default:"32" description:"The height, in pixels, of the target display."`
}

Jump to

Keyboard shortcuts

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