domain

package
v0.0.0-...-8adf444 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FOYER_BASE_URL = "https://googlehomefoyer-pa.googleapis.com/v2"
)

Variables

This section is empty.

Functions

func BeginPollingNetworkMetrics

func BeginPollingNetworkMetrics()

BeginPollingNetworkMetrics begin the Polling for Network Metrics

func Find

func Find(slice []string, val string) (int, bool)

Find takes a slice and looks for an element in it. If found it will return it's key, otherwise it will return -1 and a bool of false.

func GenerateNetworkMetricsStatus

func GenerateNetworkMetricsStatus() models.NetworkMetricsStatus

GenerateNetworkMetricsStatus generates a models.NetworkMetricsStatus

func GetAllDevices

func GetAllDevices() []models.Station

GetAllDevices returns all devices that are, or used to be connected to the network.

func GetNetworkMetrics

func GetNetworkMetrics() (models.GetRealTimeMetricsResponse, error)

GetNetworkMetrics returns all devices that are, or used to be connected to the network.

func GetStoredNetworkMetrics

func GetStoredNetworkMetrics(limit int, skip int) ([]models.ChartNetworkMetrics, error)

GetStoredNetworkMetrics returns stored Network Metrics based on the params

func MetricsMiddleware

func MetricsMiddleware() gin.HandlerFunc

MetricsMiddleware generates Prometheus metrics data about the request

func SetupLogger

func SetupLogger()

SetupLogger sets up the application wide logger

func StaticServe

func StaticServe(urlPrefix string, fs *packr.Box) gin.HandlerFunc

StaticServe serves the data

Types

type NetworkMetricsProperties

type NetworkMetricsProperties struct {
	IsPolling bool
	// contains filtered or unexported fields
}

NetworkMetricsProperties captures the various state about the Network Metrics collection feature

type Version

type Version struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

Version encapsulates the version of the application

Jump to

Keyboard shortcuts

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