Documentation ¶
Overview ¶
Package sessions is wrapper around github.com/gorilla/sessions.
Dfferences include:
- keys and values can only be strings
- way less exposed API surface
Index ¶
- type Manager
- type Session
- func (s *Session) Expire()
- func (s *Session) Flash(category, message string)
- func (s *Session) Flashes() map[string][]string
- func (s *Session) Get(key string) (string, error)
- func (s *Session) Keys() []string
- func (s *Session) Save(r *http.Request, w http.ResponseWriter) error
- func (s *Session) Set(key string, value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a sessions manager. It wraps a session store to ensure that all callers use the same session name.
func NewManager ¶
func NewManager(store gorillaSessions.Store, name string) *Manager
NewManager creates a new sessions manager
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session stores values
Click to show internal directories.
Click to hide internal directories.