Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter contains a number of rules. Rules are divided into rule sets, each denoted by a domain.
func (*Filter) AllowDomains ¶
AllowDomains sets the filter to allow only specified values as domains. The given strings are included as allowed values. Non-word values are skipped.
func (*Filter) AllowVars ¶
AllowVars sets the list to allow only specified values as variables for the given domain. The given strings are included as allowed values. Non-word values are skipped.
func (*Filter) AsQuery ¶
AsQuery formats the rule set specified by the given domain as a SQLite query expression. Literals are replaced with parameters, and returned as arguments to be passed to the query executor.
The expression is prefixed with the AND operator. If the rule set contains no rules, then the expression is empty.
Variables are prefixed with an underscore.