router

package
v0.0.0-...-de1c0ac Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(sessionKey string) (*mux.Router, error)

NewRouter creates a new router to access some pages

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App handles the state of the application

type ExamPayload

type ExamPayload struct {
	CSRF        template.HTML
	Title       string
	User        string
	Question    models.QuestionT
	Correct     bool
	Points      int64
	Explanation string
}

ExamPayload is the data to pass to the template

type IndexPayload

type IndexPayload struct {
	Title       string
	User        string
	Updates     []*models.Update
	DisplayForm bool
	Points      int64
}

IndexPayload is the data to pass to the template

type LobbyPayload

type LobbyPayload struct {
	CSRF   template.HTML
	Title  string
	User   string
	Joined bool
	Code   string
}

LobbyPayload is the data to pass to the template

type LoginPayload

type LoginPayload struct {
	Error string
}

LoginPayload is the data to pass to the template

type RankPayload

type RankPayload struct {
	CSRF      template.HTML
	User      string
	UserRanks []models.RankT
	Error     string
}

RankPayload is the data to pass to the template of this page

Jump to

Keyboard shortcuts

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