session

package
v0.23.1 Latest Latest
Warning

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

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

Documentation

Overview

Package session contains methods and objects for managing user sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear(ctx context.Context) error

func LoadAndSave

func LoadAndSave(next http.Handler) http.Handler

func NewSessionManager

func NewSessionManager() error

NewSessionManager creates a new session manager.

func Restore

func Restore[T any](ctx context.Context, key string) (T, error)

Restore retrieves an object from the session storage with the given key. If the object cannot be retrieved, then the defaultFunc is used to generate a new default value.

func Save

func Save[T any](ctx context.Context, key string, obj T)

Save saves the given object to the session storage with the given key.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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