Documentation
¶
Index ¶
- Variables
- type CookieWriter
- type SessionRequestContextType
- type Store
- func (s *Store) Del(r *http.Request, fieldname string) error
- func (s *Store) Get(r *http.Request, fieldname string, v interface{}) error
- func (s *Store) IsNotFoundError(err error) bool
- func (s *Store) MustLoad(w http.ResponseWriter, r *http.Request)
- func (s *Store) SessionData(r *http.Request) *sessions.Session
- func (s *Store) Set(r *http.Request, fieldname string, v interface{}) error
- func (s *Store) SetSessionData(r *http.Request, data *sessions.Session)
- func (s *Store) Wrap(h http.Handler) http.Handler
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ContextField = SessionRequestContextType("Session")
ContextField session request context type
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound error raised when session data not found
Functions ¶
This section is empty.
Types ¶
type CookieWriter ¶
CookieWriter writer for cookie
func (*CookieWriter) Write ¶
func (w *CookieWriter) Write(data []byte) (int, error)
Write write http response body
func (*CookieWriter) WriteHeader ¶
func (w *CookieWriter) WriteHeader(status int)
WriteHeader write http response header
type SessionRequestContextType ¶
type SessionRequestContextType string
SessionRequestContextType content type which store session in request
type Store ¶
Store session store
func (*Store) IsNotFoundError ¶
IsNotFoundError check if give error is not found error
func (*Store) MustLoad ¶
func (s *Store) MustLoad(w http.ResponseWriter, r *http.Request)
MustLoad load session from request. Panic if any error raised.
func (*Store) SessionData ¶
SessionData get session data from request
func (*Store) SetSessionData ¶
SetSessionData set session data to request.
Click to show internal directories.
Click to hide internal directories.