Documentation
¶
Index ¶
- Variables
- type SessionState
- type SessionStore
- func (s *SessionStore) HasFreshSession(userID string, now time.Time) bool
- func (s *SessionStore) Remove(sessionID string)
- func (s *SessionStore) ShouldSuppressPush(userID, roomID string, now time.Time) bool
- func (s *SessionStore) Update(sessionID string, update func(*SessionState))
- func (s *SessionStore) Upsert(sessionID string, state SessionState)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSessionStore = NewSessionStore(60 * time.Second)
Functions ¶
This section is empty.
Types ¶
type SessionState ¶
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
func NewSessionStore ¶
func NewSessionStore(ttl time.Duration) *SessionStore
func (*SessionStore) HasFreshSession ¶
func (s *SessionStore) HasFreshSession(userID string, now time.Time) bool
func (*SessionStore) Remove ¶
func (s *SessionStore) Remove(sessionID string)
func (*SessionStore) ShouldSuppressPush ¶
func (s *SessionStore) ShouldSuppressPush(userID, roomID string, now time.Time) bool
func (*SessionStore) Update ¶
func (s *SessionStore) Update(sessionID string, update func(*SessionState))
func (*SessionStore) Upsert ¶
func (s *SessionStore) Upsert(sessionID string, state SessionState)
Click to show internal directories.
Click to hide internal directories.