Versions in this module Expand all Collapse all v1 v1.12.2 Dec 24, 2020 v1.12.1 Dec 8, 2020 Changes in this version + var SLogger = NewSessionLog(os.Stderr) + func DecodeGob(encoded []byte) (map[interface{}]interface{}, error) + func EncodeGob(obj map[interface{}]interface{}) ([]byte, error) + func Register(name string, provide Provider) + type CookieProvider struct + func (pder *CookieProvider) SessionAll() int + func (pder *CookieProvider) SessionDestroy(sid string) error + func (pder *CookieProvider) SessionExist(sid string) bool + func (pder *CookieProvider) SessionGC() + func (pder *CookieProvider) SessionInit(maxlifetime int64, config string) error + func (pder *CookieProvider) SessionRead(sid string) (Store, error) + func (pder *CookieProvider) SessionRegenerate(oldsid, sid string) (Store, error) + func (pder *CookieProvider) SessionUpdate(sid string) error + type CookieSessionStore struct + func (st *CookieSessionStore) Delete(key interface{}) error + func (st *CookieSessionStore) Flush() error + func (st *CookieSessionStore) Get(key interface{}) interface{} + func (st *CookieSessionStore) SessionID() string + func (st *CookieSessionStore) SessionRelease(w http.ResponseWriter) + func (st *CookieSessionStore) Set(key, value interface{}) error + type FileProvider struct + func (fp *FileProvider) SessionAll() int + func (fp *FileProvider) SessionDestroy(sid string) error + func (fp *FileProvider) SessionExist(sid string) bool + func (fp *FileProvider) SessionGC() + func (fp *FileProvider) SessionInit(maxlifetime int64, savePath string) error + func (fp *FileProvider) SessionRead(sid string) (Store, error) + func (fp *FileProvider) SessionRegenerate(oldsid, sid string) (Store, error) + type FileSessionStore struct + func (fs *FileSessionStore) Delete(key interface{}) error + func (fs *FileSessionStore) Flush() error + func (fs *FileSessionStore) Get(key interface{}) interface{} + func (fs *FileSessionStore) SessionID() string + func (fs *FileSessionStore) SessionRelease(w http.ResponseWriter) + func (fs *FileSessionStore) Set(key, value interface{}) error + type Log struct + func NewSessionLog(out io.Writer) *Log + type Manager struct + func NewManager(provideName string, cf *ManagerConfig) (*Manager, error) + func (manager *Manager) GC() + func (manager *Manager) GetActiveSession() int + func (manager *Manager) GetProvider() Provider + func (manager *Manager) GetSessionStore(sid string) (sessions Store, err error) + func (manager *Manager) SessionDestroy(w http.ResponseWriter, r *http.Request) + func (manager *Manager) SessionRegenerateID(w http.ResponseWriter, r *http.Request) (session Store) + func (manager *Manager) SessionStart(w http.ResponseWriter, r *http.Request) (session Store, err error) + func (manager *Manager) SetSecure(secure bool) + type ManagerConfig struct + CookieLifeTime int + CookieName string + DisableHTTPOnly bool + Domain string + EnableSetCookie bool + EnableSidInHTTPHeader bool + EnableSidInURLQuery bool + Gclifetime int64 + Maxlifetime int64 + ProviderConfig string + Secure bool + SessionIDLength int64 + SessionIDPrefix string + SessionNameInHTTPHeader string + type MemProvider struct + func (pder *MemProvider) SessionAll() int + func (pder *MemProvider) SessionDestroy(sid string) error + func (pder *MemProvider) SessionExist(sid string) bool + func (pder *MemProvider) SessionGC() + func (pder *MemProvider) SessionInit(maxlifetime int64, savePath string) error + func (pder *MemProvider) SessionRead(sid string) (Store, error) + func (pder *MemProvider) SessionRegenerate(oldsid, sid string) (Store, error) + func (pder *MemProvider) SessionUpdate(sid string) error + type MemSessionStore struct + func (st *MemSessionStore) Delete(key interface{}) error + func (st *MemSessionStore) Flush() error + func (st *MemSessionStore) Get(key interface{}) interface{} + func (st *MemSessionStore) SessionID() string + func (st *MemSessionStore) SessionRelease(w http.ResponseWriter) + func (st *MemSessionStore) Set(key, value interface{}) error + type Provider interface + SessionAll func() int + SessionDestroy func(sid string) error + SessionExist func(sid string) bool + SessionGC func() + SessionInit func(gclifetime int64, config string) error + SessionRead func(sid string) (Store, error) + SessionRegenerate func(oldsid, sid string) (Store, error) + func GetProvider(name string) (Provider, error) + type Store interface + Delete func(key interface{}) error + Flush func() error + Get func(key interface{}) interface{} + SessionID func() string + SessionRelease func(w http.ResponseWriter) + Set func(key, value interface{}) error