dashboard

package
v0.0.0-...-e717604 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dashboard

type Dashboard struct {
	// Configure EPD
	Device     string
	EPDService *epd.EPD
	// contains filtered or unexported fields
}

Dashboard creates a custom Dashboard

func NewDashboard

func NewDashboard(opts ...Options) (*Dashboard, error)

NewDashboard creates a custom dashboard

func (*Dashboard) DisplayImage

func (d *Dashboard) DisplayImage(filePath string) error

DisplayImage accepts a path to image file and displays it on the screen

func (*Dashboard) DisplayText

func (d *Dashboard) DisplayText(text string) error

DisplayText accepts a string text and displays it on the screen

func (*Dashboard) Generate

func (d *Dashboard) Generate(outputFile string, headerText string, bodyText string) error

┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐ │┌────────────────────────────┐┌──────────────────────────────────────────────────────────────────────┐│ ││ ││ ││ ││ <day of week> ││ <HEADER> ││ ││ ││ ││ ││ <Day of Month> │└──────────────────────────────────────────────────────────────────────┘│ ││ ││ <BODY> ││ ││ ││ ││ ││ <Month> <Year> ││ ││ ││ ────────────────────────── ││ ││ ││ ││ ││ ││ <WEATHER> ││ ││ ││ <WEATHER> ││ ││ ││ <ICON> <TEMP> ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ ││ │└────────────────────────────┘└──────────────────────────────────────────────────────────────────────┘│ └──────────────────────────────────────────────────────────────────────────────────────────────────────┘ Generate a dashboard

type EPDOptions

type EPDOptions struct {
	Device string
}

EPDOptions tells the dashboard how to connect to an Electronic Paper Display

type Options

type Options func(d *Dashboard)

Options provides options for a new Dashboard

func WithEPD

func WithEPD(device string) Options

WithEPD creates a dashboard using these Electronic Paper Display options

func WithWeatherAPI

func WithWeatherAPI(weatherAPIOptions *WeatherAPIOptions) Options

WithWeatherAPI creates a custom dashboard with Weather API configured

type WeatherAPIOptions

type WeatherAPIOptions struct {
	WeatherAPIKey   string
	WeatherLanguage string
	WeatherTempUnit string
	WeatherCountry  string
	WeatherZipCode  int
}

WeatherAPIOptions defines options for the WeatherAPI

Jump to

Keyboard shortcuts

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