diff options
author | Jonathan Gillham <jonathan.gillham@gamil.com> | 2013-10-25 23:28:06 +0400 |
---|---|---|
committer | Jonathan Gillham <jonathan.gillham@gamil.com> | 2013-10-25 23:28:06 +0400 |
commit | 3cb09c3e9541606b194a45b02b85176b6e4635f4 (patch) | |
tree | 826fde7ee97b08cfa30ceeb953128898c6ea7e62 /store.go | |
parent | cb4af09e63b4fa547369c43a1fa62c2c4ce5c2b7 (diff) |
Improved Store interface comments.
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 } |