client

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrSetupNeeded custom error
	ErrSetupNeeded = errors.New("setup needed")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Host() string
	Status() (*types.Status, error)
	ToggleProtection(enable bool) error
	RewriteList() (*types.RewriteEntries, error)
	AddRewriteEntries(e ...types.RewriteEntry) error
	DeleteRewriteEntries(e ...types.RewriteEntry) error
	Filtering() (*types.FilteringStatus, error)
	ToggleFiltering(enabled bool, interval float64) error
	AddFilters(whitelist bool, e ...types.Filter) error
	DeleteFilters(whitelist bool, e ...types.Filter) error
	UpdateFilters(whitelist bool, e ...types.Filter) error
	RefreshFilters(whitelist bool) error
	SetCustomRules(rules types.UserRules) error
	SafeBrowsing() (bool, error)
	ToggleSafeBrowsing(enable bool) error
	Parental() (bool, error)
	ToggleParental(enable bool) error
	SafeSearch() (bool, error)
	ToggleSafeSearch(enable bool) error
	Services() (types.Services, error)
	SetServices(services types.Services) error
	Clients() (*types.Clients, error)
	AddClients(client ...types.Client) error
	UpdateClients(client ...types.Client) error
	DeleteClients(client ...types.Client) error
	QueryLogConfig() (*types.QueryLogConfig, error)
	SetQueryLogConfig(enabled bool, interval float64, anonymizeClientIP bool) error
	StatsConfig() (*types.IntervalConfig, error)
	SetStatsConfig(interval float64) error
	Setup() error
	AccessList() (*types.AccessList, error)
	SetAccessList(*types.AccessList) error
	DNSConfig() (*types.DNSConfig, error)
	SetDNSConfig(*types.DNSConfig) error
	DHCPServerConfig() (*types.DHCPServerConfig, error)
	SetDHCPServerConfig(*types.DHCPServerConfig) error
	AddDHCPStaticLeases(leases ...types.Lease) error
	DeleteDHCPStaticLeases(leases ...types.Lease) error
}

Client AdguardHome API client interface

func New

func New(config types.AdGuardInstance) (Client, error)

New create a new client

Jump to

Keyboard shortcuts

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