Add sessionGetAll to StorageAPI

This commit is contained in:
Marcos Lilljedahl
2017-07-18 18:17:42 -03:00
parent 56e2899dcf
commit 9293a4f8d0
4 changed files with 46 additions and 0 deletions

View File

@@ -27,6 +27,14 @@ func (store *storage) SessionGet(sessionId string) (*types.Session, error) {
return s, nil
}
func (store *storage) SessionGetAll() (map[string]*types.Session, error) {
store.rw.Lock()
defer store.rw.Unlock()
return store.db, nil
}
func (store *storage) SessionPut(s *types.Session) error {
store.rw.Lock()
defer store.rw.Unlock()