Documentation
¶
Index ¶
- func New(options *redis.Options) flygo.SessionProvider
- func NewSession(client *redis.Client, id, key string) flygo.Session
- func NewWithPrefixKey(options *redis.Options, prefixKey string) flygo.SessionProvider
- type RedisSession
- func (r *RedisSession) Clear()
- func (r *RedisSession) Del(name string)
- func (r *RedisSession) Get(name string) interface{}
- func (r *RedisSession) GetAll() map[string]interface{}
- func (r *RedisSession) Id() string
- func (r *RedisSession) Invalidate()
- func (r *RedisSession) Invalidated() bool
- func (r *RedisSession) Renew(lifeTime time.Duration)
- func (r *RedisSession) Set(name string, val interface{})
- func (r *RedisSession) SetAll(data map[string]interface{}, flush bool)
- type SessionProvider
- func (sp *SessionProvider) Clear()
- func (sp *SessionProvider) Del(id string)
- func (sp *SessionProvider) Exists(id string) bool
- func (sp *SessionProvider) Get(id string) flygo.Session
- func (sp *SessionProvider) GetAll() map[string]flygo.Session
- func (sp *SessionProvider) GetId(r *http.Request) string
- func (sp *SessionProvider) New(config *flygo.SessionConfig) flygo.Session
- func (sp *SessionProvider) Refresh(session flygo.Session, config *flygo.SessionConfig)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWithPrefixKey ¶
func NewWithPrefixKey(options *redis.Options, prefixKey string) flygo.SessionProvider
Get new SessionProvider with prefix key
Types ¶
type RedisSession ¶
type RedisSession struct {
// contains filtered or unexported fields
}
Define RedisSession Struct
func (*RedisSession) Invalidated ¶
func (r *RedisSession) Invalidated() bool
func (*RedisSession) SetAll ¶
func (r *RedisSession) SetAll(data map[string]interface{}, flush bool)
Set all data
type SessionProvider ¶
type SessionProvider struct {
// contains filtered or unexported fields
}
Define CookieSessionProvider struct
func (*SessionProvider) Exists ¶
func (sp *SessionProvider) Exists(id string) bool
Session is Exists?
func (*SessionProvider) Get ¶
func (sp *SessionProvider) Get(id string) flygo.Session
Get session by id
func (*SessionProvider) GetAll ¶
func (sp *SessionProvider) GetAll() map[string]flygo.Session
Get all sessions
func (*SessionProvider) GetId ¶
func (sp *SessionProvider) GetId(r *http.Request) string
Get session id from client
func (*SessionProvider) New ¶
func (sp *SessionProvider) New(config *flygo.SessionConfig) flygo.Session
New session by this provider
func (*SessionProvider) Refresh ¶
func (sp *SessionProvider) Refresh(session flygo.Session, config *flygo.SessionConfig)
Refresh session by this provider
Click to show internal directories.
Click to hide internal directories.