Documentation ¶
Overview ¶
Package rulelist contains the implementation of the standard rule-list filter that wraps an urlfilter filtering-engine.
TODO(a.garipov): Expand.
Index ¶
Constants ¶
View Source
const ErrHTML errors.Error = "data is HTML, not plain text"
ErrHTML is returned by Parser.Parse if the data is likely to be HTML.
TODO(a.garipov): This error is currently returned to the UI. Stop that and make it all-lowercase.
View Source
const MaxRuleLen = 1024
MaxRuleLen is the maximum length of a line with a filtering rule, in bytes.
TODO(a.garipov): Consider changing this to a rune length, like AdGuardDNS does.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParseResult ¶
type ParseResult struct { // Title is the title contained within the filtering-rule list, if any. Title string // RulesCount is the number of rules in the list. It excludes empty lines // and comments. RulesCount int // BytesWritten is the number of bytes written to dst. BytesWritten int // Checksum is the CRC-32 checksum of the rules content. That is, excluding // empty lines and comments. Checksum uint32 }
ParseResult contains information about the results of parsing a filtering-rule list by Parser.Parse.
Click to show internal directories.
Click to hide internal directories.