Documentation ¶
Index ¶
- type ADG
- func (c *ADG) ConfigureFiltering(filterConfig FilterConfig) (*FilterConfig, error)
- func (c *ADG) CreateClient(client Client) (*Client, error)
- func (c *ADG) CreateListFilter(filterData AddUrlRequest) (*Filter, bool, error)
- func (c *ADG) CreateRewrite(rewrite RewriteEntry) (*RewriteEntry, error)
- func (c *ADG) DeleteClient(clientDelete ClientDelete) error
- func (c *ADG) DeleteListFilter(filterDelete RemoveUrlRequest) error
- func (c *ADG) DeleteRewrite(domain string) error
- func (c *ADG) GetAccess() (*AccessList, error)
- func (c *ADG) GetAllFilters() (*FilterStatus, error)
- func (c *ADG) GetAllRewrites() (*[]RewriteEntry, error)
- func (c *ADG) GetBlockedServices() (*[]string, error)
- func (c *ADG) GetBlockedServicesList() (*BlockedServicesAll, error)
- func (c *ADG) GetClient(identifier string) (*Client, error)
- func (c *ADG) GetDnsInfo() (*DNSInfo, error)
- func (c *ADG) GetListFilterById(id int64) (*Filter, bool, error)
- func (c *ADG) GetListFilterByName(listName string) (*Filter, bool, error)
- func (c *ADG) GetParentalStatus() (*bool, error)
- func (c *ADG) GetQueryLogConfig() (*GetQueryLogConfigResponse, error)
- func (c *ADG) GetRewrite(domain string) (*RewriteEntry, error)
- func (c *ADG) GetSafeBrowsingStatus() (*bool, error)
- func (c *ADG) GetSafeSearchConfig() (*SafeSearchConfig, error)
- func (c *ADG) GetStatsConfig() (*GetStatsConfigResponse, error)
- func (c *ADG) GetUserRules() (*[]string, error)
- func (c *ADG) SetAccess(accessList AccessList) (*AccessList, error)
- func (c *ADG) SetBlockedServices(blockedServices []string) (*[]string, error)
- func (c *ADG) SetDnsConfig(dnsConfig DNSConfig) (*DNSConfig, error)
- func (c *ADG) SetParentalStatus(status bool) error
- func (c *ADG) SetQueryLogConfig(queryLogConfig GetQueryLogConfigResponse) (*GetQueryLogConfigResponse, error)
- func (c *ADG) SetSafeBrowsingStatus(status bool) error
- func (c *ADG) SetSafeSearchConfig(safeSearchConfig SafeSearchConfig) (*SafeSearchConfig, error)
- func (c *ADG) SetStatsConfig(statsConfig GetStatsConfigResponse) (*GetStatsConfigResponse, error)
- func (c *ADG) UpdateClient(clientUpdate ClientUpdate) (*Client, error)
- func (c *ADG) UpdateListFilter(filterUpdate FilterSetUrl) (*Filter, bool, error)
- func (c *ADG) UpdateRewrite(rewrite RewriteEntry) (*RewriteEntry, error)
- func (c *ADG) UpdateUserRules(rules SetRulesRequest) (*[]string, error)
- type AccessList
- type AddUrlRequest
- type AllClients
- type AuthStruct
- type BlockedService
- type BlockedServicesAll
- type Client
- type ClientAuto
- type ClientDelete
- type ClientUpdate
- type DNSConfig
- type DNSInfo
- type Enabled
- type Filter
- type FilterConfig
- type FilterSetUrl
- type FilterSetUrlData
- type FilterStatus
- type GetQueryLogConfigResponse
- type GetStatsConfigResponse
- type RemoveUrlRequest
- type RewriteEntry
- type SafeSearchConfig
- type SetRulesRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ADG ¶
type ADG struct { HostURL string HTTPClient *http.Client Auth AuthStruct }
ADG Client
func (*ADG) ConfigureFiltering ¶ added in v0.5.0
func (c *ADG) ConfigureFiltering(filterConfig FilterConfig) (*FilterConfig, error)
ConfigureFiltering - Configure DNS server filtering parameters
func (*ADG) CreateClient ¶
CreateClient - Create a client
func (*ADG) CreateListFilter ¶ added in v0.2.1
func (c *ADG) CreateListFilter(filterData AddUrlRequest) (*Filter, bool, error)
CreateListFilter - Create a list filter, returning the created filter and whether it's a whitelist filter
func (*ADG) CreateRewrite ¶ added in v0.3.0
func (c *ADG) CreateRewrite(rewrite RewriteEntry) (*RewriteEntry, error)
CreateRewrite - Create a DNS rewrite rule
func (*ADG) DeleteClient ¶
func (c *ADG) DeleteClient(clientDelete ClientDelete) error
DeleteClient - Deletes a client
func (*ADG) DeleteListFilter ¶ added in v0.2.1
func (c *ADG) DeleteListFilter(filterDelete RemoveUrlRequest) error
DeleteListFilter - Deletes a list filter
func (*ADG) DeleteRewrite ¶ added in v0.3.0
DeleteRewrite - Delete a DNS rewrite rule based on the domain
func (*ADG) GetAccess ¶ added in v0.4.0
func (c *ADG) GetAccess() (*AccessList, error)
GetAccess - Returns the current access list
func (*ADG) GetAllFilters ¶ added in v0.2.1
func (c *ADG) GetAllFilters() (*FilterStatus, error)
GetAllFilter - Returns all filters
func (*ADG) GetAllRewrites ¶ added in v0.3.0
func (c *ADG) GetAllRewrites() (*[]RewriteEntry, error)
GetAllRewrites - Returns all DNS rewrite rules
func (*ADG) GetBlockedServices ¶ added in v0.5.0
GetBlockedServices - Returns the services that are blocked globally
func (*ADG) GetBlockedServicesList ¶ added in v0.5.0
func (c *ADG) GetBlockedServicesList() (*BlockedServicesAll, error)
GetBlockedServicesList - Returns the list of all available services to be blocked
func (*ADG) GetDnsInfo ¶ added in v0.4.0
GetDnsInfo - Returns the current DNS parameters
func (*ADG) GetListFilterById ¶ added in v0.2.1
GetListFilterById - Returns a list filter based on its name and whether it's a whitelist filter
func (*ADG) GetListFilterByName ¶ added in v0.2.1
GetListFilterByName - Returns a list filter based on its name and whether it's a whitelist filter
func (*ADG) GetParentalStatus ¶ added in v0.5.0
GetParentalStatus - Returns whether parental control is enabled or not
func (*ADG) GetQueryLogConfig ¶ added in v0.5.0
func (c *ADG) GetQueryLogConfig() (*GetQueryLogConfigResponse, error)
GetQueryLogConfig - Returns query log configuration parameters
func (*ADG) GetRewrite ¶ added in v0.3.0
func (c *ADG) GetRewrite(domain string) (*RewriteEntry, error)
GetRewrite - Return a DNS rewrite rule based on the domain
func (*ADG) GetSafeBrowsingStatus ¶ added in v0.5.0
GetSafeBrowsingStatus - Returns whether safe-browsing is enabled or not
func (*ADG) GetSafeSearchConfig ¶ added in v0.5.0
func (c *ADG) GetSafeSearchConfig() (*SafeSearchConfig, error)
GetSafeSearchStatus - Retrieve safe search configuration
func (*ADG) GetStatsConfig ¶ added in v0.5.0
func (c *ADG) GetStatsConfig() (*GetStatsConfigResponse, error)
GetStatsConfig - Returns statistics configuration parameters
func (*ADG) GetUserRules ¶ added in v0.2.1
GetUserRules - Returns a list of all user rules
func (*ADG) SetAccess ¶ added in v0.4.0
func (c *ADG) SetAccess(accessList AccessList) (*AccessList, error)
SetAccess - Sets the access list
func (*ADG) SetBlockedServices ¶ added in v0.5.0
SetBlockedServices - Sets the services to be blocked globally
func (*ADG) SetDnsConfig ¶ added in v0.4.0
SetDnsConfig - Sets DNS parameters
func (*ADG) SetParentalStatus ¶ added in v0.5.0
SetParentalStatus - Enable or disable parental controls
func (*ADG) SetQueryLogConfig ¶ added in v0.5.0
func (c *ADG) SetQueryLogConfig(queryLogConfig GetQueryLogConfigResponse) (*GetQueryLogConfigResponse, error)
SetQueryLogConfig - Sets query log configuration parameters
func (*ADG) SetSafeBrowsingStatus ¶ added in v0.5.0
SetSafeBrowsingStatus - Enable or disable safe-browsing
func (*ADG) SetSafeSearchConfig ¶ added in v0.5.0
func (c *ADG) SetSafeSearchConfig(safeSearchConfig SafeSearchConfig) (*SafeSearchConfig, error)
SetSafeSearchConfig - Set safe search configuration
func (*ADG) SetStatsConfig ¶ added in v0.5.0
func (c *ADG) SetStatsConfig(statsConfig GetStatsConfigResponse) (*GetStatsConfigResponse, error)
SetStatsConfig - Sets statistics configuration parameters
func (*ADG) UpdateClient ¶
func (c *ADG) UpdateClient(clientUpdate ClientUpdate) (*Client, error)
UpdateClient - Update a client
func (*ADG) UpdateListFilter ¶ added in v0.2.1
func (c *ADG) UpdateListFilter(filterUpdate FilterSetUrl) (*Filter, bool, error)
UpdateListFilter - Update a list filter, returning the updated filter and whether it's a whitelist filter
func (*ADG) UpdateRewrite ¶ added in v0.3.0
func (c *ADG) UpdateRewrite(rewrite RewriteEntry) (*RewriteEntry, error)
UpdateRewrite - Update a DNS rewrite rule
func (*ADG) UpdateUserRules ¶ added in v0.2.1
func (c *ADG) UpdateUserRules(rules SetRulesRequest) (*[]string, error)
UpdateUserRules - Update user-provided rules, returning the list of all user rules
type AccessList ¶ added in v0.4.0
type AccessList struct { AllowedClients []string `json:"allowed_clients"` DisallowedClients []string `json:"disallowed_clients"` BlockedHosts []string `json:"blocked_hosts"` }
AccessList
type AddUrlRequest ¶ added in v0.2.1
type AddUrlRequest struct { Name string `json:"name"` Url string `json:"url"` Whitelist bool `json:"whitelist"` }
AddUrlRequest
type AllClients ¶
type AllClients struct { Clients []Client `json:"clients"` ClientAuto []ClientAuto `json:"auto_clients"` SupportedTags []string `json:"supported_tags"` }
AllClients
type AuthStruct ¶
AuthStruct
type BlockedService ¶ added in v0.5.0
type BlockedService struct { IconSvg string `json:"icon_svg"` Id string `json:"id"` Name string `json:"name"` Rules []string `json:"rules"` }
BlockedService
type BlockedServicesAll ¶ added in v0.5.0
type BlockedServicesAll struct {
BlockedServices []BlockedService `json:"blocked_services"`
}
BlockedServicesAll
type Client ¶
type Client struct { Name string `json:"name"` Ids []string `json:"ids"` UseGlobalSettings bool `json:"use_global_settings"` FilteringEnabled bool `json:"filtering_enabled"` ParentalEnabled bool `json:"parental_enabled"` SafebrowsingEnabled bool `json:"safebrowsing_enabled"` SafesearchEnabled bool `json:"safesearch_enabled"` UseGlobalBlockedServices bool `json:"use_global_blocked_services"` BlockedServices []string `json:"blocked_services"` Upstreams []string `json:"upstreams"` Tags []string `json:"tags"` }
Client
type ClientAuto ¶
type ClientAuto struct { Name string `json:"name"` Ip string `json:"ip"` Source string `json:"source"` WhoisInfo map[string]string `json:"whois_info"` }
ClientAuto
type ClientUpdate ¶
ClientUpdate
type DNSConfig ¶ added in v0.4.0
type DNSConfig struct { BootstrapDns []string `json:"bootstrap_dns"` UpstreamDns []string `json:"upstream_dns"` UpstreamDnsFile string `json:"upstream_dns_file"` RateLimit uint `json:"ratelimit"` BlockingMode string `json:"blocking_mode"` BlockingIpv4 string `json:"blocking_ipv4"` BlockingIpv6 string `json:"blocking_ipv6"` EDnsCsEnabled bool `json:"edns_cs_enabled"` DisableIpv6 bool `json:"disable_ipv6"` DnsSecEnabled bool `json:"dnssec_enabled"` CacheSize uint `json:"cache_size"` CacheTtlMin uint `json:"cache_ttl_min"` CacheTtlMax uint `json:"cache_ttl_max"` CacheOptimistic bool `json:"cache_optimistic"` UpstreamMode string `json:"upstream_mode"` UsePrivatePtrResolvers bool `json:"use_private_ptr_resolvers"` ResolveClients bool `json:"resolve_clients"` LocalPtrUpstreams []string `json:"local_ptr_upstreams"` }
DNSConfig
type DNSInfo ¶ added in v0.4.0
type DNSInfo struct { *DNSConfig DefaultLocalPtrUpstreams []string `json:"default_local_ptr_upstreams"` }
DNSInfo
type Filter ¶ added in v0.2.1
type Filter struct { Enabled bool `json:"enabled"` Id int64 `json:"id"` LastUpdated string `json:"last_updated"` Name string `json:"name"` RulesCount int32 `json:"rules_count"` Url string `json:"url"` }
Filter
type FilterConfig ¶ added in v0.5.0
FilterConfig
type FilterSetUrl ¶ added in v0.2.1
type FilterSetUrl struct { Data FilterSetUrlData `json:"data"` Url string `json:"url"` Whitelist bool `json:"whitelist"` }
FilterSetUrl
type FilterSetUrlData ¶ added in v0.2.1
type FilterSetUrlData struct { Enabled bool `json:"enabled"` Name string `json:"name"` Url string `json:"url"` }
FilterSetUrlData
type FilterStatus ¶ added in v0.2.1
type FilterStatus struct { Enabled bool `json:"enabled"` Interval uint `json:"interval"` Filters []Filter `json:"filters"` WhitelistFilters []Filter `json:"whitelist_filters"` UserRules []string `json:"user_rules"` }
FilterStatus
type GetQueryLogConfigResponse ¶ added in v0.5.0
type GetQueryLogConfigResponse struct { Enabled bool `json:"enabled"` Interval uint `json:"interval"` AnonymizeClientIp bool `json:"anonymize_client_ip"` Ignored []string `json:"ignored"` }
GetQueryLogConfigResponse
type GetStatsConfigResponse ¶ added in v0.5.0
type GetStatsConfigResponse struct { Enabled bool `json:"enabled"` Interval uint `json:"interval"` Ignored []string `json:"ignored"` }
GetStatsConfigResponse
type RemoveUrlRequest ¶ added in v0.2.1
RemoveUrlRequest
type RewriteEntry ¶ added in v0.3.0
RewriteEntry
type SafeSearchConfig ¶ added in v0.5.0
type SafeSearchConfig struct { Enabled bool `json:"enabled"` Bing bool `json:"bing"` Duckduckgo bool `json:"duckduckgo"` Google bool `json:"google"` Pixabay bool `json:"pixabay"` Yandex bool `json:"yandex"` Youtube bool `json:"youtube"` }
SafeSearchConfig
type SetRulesRequest ¶ added in v0.2.1
type SetRulesRequest struct {
Rules []string `json:"rules"`
}
SetRulesRequest