frontend

package
Version: v0.0.0-...-af62816 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package frontend contains the HTTP endpoints for delivering the official web client. In order to register the endpoints you have to call SetupRoutes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupRoutes

func SetupRoutes()

SetupRoutes registers the official webclient endpoints with the http package.

Types

type BasePageConfig

type BasePageConfig struct {
	// RootPath is the path directly after the domain and before the
	// scribble.rs paths. For example if you host scribblers on painting.com
	// but already host a different website, then your API paths might have to
	// look like this: painting.com/scribblers/v1.
	RootPath string `json:"rootPath"`
}

BasePageConfig is data that all pages require to function correctly, no matter whether error page or lobby page.

type LobbyCreatePageData

type LobbyCreatePageData struct {
	*BasePageConfig
	*game.SettingBounds
	Translation       translations.Translation
	Locale            string
	Errors            []string
	Languages         map[string]string
	Public            string
	DrawingTime       string
	Rounds            string
	MaxPlayers        string
	CustomWords       string
	CustomWordsChance string
	ClientsPerIPLimit string
	EnableVotekick    string
	Language          string
}

LobbyCreatePageData defines all non-static data for the lobby create page.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL