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
AddFinalizer(finalizer func(r *http.Request, ctx context.Context) (context.Context, error))
}
This interface will be set on the request's context.
func Retrieve ¶
Retrieve a session for the request.
Makes the session globally available, and avoids import cycles.
func SessionFromContext ¶ added in v1.4.4
SessionFromContext retrieves the session from the context.
Click to show internal directories.
Click to hide internal directories.