Documentation
¶
Index ¶
- type BlockList
- func (blocklist *BlockList) Disable(duration time.Duration) time.Time
- func (blockList *BlockList) Fetch(ctx context.Context) error
- func (blockList *BlockList) IsBlocked(fqdn string) (bool, error)
- func (blocklist *BlockList) Load(items []string)
- func (BlockList *BlockList) Metadata(attr, defaultValue string) string
- func (BlockList *BlockList) Name() string
- func (blocklist *BlockList) Reenable() bool
- func (blocklist *BlockList) Status() *BlocklistStatus
- func (blockList *BlockList) URL() string
- type BlocklistStatus
- type ScannerFunc
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockList ¶
type BlockList struct {
// contains filtered or unexported fields
}
func NewBlockList ¶
func (*BlockList) IsBlocked ¶
Returns whether the URL (or part of the URL) is on a block list. If true, might be a false positive, but if false (i.e. allowed) is definitely not blocked
func (*BlockList) Status ¶ added in v0.13.0
func (blocklist *BlockList) Status() *BlocklistStatus
type BlocklistStatus ¶ added in v0.13.0
type BlocklistStatus struct {
URL string `json:"url"`
Size uint `json:"size"`
MetaData map[string]string `json:"metadata,omitempty"`
LastUpdated *time.Time `json:"last_updated,omitempty"`
DisabledUntil *time.Time `json:"disabled_until,omitempty"`
FalsePositiveRate float64 `json:"estimated_false_positive_rate"`
}
type ScannerFunc ¶ added in v0.14.0
Click to show internal directories.
Click to hide internal directories.