Documentation
¶
Index ¶
- type CookieSessionManager
- func (s *CookieSessionManager) AuthenticateAndGetUserId(ctx *gin.Context) (int, error)
- func (s *CookieSessionManager) GetActiveLeague(ctx *gin.Context) (int, error)
- func (s *CookieSessionManager) LogIn(ctx *gin.Context, userId int) error
- func (s *CookieSessionManager) LogOut(ctx *gin.Context) error
- func (s *CookieSessionManager) SetActiveLeague(ctx *gin.Context, leagueId int) error
- type SessionManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieSessionManager ¶
type CookieSessionManager struct {
// contains filtered or unexported fields
}
func (*CookieSessionManager) AuthenticateAndGetUserId ¶
func (s *CookieSessionManager) AuthenticateAndGetUserId(ctx *gin.Context) (int, error)
func (*CookieSessionManager) GetActiveLeague ¶
func (s *CookieSessionManager) GetActiveLeague(ctx *gin.Context) (int, error)
func (*CookieSessionManager) LogIn ¶
func (s *CookieSessionManager) LogIn(ctx *gin.Context, userId int) error
func (*CookieSessionManager) SetActiveLeague ¶
func (s *CookieSessionManager) SetActiveLeague(ctx *gin.Context, leagueId int) error
type SessionManager ¶
type SessionManager interface { LogIn(ctx *gin.Context, userId int) error LogOut(ctx *gin.Context) error AuthenticateAndGetUserId(ctx *gin.Context) (int, error) SetActiveLeague(ctx *gin.Context, leagueId int) error GetActiveLeague(ctx *gin.Context) (int, error) }
func CreateCookieSessionManager ¶
func CreateCookieSessionManager(conf config.Config) SessionManager
Click to show internal directories.
Click to hide internal directories.