Documentation
¶
Overview ¶
Package ipreg keeps the visitor addresses registered for clients whose entries only allow registered addresses. Registrations expire and live in memory only.
Index ¶
- Constants
- func Count() int
- func ParseIP(s string) (netip.Addr, bool)
- func Register(client int, ip netip.Addr, ttl time.Duration) time.Time
- func Registered(client int, ip netip.Addr) bool
- func RegisteredAddr(client int, addr net.Addr) bool
- func RegisteredString(client int, addr string) bool
- func Reset()
Constants ¶
const AnyClient = 0
AnyClient registers an address for every client, as an administrator's login does.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register registers ip for client until ttl from now; a registration that already lasts longer is kept.
func Registered ¶
Registered reports whether ip is registered for client, by a registration for that client or for every client.
func RegisteredAddr ¶
RegisteredAddr is Registered for a network address.
func RegisteredString ¶
RegisteredString is Registered for an address given as text, an IP or host:port.
Types ¶
This section is empty.