pihole

package
v0.0.0-...-ac5bdac Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlexInt

type FlexInt int

func (*FlexInt) UnmarshalJSON

func (fi *FlexInt) UnmarshalJSON(b []byte) error

type QueryTypes

type QueryTypes struct {
	QueryTypes map[string]float32 `json:"querytypes"`
}

type Settings

type Settings struct {
	*cfg.Common
	// contains filtered or unexported fields
}

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

type Status

type Status struct {
	DomainsBeingBlocked string `json:"domains_being_blocked"`
	DNSQueriesToday     string `json:"dns_queries_today"`
	AdsBlockedToday     string `json:"ads_blocked_today"`
	AdsPercentageToday  string `json:"ads_percentage_today"`
	UniqueDomains       string `json:"unique_domains"`
	QueriesForwarded    string `json:"queries_forwarded"`
	QueriesCached       string `json:"queries_cached"`
	Status              string `json:"status"`
	GravityLastUpdated  struct {
		Relative struct {
			Days    FlexInt `json:"days"`
			Hours   FlexInt `json:"hours"`
			Minutes FlexInt `json:"minutes"`
		}
	} `json:"gravity_last_updated"`
}

type TopClients

type TopClients struct {
	TopSources map[string]int `json:"top_sources"`
}

type TopItems

type TopItems struct {
	TopQueries map[string]int `json:"top_queries"`
	TopAds     map[string]int `json:"top_ads"`
}

type Widget

type Widget struct {
	view.MultiSourceWidget
	view.TextWidget
	// contains filtered or unexported fields
}

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, _ *tview.Pages, settings *Settings) *Widget

NewWidget creates a new instance of a widget

func (*Widget) Refresh

func (widget *Widget) Refresh()

Jump to

Keyboard shortcuts

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