NewEmptySession returns new session object with empty storage.
(c *gin.Context)
| 269 | |
| 270 | // NewEmptySession returns new session object with empty storage. |
| 271 | func NewEmptySession(c *gin.Context) (s *Session) { |
| 272 | s = &Session{ |
| 273 | Store: gin.H{}, |
| 274 | } |
| 275 | |
| 276 | c.Set("session", s) |
| 277 | |
| 278 | return |
| 279 | } |
| 280 | |
| 281 | // NewSession created and save new session to database. |
| 282 | func NewSession(db *gorp.DbMap, expire int64) (s *Session, err error) { |
no test coverage detected