Versions in this module Expand all Collapse all v1 v1.26.29 Jul 31, 2026 v1.26.27 Jul 31, 2026 Changes in this version + func AesDecrypt(key, text []byte) ([]byte, error) + func AesEncrypt(key, text []byte) ([]byte, error) + func DecodeGob(encoded []byte) (out map[interface{}]interface{}, err error) + func DecryptSecret(key string, cipherhex string) (string, error) + func EncodeGob(obj map[interface{}]interface{}) ([]byte, error) + func EncryptSecret(key string, str string) (string, error) + func GetCookie(req *http.Request, name string) string + func NewCookie(name string, value string, others ...interface{}) *http.Cookie + func NewSecret() (string, error) + func NewSecretWithLength(length int64) (string, error) + func Register(name string, provider Provider) + func RegisterFn(name string, providerfn func() Provider) + func Sessioner(options ...Options) (func(next http.Handler) http.Handler, error) + func Version() string + type FileProvider struct + func (p *FileProvider) Count() (int, error) + func (p *FileProvider) Destroy(sid string) error + func (p *FileProvider) Exist(sid string) (bool, error) + func (p *FileProvider) GC() + func (p *FileProvider) Init(maxlifetime int64, rootPath string) error + func (p *FileProvider) Read(sid string) (_ RawStore, err error) + func (p *FileProvider) Regenerate(oldsid, sid string) (_ RawStore, err error) + type FileStore struct + func NewFileStore(p *FileProvider, sid string, kv map[interface{}]interface{}) *FileStore + func (s *FileStore) Delete(key interface{}) error + func (s *FileStore) Flush() error + func (s *FileStore) Get(key interface{}) interface{} + func (s *FileStore) ID() string + func (s *FileStore) Release() error + func (s *FileStore) Set(key, val interface{}) error + type Manager struct + func NewManager(name string, opt Options) (*Manager, error) + func (m *Manager) Count() (int, error) + func (m *Manager) Destroy(resp http.ResponseWriter, req *http.Request) error + func (m *Manager) GC() + func (m *Manager) Read(sid string) (RawStore, error) + func (m *Manager) RegenerateID(resp http.ResponseWriter, req *http.Request) (sess RawStore, err error) + func (m *Manager) SetSecure(secure bool) + func (m *Manager) Start(resp http.ResponseWriter, req *http.Request) (RawStore, error) + type MemProvider struct + func (p *MemProvider) Count() (int, error) + func (p *MemProvider) Destroy(sid string) error + func (p *MemProvider) Exist(sid string) (bool, error) + func (p *MemProvider) GC() + func (p *MemProvider) Init(maxLifetime int64, _ string) error + func (p *MemProvider) Read(sid string) (_ RawStore, err error) + func (p *MemProvider) Regenerate(oldsid, sid string) (RawStore, error) + type MemStore struct + func NewMemStore(sid string) *MemStore + func (*MemStore) Release() error + func (s *MemStore) Delete(key interface{}) error + func (s *MemStore) Flush() error + func (s *MemStore) Get(key interface{}) interface{} + func (s *MemStore) ID() string + func (s *MemStore) Set(key, val interface{}) error + type Options struct + CookieLifeTime int + CookieName string + CookiePath string + Domain string + FlashEncryptionKey string + Gclifetime int64 + IDLength int + IgnoreReleaseForWebSocket bool + Maxlifetime int64 + Provider string + ProviderConfig string + SameSite http.SameSite + Secure bool + func PrepareOptions(options []Options) Options + type Provider interface + Count func() (int, error) + Destroy func(sid string) error + Exist func(sid string) (bool, error) + GC func() + Init func(gclifetime int64, config string) error + Read func(sid string) (RawStore, error) + Regenerate func(oldsid, sid string) (RawStore, error) + type RawStore interface + Delete func(interface{}) error + Flush func() error + Get func(interface{}) interface{} + ID func() string + Release func() error + Set func(interface{}, interface{}) error + type Store interface + Count func() (int, error) + Destroy func(http.ResponseWriter, *http.Request) error + GC func() + Read func(string) (RawStore, error) + RegenerateID func(http.ResponseWriter, *http.Request) (RawStore, error) + func GetSession(req *http.Request) Store + func RegenerateSession(resp http.ResponseWriter, req *http.Request) (Store, error)