Help us shape the future of Go! Take the 2026 Go Developer Survey

session

package
v0.251.8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package session contains methods and objects for managing user sessions.

Index

Constants

This section is empty.

Variables

View Source
var Load = sync.OnceValues(func() (*Manager, error) {
	store, err := store.New()
	if err != nil {
		return nil, fmt.Errorf("load store: %w", err)
	}

	manager := scs.New()
	manager.Store = store
	manager.Lifetime = sessionLifetime
	manager.Cookie.Name = "foragd_session"
	manager.Cookie.Secure = true
	manager.Cookie.HttpOnly = true
	manager.Cookie.SameSite = http.SameSiteLaxMode
	return &Manager{
		SessionManager: manager,
	}, nil
})

Functions

This section is empty.

Types

type Manager added in v0.235.0

type Manager struct {
	*scs.SessionManager
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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