Documentation ¶
Overview ¶
Package geoip2xl provides a xlistd.List implementation that uses a geoip database for checks.
This means that the RBL can check if an ip is in a list of countries. It only allows IPv4 resources.
This package is a work in progress and makes no API stability promises.
Index ¶
- Constants
- func Builder(defaultCfg Config) xlistd.BuildListFn
- type Config
- type List
- func (l *List) Check(ctx context.Context, name string, resource xlist.Resource) (xlist.Response, error)
- func (l *List) Class() string
- func (l *List) Close()
- func (l *List) ID() string
- func (l *List) Open() error
- func (l *List) Ping() error
- func (l *List) Resources(ctx context.Context) ([]xlist.Resource, error)
Constants ¶
View Source
const ComponentClass = "geoip2"
ComponentClass registered.
Variables ¶
This section is empty.
Functions ¶
func Builder ¶
func Builder(defaultCfg Config) xlistd.BuildListFn
Builder returns a builder function.
Types ¶
type Config ¶
type Config struct { // Countries is a list of country codes Countries []string // Reverse the matching of the rule Reverse bool // Common options ForceValidation bool Reason string }
Config options.
type List ¶
type List struct {
// contains filtered or unexported fields
}
List implements an RBL that uses a geoip database for checks.
Click to show internal directories.
Click to hide internal directories.