Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct { // Created Listener Created sessionListener // Destroyed Listener Destroyed sessionListener // Invalidated Listener Invalidated sessionListener // Refreshed Listener Refreshed sessionListener }
Listener struct
type Provider ¶
type Provider interface { // CookieName session cookie name CookieName() string // Exists session Exists(id string) bool // GetId session id GetId(r *http.Request) string // Del session Del(id string) // Get session id Get(id string) Session // GetAll session GetAll() map[string]Session // Clear sessions Clear() // New return session New(config *Config, listener *Listener) Session // Refresh session Refresh(session Session, config *Config, listener *Listener) // Clean session Clean(config *Config, listener *Listener) }
Provider interface
type Session ¶
type Session interface { // Id session id Id() string // Renew session Renew(lifeTime time.Duration) // Invalidate session Invalidate() // Invalidated session Invalidated() bool // Get named val Get(name string) interface{} // GetAll session's values GetAll() map[string]interface{} // Set named val Set(name string, val interface{}) // SetAll values SetAll(data map[string]interface{}, flush bool) // Del named val Del(name string) // Clear session's val Clear() }
Session interface
Click to show internal directories.
Click to hide internal directories.