Documentation ¶
Index ¶
- func GetCookie(r *http.Request, name string) (*sessions.Session, error)
- func GetCookieKeyPairs() (keyPairs string)
- func GetCookieStore() *sessions.CookieStore
- func GetUserIp(r *http.Request) string
- func NewCookie(r *http.Request, name string) (*sessions.Session, error)
- func SaveCookie(r *http.Request, w http.ResponseWriter, s *sessions.Session) error
- func SetCookieKeyPairs(keyPairs string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCookie ¶
Get returns a session for the given name after adding it to the registry.
It returns a new session if the sessions doesn't exist. Access IsNew on the session to check if it is an existing session or a new one.
It returns a new session and an error if the session exists but could not be decoded.
func GetCookieKeyPairs ¶
func GetCookieKeyPairs() (keyPairs string)
func GetCookieStore ¶
func GetCookieStore() *sessions.CookieStore
func NewCookie ¶
New returns a session for the given name without adding it to the registry.
The difference between New() and Get() is that calling New() twice will decode the session data twice, while Get() registers and reuses the same decoded session after the first call.
func SaveCookie ¶
Save adds a single session to the response.
func SetCookieKeyPairs ¶
func SetCookieKeyPairs(keyPairs string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.