Discover Packages
github.com/JBoudou/Itero
mid
unlogged
package
Version:
v0.1.7
Opens a new window with list of versions in this module.
Published: Jul 30, 2021
License: AGPL-3.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
package unlogged provides functions to handle unlogged users.
FromAddr constructs a server.User from an address string like http.Request.RemoteAddr.
The user is created if necessary.
FromHash constructs a server.User from a hash, creating the user if necessary.
HashAddr produces a 24 bits hash sum from address strings like http.Request.RemoteAddr.
The sum is guaranteed to be the same from the same IP.
The fonction is only pertinent for IPv4 addresses, but should never fail.
LE24Bits converts a 24 bits unsigned integer to its Little-Endian representation.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.