qspgx

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package qspgx is a back-end for qsess which uses PostgreSQL, accessed via the pgx package.

Index

Constants

View Source
const DefaultPruneIntervalSecs = 2 * 60 // prune every 2 minutes

Variables

This section is empty.

Functions

func NewPgxStore

func NewPgxStore(pdb *pgxpool.Pool, tableName string, errLog io.Writer, cipherkeys ...[]byte) (*qsess.Store, error)

NewPgxStore creates a new session store, using a PostgreSQL database accessed via pgxpool.

table is the name of a database table to hold session data (it will be created if it doesn't exist).

cipherkeys are one or more 32-byte encryption keys, to be used with AES-GCM. For encryption, only the first key is used; for decryption all keys are tried (allowing key rotation).

Additional configuration options can be set by manipulating fields in the returned qsess.Store.

Types

This section is empty.

Jump to

Keyboard shortcuts

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