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
Click to show internal directories.
Click to hide internal directories.