Versions in this module Expand all Collapse all v0 v0.1.1 Aug 6, 2017 v0.1.0 Jun 10, 2017 Changes in this version + var ContextName = "scs.session" + var CookieName = "scs.session.token" + var ErrAlreadyWritten = errors.New("session already written to the engine and http.ResponseWriter") + var ErrTypeAssertionFailed = errors.New("type assertion failed") + func Clear(r *http.Request) error + func Destroy(w http.ResponseWriter, r *http.Request) error + func Exists(r *http.Request, key string) (bool, error) + func GetBool(r *http.Request, key string) (bool, error) + func GetBytes(r *http.Request, key string) ([]byte, error) + func GetFloat(r *http.Request, key string) (float64, error) + func GetInt(r *http.Request, key string) (int, error) + func GetInt64(r *http.Request, key string) (int64, error) + func GetObject(r *http.Request, key string, dst interface{}) error + func GetString(r *http.Request, key string) (string, error) + func GetTime(r *http.Request, key string) (time.Time, error) + func Keys(r *http.Request) ([]string, error) + func Manage(engine Engine, opts ...Option) func(h http.Handler) http.Handler + func NewMockRequest(r *http.Request) *http.Request + func PopBool(r *http.Request, key string) (bool, error) + func PopBytes(r *http.Request, key string) ([]byte, error) + func PopFloat(r *http.Request, key string) (float64, error) + func PopInt(r *http.Request, key string) (int, error) + func PopInt64(r *http.Request, key string) (int64, error) + func PopObject(r *http.Request, key string, dst interface{}) error + func PopString(r *http.Request, key string) (string, error) + func PopTime(r *http.Request, key string) (time.Time, error) + func PutBool(r *http.Request, key string, val bool) error + func PutBytes(r *http.Request, key string, val []byte) error + func PutFloat(r *http.Request, key string, val float64) error + func PutInt(r *http.Request, key string, val int) error + func PutInt64(r *http.Request, key string, val int64) error + func PutObject(r *http.Request, key string, val interface{}) error + func PutString(r *http.Request, key string, val string) error + func PutTime(r *http.Request, key string, val time.Time) error + func RegenerateToken(r *http.Request) error + func Remove(r *http.Request, key string) error + func Renew(r *http.Request) error + func Save(w http.ResponseWriter, r *http.Request) error + type Engine interface + Delete func(token string) (err error) + Find func(token string) (b []byte, found bool, err error) + Save func(token string, b []byte, expiry time.Time) (err error) + type Middleware func(h http.Handler) http.Handler + type Option func(*options) + func Domain(s string) Option + func ErrorFunc(f func(http.ResponseWriter, *http.Request, error)) Option + func HttpOnly(b bool) Option + func IdleTimeout(t time.Duration) Option + func Lifetime(t time.Duration) Option + func Path(s string) Option + func Persist(b bool) Option + func Secure(b bool) Option