client

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 16 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() (*model.ServerStatus, error)
	Stats() (*model.Stats, error)
	QueryLog(limit int) (*model.QueryLog, error)
	ToggleProtection(enable bool) error
	RewriteList() (*model.RewriteEntries, error)
	AddRewriteEntries(e ...model.RewriteEntry) error
	DeleteRewriteEntries(e ...model.RewriteEntry) error
	Filtering() (*model.FilterStatus, error)
	ToggleFiltering(enabled bool, interval int) error
	AddFilter(whitelist bool, f model.Filter) error
	DeleteFilter(whitelist bool, f model.Filter) error
	UpdateFilter(whitelist bool, f model.Filter) error
	RefreshFilters(whitelist bool) error
	SetCustomRules(rules *[]string) error
	SafeBrowsing() (bool, error)
	ToggleSafeBrowsing(enable bool) error
	Parental() (bool, error)
	ToggleParental(enable bool) error
	SafeSearchConfig() (*model.SafeSearchConfig, error)
	SetSafeSearchConfig(settings *model.SafeSearchConfig) error
	ProfileInfo() (*model.ProfileInfo, error)
	SetProfileInfo(settings *model.ProfileInfo) error
	BlockedServicesSchedule() (*model.BlockedServicesSchedule, error)
	SetBlockedServicesSchedule(schedule *model.BlockedServicesSchedule) error
	Clients() (*model.Clients, error)
	AddClient(client *model.Client) error
	UpdateClient(client *model.Client) error
	DeleteClient(client *model.Client) error
	QueryLogConfig() (*model.QueryLogConfigWithIgnored, error)
	SetQueryLogConfig(*model.QueryLogConfigWithIgnored) error
	StatsConfig() (*model.GetStatsConfigResponse, error)
	SetStatsConfig(sc *model.PutStatsConfigUpdateRequest) error
	Setup() error
	AccessList() (*model.AccessList, error)
	SetAccessList(*model.AccessList) error
	DNSConfig() (*model.DNSConfig, error)
	SetDNSConfig(*model.DNSConfig) error
	DhcpConfig() (*model.DhcpStatus, error)
	SetDhcpConfig(*model.DhcpStatus) error
	AddDHCPStaticLease(lease model.DhcpStaticLease) error
	DeleteDHCPStaticLease(lease model.DhcpStaticLease) error
}

Client AdguardHome API client interface

func New

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

New create a new client

Directories

Path Synopsis
Package model provides primitives to interact with the openapi HTTP API.
Package model provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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