Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Status string
Status for session store
Functions ¶
This section is empty.
Types ¶
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
InMemory is a local in memory sessionstore, for dev purpose
func (*InMemory) Exists ¶
func (s *InMemory) Exists(key SessionKey) (bool, error)
Exists check if session exists
func (*InMemory) Get ¶
func (s *InMemory) Get(session SessionKey, k string, data interface{}) error
Get returns the value corresponding to key for the session
func (*InMemory) New ¶
func (s *InMemory) New(k SessionKey) (SessionKey, error)
New creates a new session
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis is a redis client
func (*Redis) Exists ¶
func (s *Redis) Exists(token SessionKey) (bool, error)
Exists check if session exists
type SessionKey ¶
type SessionKey string
SessionKey is the session ID
func NewSessionKey ¶
func NewSessionKey() (SessionKey, error)
NewSessionKey generates a random UUID according to RFC 4122
type Store ¶
type Store interface { New(SessionKey) (SessionKey, error) Exists(SessionKey) (bool, error) Get(SessionKey, string, interface{}) error Set(SessionKey, string, interface{}) error }
Store is the session store interface
Click to show internal directories.
Click to hide internal directories.