dnsblprovider

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSBLProvider

type DNSBLProvider interface {
	GetName() string
	IsBlacklisted(string) (bool, error)
	GetReason(string) (string, error)
}

DNSBLProvider interface should be implemented to be able to query a provider

type GeneralProvider

type GeneralProvider struct {
	URL string
}

GeneralProvider implements DNSBLProvider URL is a required property which should be the ending of the dnsbl hostname

func (GeneralProvider) GetName

func (provider GeneralProvider) GetName() string

GetName returns the name of the provider Now it's the URL

func (GeneralProvider) GetReason

func (provider GeneralProvider) GetReason(address string) (string, error)

GetReason returns the block reason for an IP address

func (GeneralProvider) IsBlacklisted

func (provider GeneralProvider) IsBlacklisted(address string) (bool, error)

IsBlacklisted returns if the IP address listed at a provider

Jump to

Keyboard shortcuts

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