Documentation ¶
Overview ¶
Package safesearch implements safesearch host matching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultSafeSearch ¶
type DefaultSafeSearch struct {
// contains filtered or unexported fields
}
DefaultSafeSearch is the default safesearch struct.
func NewDefaultSafeSearch ¶
func NewDefaultSafeSearch( conf filtering.SafeSearchConfig, cacheSize uint, cacheTime time.Duration, ) (ss *DefaultSafeSearch, err error)
NewDefaultSafeSearch returns new safesearch struct. CacheTime is an element TTL (in minutes).
func (*DefaultSafeSearch) CheckHost ¶
func (ss *DefaultSafeSearch) CheckHost( host string, qtype uint16, ) (res filtering.Result, err error)
CheckHost implements the filtering.SafeSearch interface for *DefaultSafeSearch.
func (*DefaultSafeSearch) SearchHost ¶
func (ss *DefaultSafeSearch) SearchHost(host string, qtype uint16) (res *rules.DNSRewrite)
SearchHost implements the filtering.SafeSearch interface for *DefaultSafeSearch.
Click to show internal directories.
Click to hide internal directories.