Documentation
¶
Index ¶
- func NewSession() *core.Session
- type DbSession
- func (s *DbSession) ClearAll() bool
- func (s *DbSession) Create() ISessionProvider
- func (s *DbSession) Delete() bool
- func (s *DbSession) ExpiresOn(expiresOn *time.Time)
- func (s *DbSession) Get(name string) (string, error)
- func (s *DbSession) GetByKey(sessionKey string) (ISessionProvider, error)
- func (s *DbSession) GetKey() string
- func (s *DbSession) GetName() string
- func (s *DbSession) GetUser() *core.User
- func (s *DbSession) IsExpired() bool
- func (s *DbSession) Save() bool
- func (s *DbSession) Set(name string, value string)
- func (s *DbSession) SetUser(user *core.User)
- type ISessionProvider
- type SessionProviderRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
Types ¶
type DbSession ¶
type DbSession struct {
// contains filtered or unexported fields
}
func (*DbSession) Create ¶
func (s *DbSession) Create() ISessionProvider
type ISessionProvider ¶
type ISessionProvider interface {
GetKey() string
Create() ISessionProvider
GetByKey(key string) (ISessionProvider, error)
GetName() string
IsExpired() bool
Delete() bool
Set(name string, value string)
Get(name string) (string, error)
ClearAll() bool
GetUser() *core.User
SetUser(user *core.User)
Save() bool
ExpiresOn(*time.Time)
}
type SessionProviderRegistry ¶
type SessionProviderRegistry struct {
// contains filtered or unexported fields
}
func NewSessionRegistry ¶
func NewSessionRegistry() *SessionProviderRegistry
func (*SessionProviderRegistry) GetAdapter ¶
func (r *SessionProviderRegistry) GetAdapter(name string) (ISessionProvider, error)
func (*SessionProviderRegistry) GetDefaultAdapter ¶
func (r *SessionProviderRegistry) GetDefaultAdapter() (ISessionProvider, error)
func (*SessionProviderRegistry) RegisterNewAdapter ¶
func (r *SessionProviderRegistry) RegisterNewAdapter(adapter ISessionProvider, defaultAdapter bool)
Click to show internal directories.
Click to hide internal directories.