spanner

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

spanner provides the session storage driver for Spanner

Index

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

type SessionStorageDriver added in v0.4.1

type SessionStorageDriver struct {
	// contains filtered or unexported fields
}

func NewSessionStorageDriver added in v0.4.1

func NewSessionStorageDriver(client *spanner.Client) *SessionStorageDriver

NewSessionStorageDriver creates a new SessionStorageDriver

func (*SessionStorageDriver) Close added in v0.4.1

func (d *SessionStorageDriver) Close()

Close closes the spanner client

func (*SessionStorageDriver) DestroySession added in v0.4.1

func (d *SessionStorageDriver) DestroySession(ctx context.Context, sessionID ccc.UUID) error

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 using the oidcSID

func (*SessionStorageDriver) InsertSession added in v0.4.1

func (d *SessionStorageDriver) InsertSession(ctx context.Context, insertSession *dbtype.InsertSession) (ccc.UUID, error)

InsertSession inserts a Session into database

func (*SessionStorageDriver) InsertSessionOIDC added in v0.4.1

func (d *SessionStorageDriver) InsertSessionOIDC(ctx context.Context, insertSession *dbtype.InsertSessionOIDC) (ccc.UUID, error)

InsertSessionOIDC inserts a 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

func (d *SessionStorageDriver) UpdateSessionActivity(ctx context.Context, sessionID ccc.UUID) error

UpdateSessionActivity updates the session activity column with the current time

Jump to

Keyboard shortcuts

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