Documentation
¶
Overview ¶
Package spanner provides the session storage driver for Spanner.
Index ¶
- type ConnectionSettings
- type SessionStorageDriver
- func (d *SessionStorageDriver) Close()
- 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, insertSession *dbtype.InsertSession) (ccc.UUID, error)
- func (d *SessionStorageDriver) InsertSessionOIDC(ctx context.Context, insertSession *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 ConnectionSettings ¶
type ConnectionSettings struct {
// ProjectID is the project the Spanner database is in
ProjectID string
// InstanceID is the Spanner Instance ID
InstanceID string
// DatabaseName is the Spanner Database Name
DatabaseName string
}
ConnectionSettings is used to configure the spanner package
func (*ConnectionSettings) DBName ¶
func (c *ConnectionSettings) DBName() string
DBName returns the fully qualified database name.
type SessionStorageDriver ¶
type SessionStorageDriver struct {
// contains filtered or unexported fields
}
SessionStorageDriver represents the session storage implementation for Spanner.
func NewSessionStorageDriver ¶
func NewSessionStorageDriver(client *spanner.Client) *SessionStorageDriver
NewSessionStorageDriver creates a new SessionStorageDriver
func (*SessionStorageDriver) Close ¶
func (d *SessionStorageDriver) Close()
Close closes the spanner client
func (*SessionStorageDriver) DestroySession ¶
DestroySession marks the session as expired
func (*SessionStorageDriver) DestroySessionOIDC ¶
func (d *SessionStorageDriver) DestroySessionOIDC(ctx context.Context, oidcSID string) error
DestroySessionOIDC marks the session as expired using the oidcSID
func (*SessionStorageDriver) InsertSession ¶
func (d *SessionStorageDriver) InsertSession(ctx context.Context, insertSession *dbtype.InsertSession) (ccc.UUID, error)
InsertSession inserts a Session into database
func (*SessionStorageDriver) InsertSessionOIDC ¶
func (d *SessionStorageDriver) InsertSessionOIDC(ctx context.Context, insertSession *dbtype.InsertSessionOIDC) (ccc.UUID, error)
InsertSessionOIDC inserts a Session into database
func (*SessionStorageDriver) Session ¶
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 ¶
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 ¶
UpdateSessionActivity updates the session activity column with the current time