Documentation ¶
Index ¶
- Constants
- Variables
- func Destroy(w http.ResponseWriter, r *http.Request) (err error)
- func GetNumSessions() int
- func GetSession(r *http.Request) *sessions.Session
- func GetSessionID(r *http.Request) string
- func GetUserID(w http.ResponseWriter, r *http.Request) string
- func GetUserIDInt(w http.ResponseWriter, r *http.Request) (int, error)
- func InitStore(secret string, dbHandle bleve.Index, maxAge int)
- func SetUserID(w http.ResponseWriter, r *http.Request, userID string) (string, error)
Constants ¶
View Source
const (
Name = "session"
)
Variables ¶
View Source
var ( // Store contains all sessions Store *sessions.FilesystemStore StorageDir string Log = logrus.New() )
Functions ¶
func GetNumSessions ¶
func GetNumSessions() int
func GetSessionID ¶
func GetUserID ¶
func GetUserID(w http.ResponseWriter, r *http.Request) string
GetUserID returns the corresponding userID for a request
func GetUserIDInt ¶
GetUserIDInt returns the corresponding userID for a request
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.