sessionManager

package
v0.0.0-...-6690001 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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) LogOut

func (s *CookieSessionManager) LogOut(ctx *gin.Context) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL