Documentation ¶
Overview ¶
Package redistore is a session store backend for gorilla/sessions
Index ¶
- type RediStore
- func (s *RediStore) Close()
- func (s *RediStore) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
- func (s *RediStore) Get(r *http.Request, name string) (*sessions.Session, error)
- func (s *RediStore) New(r *http.Request, name string) (*sessions.Session, error)
- func (s *RediStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RediStore ¶
type RediStore struct { Pool *redis.Pool Codecs []securecookie.Codec Options *sessions.Options // default configuration }
RediStore stores sessions in a redis backend.
Example ¶
// RedisStore store := NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) defer store.Close()
Output:
func NewRediStore ¶
NewRediStore returns a new RediStore.
func (*RediStore) Get ¶
Get returns a session for the given name after adding it to the registry.
See gorilla/sessions FilesystemStore.Get().
Click to show internal directories.
Click to hide internal directories.