Documentation
¶
Index ¶
- func CreateCookieSessionStore(authKeySize, encryptKeySize int, defaultOptions *sessions.Options) (sessions.Store, error)
- func GenerateRandomBytes(n int) ([]byte, error)
- func ServiceProvider(sessionName string, store sessions.Store) service.Provider
- type Session
- func (s *Session) AddFlash(flashType session.FlashType, message string)
- func (s *Session) Delete(w http.ResponseWriter, r *http.Request) error
- func (s *Session) Flashes(flashTypes ...session.FlashType) []session.Flash
- func (s *Session) Get(key string) interface{}
- func (s *Session) Save(w http.ResponseWriter, r *http.Request) error
- func (s *Session) Set(key string, value interface{})
- func (s *Session) Unset(key string)
- type SessionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCookieSessionStore ¶
func CreateCookieSessionStore(authKeySize, encryptKeySize int, defaultOptions *sessions.Options) (sessions.Store, error)
CreateCookieSessionStore creates and returns a new cookie session store with random authentication and encryption keys
func GenerateRandomBytes ¶
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is an implementation of the session.Session service backed by github.com/gorilla/sessions Session
type SessionService ¶
type SessionService struct {
// contains filtered or unexported fields
}
SessionService is an implementation of service.Session based on the github.com/gorilla/sessions
func NewSessionService ¶
func NewSessionService(sessionName string, store sessions.Store) *SessionService
NewSessionService returns a new SessionService backed by the given Store
func (*SessionService) Get ¶
func (s *SessionService) Get(w http.ResponseWriter, r *http.Request) (session.Session, error)
Get returns a Session associated with the given HTTP request
Click to show internal directories.
Click to hide internal directories.