Versions in this module Expand all Collapse all v2 v2.3.3 Jun 5, 2020 v2.3.2 Jun 5, 2020 Changes in this version + type Codec interface + Decode func([]byte) (deadline time.Time, values map[string]interface{}, err error) + Encode func(deadline time.Time, values map[string]interface{}) ([]byte, error) + type GobCodec struct + func (GobCodec) Decode(b []byte) (time.Time, map[string]interface{}, error) + func (GobCodec) Encode(deadline time.Time, values map[string]interface{}) ([]byte, error) + type ISession interface + Clear func(ctx context.Context) error + Commit func(ctx context.Context) (string, time.Time, error) + Destroy func(ctx context.Context) error + Exists func(ctx context.Context, key string) bool + Get func(ctx context.Context, key string) interface{} + GetBool func(ctx context.Context, key string) bool + GetBytes func(ctx context.Context, key string) []byte + GetFloat func(ctx context.Context, key string) float64 + GetInt func(ctx context.Context, key string) int + GetString func(ctx context.Context, key string) string + GetTime func(ctx context.Context, key string) time.Time + Keys func(ctx context.Context) []string + Load func(ctx context.Context, token string) (context.Context, error) + LoadAndSave func(next http.Handler) http.Handler + Pop func(ctx context.Context, key string) interface{} + PopBool func(ctx context.Context, key string) bool + PopBytes func(ctx context.Context, key string) []byte + PopFloat func(ctx context.Context, key string) float64 + PopInt func(ctx context.Context, key string) int + PopString func(ctx context.Context, key string) string + PopTime func(ctx context.Context, key string) time.Time + Put func(ctx context.Context, key string, val interface{}) + Remove func(ctx context.Context, key string) + RenewToken func(ctx context.Context) error + Status func(ctx context.Context) Status + func NewMock() ISession + type Mock struct + func (m *Mock) Clear(ctx context.Context) error + func (m *Mock) Commit(ctx context.Context) (string, time.Time, error) + func (m *Mock) Destroy(ctx context.Context) error + func (m *Mock) Exists(ctx context.Context, key string) bool + func (m *Mock) Get(ctx context.Context, key string) interface{} + func (m *Mock) GetBool(ctx context.Context, key string) bool + func (m *Mock) GetBytes(ctx context.Context, key string) []byte + func (m *Mock) GetFloat(ctx context.Context, key string) float64 + func (m *Mock) GetInt(ctx context.Context, key string) int + func (m *Mock) GetString(ctx context.Context, key string) string + func (m *Mock) GetTime(ctx context.Context, key string) time.Time + func (m *Mock) Keys(ctx context.Context) []string + func (m *Mock) Load(ctx context.Context, token string) (context.Context, error) + func (m *Mock) LoadAndSave(next http.Handler) http.Handler + func (m *Mock) Pop(ctx context.Context, key string) interface{} + func (m *Mock) PopBool(ctx context.Context, key string) bool + func (m *Mock) PopBytes(ctx context.Context, key string) []byte + func (m *Mock) PopFloat(ctx context.Context, key string) float64 + func (m *Mock) PopInt(ctx context.Context, key string) int + func (m *Mock) PopString(ctx context.Context, key string) string + func (m *Mock) PopTime(ctx context.Context, key string) time.Time + func (m *Mock) Put(ctx context.Context, key string, val interface{}) + func (m *Mock) Remove(ctx context.Context, key string) + func (m *Mock) RenewToken(ctx context.Context) error + func (m *Mock) Status(ctx context.Context) Status + type Session = SessionManager + type SessionCookie struct + Domain string + HttpOnly bool + Name string + Path string + Persist bool + SameSite http.SameSite + Secure bool + type SessionManager struct + Codec Codec + Cookie SessionCookie + ErrorFunc func(http.ResponseWriter, *http.Request, error) + IdleTimeout time.Duration + Lifetime time.Duration + Store Store + func New() *SessionManager + func NewSession() *SessionManager + func (s *SessionManager) AsInterface() ISession + func (s *SessionManager) Clear(ctx context.Context) error + func (s *SessionManager) Commit(ctx context.Context) (string, time.Time, error) + func (s *SessionManager) Destroy(ctx context.Context) error + func (s *SessionManager) Exists(ctx context.Context, key string) bool + func (s *SessionManager) Get(ctx context.Context, key string) interface{} + func (s *SessionManager) GetBool(ctx context.Context, key string) bool + func (s *SessionManager) GetBytes(ctx context.Context, key string) []byte + func (s *SessionManager) GetFloat(ctx context.Context, key string) float64 + func (s *SessionManager) GetInt(ctx context.Context, key string) int + func (s *SessionManager) GetString(ctx context.Context, key string) string + func (s *SessionManager) GetTime(ctx context.Context, key string) time.Time + func (s *SessionManager) Keys(ctx context.Context) []string + func (s *SessionManager) Load(ctx context.Context, token string) (context.Context, error) + func (s *SessionManager) LoadAndSave(next http.Handler) http.Handler + func (s *SessionManager) Pop(ctx context.Context, key string) interface{} + func (s *SessionManager) PopBool(ctx context.Context, key string) bool + func (s *SessionManager) PopBytes(ctx context.Context, key string) []byte + func (s *SessionManager) PopFloat(ctx context.Context, key string) float64 + func (s *SessionManager) PopInt(ctx context.Context, key string) int + func (s *SessionManager) PopString(ctx context.Context, key string) string + func (s *SessionManager) PopTime(ctx context.Context, key string) time.Time + func (s *SessionManager) Put(ctx context.Context, key string, val interface{}) + func (s *SessionManager) Remove(ctx context.Context, key string) + func (s *SessionManager) RenewToken(ctx context.Context) error + func (s *SessionManager) Status(ctx context.Context) Status + type Status int + const Destroyed + const Modified + const Unmodified + type Store interface + Commit func(token string, b []byte, expiry time.Time) (err error) + Delete func(token string) (err error) + Find func(token string) (b []byte, found bool, err error) Other modules containing this package github.com/jclebreton/scs