Documentation
¶
Index ¶
- func UserFromCtx(ctx context.Context) (*domain.User, uuid.UUID)
- type AboutInstance
- type AdminInstance
- type ChallengeDetailsInstance
- type ChallengeListInstance
- type ChallengeUpdateInstance
- type CommonInstance
- type Handler
- func (h *Handler) About() live.Handler
- func (h *Handler) Admin() live.Handler
- func (h *Handler) BeginOAuth(res http.ResponseWriter, req *http.Request)
- func (h *Handler) ChallengeDetails() live.Handler
- func (h *Handler) ChallengeList() live.Handler
- func (h *Handler) ChallengeUpdate() live.Handler
- func (h *Handler) CompleteOAuth(res http.ResponseWriter, req *http.Request)
- func (h *Handler) Home() live.Handler
- func (h *Handler) Logout(res http.ResponseWriter, req *http.Request)
- func (ah *Handler) Middleware(h http.Handler) http.Handler
- func (h *Handler) NewAboutInstance(s live.Socket) *AboutInstance
- func (h *Handler) NewAdminInstance(s live.Socket) *AdminInstance
- func (h *Handler) NewChallengeDetailsInstance(s live.Socket) *ChallengeDetailsInstance
- func (h *Handler) NewChallengeListInstance(s live.Socket) *ChallengeListInstance
- func (h *Handler) NewChallengeUpdateInstance(s live.Socket) *ChallengeUpdateInstance
- func (h *Handler) NewCommon(s live.Socket, currentView string) *CommonInstance
- func (h *Handler) NewHomeInstance(s live.Socket) *HomeInstance
- func (h *Handler) NewNotFoundInstance(s live.Socket) *NotFoundInstance
- func (h *Handler) NewPrivacyInstance(s live.Socket) *PrivacyInstance
- func (h *Handler) NewProfileInstance(s live.Socket) *ProfileInstance
- func (h *Handler) NewTermsInstance(s live.Socket) *TermsInstance
- func (h *Handler) NotFound() live.Handler
- func (h *Handler) NotFoundRedirect(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Privacy() live.Handler
- func (h *Handler) Profile() live.Handler
- func (h *Handler) Terms() live.Handler
- type HomeInstance
- type NotFoundInstance
- type PrivacyInstance
- type ProfileInstance
- type TermsInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AboutInstance ¶
type AboutInstance struct { *CommonInstance Summary *domain.SystemSymmary TrueChallengeExample *domain.Challenge FalseChallengeExample *domain.Challenge OngoingChallengeExample *domain.Challenge }
type AdminInstance ¶
type AdminInstance struct { *CommonInstance Challenges []*domain.Challenge ChallengeCount int FilterArgs domain.FilterChallengesArgs CreateArgs domain.CreateChallengeArgs Page int MaxPage int CreateChallengeForm bool CreatedChallenge *domain.Challenge FormError error TimeLayout string }
func (*AdminInstance) NextPage ¶
func (ins *AdminInstance) NextPage() int
func (*AdminInstance) PrevPage ¶
func (ins *AdminInstance) PrevPage() int
type ChallengeListInstance ¶
type ChallengeListInstance struct { *CommonInstance Challenges []*domain.Challenge ChallengeCount int FilterArgs domain.FilterChallengesArgs Page int MaxPage int }
func (*ChallengeListInstance) NextPage ¶
func (ins *ChallengeListInstance) NextPage() int
func (*ChallengeListInstance) PrevPage ¶
func (ins *ChallengeListInstance) PrevPage() int
type ChallengeUpdateInstance ¶
type ChallengeUpdateInstance struct { *CommonInstance Challenge *domain.Challenge ChallengeArgs domain.CreateChallengeArgs FormPrefill domain.CreateChallengeArgs FormError error OutcomeError error TimeLayout string }
type CommonInstance ¶
type CommonInstance struct { Env string Session string Error error Message *string User *domain.User UserID uuid.UUID ShowLoginModal bool ShowLogoutModal bool CurrentView string Version string }
func (*CommonInstance) CloseAuthModals ¶
func (c *CommonInstance) CloseAuthModals()
func (*CommonInstance) CloseError ¶
func (c *CommonInstance) CloseError()
func (*CommonInstance) CloseMessage ¶
func (c *CommonInstance) CloseMessage()
func (*CommonInstance) OpenLoginModal ¶
func (c *CommonInstance) OpenLoginModal()
func (*CommonInstance) OpenLogoutModal ¶
func (c *CommonInstance) OpenLogoutModal()
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) BeginOAuth ¶
func (h *Handler) BeginOAuth(res http.ResponseWriter, req *http.Request)
func (*Handler) ChallengeDetails ¶
func (*Handler) ChallengeList ¶
func (*Handler) ChallengeUpdate ¶
func (*Handler) CompleteOAuth ¶
func (h *Handler) CompleteOAuth(res http.ResponseWriter, req *http.Request)
func (*Handler) NewAboutInstance ¶
func (h *Handler) NewAboutInstance(s live.Socket) *AboutInstance
func (*Handler) NewAdminInstance ¶
func (h *Handler) NewAdminInstance(s live.Socket) *AdminInstance
func (*Handler) NewChallengeDetailsInstance ¶
func (h *Handler) NewChallengeDetailsInstance(s live.Socket) *ChallengeDetailsInstance
func (*Handler) NewChallengeListInstance ¶
func (h *Handler) NewChallengeListInstance(s live.Socket) *ChallengeListInstance
func (*Handler) NewChallengeUpdateInstance ¶
func (h *Handler) NewChallengeUpdateInstance(s live.Socket) *ChallengeUpdateInstance
func (*Handler) NewCommon ¶
func (h *Handler) NewCommon(s live.Socket, currentView string) *CommonInstance
func (*Handler) NewHomeInstance ¶
func (h *Handler) NewHomeInstance(s live.Socket) *HomeInstance
func (*Handler) NewNotFoundInstance ¶
func (h *Handler) NewNotFoundInstance(s live.Socket) *NotFoundInstance
func (*Handler) NewPrivacyInstance ¶ added in v0.0.9
func (h *Handler) NewPrivacyInstance(s live.Socket) *PrivacyInstance
func (*Handler) NewProfileInstance ¶
func (h *Handler) NewProfileInstance(s live.Socket) *ProfileInstance
func (*Handler) NewTermsInstance ¶ added in v0.0.9
func (h *Handler) NewTermsInstance(s live.Socket) *TermsInstance
func (*Handler) NotFoundRedirect ¶
func (h *Handler) NotFoundRedirect(w http.ResponseWriter, r *http.Request)
type HomeInstance ¶
type HomeInstance struct { *CommonInstance Summary *domain.SystemSymmary RandomFinishedChallenges []*domain.Challenge RandomFinishedChallengesCount int RandomOngoingChallenges []*domain.Challenge RandomOngoingChallengesCount int RandomPendingChallenges []*domain.Challenge RandomPendingChallengesCount int ClosingChallenges []*domain.Challenge ClosingChallengesCount int }
type NotFoundInstance ¶
type NotFoundInstance struct {
*CommonInstance
}
type PrivacyInstance ¶ added in v0.0.9
type PrivacyInstance struct {
*CommonInstance
}
type ProfileInstance ¶
type ProfileInstance struct { *CommonInstance Summary *domain.SystemSymmary UserSummary *domain.UserSummary Challenges []*domain.Challenge ChallengeCount int FilterArgs domain.FilterChallengesArgs Page int MaxPage int ShowMine bool CreateChallengeForm bool CreateArgs domain.CreateChallengeArgs CreatedChallenge *domain.Challenge FormError error TimeLayout string }
func (*ProfileInstance) NextPage ¶
func (ins *ProfileInstance) NextPage() int
func (*ProfileInstance) PrevPage ¶
func (ins *ProfileInstance) PrevPage() int
type TermsInstance ¶ added in v0.0.9
type TermsInstance struct {
*CommonInstance
}
Click to show internal directories.
Click to hide internal directories.