Documentation
¶
Overview ¶
package postgres implements the session storage driver for PostgreSQL
Index ¶
- type Queryer
- type SessionStorageDriver
- func (d *SessionStorageDriver) DestroySession(ctx context.Context, sessionID ccc.UUID) error
- func (d *SessionStorageDriver) DestroySessionOIDC(ctx context.Context, oidcSID string) error
- func (d *SessionStorageDriver) InsertSession(ctx context.Context, session *dbtype.InsertSession) (ccc.UUID, error)
- func (d *SessionStorageDriver) InsertSessionOIDC(ctx context.Context, session *dbtype.InsertSessionOIDC) (ccc.UUID, error)
- func (d *SessionStorageDriver) Session(ctx context.Context, sessionID ccc.UUID) (*dbtype.Session, error)
- func (d *SessionStorageDriver) SessionOIDC(ctx context.Context, sessionID ccc.UUID) (*dbtype.SessionOIDC, error)
- func (d *SessionStorageDriver) UpdateSessionActivity(ctx context.Context, sessionID ccc.UUID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queryer ¶
type Queryer interface { Begin(ctx context.Context) (pgx.Tx, error) Query(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, query string, args ...interface{}) pgx.Row Exec(ctx context.Context, query string, args ...interface{}) (pgconn.CommandTag, error) }
type SessionStorageDriver ¶ added in v0.4.1
type SessionStorageDriver struct {
// contains filtered or unexported fields
}
func NewSessionStorageDriver ¶ added in v0.4.1
func NewSessionStorageDriver(conn Queryer) *SessionStorageDriver
NewSessionStorageDriver creates a new SessionStorageDriver
func (*SessionStorageDriver) DestroySession ¶ added in v0.4.1
DestroySession marks the session as expired
func (*SessionStorageDriver) DestroySessionOIDC ¶ added in v0.4.1
func (d *SessionStorageDriver) DestroySessionOIDC(ctx context.Context, oidcSID string) error
DestroySessionOIDC marks the session as expired
func (*SessionStorageDriver) InsertSession ¶ added in v0.4.1
func (d *SessionStorageDriver) InsertSession(ctx context.Context, session *dbtype.InsertSession) (ccc.UUID, error)
InsertSession inserts Session into database
func (*SessionStorageDriver) InsertSessionOIDC ¶ added in v0.4.1
func (d *SessionStorageDriver) InsertSessionOIDC(ctx context.Context, session *dbtype.InsertSessionOIDC) (ccc.UUID, error)
InsertSessionOIDC inserts Session into database
func (*SessionStorageDriver) Session ¶ added in v0.4.1
func (d *SessionStorageDriver) Session(ctx context.Context, sessionID ccc.UUID) (*dbtype.Session, error)
Session returns the session information from the database for given sessionID
func (*SessionStorageDriver) SessionOIDC ¶ added in v0.4.1
func (d *SessionStorageDriver) SessionOIDC(ctx context.Context, sessionID ccc.UUID) (*dbtype.SessionOIDC, error)
SessionOIDC returns the session information from the database for given sessionID
func (*SessionStorageDriver) UpdateSessionActivity ¶ added in v0.4.1
UpdateSessionActivity updates the session activity column with the current time
Click to show internal directories.
Click to hide internal directories.