diff options
Diffstat (limited to 'store.go')
-rw-r--r-- | store.go | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -17,17 +17,18 @@ import ( // Store is an interface for custom session stores. // -// Get should return a cached session. -// New should create and return a new session. -// Save should persist session to the underlying store implementation. -// -// Note that New should never return a nul session, even in the case of an error -// if using the Registry infrastructure for caching of sessions in your store. -// // See CookieStore and FilesystemStore for examples. type Store interface { + // Get should return a cached session. Get(r *http.Request, name string) (*Session, error) + + // New should create and return a new session. + // + // Note that New should never return a nil session, even in the case of + // an error if using the Registry infrastructure to cache the session. New(r *http.Request, name string) (*Session, error) + + // Save should persist session to the underlying store implementation. Save(r *http.Request, w http.ResponseWriter, s *Session) error } |