session

package
v0.0.0-...-b76ee76 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package session provides a wrapper for gorilla/sessions package.

Index

Constants

This section is empty.

Variables

View Source
var (

	// Name is the session name
	Name string
)

Functions

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 and never returns an error, just displays one.

func SetConfig

func SetConfig(i Info)

SetConfig stores the config.

func Store

func Store() *sessions.CookieStore

Store returns the cookiestore

Types

type Info

type Info 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
	AuthKey    string           `json:"AuthKey"`    // Key for: http://www.gorillatoolkit.org/pkg/sessions#NewCookieStore
	EncryptKey string           `json:"EncryptKey"` // Key for: http://www.gorillatoolkit.org/pkg/sessions#NewCookieStore
	CSRFKey    string           `json:"CSRFKey"`    // Key for: http://www.gorillatoolkit.org/pkg/csrf#Protect
}

Info holds the session level information.

Jump to

Keyboard shortcuts

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