Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build - constructs new filters
outputPath : path and filename for the new filter forIOS : toggles between d.a.w.g. (android) or JSON (iOS) format
func Init ¶
Init - initialize for the export side of operations
filterCacheDir : directory where assets are cached cfg : configuration options
func SetLoggingEnabled ¶
func SetLoggingEnabled(b bool)
SetLoggingEnabled -- toggle logging for package
Types ¶
type Config ¶
type Config struct { CompileDebugAsset bool // use debug assets when building non-iOS filters CacheValidity time.Duration // TTL for cached files on disk IOSFilterCutoffNo uint32 // the number of rules that can fit into one JSON HttpClient *http.Client // HTTP client used to download all assets Profile ProfileType // how aggressive the d.a.w.g. filter should be ListUrlBalanced string // list containing the exceptions for the balanced profile ListUrlEssential string // list containing the exceptions for the essential profile // contains filtered or unexported fields }
NOTE Profiles use a different logic: `assetsUrl` is the most restrictive list (strict), and `ListUrlBalanced` and `ListUrlEssential` are lists containing exceptions for the rules found in `assetUrl`.
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) SetAssetsUrl ¶
type ProfileType ¶
type ProfileType uint8
const ( ProfileTypeUnknown ProfileType = iota ProfileTypeEssential ProfileTypeBalanced ProfileTypeStrict )
func ParseProfileType ¶
func ParseProfileType(s string) ProfileType
func (ProfileType) String ¶
func (p ProfileType) String() string
type UBlockHelper ¶
type UBlockHelper struct {
// contains filtered or unexported fields
}
UBlockHelper -- object to use in superior layers.
func Deserialize ¶
func Deserialize(enc []byte) (*UBlockHelper, error)
Deserialize -- Deserializes the graph
Click to show internal directories.
Click to hide internal directories.