Documentation ¶
Overview ¶
Package home contains AdGuard Home's HTTP API methods.
Index ¶
Constants ¶
const MaxFileSize = 1024 * 1024
MaxFileSize is a maximum file length in bytes.
const PasswordMinRunes = 8
PasswordMinRunes is the minimum length of user's password in runes.
Variables ¶
var Context homeContext
Context - a global context object
var GLMode bool
GLMode - enable GL-Inet compatibility mode
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth - global object
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.
type UID ¶ added in v0.107.44
UID is the type for the unique IDs of persistent clients.
func NewUID ¶ added in v0.107.44
NewUID returns a new persistent client UID. Any error returned is an error from the cryptographic randomness reader.
func (UID) MarshalText ¶ added in v0.107.44
MarshalText implements the encoding.TextMarshaler for UID.
func (*UID) UnmarshalText ¶ added in v0.107.44
UnmarshalText implements the encoding.TextUnmarshaler interface for UID.
Source Files ¶
- auth.go
- authglinet.go
- authhttp.go
- authratelimiter.go
- client.go
- clients.go
- clientshttp.go
- clientstags.go
- config.go
- control.go
- controlinstall.go
- controlupdate.go
- dns.go
- home.go
- httpclient.go
- i18n.go
- log.go
- middlewares.go
- mobileconfig.go
- options.go
- profilehttp.go
- service.go
- service_linux.go
- tls.go
- web.go