Documentation ¶
Index ¶
- Variables
- func SessionProvider() httpsession.SessionProvider
- type RedisSessionProvider
- type Session
- func (s *Session) Clear() httpsession.Session
- func (s *Session) Data() map[string]string
- func (s *Session) Delete(key string)
- func (s *Session) Expire() *time.Time
- func (s *Session) GetInt64(key string) int64
- func (s *Session) GetString(key string) string
- func (s *Session) GetStruct(key string, obj interface{})
- func (s *Session) ID() string
- func (s *Session) IsExpire() bool
- func (s *Session) PutInt64(key string, value int64) httpsession.Session
- func (s *Session) PutString(key string, value string) httpsession.Session
- func (s *Session) PutStruct(key string, value interface{}) httpsession.Session
- func (s *Session) Reload() httpsession.Session
- func (s *Session) Remove()
- func (s *Session) Save() httpsession.Session
- func (s *Session) SetExpire(expire *time.Time) httpsession.Session
- type SessionEntity
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RedisName = "redis" RedisSessionPrefix = "httpsession" )
Functions ¶
func SessionProvider ¶
func SessionProvider() httpsession.SessionProvider
Types ¶
type RedisSessionProvider ¶
type RedisSessionProvider struct { Master *datastore.KKRedisOp Slave *datastore.KKRedisOp }
func (*RedisSessionProvider) NewSession ¶
func (r *RedisSessionProvider) NewSession(expire *time.Time) httpsession.Session
func (*RedisSessionProvider) Session ¶
func (r *RedisSessionProvider) Session(key string) httpsession.Session
func (*RedisSessionProvider) Sessions ¶
func (r *RedisSessionProvider) Sessions() map[string]httpsession.Session
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) Clear ¶
func (s *Session) Clear() httpsession.Session
func (*Session) PutString ¶
func (s *Session) PutString(key string, value string) httpsession.Session
func (*Session) PutStruct ¶
func (s *Session) PutStruct(key string, value interface{}) httpsession.Session
func (*Session) Reload ¶
func (s *Session) Reload() httpsession.Session
func (*Session) Save ¶
func (s *Session) Save() httpsession.Session
Click to show internal directories.
Click to hide internal directories.