Documentation
¶
Index ¶
- Constants
- type PSession
- func (p *PSession) CheckCSRFToken(c *gin.Context, token string) bool
- func (p *PSession) Clean() error
- func (p *PSession) Delete(c *gin.Context) error
- func (p *PSession) DeleteByID(id string) error
- func (p *PSession) Get(c *gin.Context) (SessionUser, error)
- func (p *PSession) RefreshIfNeeded(c *gin.Context, user SessionUser, secure bool, ttlSeconds int) (bool, error)
- func (p *PSession) Set(c *gin.Context, user SessionUser, secure bool, ttlSeconds int) error
- func (p *PSession) SetFresh(c *gin.Context, user SessionUser, secure bool, ttlSeconds int) error
- type SessionUser
Constants ¶
View Source
const GinContextSessionUserKey = "session_user"
View Source
const SuperAdminSessionUserID = "__super_admin__"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PSession ¶
type PSession struct {
// contains filtered or unexported fields
}
func NewPSession ¶
func (*PSession) CheckCSRFToken ¶
func (*PSession) DeleteByID ¶
func (*PSession) RefreshIfNeeded ¶
type SessionUser ¶
Click to show internal directories.
Click to hide internal directories.