Versions in this module Expand all Collapse all v1 v1.2.1 Feb 11, 2022 Changes in this version + func Invalidate(s *Session) error + func Malloc(v *Values) v1.2.0 Feb 4, 2022 Changes in this version + var DefaultRAMOptions = &RAMOption + var ErrAlreadyExpired = errors.New("session already expired") + var ErrIsEmpty = errors.New("key or session id is empty") + var ErrKeyNoData = errors.New("key no data") + var ErrMigrateSessionFail = errors.New("migrate session fail") + var ErrRemoveSessionFail = errors.New("remove session fail") + var ErrSessionNoData = errors.New("session no data") + var NewRDSOptions = func(ip string, port uint16, passwd string, opts ...func(*RDSOption)) *RDSOption + var WithCookieName = func(cn string) func(*Options) + var WithDomain = func(domain string) func(*Options) + var WithHttpOnly = func(b bool) func(*Options) + var WithIndex = func(number uint8) func(*RDSOption) + var WithLifeTime = func(d time.Duration) func(*Options) + var WithOpts = func(opt Options) func(*RDSOption) + var WithPath = func(path string) func(*Options) + var WithPoolSize = func(poolsize uint8) func(*RDSOption) + var WithPrefix = func(prefix string) func(*RDSOption) + var WithSecure = func(b bool) func(*Options) + func Debug(flag bool) + func NewCookie() *http.Cookie + func Open(opt Configure) + func StoreFactory(opt Options, store Storage) + type Config struct + type Configure interface + Parse func() (cfg *Config) + type Options struct + func NewOptions(opts ...func(*Options)) Options + func (opt Options) Parse() (cfg *Config) + type RAMOption struct + func (opt RAMOption) Parse() (cfg *Config) + type RDSOption struct + Address string + Index uint8 + Password string + PoolSize uint8 + Prefix string + func (opt RDSOption) Parse() (cfg *Config) + type RamStore struct + func NewRAM() *RamStore + func (ram *RamStore) Read(s *Session) (err error) + func (ram *RamStore) Remove(s *Session) (err error) + func (ram *RamStore) Write(s *Session) (err error) + type RdsStore struct + func NewRds() *RdsStore + func (rds *RdsStore) Read(s *Session) (err error) + func (rds *RdsStore) Remove(s *Session) (err error) + func (rds *RdsStore) Write(s *Session) (err error) + type Session struct + func GetSession(w http.ResponseWriter, req *http.Request) (*Session, error) + func Migrate(write http.ResponseWriter, old *Session) (*Session, error) + func NewSession() *Session + func (s *Session) Expired() bool + func (s *Session) ID() string + func (s *Session) Sync() error + type Storage interface + Read func(s *Session) (err error) + Remove func(s *Session) (err error) + Write func(s *Session) (err error) + type Values map[string]interface