whitelist

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(ipStrings []string) error

Validate checks if a list of IP strings are valid.

Types

type Whitelist

type Whitelist struct {
	// contains filtered or unexported fields
}

Whitelist holds the allowed IP addresses.

func Initialize

func Initialize(ipStrings []string) (*Whitelist, error)

Initialize initializes a new Whitelist from IP strings.

func (*Whitelist) Matches

func (wl *Whitelist) Matches(ip netip.Addr) (bool, error)

Matches checks if the remote address is in the whitelist.

Jump to

Keyboard shortcuts

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