Documentation ¶
Index ¶
- Variables
- func ToSessionStorage(y *SessionStorage) func(string, interface{}) error
- type RedisSessionStorage
- func (self *RedisSessionStorage) GetStartupSession(id string) (int32, error)
- func (self *RedisSessionStorage) RefreshStartupSession(id string, expire time.Duration) error
- func (self *RedisSessionStorage) SetStartupSessionIfNotExists(id string, sess int32, expire time.Duration) error
- func (self *RedisSessionStorage) UnsetStartupSession(id string) error
- type SessionStorage
- type SessionStorageFactory
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidArgument = errors.New("invalid argument") ErrUnknownSessionStorageDriver = errors.New("unknown session storage driver") )
Functions ¶
func ToSessionStorage ¶ added in v1.1.28
func ToSessionStorage(y *SessionStorage) func(string, interface{}) error
Types ¶
type RedisSessionStorage ¶
type RedisSessionStorage struct {
// contains filtered or unexported fields
}
func (*RedisSessionStorage) GetStartupSession ¶
func (self *RedisSessionStorage) GetStartupSession(id string) (int32, error)
func (*RedisSessionStorage) RefreshStartupSession ¶
func (self *RedisSessionStorage) RefreshStartupSession(id string, expire time.Duration) error
func (*RedisSessionStorage) SetStartupSessionIfNotExists ¶
func (*RedisSessionStorage) UnsetStartupSession ¶
func (self *RedisSessionStorage) UnsetStartupSession(id string) error
type SessionStorage ¶
type SessionStorage interface { GetStartupSession(id string) (int32, error) SetStartupSessionIfNotExists(id string, sess int32, expire time.Duration) error UnsetStartupSession(id string) error RefreshStartupSession(id string, expire time.Duration) error }
func NewRedisSessionStorage ¶
func NewRedisSessionStorage(args ...interface{}) (SessionStorage, error)
func NewSessionStorage ¶
func NewSessionStorage(driver string, args ...interface{}) (SessionStorage, error)
type SessionStorageFactory ¶
type SessionStorageFactory func(...interface{}) (SessionStorage, error)
Click to show internal directories.
Click to hide internal directories.