Versions in this module Expand all Collapse all v0 v0.0.2 Aug 19, 2022 v0.0.1 Jul 4, 2022 Changes in this version + func DumpBasic(wl *Basic) []byte + func HTTPRequestLookup(req *http.Request) (net.IP, error) + func NetConnLookup(conn net.Conn) (net.IP, error) + func NewHandler(allow, deny http.Handler, acl ACL) (http.Handler, error) + type ACL interface + Permitted func(net.IP) bool + type Basic struct + func LoadBasic(in []byte) (*Basic, error) + func NewBasic() *Basic + func (wl *Basic) Add(ip net.IP) + func (wl *Basic) MarshalJSON() ([]byte, error) + func (wl *Basic) Permitted(ip net.IP) bool + func (wl *Basic) Remove(ip net.IP) + func (wl *Basic) UnmarshalJSON(in []byte) error + type BasicNet struct + func NewBasicNet() *BasicNet + func (wl *BasicNet) Add(n *net.IPNet) + func (wl *BasicNet) MarshalJSON() ([]byte, error) + func (wl *BasicNet) Permitted(ip net.IP) bool + func (wl *BasicNet) Remove(n *net.IPNet) + func (wl *BasicNet) UnmarshalJSON(in []byte) error + type Handler struct + func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) + type HandlerFunc struct + func NewHandlerFunc(allow, deny func(http.ResponseWriter, *http.Request), acl ACL) (*HandlerFunc, error) + func (h *HandlerFunc) ServeHTTP(w http.ResponseWriter, req *http.Request) + type HostACL interface + Add func(net.IP) + Remove func(net.IP) + type HostStub struct + func NewHostStub() HostStub + func (wl HostStub) Add(ip net.IP) + func (wl HostStub) Permitted(ip net.IP) bool + func (wl HostStub) Remove(ip net.IP) + type NetACL interface + Add func(*net.IPNet) + Remove func(*net.IPNet) + type NetStub struct + func NewNetStub() NetStub + func (wl NetStub) Add(ip *net.IPNet) + func (wl NetStub) Permitted(ip net.IP) bool + func (wl NetStub) Remove(ip *net.IPNet)