Documentation ¶
Index ¶
- Constants
- func GetNonce(c echo.Context) domain.Nonce
- func GetUserFromContext(c echo.Context) (db.User, error)
- func Redirect(c echo.Context, path string, statusCode int) error
- func RedirectToErrorPage(c echo.Context, errorCode int) error
- func Render(c echo.Context, _ int, t templ.Component) error
- func SetUserToContext(c echo.Context, user db.User)
- type BetController
- type JwtMiddleware
- type MatchController
- type PageController
- type TournamentController
- type UserController
Constants ¶
View Source
const ( // SessionTokenCookieKey is the key for the session token cookie. SessionTokenCookieKey = "session_token" ExpiresDuration = 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func GetUserFromContext ¶
func RedirectToErrorPage ¶
func SetUserToContext ¶
Types ¶
type BetController ¶
type BetController struct {
// contains filtered or unexported fields
}
func NewBetController ¶
func NewBetController(useCase bet.IUseCase) BetController
type JwtMiddleware ¶
JwtMiddleware is the controller for the jwt routes.
func NewJwtMiddleware ¶
func NewJwtMiddleware(user user.IUseCase) JwtMiddleware
NewJwtController creates a new jwt controller.
func (*JwtMiddleware) AuthorizeUser ¶
func (j *JwtMiddleware) AuthorizeUser(next echo.HandlerFunc) echo.HandlerFunc
func (*JwtMiddleware) IsConnectedMiddleware ¶
func (j *JwtMiddleware) IsConnectedMiddleware(_ domain.Permission, next echo.HandlerFunc) func(c echo.Context) error
type MatchController ¶
type MatchController struct {
// contains filtered or unexported fields
}
func NewMatchController ¶
func NewMatchController(useCase match.IUseCase) MatchController
func (*MatchController) GetUpcomingMatchByTournament ¶
func (mc *MatchController) GetUpcomingMatchByTournament(c echo.Context) error
type PageController ¶
type PageController struct{}
func NewPageController ¶
func NewPageController() *PageController
func (*PageController) GetAdmin ¶
func (p *PageController) GetAdmin(c echo.Context) error
func (*PageController) GetHome ¶
func (p *PageController) GetHome(c echo.Context) error
func (*PageController) GetIndex ¶
func (p *PageController) GetIndex(c echo.Context) error
func (*PageController) GetTournament ¶
func (p *PageController) GetTournament(c echo.Context) error
type TournamentController ¶
type TournamentController struct {
// contains filtered or unexported fields
}
func NewTournamentController ¶
func NewTournamentController(useCase tournament.IUseCase) TournamentController
func (*TournamentController) CreateTournamentFromLichessID ¶
func (tc *TournamentController) CreateTournamentFromLichessID(c echo.Context) error
func (*TournamentController) GetTournamentByID ¶
func (tc *TournamentController) GetTournamentByID(c echo.Context) error
func (*TournamentController) GetTournamentsInProgress ¶
func (tc *TournamentController) GetTournamentsInProgress(c echo.Context) error
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
func NewUserController ¶
func NewUserController(user user.IUseCase) UserController
func (*UserController) DiscordCallback ¶
func (uc *UserController) DiscordCallback(c echo.Context) error
func (*UserController) DiscordLogin ¶
func (uc *UserController) DiscordLogin(c echo.Context) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.