Documentation ¶
Index ¶
- type RedisSessionStore
- func (redisSessionStore *RedisSessionStore) Delete(key string) error
- func (redisSessionStore *RedisSessionStore) Get(key string) (data map[string]interface{}, err error)
- func (redisSessionStore *RedisSessionStore) New(network, address string) error
- func (redisSessionStore *RedisSessionStore) Reset() error
- func (redisSessionStore *RedisSessionStore) Save(key string, value map[string]interface{}, expiry time.Duration) (err error)
- type Session
- func (session *Session) Delete(w http.ResponseWriter, r *http.Request) (err error)
- func (session *Session) Get(r *http.Request) (data map[string]interface{}, err error)
- func (session *Session) Reset(r *http.Request) (err error)
- func (session *Session) Set(w http.ResponseWriter, data map[string]interface{}, expiry time.Duration) (err error)
- func (session *Session) Update(w http.ResponseWriter, r *http.Request, data map[string]interface{}) (err error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisSessionStore ¶ added in v0.1.0
func (*RedisSessionStore) Delete ¶ added in v0.1.0
func (redisSessionStore *RedisSessionStore) Delete(key string) error
func (*RedisSessionStore) Get ¶ added in v0.1.0
func (redisSessionStore *RedisSessionStore) Get(key string) (data map[string]interface{}, err error)
func (*RedisSessionStore) New ¶ added in v0.1.0
func (redisSessionStore *RedisSessionStore) New(network, address string) error
func (*RedisSessionStore) Reset ¶ added in v0.1.0
func (redisSessionStore *RedisSessionStore) Reset() error
type Session ¶ added in v0.1.0
type Session struct { Store Store Cookie cookie.CyclopsCookie // contains filtered or unexported fields }
type Store ¶ added in v0.1.0
type Store interface { // Save helps in saving data to session store with a expiry Save(key string, data map[string]interface{}, expiry time.Duration) error // Get retrieves the data associated with the session key Get(key string) (data map[string]interface{}, err error) // Delete deletes a session from session store Delete(key string) error // Reset deletes all sessions from session store Reset() error }
Store provides interface to create custom session stores
Click to show internal directories.
Click to hide internal directories.