2018-project-roaster: github.com/LuleaUniversityOfTechnology/2018-project-roaster/session Index | Files

package session

import "github.com/LuleaUniversityOfTechnology/2018-project-roaster/session"

Package session implements a session storage using a Redis store and the gorilla/sessions package.


Package Files


func Get Uses

func Get(request *http.Request, name string) (*sessions.Session, error)

Get returns a session using its name.

func Invalidate Uses

func Invalidate(request *http.Request, writer http.ResponseWriter, session *sessions.Session) error

Invalidate sets the max age of a cookie to -1, rendering it invalid.

func New Uses

func New(request *http.Request, name string) (*sessions.Session, error)

New creates a new session by a provided name.

func Open Uses

func Open(maxIdleConn uint, network, address, password string, secure bool, keyPairs ...[]byte) (err error)

Open a new connection to Redis and initialize a new store.

func Save Uses

func Save(request *http.Request, writer http.ResponseWriter, session *sessions.Session) error

Save writes a new session.

Package session imports 4 packages (graph) and is imported by 3 packages. Updated 2019-01-14. Refresh now. Tools for package owners.