aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gillham <jonathan.gillham@gamil.com>2013-10-25 23:28:06 +0400
committerJonathan Gillham <jonathan.gillham@gamil.com>2013-10-25 23:28:06 +0400
commit3cb09c3e9541606b194a45b02b85176b6e4635f4 (patch)
tree826fde7ee97b08cfa30ceeb953128898c6ea7e62
parentcb4af09e63b4fa547369c43a1fa62c2c4ce5c2b7 (diff)
Improved Store interface comments.
-rw-r--r--store.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/store.go b/store.go
index 5b43bc8..5eaea81 100644
--- a/store.go
+++ b/store.go
@@ -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
}