session

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Store    Store
	CacheTTL time.Duration
}

func (*Manager) Revoke

func (m *Manager) Revoke(ctx context.Context, userID int64, sid string) error

func (*Manager) RevokeAll

func (m *Manager) RevokeAll(ctx context.Context, userID int64, except string) error

func (*Manager) Touch

func (m *Manager) Touch(ctx context.Context, userID int64, sid string)

func (*Manager) Valid

func (m *Manager) Valid(ctx context.Context, userID int64, sid string) (bool, error)

type Store

type Store interface {
	Alive(ctx context.Context, userID int64, sid string) (bool, error)
	Revoke(ctx context.Context, userID int64, sid string) error
	RevokeAll(ctx context.Context, userID int64, except string) ([]string, error)
}

Jump to

Keyboard shortcuts

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