package
0.0.2
Repository: https://github.com/jynychen/adguardhome.git
Documentation: pkg.go.dev

# Functions

HostToIPs is a helper that generates one IPv4 and one IPv6 address from host.
MatchedResponse is a test helper that returns a response with answer if req has question type qt, and target targ.
NewBlockUpstream returns an [*UpstreamMock] that works like an upstream that supports hash-based safe-browsing/adult-blocking feature.
NewErrorUpstream returns an [*UpstreamMock] that returns [ErrUpstream] from its Exchange method.
NewUpstreamMock returns an [*UpstreamMock], fields OnAddress and OnClose of which are set to stubs that return "upstream.example" and nil respectively.
ReplaceLogLevel sets logging level to l and uses Cleanup method of t to revert changes.
ReplaceLogWriter moves logger output to w and uses Cleanup method of t to revert changes.
StartHTTPServer is a helper that starts the HTTP server, which is configured to return data on every request, and returns the client and server URL.

# Constants

ErrUpstream is the error returned from the [*UpstreamMock] created by [NewErrorUpstream].
ReqFQDN is the common request FQDN for filtering tests.
ReqHost is the common request host for filtering tests.

# Structs

AddressProcessor is a fake [client.AddressProcessor] implementation for tests.
AddressUpdater is a fake [client.AddressUpdater] implementation for tests.
Exchanger is a fake [rdns.Exchanger] implementation for tests.
FSWatcher is a fake [aghos.FSWatcher] implementation for tests.
Resolver is a fake [filtering.Resolver] implementation for tests.
ServiceWithConfig is a fake [agh.ServiceWithConfig] implementation for tests.
Upstream is a mock implementation of upstream.Upstream.
UpstreamMock is a fake [upstream.Upstream] implementation for tests.