MCPcopy
hub / github.com/gorilla/sessions / Store

Interface Store

store.go:25–37  ·  view source on GitHub ↗

Store is an interface for custom session stores. See CookieStore and FilesystemStore for examples.

Source from the content-addressed store, hash-verified

23//
24// See CookieStore and FilesystemStore for examples.
25type Store interface {
26 // Get should return a cached session.
27 Get(r *http.Request, name string) (*Session, error)
28
29 // New should create and return a new session.
30 //
31 // Note that New should never return a nil session, even in the case of
32 // an error if using the Registry infrastructure to cache the session.
33 New(r *http.Request, name string) (*Session, error)
34
35 // Save should persist session to the underlying store implementation.
36 Save(r *http.Request, w http.ResponseWriter, s *Session) error
37}
38
39// CookieStore ----------------------------------------------------------------
40

Callers 9

GetMethod · 0.65
GetMethod · 0.65
GetMethod · 0.65
TestGH2MaxLengthFunction · 0.65
SaveMethod · 0.65
SaveMethod · 0.65
SaveFunction · 0.65

Implementers 2

CookieStorestore.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…