Documentation
¶
Index ¶
Constants ¶
View Source
const ( EXPIRED int = 1 ACTIVE int = 2 DELETED int = 3 //SIDLEN Length of each SessionID. Change this value to change the length of each Session ID created by uafm. SIDLEN int = 32 )
Variables ¶
This section is empty.
Functions ¶
func GenerateUniqueSid ¶
func GenerateUniqueSid() string
GenerateUniqueSid is cryptographically safe enough with crypto/rand function.
Types ¶
type SessionManager ¶
type SessionManager struct {
Collection *mgo.Collection
}
var FormSM *SessionManager
var UserSM *SessionManager
func (*SessionManager) Clean ¶
func (sm *SessionManager) Clean()
func (*SessionManager) DeleteSession ¶
func (sm *SessionManager) DeleteSession(sid string) (int, error)
func (*SessionManager) GetSession ¶
func (sm *SessionManager) GetSession(sid string) (*Session, error)
func (*SessionManager) SetSession ¶
Click to show internal directories.
Click to hide internal directories.