Documentation ¶
Index ¶
- Variables
- type Session
- func (s *Session) Get(r *http.Request, key string) (interface{}, error)
- func (s *Session) GetInt64(r *http.Request, key string) (int64, error)
- func (s *Session) Set(w http.ResponseWriter, r *http.Request, key string, value interface{}) error
- func (s *Session) UnSet(w http.ResponseWriter, r *http.Request, key string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserNotLoggedIn give error when session does not account you of logging in ErrUserNotLoggedIn = errors.New("you must login first") )
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is used for storing session cookies
func (*Session) Get ¶
Get is used to get a value of any type that is temporarily saved by a key, returns interface to be marshalled
func (*Session) GetInt64 ¶
GetInt64 is used to get value that is temporarily saved by a key, returns an int64 preferably the user id
Click to show internal directories.
Click to hide internal directories.