Documentation
¶
Index ¶
- type Driver
- func (driver *Driver) Create(_ context.Context, userID, sessionID string, expires int64) (string, error)
- func (driver *Driver) GetByRawToken(_ context.Context, rawToken string) (*session.Session, error)
- func (driver *Driver) TerminateBySessionID(_ context.Context, sessionID string) error
- func (driver *Driver) TerminateByUserID(_ context.Context, userID string) error
- func (driver *Driver) TerminateExpired(_ context.Context) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver represents the in-memory session storage driver built using hashicorp/go-memdb
func (*Driver) Create ¶
func (driver *Driver) Create(_ context.Context, userID, sessionID string, expires int64) (string, error)
Create creates a new session
func (*Driver) GetByRawToken ¶
GetByRawToken retrieves a session by its raw (prior hashing) token
func (*Driver) TerminateBySessionID ¶
TerminateBySessionID terminates a session by its session ID
func (*Driver) TerminateByUserID ¶
TerminateByUserID terminates all sessions of a specific user ID
Click to show internal directories.
Click to hide internal directories.