sessions

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: GPL-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SessionMiddleware

func SessionMiddleware(store *scs.SessionManager) mux.Middleware

Add a session to the request.

Types

type Session

type Session interface {
	Set(key string, value interface{})
	Get(key string) interface{}
	Exists(key string) bool
	Delete(key string)
	Destroy() error
	RenewToken() error
}

This interface will be set on the request's context.

func Retrieve

func Retrieve(r *http.Request) Session

Retrieve a session for the request.

Makes the session globally available, and avoids import cycles.

Jump to

Keyboard shortcuts

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