filter

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	DbFilePath       string
	AllowedCountries map[string]bool
	DeniedCountries  map[string]bool
	// contains filtered or unexported fields
}

Filter implements the ipfilter interface

func (*Filter) CheckIP

func (f *Filter) CheckIP(ipAddr, _ string) error

CheckIP returns an error if the specified IP is not allowed

func (*Filter) Close

func (f *Filter) Close()

Close closes the database file

func (*Filter) Reload

func (f *Filter) Reload() error

Reload loads the database file

Jump to

Keyboard shortcuts

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