session

package
v0.0.0-...-d1236c8 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("session manager: no session found")

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// GetOrInit returns the current session ID stored in the request
	// as a cookie or creates a new id and writes it into the response as a cookie
	GetOrInit(http.ResponseWriter, *http.Request) string
	// Get returns the current session only if it exists. Returns an error otherwise
	Get(*http.Request) (string, error)
}

Manager for the current session

func NewManager

func NewManager() Manager

NewManager returns an implementation of the Manager interface

Jump to

Keyboard shortcuts

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