whitelist

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IP

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

IP allows to check that addresses are in a white list

func NewIP

func NewIP(whitelistStrings []string, insecure bool) (*IP, error)

NewIP builds a new IP given a list of CIDR-Strings to whitelist

func (*IP) Contains

func (ip *IP) Contains(addr string) (bool, net.IP, error)

Contains checks if provided address is in the white list

func (*IP) ContainsIP

func (ip *IP) ContainsIP(addr net.IP) (bool, error)

ContainsIP checks if provided address is in the white list

Jump to

Keyboard shortcuts

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