qscql

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: 4 Imported by: 0

Documentation

Overview

Package qscql is a Cassandra/Scylla back-end for qsess.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCqlStore

func NewCqlStore(gs *gocql.Session, table string, uidIndex bool, uidToClient bool, cipherkeys ...[]byte) (*qsess.Store, error)

NewCqlStore creates a new session store, using a cassandra database.

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).

uidIndex and uidToClient control the implementation of DeleteByUserID. If you are not using DeleteByUserID, set them both to false. If you are using DeleteByUserID with Cassandra, set uidIndex to true, which creates a secondary index of sessions by userID. If you are using DeleteByUserID with Scylla, set uidToClient to true, which keys the session table by (userID, sessID), which requires that encrypted userIDs be stored in client cookies/tokens. There is never a reason to set them both to true.

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