Documentation ¶
Index ¶
- type Gorilla
- func (gorilla Gorilla) Add(w http.ResponseWriter, req *http.Request, key string, value interface{}) error
- func (gorilla Gorilla) Flash(w http.ResponseWriter, req *http.Request, message session.Message) error
- func (gorilla Gorilla) Flashes(w http.ResponseWriter, req *http.Request) []session.Message
- func (gorilla Gorilla) Get(req *http.Request, key string) string
- func (gorilla Gorilla) Load(req *http.Request, key string, result interface{}) error
- func (gorilla Gorilla) Middleware(handler http.Handler) http.Handler
- func (gorilla Gorilla) Pop(w http.ResponseWriter, req *http.Request, key string) string
- func (gorilla Gorilla) PopLoad(w http.ResponseWriter, req *http.Request, key string, result interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gorilla ¶
Gorilla session manager struct for gorilla
func (Gorilla) Add ¶
func (gorilla Gorilla) Add(w http.ResponseWriter, req *http.Request, key string, value interface{}) error
Add value to session data, if value is not string, will marshal it into JSON encoding and save it into session data.
func (Gorilla) Flash ¶
func (gorilla Gorilla) Flash(w http.ResponseWriter, req *http.Request, message session.Message) error
Flash add flash message to session data
func (Gorilla) Middleware ¶
Middleware returns a new session manager middleware instance
Click to show internal directories.
Click to hide internal directories.