ipacl

package
v0.0.0-...-129829b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AclHost

func AclHost(host string) func(*IPAcl)

AclHost adds a allowed hostname to the acl list.

func AclIPNet

func AclIPNet(ipnet net.IPNet) func(*IPAcl)

AclIPNet adds a net.IPNet to the acl list.

Types

type IPAcl

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

func New

func New(opts ...IPAclOption) *IPAcl

func NewFromList

func NewFromList(hosts []string) (*IPAcl, error)

func (*IPAcl) CheckIP

func (ia *IPAcl) CheckIP(ctx context.Context, ip net.IP) bool

type IPAclItem

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

type IPAclOption

type IPAclOption func(*IPAcl)

Jump to

Keyboard shortcuts

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