Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSessionNotFound = errors.New("session not found")
View Source
var SessionDel func(c context.Context, id string) error
View Source
var SessionSave func(c context.Context, s Session) error
Functions ¶
func CtxSessionExist ¶
CtxSessionExist - checks if session exists.
func CtxSessionID ¶
CtxSessionID - gets session id from req cookie.
Types ¶
type Session ¶
type Session struct { ID string User string Perms map[string]string Tenant string ExtraInfo map[string]string }
func CtxMustSession ¶
CtxMustSession - gets session and returns ErrSessionNotFound if something goes wrong.
func CtxSession ¶
CtxSession - gets all session data from cache.
func ReqSession ¶
CtxSession - gets all session data from cache.
Click to show internal directories.
Click to hide internal directories.