session

package
v0.0.0-...-4e4842a Latest Latest
Warning

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

Go to latest
Published: May 4, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Store *sessions.CookieStore //Store is the cookie store
	Name  string                //Name is the session name
)

Functions

func Configure

func Configure(s SessionConfig)

Configure the session cookie store

func Empty

func Empty(sess *sessions.Session)

Empty deletes all the current session values

func Instance

func Instance(r *http.Request) *sessions.Session

Instance returns a new session, never returns an error

Types

type SessionConfig

type SessionConfig struct {
	Options          sessions.Options `json:"Options"`          // Pulled from: http://www.gorillatoolkit.org/pkg/sessions#Options
	Name             string           `json:"Name"`             // Name for: http://www.gorillatoolkit.org/pkg/sessions#CookieStore.Get
	SecretKey        string           `json:"SecretKey"`        //
	MaxLoginAttempts int              `json:"MaxLoginAttempts"` //
	LoginAttemptsKey string           `json:"LoginAttemptsKey"` //
}

SessionConfig stores session level information

Jump to

Keyboard shortcuts

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