Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Whitelist ¶
func NewWhitelist ¶
NewWhitelist opens the bolt database file and returns an implementation for monban.Whitelist. The bolt database file will be created if it does not exist.
func (Whitelist) Reap ¶
Reap removes sessions older than a given duration. This function assumes that all session data is stored in a "sessions" bucket and the data is organized so the key is the session id and the value is laid out as:
-8 bytes- --n bytes-- timestamp + sessiondata
As written by Ben Johnson: https://gist.github.com/benbjohnson/a3e9e35f73dae8d15c49
Reap should run every second to clean up expired refresh tokens. Reap is meant to be called manually, only once and on a separate goroutine at the start of the program.
Click to show internal directories.
Click to hide internal directories.