Documentation
¶
Overview ¶
Package database persists session families and generations through the production database owner.
Index ¶
Constants ¶
const ( // SchemaVersion is the session schema version Ready must observe. SchemaVersion uint = 3 // VersionTable records session migrations apart from the application's schema_migrations, so both sets keep independent version sequences in one database. VersionTable = "auth_session_schema_migrations" )
Variables ¶
This section is empty.
Functions ¶
func Migrations ¶
Migrations returns production versioned SQL migrations at SchemaVersion, tracked in VersionTable. Composition injects the driver and sets Config.Table.Schema for PostgreSQL.
func NewStore ¶
NewStore borrows the injected production database; the caller owns migrations and pool shutdown.
func RevokeSubjectTx ¶
RevokeSubjectTx revokes every active session family of one subject inside the caller's transaction, so the revocation commits or rolls back with the caller's own writes, such as a password change. It does not end live streams: after the commit the caller calls session.Manager.RevokeSubject or session.Manager.Nudge.
Types ¶
This section is empty.