blacklists

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blacklist

type Blacklist map[string]*BlacklistProvider

Blacklist is a custom type that allows for direct access to providers

func ReadBlacklistConfig

func ReadBlacklistConfig(listType string) (Blacklist, error)

ReadConfig reads and parses the TOML config file

type BlacklistProvider

type BlacklistProvider struct {
	Name        string     `toml:"name"`
	Website     string     `toml:"website"`
	Lookup      string     `toml:"lookup"`
	DomainLists []ListInfo `toml:"domain_lists"`
	IPLists     []ListInfo `toml:"ip_lists"`
}

BlacklistProvider represents a single blacklist provider

type ListInfo

type ListInfo struct {
	Name string `toml:"name"`
	URL  string `toml:"url"`
	Type string `toml:"type"`
}

ListInfo represents information about a specific blacklist

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL