Documentation ¶
Index ¶
- Constants
- type Session
- type SessionStore
- func (s *SessionStore) Delete(session *Session)
- func (s *SessionStore) DeleteById(id string)
- func (s *SessionStore) FindSession(r *http.Request) *Session
- func (s *SessionStore) GenerateID() string
- func (s *SessionStore) Get(id string) *Session
- func (s *SessionStore) NewSession() *Session
- func (s *SessionStore) Put(session *Session)
- func (s *SessionStore) Reap()
Constants ¶
View Source
const TIMEOUT = 3600
Session timeout in seconds. Default 1 hour.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct { Id string User core.User RemoteAddr string Other map[string]interface{} // contains filtered or unexported fields }
func NewSession ¶
func NewSession() *Session
func (*Session) GetExpires ¶
func (*Session) UpdateExpires ¶
type SessionStore ¶
type SessionStore struct { Header string // contains filtered or unexported fields }
func NewSessionStore ¶
func NewSessionStore() *SessionStore
func (*SessionStore) Delete ¶
func (s *SessionStore) Delete(session *Session)
func (*SessionStore) DeleteById ¶
func (s *SessionStore) DeleteById(id string)
func (*SessionStore) FindSession ¶
func (s *SessionStore) FindSession(r *http.Request) *Session
func (*SessionStore) GenerateID ¶
func (s *SessionStore) GenerateID() string
func (*SessionStore) Get ¶
func (s *SessionStore) Get(id string) *Session
func (*SessionStore) NewSession ¶
func (s *SessionStore) NewSession() *Session
NewSession creates a new session with a session ID. It DOES NOT add the session to the session store.
func (*SessionStore) Put ¶
func (s *SessionStore) Put(session *Session)
Click to show internal directories.
Click to hide internal directories.