Documentation
¶
Overview ¶
Package pihole contains utilities for interacting with the pihole admin API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStatus = errors.New("unexpected status code")
ErrStatus is the error given when an HTTP call to the pihole returns an error status code.
Functions ¶
This section is empty.
Types ¶
type PiHole ¶
type PiHole struct {
// contains filtered or unexported fields
}
The PiHole type is the API interface for a running pihole instance.
func New ¶
New creates a new instance of the PiHole type that will make requests against the given url.
type Summary ¶
type Summary struct { AdsBlocked float64 `json:"ads_blocked_today"` AdsPercentage float64 `json:"ads_percentage_today"` ClientsEverSeen float64 `json:"clients_ever_seen"` DNSQueries float64 `json:"dns_queries_today"` DomainsBlocked float64 `json:"domains_being_blocked"` QueriesCached float64 `json:"queries_cached"` QueriesForwarded float64 `json:"queries_forwarded"` Status string `json:"status"` UniqueClients float64 `json:"unique_clients"` UniqueDomains float64 `json:"unique_domains"` }
The Summary type contains the summary returned by the pihole instance.
Click to show internal directories.
Click to hide internal directories.