sessions

package
v0.0.0-...-2b1c11c Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSessionConfig = SessionConfig{
	Skipper: middleware.DefaultSkipper,
}

Functions

func Context

func Context(ctx context.Context, session *scs.SessionManager) context.Context

Context adds session manager object to context for immediate use

func ForContext

func ForContext(ctx context.Context) *scs.SessionManager

ForContext pulls session manager value for context

func LoadAndSave

func LoadAndSave(sessionManager *scs.SessionManager) echo.MiddlewareFunc

func LoadAndSaveWithConfig

func LoadAndSaveWithConfig(config SessionConfig) echo.MiddlewareFunc

func Middleware

func Middleware(session *scs.SessionManager) echo.MiddlewareFunc

Middleware will add the provided *scs.SessionManager instance to the context

func TimeoutMiddleware

func TimeoutMiddleware(session *scs.SessionManager, exp time.Duration) echo.MiddlewareFunc

TimeoutMiddleware will alter the session expiration date by adding the duration given to the current timestamp.

Types

type SessionConfig

type SessionConfig struct {
	Skipper        middleware.Skipper
	SessionManager *scs.SessionManager
}

Jump to

Keyboard shortcuts

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