httpsession

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKeySession = ContextKey("session")

ContextKeySession is the key used to fetch the session from the context

Functions

func GetSessionFromRequest

func GetSessionFromRequest(req *http.Request) *session.Session

GetSessionFromRequest retrieves session data from a given request, fetching it from the context using the ContextKeySession

func Register

func Register(c alice.Chain) alice.Chain

Register will append an HTTP handler to an Alice chain, whereby the stored session will be loaded and stored on the request context

Types

type ContextKey

type ContextKey string

ContextKey is a type to cast context keys

Jump to

Keyboard shortcuts

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