handlers

package
v0.0.0-...-772b57d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGame

func GetGame(templateFS embed.FS, db *sql.DB) http.HandlerFunc

func GetMenu

func GetMenu(templateFS embed.FS, db *sql.DB) http.HandlerFunc

func GetScoreboard

func GetScoreboard(templateFS embed.FS, db *sql.DB) http.HandlerFunc

func PostScoreboard

func PostScoreboard(db *sql.DB) http.HandlerFunc

Types

type Page

type Page struct {
	Home    bool
	Scripts bool

	// todo: define template type with time=string
	Scoreboard []storage.PlayerTime
	CSRFToken  string
	Kana       string

	// tmp
	Name string
	Time time.Time
	Rank uint
}

Jump to

Keyboard shortcuts

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