session

package
v0.0.0-...-588f2ff Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QLStore

type QLStore struct {
	// contains filtered or unexported fields
}

QLStore is the session storage implementation for gorilla/sessions using embedded SQL database(ql).

func NewQLStore

func NewQLStore(store *db.DB, path string, maxAge int, keyPairs ...[]byte) *QLStore

NewQLStore initillizes QLStore with the given keyPairs

func (*QLStore) Delete

func (db *QLStore) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error

Delete deletes session.

func (*QLStore) Get

func (db *QLStore) Get(r *http.Request, name string) (*sessions.Session, error)

Get fetches a session for a given name after it has been added to the registry.

func (*QLStore) New

func (db *QLStore) New(r *http.Request, name string) (*sessions.Session, error)

New returns a new session

func (*QLStore) Save

func (db *QLStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error

Save saves the session into a ql database

Jump to

Keyboard shortcuts

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