frontend

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: BSD-3-Clause Imports: 17 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

This section is empty.

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"`
	// CacheBust is a string that is appended to all resources to prevent
	// browsers from using cached data of a previous version, but still have
	// long lived max age values.
	CacheBust string `json:"cacheBust"`
}

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

type LobbyCreatePageData

type LobbyCreatePageData struct {
	*BasePageConfig
	config.LobbySettingDefaults
	game.SettingBounds

	Translation translations.Translation
	Locale      string
	Errors      []string
	Languages   map[string]string
}

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

type SSRHandler added in v0.8.5

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

func NewHandler added in v0.8.5

func NewHandler(cfg *config.Config) (*SSRHandler, error)

func (*SSRHandler) SetupRoutes added in v0.8.5

func (handler *SSRHandler) SetupRoutes(router chi.Router)

SetupRoutes registers the official webclient endpoints with the http package.

Jump to

Keyboard shortcuts

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