Documentation ¶
Overview ¶
Package home contains AdGuard Home's HTTP API methods.
Index ¶
Constants ¶
View Source
const MaxFileSize = 1024 * 1024
MaxFileSize is a maximum file length in bytes.
View Source
const PasswordMinRunes = 8
PasswordMinRunes is the minimum length of user's password in runes.
Variables ¶
View Source
var Context homeContext
Context - a global context object
View Source
var GLMode bool
GLMode - enable GL-Inet compatibility mode
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth is the global authentication object.
type BlockedClientChecker ¶ added in v0.107.49
type BlockedClientChecker interface {
IsBlockedClient(ip netip.Addr, clientID string) (blocked bool, rule string)
}
BlockedClientChecker checks if a client is blocked by the current access settings.
type DHCP ¶ added in v0.107.33
type DHCP interface { // Leases returns all the DHCP leases. Leases() (leases []*dhcpsvc.Lease) // HostByIP returns the hostname of the DHCP client with the given IP // address. The address will be netip.Addr{} if there is no such client, // due to an assumption that a DHCP client must always have a hostname. HostByIP(ip netip.Addr) (host string) // MACByIP returns the MAC address for the given IP address leased. It // returns nil if there is no such client, due to an assumption that a DHCP // client must always have a MAC address. MACByIP(ip netip.Addr) (mac net.HardwareAddr) }
DHCP is an interface for accessing DHCP lease data the [clientsContainer] needs.
type Theme ¶ added in v0.107.22
type Theme string
Theme is an enum of all allowed UI themes.
Allowed Theme values.
Keep in sync with client/src/helpers/constants.js.
func (*Theme) UnmarshalText ¶ added in v0.107.22
UnmarshalText implements encoding.TextUnmarshaler interface for *Theme.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.