dishy

package
v0.0.0-...-e6e7638 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGrafanaDashboard

func CreateGrafanaDashboard(ctx context.Context, id string, name string) error

CreateGrafanaDashboard will create the default dashboard in grafana for this device and return the ID of the grafana dashboard

func Geocheck

func Geocheck(id string, ipAddress string) (*types.GeoCheck, error)

Geocheck will look up the ip address and make sure it looks to be a starlink address

func GetDayStart

func GetDayStart(ctx context.Context, timezoneOffset int, when time.Time) (*time.Time, error)

func GetFourHourStart

func GetFourHourStart(ctx context.Context, timezoneOffset int, when time.Time) (*time.Time, error)

func GetLatestSpeeds

func GetLatestSpeeds(id string) (*types.DishySpeed, error)

func GetLatestStats

func GetLatestStats(id string) (*types.DishyStat, error)

GetLatestStats will query timescale for the current stats

func GetRecentStats

func GetRecentStats(id string) (map[time.Time]*types.DishyStat, map[time.Time]*types.DishySpeed, error)

func UpdateGrafanaDashboard

func UpdateGrafanaDashboard(ctx context.Context, id string, name string) error

UpdateGrafanaDashboard will update the dashboard for a dishy

func UpdatePublicDashboards

func UpdatePublicDashboards(ctx context.Context) error

UpdatePublicDashboards will update all public dashboards (not dishy dahsboards)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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